A library for experimenting with SIR model.
- standard package importing
- stand-alone CLI program
-
clone repository
git clone https://github.com/l3nn4rt/infection
-
install dependencies
python -m pip install ./infection
All modules have an help command:
python -m infection.generation --help
python -m infection.simulation --help
python -m infection.visualization --help
-
create a graph
python -m infection.generation --save TORUS_U_ERDOS_RENYI -c 5 -r 6 -p .1 GRAPH_UID # save this
-
simulate infection evolution over graph
python -m infection.simulation --save -g $GRAPH_UID -p .3 -s 1 EVOLUTION_UID # save this
-
show animation and timeline
python -m infection.visualization -e $EVOLUTION_UID -a -t