Skip to content

laser.measles.biweekly.components.process_infection

laser.measles.biweekly.components.process_infection

laser.measles.biweekly.components.process_infection.InfectionParams

Bases: BaseInfectionParams

Parameters specific to the infection process component.

laser.measles.biweekly.components.process_infection.InfectionProcess(model, verbose=False, params=None)

Bases: BaseInfectionProcess

Component for simulating the spread of infection in the model.

This class implements a stochastic infection process that models disease transmission between different population groups. It uses a seasonally-adjusted transmission rate and accounts for mixing between different population groups.

The infection process follows these steps:

  1. Calculates expected new infections based on:

  2. Base transmission rate (beta)

  3. Seasonal variation
  4. Population mixing matrix
  5. Current number of infected individuals

  6. Converts expected infections to probabilities

  7. Samples actual new infections from a binomial distribution
  8. Updates population states:

  9. Moves current infected to recovered (configurable recovery period)

  10. Adds new infections to infected population
  11. Removes new infections from susceptible population
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 a configurable recovery period and seasonal transmission rate that varies sinusoidally over time.