Giter Site home page Giter Site logo

epicommute's Introduction

EpiCommute

Simulate an epidemic on a metapopulation network with commuter-type mobility, and potential mobility-reducing containment strategies.

The model is used and defined in the following publication:

"COVID-19 lockdown induces structural changes in mobility networks -- Implication for mitigating disease dynamics", Frank Schlosser, Benjamin F. Maier, David Hinrichs, Adrian Zachariae, Dirk Brockmann, (https://arxiv.org/abs/2007.01583)

Install

python setup.py install

Usage example

>>> import numpy as np
>>> from EpiCommute import SIRModel
>>> # Create dummy data
>>> M = 10 # Number of subpopulations
>>> mobility = np.random.rand(M, M) # mobility matrix
>>> subpopulation_sizes = np.random.randint(20,100,M) # subpop.-sizes
>>> # Run simulation
>>> model = SIRModel(mobility, subpopulation_sizes)
>>> results = model.run_simulation(VERBOSE=True)
Starting Simulation ...
Simulation completed
Time: 0min 3.35s

More examples are given in the notebooks at /examples.

Model description

The code simulates an SIR epidemic on a subpopulation network, where subpopulations are connected by commuter-type mobility.

A detailed descriptions of the model is given in the mauscript linked above.

Mobility

Movement of individuals between subpopulation is implemented using commuter-type dynamics. This means that each individual lives at a home location i, and works at a work location j.

How the individuals are distributed among the compartments is determined by an origin-destination mobility matrix mobility of size M x M, which contains the number of individuals commuting between pairs of locations.

The population in the system is then distributed into M x M compartments, where compartment ij includes those individuals living at i and working at j.

Infection dynamics

Epidemic spread is simulated using the SIR model, consisting of susceptibles S, infecteds I and recovereds R.

The infection step is subdivided in two phases of equal length:

  • In the home phase, each individual has a chance to get infected at their home location i.
  • In the work phase, infections can take place at the work locations.

Containment/lockdown effects

The model can consider changes in absolute mobility flux (for example due to lockdown effects). For this, it is a assumed that a matrix mobility is provided with the current (possibly reduced) number of commuters, and a matrix mobility_baseline with the number of commuters during normal times.

Changes in mobility flux are taken into account in two different scenarios:

  • In the isolation scenario, it is assumed that a reduction in mobility means that individuals are effectively removed from the system.
  • In the distancing scenario, a reduction in mobility instead leads to a reduction in the effective transmission rate in the system.

A more detailed description of the scenarios and the model can be found in the publication.

epicommute's People

Contributors

franksh avatar benmaier avatar

Watchers

 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.