https://github.com/acmo0/sir-simulation
This is an implementation of the SIERD model in C using Euler's explicit method
https://github.com/acmo0/sir-simulation
disease disease-modeling disease-spread euler-method model simulation sir sir-model
Last synced: 13 days ago
JSON representation
This is an implementation of the SIERD model in C using Euler's explicit method
- Host: GitHub
- URL: https://github.com/acmo0/sir-simulation
- Owner: acmo0
- License: gpl-3.0
- Created: 2022-04-25T16:27:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T18:23:11.000Z (about 4 years ago)
- Last Synced: 2025-02-24T08:17:08.337Z (over 1 year ago)
- Topics: disease, disease-modeling, disease-spread, euler-method, model, simulation, sir, sir-model
- Language: C
- Homepage:
- Size: 925 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simulation of SIERD model
## Installation
Executables files are located in the bin folder, please download *generate.py* and *simulation_sir* from the [lastest release](https://github.com/acmo0/SIR-simulation/releases/tag/v1.0) 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 :

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 :
