Git Product home page Git Product logo

node-red-contagion's Introduction

Contagion Models

About

Node-RED flows to implement compartmental models for contagious disease. The compartments used are:

  • S = susceptible
  • E = exposed
  • I = infectious
  • R= recovered
  • D = deceased

The models implemented are SIR, SIRD, SEIR, and SEIRD. The rate equations (ordinary differential equations) representing transitions between the compartments are solved by the finite difference method, with a step size of 0.01 days. The populations of the compartments are represented by the time-dependent variables s,e,i,r,d, which are the fractions of the total population in each compartment. The system is initialized at t = 0 with i = 0.001 and s = 0.999.

The models assume that the population is uniform and homogeneously mixed and that recovered individuals (compartment R) are immune to re-infection. The time period simulated is assumed to be brief enough that births and deaths (other than from the disease being modeled) can be neglected.

Transition rates

SIR

  • rate(S -> I) = beta * i * s
  • rate(I -> R) = gamma * i

SIRD

  • rate(S -> I) = beta * i * s
  • rate(I -> R) = (1 - alpha) * gamma * i
  • rate(I -> D) = alpha * rho * i

SEIR

  • rate(S -> E) = beta * i * s
  • rate(E -> I) = delta * e
  • rate(I -> R) = gamma * i

SEIRD

  • rate(S -> E) = beta * i * s
  • rate(E -> I) = delta * e
  • rate(I -> R) = (1 - alpha) * gamma * i
  • rate(I -> D) = alpha * rho * i

where

  • R0 = basic reproduction number
  • I = incubation period (days)
  • delta = 1/I
  • D = contagious period (days)
  • gamma = 1/D
  • beta = R0 * gamma
  • H = treatment period (days)
  • rho = 1/H
  • alpha = fatality rate

Consensus values in the COVID-19 literature seem to be approximately: R0 = 2.5, D = 6 days, I = 2 days, H = 14 days, alpha = 0.05 - 0.1

Note: alpha is not equal to the conventional infection fatality rate, IFR. The two are related by

alpha = H / (D / IFR - D + H).

If IFR << 1, then to a good approximation,

alpha โ‰ˆ IFR * H / D, or IFR โ‰ˆ D * alpha / H.

Node-RED Flow Tabs

Contagion Models: allows the user to compare the results of two models, with the type and parameters selected independently.

Interventions: shows the result of imposing or modifying interventions (lockdown or social distancing), defined by changes in R0 at a specified times.

node-red-contagion's People

Contributors

drmibell 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.