ConstantPopProcess#
- class ConstantPopProcess(model, verbose=False, params=None)[source]#
Bases:
BaseConstantPopProcessA component to handle the birth events in a model with constant population - that is, births == deaths.
- model#
The model instance containing population and parameters.
- verbose#
Flag to enable verbose output. Default is False.
- Type:
bool
- initializers#
List of initializers to be called on birth events.
- Type:
list
Initialize the Births component.
- Parameters:
model (
ABMModel) – The model object which must have a population attribute.verbose (
bool) – If True, enables verbose output. Defaults to False.params (
ConstantPopParams|None) – Component parameters. If None, uses model.params.
- __call__(model, tick)[source]#
Adds new agents to each patch based on expected daily births calculated from CBR. Calls each of the registered initializers for the newborns.
- Parameters:
model – The simulation model containing patches, population, and parameters.
tick – The current time step in the simulation.
- Return type:
None- Returns:
None
This method performs the following steps:
Draw a random set of indices, or size size “number of births” from the population,