An open API service indexing awesome lists of open source software.

https://github.com/prateekmaj21/disease-outbreak-simulation

Simulation of a disease based on OOP
https://github.com/prateekmaj21/disease-outbreak-simulation

oop python3

Last synced: about 1 year ago
JSON representation

Simulation of a disease based on OOP

Awesome Lists containing this project

README

          

# Disease-Outbreak-Simulation
## Simulation of a disease based on OOP

Created using python. It simulates the spread of a communicable infectious disease through the population. Both, an individual and whole population’s attributes are modelled using classes.

We can set various initial conditions like size of population, rate of infection, mortality rate, infection duration. We can also select the number of days; we want the simulation to run.

The interaction of people in the population and spread of infection get simulated. For each day of the simulation, we get details of the spread of disease.
At the end of the simulation, we get the timeline of the infected and deaths in graph format.

It can show the rise of infection in early stages of growth of disease.

## File
```
simulation.py
```
## SAMPLE EXECUTION

Disease Outbreak Simulation

Based on statistical assumptions.
1. We must know the total population size

Enter the population size: 1000000

2. First theoretical assumption is that a part of the population is infected.

Enter the percentage (0-100) of the population who are already infected: 0.01

3. We must know the risk a person has to contract the disease when he is exposed to the pathogens.

Enter the probability (0-100) that an individual gets infected when exposed to the pathogens: 20

4. We must know how many days infection will last when exposed

Enter the average duration (in days) the infection lasts in a person: 15

5. Next required data is the mortality rate of those who are exposed

Enter the mortality rate (0-100) of the infection: 2

6. We need information on how many days simulation is to be run

Please keep input under 100 Days.

Enter the number of days to simulate: 20

Press enter to start the simulation
All data in the Excel file!

The simulation infected cases and deaths over the days:



![Screenshot](https://github.com/prateekmaj21/Disease-Outbreak-Simulation/blob/main/Data.jpg)