This software supports the results in the paper: https://www.medrxiv.org/content/10.1101/2020.11.26.20152520v1
The algorithm simulates a COVID-19 epidemic for Austin, TX, and determines triggers to enact social distancing orders to avoid exceeding hospital capacity. Chosen triggers attempt to minimize the total number of days that a city is in strict levels.
All codes are tested on MacOS but should work on Windows and Linux.
- Download and unzip the code to a local path (e.g., .../COVID_Staged_Alert)
- Add both /COVID_Staged_Alert and /COVID_Staged_Alert/InterventionsMIP to your $PYTHONPATH
- The following packages are required:
- matplotlib
- pandas
- numpy
- scipy
- The installation should take less than a minute.
- Create new branches to test new features
- Create a pull request to merge with master
- Main module to launch the search
- Functions to execute the search and find optimized thresholds to enact lock-downs.
- Iterators for traing and testing
- Calendar generation (ad-hoc for Austin instance)
- Main module to run the search
- Functions to perform chance-constrained check and select the optimal policies w/o ACS setup
- Simulator engine
- Parallelizarion functions
- Calander utils class (SimCalendar)
- Class EpiSetup characterizes the simulation and recompute contact matrices as needed.
- Class intervention defines its properties and used in the simulator.
- Helper function to create multiple interventions
- Class MultiTierPolicy and MultiTierPolicy_ACS defines policy given the thresholds and will have functions to obtain corresponding tier given trigger statistics
- Functions to build a list of trial policies
- Construct the objective function for a simulation path
- Timing function
- Rounding functions
- Module summarizing the input of the simulator.
- Creates an instance of EpiSetup
- Least-squares fit
Related input files:
instances/austin/
- austin_real_icu_lsq.csv
- austin_real_hosp_lsq.csv
- austin_hos_ad_lsq.csv
- transmission_Final_lsq.csv
- setup_data_Final_lsq.json
instances/houston/
- houston_real_icu_lsq.csv
- houston_real_hosp_lsq.csv
- transmission_Final_lsq.csv
- setup_data_Final_lsq.json
- Donwsampling procedure (algorithm 1)
- Call downsampling.py
Related input files:
instances/austin/
- tiers5_ds_Final.json
- austin_test_IHT_ds.json
- script to obtain optimal trigger policy
- Call policy_search_functions.py
Related input files:
instances/austin/
- tiers5_opt_Final.json
- transmission_Final.csv
- script to obtain optimal trigger policy and ACS setup threshold
- Call policy_search_functions.py
instances/austin/
- tiers5_acs_Final.json
- transmission_Final_orange25_yellow75.csv
- Plot the figures used in the manuscript
- ICU, general wards heads-in-beds
- Total daily admission
- Stacked plots
- Obtain statistics based on simulation results in .p file
- generate pdf file by filling in statistics in the .tex template and compile
Run the bash file test.sh in Demo folder to obtain an optimal trigger and generate visualization and a report
- The .p file (data file) will be generated in /output
- The plots will be generated under /plots
- The report will be generated under /reporting/reports
- The run time should be within a minutes