stisim.networks module#
Define sexual network for STI transmission.
Overview:
Risk groups: agents are randomly assigned into one of 3 main risk groups:
0 = marry and remain married to a single partner throughout their lifetime
1 = marry and then divorce or who have concurrent partner(s) during their marriage
2 = never marry
In addition, a proportion of each of the groups above engages in sex work.
- class stisim.networks.StructuredSexual(pars=None, key_dict=None, condom_data=None, name=None, **kwargs)[source]#
Bases:
SexualNetwork
Structured sexual network
- init_pre(sim)[source]#
Perform initialization steps
This method is called once, as part of initializing a Sim. Note: after initialization, initialized=False until init_vals() is called (which is after distributions are initialized).
- set_network_states(upper_age=None)[source]#
Many network states depend on properties of people – e.g. MSM depends on being male, age of debut varies by sex and over time, and participation rates vary by age. Each time states are dynamically grown, this function should be called to set the network states that depend on other states.
- set_concurrency(upper_age=None)[source]#
Assign each person a preferred number of simultaneous partners
- net_beta(disease_beta=None, uids=None, disease=None)[source]#
Calculate the beta for the given disease and network
- class stisim.networks.FastStructuredSexual(**kwargs)[source]#
Bases:
StructuredSexual
- class stisim.networks.AgeMatchedMSM(**kwargs)[source]#
Bases:
StructuredSexual
- class stisim.networks.AgeApproxMSM(**kwargs)[source]#
Bases:
StructuredSexual