Skip to content

laser.measles.abm.components.process_disease

laser.measles.abm.components.process_disease

Component defining the DiseaseProcess, which simulates the disease progression in the ABM model with MCV1.

laser.measles.abm.components.process_disease.DiseaseParams

Bases: BaseModel

Parameters for ABM disease progression (infectious duration distribution).

Example:

1
2
3
4
5
```python
from laser.measles.abm.components.process_disease import DiseaseParams

params = DiseaseParams()
```

laser.measles.abm.components.process_disease.DiseaseParams.inf_scale property

Gamma distribution scale parameter derived from inf_mean and inf_sigma.

laser.measles.abm.components.process_disease.DiseaseParams.inf_shape property

Gamma distribution shape parameter derived from inf_mean and inf_sigma.

laser.measles.abm.components.process_disease.DiseaseProcess(model, verbose=False, params=None)

Bases: BaseComponent

This component provides disease progression (E->I->R) It is used to update the infectious timers and the exposed timers.

Example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
```python
from laser.measles.scenarios.synthetic import single_patch_scenario
from laser.measles.abm import ABMModel, ABMParams
from laser.measles.abm import components
from laser.measles import create_component

scenario = single_patch_scenario(population=50_000, mcv1_coverage=0.85)
params = ABMParams(num_ticks=365, seed=42, start_time="2000-01")
model = ABMModel(scenario, params)
model.add_component(create_component(components.DiseaseProcess, components.DiseaseParams()))
```

laser.measles.abm.components.process_disease.nb_gamma_update(count, timers_0, timers_1, state, shape, scale, flow, patch_id)

Numba compiled function to check and update exposed timers for the population in parallel.

laser.measles.abm.components.process_disease.nb_state_update(count, timers, state, new_state, flow, patch_id)

Numba compiled function to check and update infection timers for the population in parallel.

laser.measles.abm.components.process_disease.numpy_gamma_update(count, timers_0, timers_1, state, shape, scale, flow, patch_id)

Numpy function to check and update exposed timers for the population.

laser.measles.abm.components.process_disease.numpy_state_update(count, timers, state, new_state, flow, patch_id)

Numpy function to check and update infection timers for the population.