Skip to content

This is an implementation of the SIERD model in C using Euler's explicit method

License

Notifications You must be signed in to change notification settings

acmo0/SIR-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulation of SIERD model

Installation

Executables files are located in the bin folder, please download generate.py and simulation_sir from the lastest release or clone the github repo. To plot calculated data, you need to install matplotlib using :

sudo apt install python3-matplotlib

or

pip install matplotlib

Usage

The model can be schematized like this : fig1 To start the simulation use :

./simulation_sir S0 E0 I0 alpha beta gamma delta epsilon mu nu duration points

Explanation of parameters (see figure too) :

S0 : initial percentage of healthy population
E0 : initial percentage of exposed pupulation
I0 initial percentage of infected population
alpha : incubation rate per time
beta : average number of contacts (per person per time)
gamma : cure rate (per time)
delta : death rate (per time)
epsilon : deimmunization rate (per time)
mu : natural death rate (per time)
nu : birth rate (per time)
duration of simulation (in day)
points : number of points for the simulation (at least 10000 is recommended)

Install from sources

First, clone the github repo and go to source then compile program with :

gcc -o simulation_sir model.c

Exemple

./simulation_sir 0.99 0 0.01 1.3 5.7 0.2 0.0125 0.01 0.0001 0.0008 40 300000

gives the following output :

fig