Giter Site home page Giter Site logo

pandemicsimulation's Introduction

Pandemic Simulation with mesa

Simple project that uses the mesa python3 package to simulate a pandemic environment with some simple rules

Installation

Poetry is needed to install the project.

Using pip3

To install poetry:

pip3 install poetry

Create the environment:

poetry install

Launch the environment:

poetry shell

Other methods

Check: https://python-poetry.org/docs/ for the installation command and then follow the same commands.

Run

First run:

poetry shell
python server.py

or

poetry run python server.py 

then a server will open at: http://127.0.0.1:8052/

Simulation Rules

The simulation follows some simple rules:

  1. the population consists of 3 types of persons:

    • infected (red)
    • well (never infected) (green)
    • recovered (infected in the past) (yellow)
  2. Each agent has an age and based on that a probability of infection is assigned to him/her

  3. An infected agent spreads the virus to his/her neighbours (in relation with the above probability of infection).

  4. A recovered agent can never be infected again

  5. An infected agent recovers after a number of days

How it looks

image

pandemicsimulation's People

Contributors

saladbreaker avatar

Watchers

James Cloos avatar  avatar

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.