laser.measles.abm.components.process_infection
laser.measles.abm.components.process_infection
Component defining the InfectionProcess, which orchestrates the transmission and disease progression of measles in a population.
laser.measles.abm.components.process_infection.InfectionParams
Bases: BaseInfectionParams
Combined parameters for ABM transmission and disease processes.
Spatial mixing strength is controlled via distance_exponent and
mixing_scale, which configure the default
:class:~laser.measles.mixing.gravity.GravityMixing model used
internally. The model sets the patch scenario on the mixer automatically
at initialisation.
.. note::
1 2 3 4 5 6 7 8 | |
Example::
1 2 3 4 5 6 7 | |
laser.measles.abm.components.process_infection.InfectionParams.disease_params
property
Extract disease-specific parameters.
laser.measles.abm.components.process_infection.InfectionParams.transmission_params
property
Extract transmission-specific parameters.
laser.measles.abm.components.process_infection.InfectionProcess(model, verbose=False, params=None)
Bases: BaseInfectionProcess
Combined infection process that orchestrates transmission and disease progression.
This component provides a unified interface for both disease transmission (handled by TransmissionProcess) and disease progression through states (handled by DiseaseProcess), similar to the biweekly model's InfectionProcess but for agent-based modeling.
Initialize the combined infection process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ABMModel
|
The model object that contains the patches and parameters. |
required |
verbose
|
bool
|
If True, enables verbose output. Defaults to False. |
False
|
params
|
InfectionParams | None
|
Combined parameters for both transmission and disease processes. |
None
|
laser.measles.abm.components.process_infection.InfectionProcess.__call__(model, tick)
Execute both transmission and disease progression for the given tick.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
The model object containing the population, patches, and parameters. |
required | |
tick
|
int
|
The current time step in the simulation. |
required |
laser.measles.abm.components.process_infection.InfectionProcess.plot(fig=None)
Plot cases and incidence using the transmission component's plotting functionality.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fig
|
Figure | None
|
A Matplotlib Figure object to plot on. If None, a new figure is created. |
None
|