This code is released in support of the above manuscript, which is currently under review. The full citation will be added upon acceptance.
All code used to generate model-based results is in this repository. The structure is as follows:
- The Python library code is in
crn_paper
, including disease-specific modules likehiv.py
,PPH_demographics.py
, and utilities likeanalyzers.py
. - Script files used to run and process the simulations are in
scripts
. The main files are:
- PPH:
run_PPH.py
- SIR:
run_SIR.py
- VMMC:
run_VMMC.py
pairwise_bias.py
was used to evaluate potential bias in pairwise random numbers, resulting in Appendix A.net_perf.py
was used to evaluate the performance of several networks, resulting in the figure in Appendix C.
Other scripts are included for completeness. These scripts are computationally intensive, requiring roughly 3 hours on a laptop.
The result of running each script is a corresponding folder of results and figures that will appear within the figs
folder.
The pre-generated data files loaded by the scripts are stored in figs
, from which figures can be generated by passing -p
as a command line argument to each corresponding script.
-
Ensure you have Python installed (if you haven't installed Python already, the easiest is to use Anaconda; an out-of-the-box system Python installation is unlikely to work).
-
In a terminal (or Windows command prompt), type
pip install -e .
to install (note the ".
" at the end of the command, this is critical!). -
To test your installation,
import crn_paper
should work from a Python prompt.
If you're using R, you need to have R installed. You also need to install reticulate
(which allows R to communicate with Python): install.packages("reticulate")
. Note: Even if you're using R, you still need to follow the first two steps to install the Python package.
The code is provided on an as-is basis and there may be practical challenges in getting it to run on a particular system (see note about compute requirements above). However, it should at least be possible to regenerate the figures by running the scripts.
The code in this repository was developed by researchers at IDM and the Burnet Institute. We've made it publicly available under the MIT License to provide others with a better understanding of our research and an opportunity to build upon it for their own work. We make no representations that the code works as intended or that we will provide support, address issues that are found, or accept pull requests. You are welcome to create your own fork and modify the code to suit your own modeling needs as permitted under the MIT License.