laser.measles.biweekly.components.process_importation_pressure
laser.measles.biweekly.components.process_importation_pressure
laser.measles.biweekly.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), moving susceptible individuals directly to infected (I) each biweekly tick.
Attributes:
| Name | Type | Description |
|---|---|---|
crude_importation_rate |
float | list[float] | dict[str, float]
|
Yearly importation rate per 1,000 population. Three forms are accepted:
|
importation_start |
int
|
Day on which importation begins (inclusive). Supply in
days; the model converts to biweekly ticks internally. Default |
importation_end |
int
|
Day on which importation ends (inclusive). Supply in days;
the model converts to biweekly ticks internally. 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.biweekly.components.process_importation_pressure.ImportationPressureParams.validate_importation_end(v, info)
classmethod
Validate that importation_end is greater than importation_start when not -1.
laser.measles.biweekly.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
laser.measles.biweekly.components.process_importation_pressure.ImportationPressureProcess.__call__(model, tick)
Process importation pressure for the current tick.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
The simulation model instance |
required | |
tick
|
int
|
The current simulation tick |
required |