## Model


Discrete-event simulation model for generating patient calls.


Usage

``` python
Model(
    run_number,
    config,
)
```


The model creates one call-generation process per patient category and records generated patients during a single simulation run.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialise the simulation model. |
| [generate_patients()](#generate_patients) | Generate patients. |
| [request_ambulance()](#request_ambulance) | Simulate ambulance response. |
| [run()](#run) | Run the simulation model. |
| [warm_up()](#warm_up) | Reset results collection after the warm-up period. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Initialise the simulation model.


Usage

``` python
__init__(run_number, config)
```


##### Parameters


`run_number: int`  
Simulation run identifier.

`config: object`  
Configuration object containing model parameters.


------------------------------------------------------------------------


#### generate_patients()


Generate patients.


Usage

``` python
generate_patients()
```


------------------------------------------------------------------------


#### request_ambulance()


Simulate ambulance response.


Usage

``` python
request_ambulance(patient)
```


##### Parameters


`patient: Patient`  
Patient requesting ambulance transport.


------------------------------------------------------------------------


#### run()


Run the simulation model.


Usage

``` python
run()
```


Starts one patient-generation process for each category and runs the simulation until the configured run length.


------------------------------------------------------------------------


#### warm_up()


Reset results collection after the warm-up period.


Usage

``` python
warm_up()
```
