laser.measles.compartmental.components.process_importation_pressure
laser.measles.compartmental.components.process_importation_pressure
Component for simulating the importation pressure in the compartmental model.
laser.measles.compartmental.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 into the exposed (E) compartment each daily tick.
Note
Unlike the ABM and biweekly models which move S→I, the compartmental model moves imported cases S→E, letting them progress through the latent period.
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). 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.compartmental.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.compartmental.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 exposed 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