Giter Site home page Giter Site logo

metalcorebear / covid-agent-based-model Goto Github PK

View Code? Open in Web Editor NEW
37.0 4.0 14.0 42 KB

Disease propagation ABM generating SIR, severe cases, and R0 over quasi-time.

License: MIT License

Python 100.00%
agent-based-modeling agent-based-simulation epidemiology epidemics covid-19 mesa covid project-mesa

covid-agent-based-model's Introduction

COVID Infection Model

(C) 2020 Mark M. Bailey

About

This repository contains an agent-based model simulating COVID transmission within social networks using Mesa. Model parameters can be set in the 'model_params.py" file. Produces a dataframe output over quasi-time (steps).

This is a work in progress and is intended for research purposes only.

Several parameters were taken from the following report:
https://www.imperial.ac.uk/media/imperial-college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-symptom-progression-11-03-2020.pdf

Installation

This model works best with the current GitHub version of Mesa:
pip install -e git+https://github.com/projectmesa/mesa#egg=mesa

Model Description

This is an SIR (susceptible, infected, recovered) model for COVID. Model parameters can be set to simulate the changes in these three variables, as well as the reproduction number (R0) and number of severe cases, over time. An R0 less than 1 would indicate that the epidemic is becoming extinguished. This can be used to simulate the effects of social distancing.

Model Parameters

  • ptrans = Transmission probability.
  • population = Total population within all containers.
  • progression_period = Average number of days until a patient seeks treatment.
  • progression_sd = Standard deviation of progression_period.
  • interactions = Average number of interactions per person per day (decreases with social distancing).
  • reinfection_rate = Probability of becoming susceptible again after recovery.
  • I0 = Initial probability of being infected.
  • death_rate = Probability of dying after being infected after progression_period and before recovery_days.
  • recovery_days = Average number of days until recovery.
  • recovery_sd = Standard deviation of recovery_days.
  • severe = Probability of developing severe, symptomatic disease.
  • steps = number of days in simulation.

  • chaos (in model_functions.py 'build_network' function) = Adjusting this parameter allows for social distancing compliance uncertainty.

Instructions for Use

  • Update parameters in the 'model_params.py' file.
  • Execute the 'run.py' script.
    python run.py -o <output_path>

covid-agent-based-model's People

Contributors

metalcorebear avatar tpike3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

covid-agent-based-model's Issues

COVID_model fails at instantiation

Running run.py throw an error.

Traceback (most recent call last):
  File "run.py", line 37, in <module>
    meme_model = COVID_model()
  File "C:\Users\Karl Hansen\Documents\Code\mason_covid\model.py", line 20, in __init__
    super().__init__(Model)
TypeError: __init__() takes 1 positional argument but 2 were given

Removing Model in Line 20 in super().__init__(Model), fixes it.

parameter calculation

hi Team, thank you for sharing this code. I had a question on how the parameters are estimated. In the parameters file, all the values are hardcoded. So, is this data obtained from social media somehow or some real world data? Please elaborate.

Thanks,
Padmaksha

Requirements.txt causing error

When I try to run pip install -r requirements.txt I get an error. If I install mesa by hand (pip install mesa) in stead of from github, it works.

I am on Windows.

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.