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
- Host: GitHub
- URL: https://github.com/prateekmaj21/disease-outbreak-simulation
- Owner: prateekmaj21
- License: mit
- Created: 2021-07-31T06:18:28.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-31T07:13:40.000Z (almost 5 years ago)
- Last Synced: 2025-02-17T06:16:50.962Z (over 1 year ago)
- Topics: oop, python3
- Language: Python
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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:
