MetaWards
This is the top-level Python package that provides the core objects to build and run MetaWards models.
The package centers around a few core objects:
Nodes
/Node
These represent the individual electoral wards in which progress of the disease is tracked.
Links
/Link
These represent the connections between electoral wards, including how people commute between wards for work. These therefore provide the routes via which the disease can spread.
Parameters
This is the holder of all model parameters that can describe, e.g. the proportion of day versus night, cutoff distance for transmission between wards etc. Example parameter sets are held in the MetaWardsData repository.
Disease
This is the holder of disease parameters, used to change the model to represent different types of disease outbreaks. Different disease models are held in the MetaWardsData repository.
InputFiles
This holds information about all of the input files that are used to build the network of wards and links. All of the input data is held in the MetaWardsData repository.
Network
This is the complete network of
Nodes
andLinks
built using the data loaded from theInputFiles
, set up to model the disease whose parameters are in aDisease
, using model run parameters held in aParameters
object. A Network is self-contained, containing everything needed for a model run. Therun()
function runs the model.VariableSet
/VariableSets
The model contains adjustable variables, which must be adjusted so that the model can match observed real-life data. A
VariableSet
contains a set of variables to be adjusted, whileVariableSets
is a collection of such changes that should be explored over multiple model runs.Population
/Populations
A model run will result in a trajectory of changes in populations of people who have progressed along different stages of the disease (e.g. from being susceptible to infection (S), to being removed from the outbreak (R) - either because they have recovered or have sadly perished). A
Population
holds the numbers in each state for a single day in the outbreak, whilePopulations
holds the full trajectory.OutputFiles
Manages all of the output files that are produced by the program. This can be told to auto-compress (bzip2) all files as they are being written.
All of the above classes (and others in the top-level package) are described in more detail here;