tlo.methods.hiv module

The HIV Module Overview: HIV infection —> AIDS onset Event (defined by the presence of AIDS symptoms) –> AIDS Death Event Testing is spontaneously taken-up and can lead to accessing intervention services (ART, VMMC, PrEP). AIDS symptoms can also lead to care-seeking and there is routine testing for HIV at all non-emergency Generic HSI

events.

Persons can be on ART -
  • with viral suppression: when the person with not develop AIDS, or if they have already, it is relieved and they

    will not die of AIDS; and the person is not infectious

  • without viral suppression: when there is no benefit in avoiding AIDS and infectiousness is unchanged.

Maintenance on ART and PrEP is re-assessed at periodic ‘Decision Events’, at which is it is determined if the person

will attend the “next” HSI for continuation of the service; and if not, they are removed from that service and “stop treatment”. If a stock-out or non-availability of health system resources prevent treatment continuation, the person “stops treatment”. Stopping treatment leads to a new AIDS Event being scheduled. Persons can restart treatment. If a person has developed AIDS, starts treatment and then defaults from treatment, their ‘original’ AIDS Death Event will still occur.

If PrEP is not available due to limitations in the HealthSystem, the person defaults to not being on PrEP. # Things to note:

  • Need to incorporate testing for HIV at first ANC appointment (as it does in generic HSI)

  • Need to incorporate testing for infants born to HIV-positive mothers (currently done in on_birth here).

  • Need to incorporate cotrim for infants born to HIV-positive mothers (not done here)

  • Cotrimoxazole is not included - either in effect of consumption of the drug (because the effect is not known).

  • Calibration has not been done: most things look OK - except HIV-AIDS deaths

class Hiv(name=None, resourcefilepath=None, run_with_checks=False)[source]

The HIV Disease Module

Bases: tlo.core.Module

PARAMETERS:

Item

Type

Description

time_inf

DATA_FRAME

prob of time since infection for baseline adult pop

art_coverage

DATA_FRAME

coverage of ART at baseline

fraction_of_those_infected_that_have_aids_at_initiation

REAL

Fraction of persons living with HIV at baseline that have developed AIDS

testing_coverage_male

REAL

proportion of adult male population tested

testing_coverage_female

REAL

proportion of adult female population tested

beta

REAL

Transmission rate

prob_mtct_untreated

REAL

Probability of mother to child transmission

prob_mtct_treated

REAL

Probability of mother to child transmission, mother on ART

prob_mtct_incident_preg

REAL

Probability of mother to child transmission, mother infected during pregnancy

monthly_prob_mtct_bf_untreated

REAL

Probability of mother to child transmission during breastfeeding

monthly_prob_mtct_bf_treated

REAL

Probability of mother to child transmission, mother infected during breastfeeding

rr_fsw

REAL

Relative risk of HIV with female sex work

rr_circumcision

REAL

Relative risk of HIV with circumcision

rr_rural

REAL

Relative risk of HIV in rural location

rr_windex_poorer

REAL

Relative risk of HIV with wealth level poorer

rr_windex_middle

REAL

Relative risk of HIV with wealth level middle

rr_windex_richer

REAL

Relative risk of HIV with wealth level richer

rr_windex_richest

REAL

Relative risk of HIV with wealth level richest

rr_sex_f

REAL

Relative risk of HIV if female

rr_age_gp20

REAL

Relative risk of HIV if age 20-24 compared with 15-19

rr_age_gp25

REAL

Relative risk of HIV if age 25-29

rr_age_gp30

REAL

Relative risk of HIV if age 30-34

rr_age_gp35

REAL

Relative risk of HIV if age 35-39

rr_age_gp40

REAL

Relative risk of HIV if age 40-44

rr_age_gp45

REAL

Relative risk of HIV if age 45-49

rr_age_gp50

REAL

Relative risk of HIV if age 50+

rr_edlevel_primary

REAL

Relative risk of HIV with primary education

rr_edlevel_secondary

REAL

Relative risk of HIV with secondary education

rr_edlevel_higher

REAL

Relative risk of HIV with higher education

rr_behaviour_change

REAL

Relative risk of HIV with behaviour modification

proportion_reduction_in_risk_of_hiv_aq_if_on_prep

REAL

Proportion reduction in risk of HIV acquisition if on PrEP. 0 for no efficacy; 1.0 for perfect efficacy.

mean_months_between_aids_and_death

REAL

Mean number of months (distributed exponentially) for the time between AIDS and AIDS Death

mean_months_between_aids_and_death_infant

REAL

Mean number of months for the time between AIDS and AIDS Death for infants

infection_to_death_weibull_shape_1519

REAL

Shape parameter for Weibull describing time between infection and death for 15-19 yo (units: years)

infection_to_death_weibull_shape_2024

REAL

Shape parameter for Weibull describing time between infection and death for 20-24 yo (units: years)

infection_to_death_weibull_shape_2529

REAL

Shape parameter for Weibull describing time between infection and death for 25-29 yo (units: years)

infection_to_death_weibull_shape_3034

REAL

Shape parameter for Weibull describing time between infection and death for 30-34 yo (units: years)

infection_to_death_weibull_shape_3539

REAL

Shape parameter for Weibull describing time between infection and death for 35-39 yo (units: years)

infection_to_death_weibull_shape_4044

REAL

Shape parameter for Weibull describing time between infection and death for 40-44 yo (units: years)

infection_to_death_weibull_shape_4549

REAL

Shape parameter for Weibull describing time between infection and death for 45-49 yo (units: years)

infection_to_death_weibull_scale_1519

REAL

Scale parameter for Weibull describing time between infection and death for 15-19 yo (units: years)

infection_to_death_weibull_scale_2024

REAL

Scale parameter for Weibull describing time between infection and death for 20-24 yo (units: years)

infection_to_death_weibull_scale_2529

REAL

Scale parameter for Weibull describing time between infection and death for 25-29 yo (units: years)

infection_to_death_weibull_scale_3034

REAL

Scale parameter for Weibull describing time between infection and death for 30-34 yo (units: years)

infection_to_death_weibull_scale_3539

REAL

Scale parameter for Weibull describing time between infection and death for 35-39 yo (units: years)

infection_to_death_weibull_scale_4044

REAL

Scale parameter for Weibull describing time between infection and death for 40-44 yo (units: years)

infection_to_death_weibull_scale_4549

REAL

Scale parameter for Weibull describing time between infection and death for 45-49 yo (units: years)

art_default_to_aids_mean_years

REAL

Mean years between when a person (any change) stops being on treatment to when AIDS is onset (if the absence of resuming treatment).

mean_survival_for_infants_infected_prior_to_birth

REAL

Exponential rate parameter for mortality in infants who are infected before birth

infection_to_death_infant_infection_after_birth_weibull_scale

REAL

Weibull scale parameter for mortality in infants who are infected after birth

infection_to_death_infant_infection_after_birth_weibull_shape

REAL

Weibull shape parameter for mortality in infants who are infected after birth

prob_spontaneous_test_12m

REAL

Probability that a person will seek HIV testing per 12 month period.

prob_start_art_after_hiv_test

REAL

Probability that a person will start treatment, if HIV-positive, following testing

rr_start_art_if_aids_symptoms

REAL

Relative probability of a person starting treatment if they have aids_symptoms compared to ifthey do not.

prob_behav_chg_after_hiv_test

REAL

Probability that a person will change risk behaviours, if HIV-negative, following testing

prob_prep_for_fsw_after_hiv_test

REAL

Probability that a FSW will start PrEP, if HIV-negative, following testing

prob_circ_after_hiv_test

REAL

Probability that a male will be circumcised, if HIV-negative, following testing

probability_of_being_retained_on_prep_every_3_months

REAL

Probability that someone who has initiated on prep will attend an appointment and be on prep for the next 3 months, until the next appointment.

probability_of_being_retained_on_art_every_6_months

REAL

Probability that someone who has initiated on treatment will attend an appointment and be on treatment for next 6 months, until the next appointment.

probability_of_seeking_further_art_appointment_if_drug_not_available

REAL

Probability that a person who ‘should’ be on art will seek another appointment (the following day and try for each of the next 7 days) if drugs were not available.

probability_of_seeking_further_art_appointment_if_appointment_not_available

REAL

Probability that a person who ‘should’ be on art will seek another appointment if the health-system has not been able to provide them with an appointment

vls_m

REAL

Rates of viral load suppression males

vls_f

REAL

Rates of viral load suppression males

vls_child

REAL

Rates of viral load suppression in children 0-14 years

prep_start_year

REAL

Year from which PrEP is available

ART_age_cutoff_young_child

INT

Age cutoff for ART regimen for young children

ART_age_cutoff_older_child

INT

Age cutoff for ART regimen for older children

PROPERTIES:

Item

Type

Description

hv_inf

BOOL

Is person currently infected with HIV (NB. AIDS status is determined by prescence of the AIDS Symptom.

hv_art

CATEGORICAL

ART status of person, whether on ART or not; and whether viral load is suppressed or not if on ART.. Possible values are: [not, on_VL_suppressed, on_not_VL_suppressed, ]

hv_is_on_prep

BOOL

Whether the person is currently taking and receiving a protective effect from Pre-Exposure Prophylaxis.

hv_behaviour_change

BOOL

Has this person been exposed to HIV prevention counselling following a negative HIV test result

hv_diagnosed

BOOL

Knows that they are HIV+: i.e. is HIV+ and tested as HIV+

hv_number_tests

INT

Number of HIV tests ever taken

hv_last_test_date

DATE

Date of last HIV test

hv_date_inf

DATE

Date infected with HIV

Class attributes:

ADDITIONAL_DEPENDENCIES : {‘NewbornOutcomes’}

CAUSES_OF_DEATH : {‘AIDS’: <tlo.methods.causes.Cause object at 0x7ff868fa8fd0>}

CAUSES_OF_DISABILITY : {‘AIDS’: <tlo.methods.causes.Cause object at 0x7ff86a1010a0>}

INIT_DEPENDENCIES : {‘Demography’, ‘HealthSystem’, ‘SymptomManager’, ‘Lifestyle’}

METADATA : {<Metadata.DISEASE_MODULE: 1>, <Metadata.USES_SYMPTOMMANAGER: 2>, <Metadata.USES_HEALTHBURDEN: 4>, <Metadata.USES_HEALTHSYSTEM: 3>}

OPTIONAL_INIT_DEPENDENCIES : {‘HealthBurden’}

Functions (defined or overridden in class Hiv):

__init__(name=None, resourcefilepath=None, run_with_checks=False)[source]

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters

name – the name to use for this module. Defaults to the concrete subclass’ name.

read_parameters(data_folder)[source]
    1. Reads the ResourceFiles

    1. Declare the Symptoms

pre_initialise_population()[source]
  • Establish the Linear Models

initialise_population(population)[source]

Set our property values for the initial population.

initialise_baseline_prevalence(population)[source]

Assign baseline HIV prevalence, according to age, sex and key other variables (established in analysis of DHS data).

initialise_baseline_art(population)[source]

assign initial art coverage levels also assign hiv test properties if allocated ART

initialise_baseline_tested(population)[source]

assign initial hiv testing levels, only for adults all who have been allocated ART will already have property hv_number_tests=1 use the hiv testing coverage levels to assign any remaining hiv tests

initialise_simulation(sim)[source]
    1. Schedule the Main HIV Regular Polling Event

    1. Schedule the Logging Event

    1. Determine who has AIDS and impose the Symptoms ‘aids_symptoms’

    1. Schedule the AIDS onset events and AIDS death event for those infected already

    1. (Optionally) Schedule the event to check the configuration of all properties

    1. Define the DxTests

    1. Look-up and save the codes for consumables

on_birth(mother_id, child_id)[source]
  • Initialise our properties for a newborn individual;

  • schedule testing;

  • schedule infection during breastfeeding

on_hsi_alert(person_id, treatment_id)[source]
report_daly_values()[source]

Report DALYS for HIV, based on current symptomatic state of persons.

mtct_during_breastfeeding(mother_id, child_id)[source]

Compute risk of mother-to-child transmission and schedule HivInfectionDuringBreastFeedingEvent. If the child is breastfeeding currently, consider the time-until-infection assuming a constantly monthly risk of

transmission. If the breastfeeding has ceased by the time of the scheduled infection, then it will not run.

(This means that this event can be run at birth or at the time of the mother’s infection without the need for further polling etc.)

do_new_infection(person_id)[source]

Enact that this person is infected with HIV * Update their hv_inf status and hv_date_inf * Schedule the AIDS onset event for this person

get_time_from_infection_to_aids(person_id)[source]

Gives time between onset of infection and AIDS, returning a pd.DateOffset. For those infected prior to, or at, birth: (this is a draw from an exponential distribution) For those infected after birth but before reaching age 5.0 (this is drawn from a weibull distribution) For adults: (this is a drawn from a weibull distribution (with scale depending on age); * NB. It is further assumed that the time from aids to death is 18 months.

get_time_from_aids_to_death()[source]

Gives time between onset of AIDS and death, returning a pd.DateOffset. Assumes that the time between onset of AIDS symptoms and deaths is exponentially distributed.

do_when_hiv_diagnosed(person_id)[source]

Things to do when a person has been tested and found (newly) be be HIV-positive:. * Consier if ART should be initiated, and schedule HSI if so. The person should not yet be on ART.

stops_treatment(person_id)[source]

Helper function that is called when someone stops being on ART. Sets the flag for ART status. If the person was already on ART, it schedules a new AIDSEvent

per_capita_testing_rate()[source]

this calculates the numbers of hiv tests performed in each time period it looks at the cumulative number of tests ever performed and subtracts the number calculated at the last time point values are converted to per capita testing rates this function is called by the logger and can be called at any frequency

check_config_of_properties()[source]

check that the properties are currently configured correctly

class HivRegularPollingEvent(module)[source]

The HIV Regular Polling Events * Schedules persons becoming newly infected through horizontal transmission * Schedules who will present for voluntary (“spontaneous”) testing

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Functions (defined or overridden in class HivRegularPollingEvent):

__init__(module)[source]

Create a new regular event.

Parameters
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

apply(population)[source]

Apply this event to the population.

Must be implemented by subclasses.

Parameters

population – the current population

class HivInfectionEvent(module, person_id)[source]

This person will become infected. * Do the infection process * Check for onward transmission through MTCT if the infection is to a mother who is currently breastfeeding.

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HivInfectionEvent):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class HivInfectionDuringBreastFeedingEvent(module, person_id)[source]

This person will become infected during breastfeeding * Do the infection process

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HivInfectionDuringBreastFeedingEvent):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class HivAidsOnsetEvent(module, person_id)[source]

This person has developed AIDS. * Update their symptomatic status * Record the date at which AIDS onset * Schedule the AIDS death

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HivAidsOnsetEvent):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class HivAidsDeathEvent(module, person_id)[source]

Causes someone to die of AIDS, if they are not VL suppressed on ART.

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HivAidsDeathEvent):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class Hiv_DecisionToContinueOnPrEP(module, person_id)[source]

Helper event that is used to ‘decide’ if someone on PrEP should continue on PrEP. This event is scheduled by ‘HSI_Hiv_StartOrContinueOnPrep’ 3 months after it is run.

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class Hiv_DecisionToContinueOnPrEP):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class Hiv_DecisionToContinueTreatment(module, person_id)[source]

Helper event that is used to ‘decide’ if someone on Treatment should continue on Treatment. This event is scheduled by ‘HSI_Hiv_StartOrContinueTreatment’ 6 months after it is run.

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class Hiv_DecisionToContinueTreatment):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id)[source]

Apply this event to the given person.

Must be implemented by subclasses.

Parameters

person_id – the person the event happens to

class HSI_Hiv_TestAndRefer(module, person_id, do_not_refer_if_neg=False, suppress_footprint=False)[source]

The is the Test-and-Refer HSI. Individuals may seek an HIV test at any time. From this, they can be referred on to other services. This event is scheduled by:

  • the main event poll,

  • when someone presents for any care through a Generic HSI.

  • when an infant is born to an HIV-positive mother

Following the test, they may or may not go on to present for uptake an HIV service: ART (if HIV-positive), VMMC (if HIV-negative and male) or PrEP (if HIV-negative and a female sex worker). If this event is called within another HSI, it may be desirable to limit the functionality of the HSI: do this using the arguments:

  • do_not_refer_if_neg=False : if the person is HIV-neg they will not be referred to VMMC or PrEP

  • suppress_footprint=True : the HSI will not have any footprint

Bases: tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_Hiv_TestAndRefer):

__init__(module, person_id, do_not_refer_if_neg=False, suppress_footprint=False)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Do the testing and referring to other services

class HSI_Hiv_Circ(module, person_id)[source]

Bases: tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_Hiv_Circ):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Do the circumcision for this man

class HSI_Hiv_StartOrContinueOnPrep(module, person_id)[source]

Bases: tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_Hiv_StartOrContinueOnPrep):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

Start PrEP for this person; or continue them on PrEP for 3 more months

never_ran(*args, **kwargs)[source]

This is called if this HSI was never run. Default the person to being off PrEP

class HSI_Hiv_StartOrContinueTreatment(module, person_id)[source]

Bases: tlo.methods.healthsystem.HSI_Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class HSI_Hiv_StartOrContinueTreatment):

__init__(module, person_id)[source]

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)[source]

This is a Health System Interaction Event - start or continue HIV treatment for 6 more months

do_at_initiation(person_id)[source]

Things to do when this the first appointment ART

do_at_continuation(person_id)[source]

Things to do when the person is already on ART

determine_vl_status(sex_of_person, age_of_person)[source]

Helper function to determine the VL status that the person will have. Return what will be the status of “hv_art”

get_drugs(age_of_person)[source]

Helper function to get the ART according to the age of the person being treated. Returns bool to indicate whether drugs were available

consider_tb(person_id)[source]
never_ran()[source]

This is called if this HSI was never run. * Default the person to being off ART. * Determine if they will re-seek care themselves in the future:

class HivLoggingEvent(module)[source]

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Functions (defined or overridden in class HivLoggingEvent):

__init__(module)[source]

Log Current status of the population, every year

apply(population)[source]

Apply this event to the population.

Must be implemented by subclasses.

Parameters

population – the current population

class HivCheckPropertiesEvent(module)[source]

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Functions (defined or overridden in class HivCheckPropertiesEvent):

__init__(module)[source]

Create a new regular event.

Parameters
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

apply(population)[source]

Apply this event to the population.

Must be implemented by subclasses.

Parameters

population – the current population

class DummyHivModule(name=None, hiv_prev=0.1)[source]

Dummy HIV Module - it’s only job is to create and maintain the ‘hv_inf’ property. This can be used in test files.

Bases: tlo.core.Module

PROPERTIES:

Item

Type

Description

hv_inf

BOOL

DUMMY version of the property for hv_inf

Class attributes:

ALTERNATIVE_TO : {‘Hiv’}

INIT_DEPENDENCIES : {‘Demography’}

Functions (defined or overridden in class DummyHivModule):

__init__(name=None, hiv_prev=0.1)[source]

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters

name – the name to use for this module. Defaults to the concrete subclass’ name.

read_parameters(data_folder)[source]

Read parameter values from file, if required.

Must be implemented by subclasses.

Parameters

data_folder – path of a folder supplied to the Simulation containing data files. Typically modules would read a particular file within here.

initialise_population(population)[source]

Set our property values for the initial population.

Must be implemented by subclasses.

This method is called by the simulation when creating the initial population, and is responsible for assigning initial values, for every individual, of those properties ‘owned’ by this module, i.e. those declared in its PROPERTIES dictionary.

TODO: We probably need to declare somehow which properties we ‘read’ here, so the simulation knows what order to initialise modules in!

Parameters

population – the population of individuals

initialise_simulation(sim)[source]

Get ready for simulation start.

Must be implemented by subclasses.

This method is called just before the main simulation loop begins, and after all modules have read their parameters and the initial population has been created. It is a good place to add initial events to the event queue.

on_birth(mother, child)[source]

Initialise our properties for a newborn individual.

Must be implemented by subclasses.

This is called by the simulation whenever a new person is born.

Parameters
  • mother – the mother for this child (can be -1 if the mother is not identified).

  • child – the new child