Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 913 Bytes

README.md

File metadata and controls

54 lines (36 loc) · 913 Bytes

infection

A library for experimenting with SIR model.

Modes

  • standard package importing
  • stand-alone CLI program

Installation

  1. clone repository

    git clone https://github.com/l3nn4rt/infection
  2. install dependencies

    python -m pip install ./infection

Usage

All modules have an help command:

python -m infection.generation --help
python -m infection.simulation --help
python -m infection.visualization --help

Example

  1. create a graph

    python -m infection.generation --save TORUS_U_ERDOS_RENYI -c 5 -r 6 -p .1
    GRAPH_UID # save this
  2. simulate infection evolution over graph

    python -m infection.simulation --save -g $GRAPH_UID -p .3 -s 1
    EVOLUTION_UID # save this
  3. show animation and timeline

    python -m infection.visualization -e $EVOLUTION_UID -a -t