@@ -221,15 +221,17 @@ def helper_warmup(warm_up_period):
221
221
)
222
222
223
223
# Check that the first interval audit entry with no warm-up has time and
224
- # results of 0
224
+ # no queue or wait time. However, as our first patient arrives at time 0,
225
+ # we do expect to have utilisation over 0.
225
226
first_interval = results_none ['interval_audit' ].iloc [0 ]
226
227
assert first_interval ['simulation_time' ] == 0 , (
227
228
'With no warm-up, expect first entry in interval audit to be ' +
228
229
f'at time 0, but it was at time { first_interval ['simulation_time' ]} .'
229
230
)
230
- assert first_interval ['utilisation' ] == 0 , (
231
+ assert first_interval ['utilisation' ] > 0 , (
231
232
'With no warm-up, expect first entry in interval audit to ' +
232
- f'have 0 utilisation, but it was { first_interval ['utilisation' ]} .'
233
+ 'have utilisation greater than 0 (as first patient arrives at time ' +
234
+ f'0), but utilisation was { first_interval ['utilisation' ]} .'
233
235
)
234
236
assert first_interval ['queue_length' ] == 0 , (
235
237
'With no warm-up, expect first entry in interval audit to ' +
@@ -242,6 +244,16 @@ def helper_warmup(warm_up_period):
242
244
f'{ first_interval ['running_mean_wait_time' ]} .'
243
245
)
244
246
247
+ # Check that first interval audit entry with a warm-up has time 500
248
+ # (matching length of warm-up period) - and so ensuring the first entry
249
+ # in the interval audit, which occurs at the end of the warm-up period,
250
+ # has not been deleted.
251
+ first_interval_warmup = results_warmup ['interval_audit' ].iloc [0 ]
252
+ assert first_interval_warmup ['simulation_time' ] == 500 , (
253
+ 'With warm-up of 500, expect first entry in interval audit to be ' +
254
+ f'at time 500, but it was at time { first_interval ['simulation_time' ]} .'
255
+ )
256
+
245
257
246
258
def test_arrivals ():
247
259
"""
0 commit comments