laser.measles.abm.components.process_importation_pressure
laser.measles.abm.components.process_importation_pressure
laser.measles.abm.components.process_importation_pressure.ImportationPressureParams
Bases: BaseModel
Parameters for the importation pressure component.
Importation pressure simulates external case introductions from outside the modeled population (e.g., international travel, cross-border movement), seeding infections into susceptible individuals each tick.
Note
Imported cases are drawn from the total population
(binomial(population, rate)), but only susceptible individuals
are actually infected. When the number of drawn imports exceeds the
available susceptibles in a patch, the excess is discarded. This means
the effective importation rate decreases as population immunity
increases.
Attributes:
| Name | Type | Description |
|---|---|---|
crude_importation_rate |
float | list[float] | dict[str, float]
|
Yearly importation rate per 1,000 total population (not per susceptible). Three forms are accepted:
|
importation_start |
int
|
Day on which importation begins (inclusive). The model
converts this to ticks internally, so always supply days regardless of
model type. Default |
importation_end |
int
|
Day on which importation ends (inclusive). Use |
Examples:
Uniform low background pressure across all patches::
1 | |
Disable importation entirely::
1 | |
Per-patch sequence (one entry per patch, aligned to scenario row order)::
1 2 3 4 | |
Sparse dict — only named patches receive importation; all others get 0.0::
1 2 3 4 | |
Numpy array input (accepted and converted to list internally)::
1 2 3 4 | |
Time-windowed importation active only during the first year (days 0-364)::
1 2 3 4 5 | |
Metro-only importation for the first year, then stop::
1 2 3 4 5 | |
laser.measles.abm.components.process_importation_pressure.ImportationPressureProcess(model, verbose=False, params=None)
Bases: BasePhase
Component for simulating the importation pressure in the model.
This component handles the simulation of disease importation into the population. It processes: - Importation of cases based on crude importation rate - Time-windowed importation (start/end times) - Population updates: Moves individuals from susceptible to infected state
Parameters
model : object The simulation model containing nodes, states, and parameters verbose : bool, default=False Whether to print verbose output during simulation params : Optional[ImportationPressureParams], default=None Component-specific parameters. If None, will use default parameters
Notes
- Importation rates are calculated per year
- Importation is limited to the susceptible population
- All state counts are ensured to be non-negative