Repository navigation
v0.2.0 - 2026-10-23
Model now has arrivals varying by hour of day, resources varying according to shift patterns, which are adjusted for unavailability, meal break and restricted send per hour.
The results have improved - C1 and C2 times a bit higher, but still too quick.
Added
- Empirical: Add
build_empirical_configandEmpiricalRunner(moved fromambdes-private). - Restricted send:
- Add new attribute
restricted_send_scheduletoSimConfig, and a new methodcreate_permit_schedule()which will create a schedule based on ambulance schedule v.s., restricted send schedule. - In
Model, add permit schedule and initialise permit store. When request an ambulance, if using restricted send, the C2-C4 patients also have to request a permit first. The various capacity change methods have been amended so they can be used both for varying the ambulance pool and the permit pool. - Add new class
Dispatcherwhich ensures that patients have to get an ambulance and permit at the same time - else you have an issue where e.g., C4 gets a permit but waiting for an ambulance when C2 comes in. It should be synchronous.
- Add new attribute
- Tests: Add more tests for:
- Restricted send dispatch logic.
SimConfigpermit schedule.- Checking
patientstimings match the vidigi log. - Varying capacity with
CapacitySchedule. - Regression tests for
build_arrival_config.
- Resource reduction: Add
reduce_ambulanceswhich can applied to fixed number of ambulances or ambulance schedule schedule. - Outputs: Add all the times to
Patient, allowing greater exploration when looking at model results.
Changed
- Configuration:
- Just directly supply the number of ambulances, rather than expecting
SimConfigto calculate it from the resource hours. - Amend
build_arrival_configso can build by hour-weekday or just weekday. - Allow arrives and times to be a dict or path to JSON.
- Just directly supply the number of ambulances, rather than expecting
- Varying capacity:
- Switch from sampling capacity reduction at intervals to instead providing a schedule of resource levels.
- Moved varying capacity logic out of the model and into a new class
CapacitySchedule.
- Tests: Amend tests following refactoring changes.
- Model: Separate
Model.__init__()into several separate methods to make it easier to read and disentangle what is happening. - Documentation: Update following recent changes.
Fixed
- Upgrade pandas to resolve future warning.
- Fix for bug identified by
test_resource_released_at_deadline_stays_operational. When release and deadline coincide, we expect the unit to become available at the deadline and remain operational, but this was not happening, at that timepoint it would look like it disappeared. - Fixed bug in creation of
arrival_config. Previous approach summed by day then did mean. But this has changed to just a sum overall. As the current approach would not account for different arrival numbers per day.
