Skip to content

Agent based model that simulates the virus propagation in a community

Notifications You must be signed in to change notification settings

ahmedibrhm/Viral-Infection-Agent-Based-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Viral-Infection-Model

Agent-Based Model

Agent based model that simulates the virus propagation in a community. The model has the following assumptions:
1- Humans live in a world that has a length and width.
2- Humans can only be susceptibles, infected, or removed.
3- Each human occupy a space of coordinates (x,y) in the world.
4- People who get recover won't be susceptible again.
6- People can move randomly in 8 directions: East, West, North, South, NorthEast, NorthWest, SouthEast, and SouthWest.
7- Susceptibles can only be infected if they existed in a coordinate of (x,y) that an infected person existed in at the same time.
8- If a susceptible person existed at the same position as an infected person, there is a probability of getting infected according to the infection rate of the virus.
9- People who get the vaccine change from susceptibles to recovered.

Model's graph

The model is producing both visual representation of the three populations and a map. This map is for representing the model's world (simulated area). The map has four colors:
Black: means no humans are in this place
Red: Means there is infected person in this place
Yellow: Means there is susceptible person in this place and there is no infected.
Green: Means there is only recovered persons in this place

Model's Phase Space

The model also produce a 3D phase Space that plots the susceptible, Infected, and Recovered population with regard to each others.

Libraries Used:

- random
- seaborn
- matplotlib
- copy
- IPython
- numpy
- mpl_toolkits
- imageio
- os

How to run

1- Clone the repository.
2- Make sure that you have all of the used libraries.
3- Run the Model.ipynp on jupyter notebook.

About

Agent based model that simulates the virus propagation in a community

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published