Modeling infectious diseases with the SIR model and variations
Go to file
Anthony Wang 01fa436650
Move main.tex to root directory
2022-01-12 09:10:37 -06:00
data Cleanup 2020-04-29 19:32:37 -05:00
out Fixed formatting 2020-05-02 15:28:34 -05:00
.gitignore Added Linear models 2020-04-29 19:30:14 -05:00
COVID-19-ESIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
COVID-19-Linear.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
COVID-19-SEIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
COVID-19-SIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
LinearCompartmentModels.mw Hopefully fixed everything 2020-04-29 19:09:32 -05:00
main.tex Move main.tex to root directory 2022-01-12 09:10:37 -06:00
NLCModel01.mw Hopefully fixed everything 2020-04-29 19:09:32 -05:00
NLCModel02.mw Hopefully fixed everything 2020-04-29 19:09:32 -05:00
NLCModel03.mw Hopefully fixed everything 2020-04-29 19:09:32 -05:00
README.md Redo tests 2020-05-02 15:25:32 -05:00
SARS-ESIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
SARS-Linear.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
SARS-SEIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
SARS-SIR.png [ImgBot] Optimize images 2020-05-18 21:28:46 +00:00
sir_model.cpp Hopefully fixed everything 2020-04-29 19:09:32 -05:00
solver.py Add files via upload 2020-04-28 21:43:30 -05:00
solver2.py Fixed formatting 2020-05-02 15:28:34 -05:00

Infectious-Disease-Modeling

A project to model infectious diseases with the SIR model and variations.

Usage

For SARS in Hong Kong use
./solver2.py --country=Hong_Kong --popcountry=20000 --initial=1000 --disease=SARS --start=4/10/03 --mode={SIR,Linear,ESIR,SEIR}

For COVID-19 in the US use
./solver2.py --popcountry=3000000 --initial=100 --mode={SIR,Linear,ESIR,SEIR}

General usage:

usage: solver2.py [-h] [--mode {SIR,Linear,ESIR,SEIR}]
                  [--data [{Actual,S,I,R,E} [{Actual,S,I,R,E} ...]]]
                  [--folder FOLDER] [--disease DISEASE] [--out OUT]
                  [--start START] [--end END] [--incubation INCUBATION_PERIOD]
                  [--predict PREDICTION_RANGE] [--country COUNTRY]
                  [--popcountry POPCOUNTRY] [--popmodel POPMODEL]
                  [--initial INITIAL]

optional arguments:
  -h, --help            show this help message and exit
  --mode {SIR,Linear,ESIR,SEIR}, -m {SIR,Linear,ESIR,SEIR}
                        change the mode of the model (SIR, Linear, ESIR,
                        SEIR); default: SIR
  --data [{Actual,S,I,R,E} [{Actual,S,I,R,E} ...]], -d [{Actual,S,I,R,E} [{Actual,S,I,R,E} ...]]
                        change the type of data to present in the graph
                        (Actual, S, I, R, E); default: Actual S I R
  --folder FOLDER, -f FOLDER
                        the folder in which to find the data files; defaults
                        to looking in the data folder
  --disease DISEASE, -D DISEASE
                        the disease to model; defaults to COVID-19
  --out OUT, -o OUT     the name of the graph and csv files; defaults to the
                        name of the disease
  --start START, -s START
                        the date where the data starts (defaults to the start
                        date of COVID-19 (1/22/20))
  --end END, -e END     the date where the data stops (defaults to whereever
                        the input data ends)
  --incubation INCUBATION_PERIOD, -i INCUBATION_PERIOD
                        the incubation period of the disease (only applicable
                        if using SIRE model; ignored otherwise); none by
                        default
  --predict PREDICTION_RANGE, -p PREDICTION_RANGE
                        the number of days to predict the course of the
                        disease (defaults to None, meaning the model will not
                        predict beyond the given data)
  --country COUNTRY, -c COUNTRY
                        the country that is being modeled (defaults to US)
  --popcountry POPCOUNTRY, -pc POPCOUNTRY
                        the population of the country (defaults to US
                        population)
  --popmodel POPMODEL, -pm POPMODEL
                        the population of the model (defaults to 10000)
  --initial INITIAL, -I INITIAL
                        initial infected people (defaults to 1)

Credits

Original code by JasonXu314 and Lewuathe