This repository contains the code for the outbreak information model (OIM) described in the pre-print "A model for outbreak information management in public health" by R. Seibel, M. Tildesley and E. Hill (2024). The model is implemented in Python 3.11.7 and can be used to deterministically simulate the spread of a human infectious disease in a population given real-time awareness of intervention effectiveness. The model is described in detail in the pre-print, which can be found on medRxiv.
Archived code associated with this study is available on Zenodo:
- Clone the repository
- Install the required packages (pip install using requirements.txt or activate conda environment from cloned repository)
- Determine which population structure you want to use (homogeneous or heterogeneous) and which scenario (1 or 2) you wish to run. Note that some scenarios are separated into multiple files (e.g. homogeneous scenario 1 is split into 1a and 1b).
- Open the corresponding model file (e.g. src/main_homogeneous.py) and set the file path for the parameter variable (e.g. "results/homogeneous/inputs/parameters_scenario1a.csv")
- Execute the cells in the corresponding Jupyter notebook (e.g. Homogeneous.ipynb). Save the results to the "outputs" folder for the corresponding population structure and scenario.
The model outputs a number of files, which are saved in the "outputs" folder for the correponding population structure and scenario. The files are:
results.csv
: Contains the cumulative results of the model run. Each row corresponds to a single simulation and contains the following columns:pathogen
: The pathogen used in the simulationsplit
: For the heterogeneous simulations only, the split between the three subpopulationsmemory_window
: The memory window used in the simulationbehaviour_function
: The behaviour function used in the simulationr
: The vaccine opinion(s) used in the simulationalpha
: The information sensitivity used in the simulationvaccine_efficacy
: The vaccine efficacy (as a proportion) used in the simulationfinal_cases
: The number of cases at the end of the simulationfinal_deaths
: The number of deaths at the end of the simulationfinal_vaccinated
: The number of vaccinated individuals at the end of the simulationepidemic_duration
: The duration of the epidemic in days
temporal.csv
: Contains the temporal results of the model run. Each row corresponds to a single day in a single simulation and contains the following columns:pathogen
: The pathogen used in the simulationsplit
: For the heterogeneous simulations only, the split between the three subpopulationsmemory_window
: The memory window used in the simulationbehaviour_function
: The behaviour function used in the simulationr
: The vaccine opinion(s) used in the simulationalpha
: The information sensitivity used in the simulationvaccine_efficacy
: The vaccine efficacy (as a proportion) used in the simulationt
: The day of the simulationS
: The number of susceptible, unvaccinated individuals on day tE
: The number of exposed, unvaccinated individuals on day tI
: The number of infectious, unvaccinated individuals on day tR
: The number of recovered, unvaccinated individuals on day tH
: The number of hospitalised, unvaccinated individuals on day tSv
: The number of susceptible, vaccinated individuals on day tEv
: The number of exposed, vaccinated individuals on day tIv
: The number of infectious, vaccinated individuals on day tRv
: The number of recovered, vaccinated individuals on day tHv
: The number of hospitalised, vaccinated individuals on day tC
: The number of cumulative cases in unvaccinated individuals on day tCv
: The number of cumulative cases in vaccinated individuals on day t