Births#

class Births(pars=None, metadata=None, **kwargs)[source]#

Bases: Demographics

Create births based on rates, rather than based on pregnancy

Attributes

now

Return the current time, i.e. the time vector at the current timestep.

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

Methods

init_pre(sim)[source]#

Initialize with sim information

standardize_birth_data()[source]#

Standardize/validate birth rates - handled in an external file due to shared functionality

get_births()[source]#

Extract the right birth rates to use and translate it into a number of people to add.

add_births()[source]#

Add n_new births to each state in the sim