Skip to content

gerritgr/BD-Reduction

Repository files navigation

Birth-Death Process Reduction for Epidemics

License: GPL v3

Copyright: 2022, Gerrit Großmann, Group of Modeling and Simulation at Saarland University

Version: 0.1 (Please note that this is proof-of-concept code.)

A more detailed description of the technique can be found in Chapter 7 of my phd dissertation.

alt text

Usage

Step 1: Install Python3 and Jupyter Notebooks

If not already installed, you can install Anaconda.

Step 2: Install Rust (only necessary for simulation baseline)

For simulation, we use Rust code based on the Rejection-Based Simulation of Stochastic Spreading Processes on Complex Networks paper.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

and compile the simulation code

cd rust/Rejection-Based-Epidemic-Simulation/rust_reject/ && cargo build --release

Step 3: Install Julia

Install Julia and link it to your jupyter notebook.

Step 4: Open 'main.ipynb'

visualization.ipynb (Python) can also create nicer plots but is not really necessary.

Docker

You can also use Docker to run the code off the shelf:

docker pull gerritgr/bdreduction:latest
docker run -p 8888:8888 gerritgr/bdreduction

You can then open the Jupyter Lab URL in your browser and open main.ipynb (no need to execute the first cell).

Graphs

We use generate contact networks with the following parameters:

n=10^2
g = erdos_renyi(n, 1/n*10, seed=123)      #ER
g = barabasi_albert(n, 3, seed=123)       #BA
g = watts_strogatz(n, 8, 0.8, seed=123)   #WS      

n=10^4
g = erdos_renyi(n, 1/n*20, seed=123)
g = barabasi_albert(n, 4, seed=123)
g = watts_strogatz(n, 12, 0.8, seed=123)  

n=10^6
g = erdos_renyi(n, 1/n*40, seed=123)
g = barabasi_albert(n, 6, seed=123)
g = watts_strogatz(n, 16, 0.8, seed=123)  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published