Skip to content

francesco-campi/SIR-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIR-Project: Simulate the spread of an epidemic

General project description

The goal of this project is to implement at least one model to simulate and visualize the spread of an epidemic. Later on we will try to fit the model(s) to the current COVID-19 epidemic. The idea is to gradually increase the sophistication of the simulation by adding more assumptions and conditions, e.g. more complex behaviors of the people (people living in households, going to work, grocery store, separated communities, quarantine). Additionally, we might switch to to a modified SIR model to include different assumptions about the epidemic itself, e.g. a latent period of the disease where the person is not infectious. In the end, a visualization of the simulated data is planned. This probably will be done by exporting data and handling it in python. Alternatively, we might implement a live GUI where the user can choose the modeling parameters.

A few sources:

How to run the simulation

Run the following commands:
cmake -B build
cd build
make
./sir

Change parameters

Please input the parameters into the INPUT.txt file.

Output

The results of the simulation will be safed in the tests folder.

Simulation.csv:

Here you find the position and status of each person for all timesteps.

ith Line = ith Person
jth column = jth timestep

Each entry has the format
Position_x Position_y Status
for the corresponding person and timestep.

Overview.csv:

Here you find an overview of the proportions of the population that are suceptible, recoverd and infected per timestep.

ith Line = ith timestep

Each entry has the format
suceptible infected recovered

Visualization

In the visualization folder you can find a jupyter notebook to visualize the output.
After running the notebook four files will be safed in the visualization folder.

About

Simulate the spread of an epidemic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published