laser.measles.compartmental.components.process_infection
laser.measles.compartmental.components.process_infection
Component for simulating the SEIR infection process in the compartmental model.
laser.measles.compartmental.components.process_infection.InfectionParams
Bases: BaseInfectionParams
Parameters for the compartmental SEIR infection process.
Spatial mixing is configured via the mixer parameter. Any
:class:~laser.measles.mixing.base.BaseMixing subclass is accepted
(e.g. :class:~laser.measles.mixing.gravity.GravityMixing,
:class:~laser.measles.mixing.radiation.RadiationMixing).
The model sets the patch scenario on the mixer automatically at
initialisation, so passing scenario= to the mixer at construction
is not required.
Example::
1 2 3 4 5 6 7 | |
laser.measles.compartmental.components.process_infection.InfectionParams.basic_reproduction_number
property
Calculate R0 = beta / gamma
laser.measles.compartmental.components.process_infection.InfectionParams.gamma
property
Recovery rate from infection (1/infectious_period)
laser.measles.compartmental.components.process_infection.InfectionParams.incubation_period
property
Average incubation period in days
laser.measles.compartmental.components.process_infection.InfectionParams.infectious_period
property
Average infectious period in days
laser.measles.compartmental.components.process_infection.InfectionParams.sigma
property
Progression rate from exposed to infectious (1/exposure_period)
laser.measles.compartmental.components.process_infection.InfectionProcess(model, params=None, verbose=False)
Bases: BaseInfectionProcess
Component 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 : object The simulation model containing population states and parameters verbose : bool, default=False Whether to print detailed information during execution params : InfectionParams | None, default=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.