File descriptions and unit tests - dime-worldbank/Disease-Modelling-SSA GitHub Wiki

This list was last updated in August 2025


Behaviours

Disease behaviours

Disease progression behaviour framework

This is a subcategory of behaviour framework files, all of which extend the DiseaseProgressionBehaviourFramework class. These files are linked to specific diseases modelled and as the name suggests handle the progression of diseases modelled through their infection states. Currently included are the the disease progression behaviour files for:

  • COVID-19
  • COVID-19 spurious symptoms
  • Dummy infectious disease - a hypothetical infectious disease with both horizontal and vertical transmission routes, which was developed to test development for modelling multiple diseases
  • Dummy non-communicable disease - a hypothetical NCD disease with no infectious component, created to test development of future non-communicable disease modelling
  • Dummy waterborne disease - a hypothetical waterborne disease spread to both person and water hosts, created to test development of future waterborne disease modelling

Disease spread behaviour framework

This is currently just used to trigger the development of the dummy NCD disease, using risk factors and a base rate of development to trigger new dummy NCD cases occurring in the population.

Human behaviours

Demography

This file handles new births occurring in the population with a simple model of births, it also causes a general level of mortality in the population (essentially the mortality that we would expect to see in the population in the absence of a novel disease such as COVID-19).

Movement behaviour framework

This file is responsible for triggering movement in humans, there are three destinations currently considered in the model: home, community and workplaces. This file triggers the transition between these locations.

Objects

Diseases

All diseases now inherit from the abstract 'disease' class. All disease will inherit the following from this class: links to a host; infectious behaviour disease nodes; time information to track the temporal changes to disease progression states; boolean disease progression trackers; functions relating to the logging of the diseases.

We also now have the following disease objects in the model

  • COVID-19
  • COVID-19 spurious symptoms
  • Dummy infectious disease
  • Dummy non-communicable disease
  • Dummy waterborne disease

Hosts

Person

  • Holds demographic information about the person
  • Holds relevant epidemic info about the person
  • Hosts the infect neighbours function
  • Interacts with water
  • Create infections

Water

  • Is a source and recipient of waterborne diseases
  • Holds relevant geographic and physical information about the water source
  • Create waterborne infections

Locations

Households

  • Represents each agent's household and can contain (depending on individual movement) a group of people living there. Agents start of end their day here

Workplaces

  • Represents each agent's workplace location, these are either a specified location linked to their occupation or will be based in the broader community location. Agent may visit workplace locations as part of their daily routine

Communities

  • Represents the shared communal space available to all agents. When travelling to out of home province/district/ward locations, this is where agents will visit.

Simulation set up and simulation running

WorldBankCovid19Sim

Responsibilities

  • Configures simulation
  • Configures output
  • Determines what is included in the simulation
  • Initialised the simulation
  • Handles the 'day to day' running of the simulation as things change over time
  • Has helper functions

Params

Responsibilities

  • Read in parameter files and store them, attached to simulation object

Unit tests

Mobility testings

This test suite checks the following:

  • People with the community behaviour node switch to the home behaviour node at the end of the day
  • People within the community location go back to their home location at the end of the day
  • People doing the home behaviour node switch to the community behaviour node at the start of the day
  • People within the home location go back to their community location at the start of the day (if we aren't modelling workplaces)
  • When we exclude the modelling of workplaces in the model, people only go do the home and community behaviours
  • When we exclude the modelling of workplaces in the model, people only go to the home and community location
  • Lockdown reduces the number of visits to other admin zones (reduced outbound mobility)
  • People go to their workplace (if we model them)
  • People at work go to the community or home afterwards

Coronavirus Infectious Behaviour Disease testing

This test suite checks:

  • If there are no COVID-19 infections, people only have the susceptible behaviour node
  • The exposed behaviour node lead to susceptible, presymptomatic and asymptomatic behaviour nodes only
  • The presymptomatic behaviour node leads to the mild behaviour node only
  • The asymptomatic behaviour node leads to recovered nodes only
  • The mild behaviour node leads to severe and recovered nodes only
  • Mild infections resolve to recovered when we block disease progression
  • The severe behaviour node leads to critical and recovered nodes only
  • severe infections resolve to recovered when we block disease progression
  • The critical behaviour node leads to dead and recovered nodes only
  • Critical infections resolve to recovered when we block disease progression
  • Recovered behaviour nodes do not change
  • Dead behaviour nodes do not change
  • If we give everyone an infection, eventually they will recover or die
  • New COVID-19 cases are created

COVID-19 spurious symptom testing

This test suite checks:

  • Check people with symptomatic COVID-19 do not get spurious symptoms
  • Check people can have asymptomatic COVID-19 and spurious symptoms
  • Check setting COVID-19 spurious symptom and testing eligibility properties are being removed after a week
  • Check COVID-19 spurious symptoms and testing eligibility properties are being set when created
  • Check spurious symptom objects are created

Dummy disease testing

This test suite checks:

  • People get the dummy diseases (infectious, waterborne and NCD)
  • Vertical transmission of the dummy infectious disease works
  • Horizontal transmission of the dummy infectious disease works
  • No new cases of the dummy NCD are created with no 'rate of acquisition'
  • That new cases of the dummy NCD occur over time
  • That more new dummy NCDs occur in those with risk factors (dummy risk factors are being male and being over 50 years old)
  • Dummy waterborne diseases are spread to water
  • Dummy waterborne diseases are spread to people
  • No new dummy waterborne cases happen if people do not interact with water
  • That duplicated infection types do not happen

COVID-19 disease testing testing

This test suite checks:

  • Tests only happen for those with symptoms of COVID-19

Demography testing

This test suite checks:

  • Births are increasing population size
  • Births do not occur in males
  • Death rates are sex dependent
  • Ages increase over the course of the simulation

Parameter testing

This test suite checks:

  • Optional model variations specific parameter files (e.g. demography, lockdown, COVID-19 disease testing, etc...) do no stop the model from running if not included in the simulation
  • Faulty input data or parameters files not formatted in the correct way will result in the simulation not running

Workplace testing

This test suite checks:

  • Workplace locations are loaded into the model
  • Workplace 'bubbles' are being made
  • Each person's workplace bubble contains everyone in their workplace
  • People go to their workplace
  • Workplace contact count data is being loaded
  • Workplace constraints are being loaded
  • Those constrained to home are immobilised
  • Those constrained to the community are not at work
  • Workplace constraints run without issue