hpvsim.population module¶
Defines functions for making the population.
- make_people(sim, popdict=None, reset=False, verbose=None, use_age_data=True, sex_ratio=0.5, dt_round_age=True, microstructure=None, age_data=None, pop_trend=None, pop_age_trend=None, **kwargs)[source]¶
Make the people for the simulation.
Usually called via
hpvsim.sim.Sim.initialize()
.- Parameters:
sim (Sim) – the simulation object; population parameters are taken from the sim object
popdict (any) – if supplied, use this population dictionary instead of generating a new one; can be a dict or People object
reset (bool) – whether to force population creation even if self.popdict/self.people exists
verbose (bool) – level of detail to print
use_age_data (bool) –
sex_ratio (bool) –
dt_round_age (bool) – whether to round people’s ages to the nearest timestep (default true)
- Returns:
people
- Return type:
people (People)
- make_contacts(lno=None, tind=None, partners=None, current_partners=None, ages=None, debuts=None, is_female=None, is_active=None, mixing=None, layer_probs=None, f_cross_layer=None, m_cross_layer=None, durations=None, acts=None, age_act_pars=None, cluster=None, add_mixing=None)[source]¶
Make contacts for a single layer as an edgelist. This will select sexually active male partners for sexually active females using age structure if given.