Giter VIP home page Giter VIP logo

pandemic-simulator's Introduction

Pandemic-Simulator

This is a program that simulates a pandemic based on parameters and hyper-parameters. It generates a data frame of virtual people. And within the program, these people can move from one community to another. They tend to visit landmarks more often than in other places. And a foreigner could only directly go to the landmark of a different community. When the infection starts spreading the government set up lockdown.But the lock-downs aren't absolute. Many tend to disobey.

The Dataframes

alt text

The figure represents the population data frame. Each person has an x,y coordinate for their location. A value ranging from 0 to 1. Represent their acceptance of the lockdown. 1 represent going for a perfect lockdown. 0 represents not caring about a lockdown at all. The region represents which region the person belongs to.

alt text

The figure represents the infected data frame. Each person has an x,y coordinate for their location. Time represents the number of days since the person has been infected. The region represents which region the person belongs to.

The parameters and variables

spread_limit --> Maximum distance between infected and an uninfected person needed for infection to spread
recovery_prob --> Probability that a person will recover from the disease(at least 3 days after infection)
intial_count --> The number of people infected at the very beginning
infection_rate --> Probability of getting infected if within spread_limit
population = --> The number of people at the beginning of the simulation

landmark --> An array storing the x,y coordinates of the landmarks of each region
landmark_prob --> The probability of a random person to visit a landmark on a particular day
landmark_prob_dec_rate --> Rate of decrease in the tendency to visit a landmark on a particular day

lock_ratio --> Initial ratio of people who go on lockdown when government notice is put up
lock_decrease_rate --> ratio of people who go will decrease their lockdown value(Quar) each day
lock_increase_rate --> ratio of people who go will increase their lockdown value(Quar) each day
lock_infected_count --> minimum number of infected people after which lockdown starts

no_of_region --> No. of regions in which the people are divided
alt text

Plots

General plot

alt text Creating a simpler model initially, in this model there are no landmark(every location in equally probable). People don't go into lockdown. The space is not divided into regions. Values of parameters are present in the image itself. x axis represnts days,and y axis represents no of people.

Variable Infection_Rate value

alt text This creates several models(simple model as in the General plot) and with different Infection_Rate value. The number of days within which the number of infected people becomes zero are found for each value. And the data is plotted above alt text This creates several models(simple model as in the General plot) and with different Infection_Rate value. The number of people infected and the number of recovered in found for each infection_rate value. And the data is plotted above

pandemic-simulator's People

Contributors

abhinandan-pal avatar rollingthundersagnik avatar siddhant-k-code avatar

Stargazers

 avatar

Watchers

 avatar

pandemic-simulator's Issues

use makefile

  1. Separate out the code into different python files lets say one for generating dataset and the other for computing.
  2. Then use a makefile to execute them in the desired order

Study the Data and plots

Crunch Through the numbers and see what you can find. And share the findings through ReadMe.md.

Create more good-first-issues

This is a request to the maintainers to kindly put up a few sample issues for beginners so they get an idea of how someone can contribute to this repository, probably hinting on what possible implementations could resolve the issue as well.

Improve Complexity

A few of the steps are highly time-consuming. There must be a way around. Give it a look.

Create Colab Notebook from .py file

Create a Colab notebook for the Sim_centered.py . Running the whole python file at once can be really messy. And few of the steps are rather time-consuming. A better alternative would be implementing them on Colab. One of the .py file has been worked out for reference.

.py file : Link

Colab notebook : Link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.