laser.measles.abm.components.process_importation
laser.measles.abm.components.process_importation
Importation components: periodically introduce new infections into a population during simulation.
Classes:
| Name | Description |
|---|---|
ImportationParams |
Pydantic schema for configuring importation cadence, count, time window, and patch targets. |
InfectRandomAgentsProcess |
Periodically infects a random subset of agents drawn from anywhere in the population. |
InfectAgentsInPatchProcess |
Periodically infects a fixed number of agents in each patch listed in |
Both process classes share the same __init__(model, params: ImportationParams | None = None) signature; if params is omitted, values are read from model.params for backward compatibility.
laser.measles.abm.components.process_importation.ImportationParams
Bases: BaseModel
Parameters specific to the importation process components.
Example:
1 2 3 4 5 | |
laser.measles.abm.components.process_importation.InfectAgentsInPatchProcess(model, params=None)
A component to update the infection timers of a population in a model.
Example:
1 2 3 4 5 6 7 8 9 10 11 | |
Initialize an InfectAgentsInPatchProcess instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ABMModel
|
The model object that contains the population. |
required |
params
|
ImportationParams | None
|
Optional importation configuration. When provided, this should
be an |
None
|
Attributes:
1 | |
Side Effects:
laser.measles.abm.components.process_importation.InfectAgentsInPatchProcess.__call__(model, tick)
Updates the infection timers for the population in the model.
Args:
1 2 | |
Returns:
1 | |
laser.measles.abm.components.process_importation.InfectAgentsInPatchProcess.plot(fig=None)
Nothing yet
laser.measles.abm.components.process_importation.InfectRandomAgentsProcess(model, params=None)
A component to update the infection timers of a population in a model.
Example:
1 2 3 4 5 6 7 8 9 10 11 | |
Initialize an InfectRandomAgentsProcess instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
ABMModel
|
The model object that contains the population. |
required |
params
|
ImportationParams | None
|
Optional importation configuration. If provided, this should be an
|
None
|
Attributes:
1 | |
Side Effects:
laser.measles.abm.components.process_importation.InfectRandomAgentsProcess.__call__(model, tick)
Updates the infection timers for the population in the model.
Args:
1 2 | |
Returns:
1 | |
laser.measles.abm.components.process_importation.InfectRandomAgentsProcess.plot(fig=None)
Nothing yet