TransmissionProcess#
- class TransmissionProcess(model, verbose=False, params=None)[source]#
Bases:
BasePhaseA component to model the transmission of disease in a population.
Initializes the transmission object.
- Parameters:
model – The model object that contains the patches and parameters.
verbose (
bool) – If True, enables verbose output. Defaults to False.
- model#
The model object passed during initialization.
The model’s patches are extended with the following properties:
‘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.
- __call__(model, tick)[source]#
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:
model (object) – The model object containing the population, patches, and parameters.
tick (int) – The current time step in the simulation.
- Return type:
None- Returns:
None
- property mixing: ndarray#
Returns the mixing matrix, initializing if necessary