laser.measles.biweekly.model
laser.measles.biweekly.model
A class to represent the biweekly model.
laser.measles.biweekly.model.BiweeklyModel(scenario, params, name='biweekly')
Bases: BaseLaserModel
A class to represent the biweekly model.
Args:
1 2 3 | |
Notes:
1 2 3 4 5 6 7 | |
Initialize the disease model with the given scenario and parameters.
Args:
1 2 3 | |
Returns:
1 | |
laser.measles.biweekly.model.BiweeklyModel.__call__(model, tick)
Updates the model for the next tick.
Args:
1 2 | |
Returns:
1 | |
laser.measles.biweekly.model.BiweeklyModel.infect(indices, num_infected)
Infects the given nodes with the given number of infected individuals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indices
|
int | ndarray
|
The indices of the nodes to infect. |
required |
num_infected
|
int | ndarray
|
The number of infected individuals to infect. |
required |
laser.measles.biweekly.model.BiweeklyModel.recover(indices, num_recovered)
Recovers the given nodes with the given number of recovered individuals. Moves individuals from Infected to Recovered compartment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indices
|
int | ndarray
|
The indices of the nodes to recover. |
required |
num_recovered
|
int | ndarray
|
The number of recovered individuals. |
required |