InfectionProcess#
- class InfectionProcess(model, params=None, verbose=False)[source]#
Bases:
BaseInfectionProcessComponent for simulating SEIR disease progression with daily timesteps.
This class implements a stochastic SEIR infection process that models disease transmission and progression through compartments. It uses daily rates and accounts for mixing between different population groups.
The SEIR infection process follows these steps:
Calculate force of infection based on:
Base transmission rate (beta)
Seasonal variation
Population mixing matrix
Current number of infectious individuals
Stochastic transitions using binomial sampling:
S → E: New exposures based on force of infection
E → I: Progression from exposed to infectious
I → R: Recovery from infection
Update population states for all compartments
- Parameters:
model (
BaseLaserModel) – The simulation model containing population states and parametersverbose (
bool) – Whether to print detailed information during executionparams (
InfectionParams|None) – Component-specific parameters. If None, will use default parameters
Notes
The infection process uses daily rates and seasonal transmission that varies sinusoidally over time with a period of 365 days.
Initialize the component.
- Parameters:
model (
BaseLaserModel) – The model instance this component belongs to.verbose (
bool) – Whether to enable verbose output. Defaults to False.
- __call__(model, tick)[source]#
Execute component logic for a given simulation tick.
- Parameters:
model (
BaseLaserModel) – The model instance.tick (
int) – The current simulation tick.
- Return type:
None