Specifying population structure
This page describes how users specify the names, sizes, and connectivities of the different subpopulations comprising the total population to be modeled
Overview
The subpop_setup
section of the configuration file is where users can input the information required to define a population structure on which to simulate the model. The options allow the user to determine the population size of each subpopulation that makes up the overall population, and to specify the amount of mixing that occurs between each pair of subpopulations.
An example configuration file with the global header and the spatial_setup section is below:
Items and options
geodata
required
path to file
path to geodata file
mobility
required
path to file
path to mobility file
selected
optional
string or list of strings
name of selected location ingeodata
geodata
file and selected
option
geodata
file and selected
optiongeodata
is a .csv with column headers, with at least two columns:subpop
andpopulation
.selected
if provided, is the subset of locations in geodata file (as determined bysubpop
column) to be modeled. Requesting subpopulation(s) that are not present will lead to an error.
Example geodata file format
mobility
file
mobility
fileExample mobility file format
It is also possible, but not recommended to specify the mobility
file as a .txt with space-separated values in the shape of a matrix. This matrix is symmetric and of size K x K, with K being the number of rows in geodata
. The above example corresponds to
Examples
Example 1
To simulate a simple population structure with two subpopulations, a large province with 10,000 individuals and a small province with only 1,000 individuals, where every day 100 residents of the large province travel to the small province and interact with residents there, and 50 residents of the small province visit the large province
geodata.csv
contains the population structure (with columns subpop
and population
)
mobility.csv
contains
Last updated