Model
Model(run_number, config)Discrete-event simulation model for generating patient calls.
The model creates one call-generation process per patient category and records generated patients during a single simulation run.
Methods
| Name | Description |
|---|---|
| generate_patients | Generate patients for a given category indefinitely. |
| request_ambulance | Simulate ambulance response. |
| run | Run the simulation model. |
generate_patients
Model.generate_patients(dist, category)Generate patients for a given category indefinitely.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dist | Distribution | Inter-arrival time distribution for the patient category. | required |
| category | str | Response category label, e.g., “C1”. | required |
request_ambulance
Model.request_ambulance(patient)Simulate ambulance response.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| patient | Patient | Patient requesting ambulance transport. | required |
run
Model.run()Run the simulation model.
Starts one patient-generation process for each category and runs the simulation until the configured run length.