Skip to content

laser.measles.abm.components.process_transmission

laser.measles.abm.components.process_transmission

Component defining the TransmissionProcess, which models the transmission of measles in a population.

laser.measles.abm.components.process_transmission.TransmissionParams

Bases: BaseModel

Parameters specific to the transmission process component.

laser.measles.abm.components.process_transmission.TransmissionParams.mu_underlying property

The mean of the underlying lognormal distribution.

laser.measles.abm.components.process_transmission.TransmissionParams.sigma_underlying property

The standard deviation of the underlying lognormal distribution.

laser.measles.abm.components.process_transmission.TransmissionProcess(model, verbose=False, params=None)

Bases: BasePhase

A component to model the transmission of disease in a population.

Initializes the transmission object.

Args:

1
2
model: The model object that contains the patches and parameters.
verbose (bool, optional): If True, enables verbose output. Defaults to False.

Attributes:

1
model: The model object passed during initialization.

The model's patches are extended with the following properties:

1
2
3
- 'cases': A vector property with length equal to the number of ticks, dtype is uint32.
- 'forces': A scalar property with dtype float32.
- 'incidence': A vector property with length equal to the number of ticks, dtype is uint32.

laser.measles.abm.components.process_transmission.TransmissionProcess.mixing property writable

Returns the mixing matrix, initializing if necessary

laser.measles.abm.components.process_transmission.TransmissionProcess.__call__(model, tick)

Simulate the transmission of measles for a given model at a specific tick.

This method updates the state of the model by simulating the spread of disease through the population and patches. It calculates the contagion, handles the migration of infections between patches, and updates the forces of infection based on the effective transmission rate and seasonality factors. Finally, it updates the infected state of the population.

Parameters:

1
2
model (object): The model object containing the population, patches, and parameters.
tick (int): The current time step in the simulation.

Returns:

1
None

laser.measles.abm.components.process_transmission.TransmissionProcess.infect(model, idx)

Infect a set of agents. Moves agents from S to E state and updates patch counters.

laser.measles.abm.components.process_transmission.nb_lognormal_update(states, patch_ids, susceptibilties, forces, etimers, count, exp_mu, exp_sigma, flow)

Numba compiled function to stochastically transmit infection to agents in parallel.

laser.measles.abm.components.process_transmission.numpy_lognormal_update(states, patch_ids, susceptibilties, forces, etimers, count, exp_mu, exp_sigma, flow)

Numpy function to stochastically transmit infection to agents.