Skip to content

Simulation Parameters

The initialization of the community object is made through a dictionary instance passed to its constructor. The dictionary has total power of configuration of the community and the objects created therein. However, even if an empty dictionary is passed, the simulation object will assume some default values and export results. This behavior is thought to help novice users, and at same time, empower experienced users to highly control the simulation parameters of the community.

Simulation Settings

Parameters that define the overall size of the simulation:

Parameter Type Description Default Value
number_of_days int Number of days to be simulated in the real city 60
number_of_particles int Number of particles that will be simulated in the representative city. This number does not have to be equal to the number of persons in the city, but it has to be large enough for the randomness stabilize the results. 1000
resolution_t float Time step used in simulations, measured in hours 1
start_date string An start date for the simulation in ISO format. "2020-02-01"

Scenario Parameters

Parameters that define the social mechanics of the simulation:

Parameter Type Description Default Value
simulate_meanfield bool Enables a mean field simulation or not. Mean field here is understood as a community with simple random walking of the particles and no other social restriction. If turned on, this switch turns off the other social interventions False
services_close bool Enables closing of services during the simulation. The type of decision that closes the services, as well as its parameters, must be specified False
social_isolation bool Enables social isolation, which specifies if a certain portion of the population tends to stay at home during work day False
lockdown bool Enables a lockdown in the community. Similar to the services close, a decision must be selected, as well as the parameters that specify this decision False

Demographic Parameters

Parameters that define the demographics of the simulation:

Parameter Type Description Default Value
city_name string Name of the city. It is used mainly for the output of the results. default
population_ages list A list of integers for the number of particles in each age group. The age groups are currently separated in intervals of five years from 0 to 100 years, and another age group for 100 years or more. The total number of persons in the city is given from the sum of all of these values. Data from São Carlos, SP, Brazil
persons_per_home float Average number of people in a single home 3.

Services parameters

Disease Parameters

Parameter Type Description Default Value
inf0_perc float or list If a single value, the percentage of the population that is exposed to the disease at the start of the simulation. If a list of values, the percentages of the population in each of the infection states (S, E, I, R, D) 0.01
inf0_perc_symp list List with percentages of infectious particles in the following three symptom states: asymptomatic, soft symptomatic and severe symptomatic, respectively (must sum up to 1, otherwise are normalized to do so by respecting the proportions in the list's entries) Defined by the symptoms probability
inf_probability float or dict Probability of an infectious particle infect a susceptible one if they have had a contact of one hour (internally adjusted with resolution_t), can also be a dictionary to a numpy.random distribution (see infection probability distibution) 0.05
outdoor_inf_prob_weight float An weight to be multiplied to the infection probability in outdoor contexts 1.0
inf_incubation float or RandomDistibution Mean time, in days, that an exposed particle takes to become infectious 3.2
inf_duration float or RandomDistibution Mean time, in days, that an infectious particle takes to recover 5.0
inf_severe_duration float or RandomDistibution Mean time, in days, that an severe symptomatic particle takes to recover inf_duration
inf_sympt_timeto float or RandomDistibution Mean time, in days, that an infectious particle takes to become symptomatic 2.0
inf_prob_sympt float Probability of an infectious particle ever becoming symptomatic 0.5
inf_severe_sympt_prob float Probability of an infectious symptomatic particle develop severe symptoms 0.0
inf_severe_death_prob float or list If a value, the probability of a severe symptomatic infected particle to die instead of recover. If a list of values, the same probabilities discriminated by age groups 0.15
susceptibility_by_age list A list with susceptibility values for exposed particles, discriminated by age groups, which multiply the inf_probability of infectious particles, when these two particles encounter each other a list with all entries equal to 1
infection_probability_correction 'bool' This mechanic alters inf_prob keyword's value at night, for particles in the same home, so that only one infectious encounter is simulated in this period, can not be used with use_virulence. False

Interventions Parameters

Parameter Type Description Default Value
decision int The global decision process to be used in the simulation, see available decisions. decisions.BY_DIAGNOSTICS
decision_par_lockdown dict Parameters to be used on the selected decision process to start/end lockdowns, see available decisions. Dependent on the decision
decision_par_services_closing dict Global parameters to be used on the selected decision process to close/reopen services, see available decisions. Dependent on the decision
vaccinations list List with the parameters for vaccination campaigns (see vaccination) []
quarantines list List with the parameters for quarantines (see quarantines) [quarantines.HOSPITALIZATION]
tracing_percent float Percentage of the population with tracing capability (see tracing) 0.5
lockdown_adhere_percent float Percentage of the population that respect the lockdown (see lockdown) 0.7
lockdown_decision_offset float Offset days to take action on start or stop lockdown (see lockdown) 3
isol_pct_time_series np.array Time series of percentage of people isolated at home (see social isolation) [0.3, ..., 0.3]
isol_stay_prob float Probability of a person that stayed at home at a given day remain at home next day. For lockdown it may be interesting to use a 100% value (see social isolation) 0.6

All Parameters

A exhaustive list with all parameters and it's descriptions can be found here.