This is a multi-strain version of the ABMlux stochastic agent-based model of COVID-19.
This model relies on time use survey data to automate the behaviour of agents. Map, activity, disease, and intervention models are all modular and a number of alternative modules are bundled with the main distribution. Scenarios for the model are configured using YAML, and a [comprehensive sample scenario] is provided in this repository.
The code is pure python, and has been developed with readability and maintainability in mind.
Input data are defined per-scenario in the Scenarios directory. A single YAML configuration file specifies exact data locations and parameters for the simulation. This file is heavily commented, and the example contains a very detailed use-case for all available modules.
- python 3.9
pip install .
ms_abmlux Scenarios/Luxembourg/config.yaml state.abm
To test:
pip install .[test]
pytest
To generate documentation:
pip install pdoc
pdoc --html --overwrite --html-dir docs ms_abmlux
There are a number of interfaces defined internally, which form the basis for pluggable modules through inheritance. In addition to this, components communicate with the simulation engine via a messagebus, sending messages of two types:
- intent to change state, e.g. 'I wish to change this agent's location to xxx'
- action notifications updating the state of the world, e.g. 'Agent xxx has moved to location yyy'
Though it is possible to write new events, the existing list of event types is documented here.
The multi-strain ABMlux model is based on the original ABMlux, an epidemic model which was used in the article Thompson, J. and Wattam, S. "Estimating the impact of interventions against COVID-19: from lockdown to vaccination", 2021, PLOS ONE, https://doi.org/10.1371/journal.pone.0261330.
If you publish using technology from this repository, please cite the above article using this BibTeX:
@article{10.1371/journal.pone.0261330,
doi = {10.1371/journal.pone.0261330},
author = {Thompson, James AND Wattam, Stephen},
journal = {PLOS ONE},
publisher = {Public Library of Science},
title = {Estimating the impact of interventions against COVID-19: From lockdown to vaccination},
year = {2021},
month = {12},
volume = {16},
url = {https://doi.org/10.1371/journal.pone.0261330},
pages = {1-51},
number = {12},
}
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Read the full text for details, but basically this means:
- No commercial exploitation (contact us for another license in this case);
- You must re-publish the source if you modify the application.
We would like this work to be useful to non-profit and academic users without significant effort. If the license is an impediment to you using the work, please get in touch with us to discuss other licensing options.