Virus Epidemics SIR Model
|
04-08-2020, 08:13 AM
(This post was last modified: 04-08-2020 08:56 AM by Ángel Martin.)
Post: #1
|
|||
|
|||
Virus Epidemics SIR Model
Chances are you're reading this from your "shelter in place" Covid-19 confinement, and thus will resonate with the concepts involved. This short program is a direct application of Jean-Marc Baillard's ODE routine "RK4C" from the Differential Equations module, available at TOS and the CL Library (id$ = "DIFF").
The SIR model calculates the values of Susceptible, Infected and Removed groups of population in a total population of N individuals. N = S + I + R. The virus is modeled with two parameters that indicate the infection rate "a" and the recovery rate "b". These are the crux of the model, as they need to be expressed in the same units used by the ODEs to show the individual results - i.e. a=2.3 infected people per person and DAY, and b = 0.3 people recovered per DAY if we want to look at daily numbers. Supposedly your local Covid-19 statistics could be used to estimate the parameters, but this is tricky since the reported infection cases are much lower than the actual ones. Besides, the Removed section includes both the recovered (cured) and the dead patients. The ODEs are normalized by the total population size N, but this is transparent to the user and it's done by the routine itself. The ODE's are implemented in the LBL "d/dt" subroutine: dS/dt = -a. I(t).S(t) dI/dt = a. S(t). I(t) - b.I(t) dR/dt = b.I(t) So here you have it, play with your a,b parameters (XEQ A) and define your initial conditions N, So, Io (XEQ B) to start getting the results for the S,I,R sectors of population. The model assumes Ro=0. Remember that N=S+I+R at all times. Program Listing: Code: 9:41AM 04/08 Note: ARCLI is in the AMC_OS/X Module. It appends the integer part o X to ALPHA. PS. Looks that the formatting codes don't work within a CODE block? PSS. - SIR material abounds on the Web, here's one video that was useful to me to grasp some details: https://www.youtube.com/watch?v=k6nLfCbAzgo&t=867s "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Virus Epidemics SIR Model - Ángel Martin - 04-08-2020 08:13 AM
RE: Virus Epidemics SIR Model - Geoff Quickfall - 04-08-2020, 03:56 PM
RE: Virus Epidemics SIR Model - Ángel Martin - 04-09-2020, 12:24 AM
RE: Virus Epidemics SIR Model - Ángel Martin - 04-15-2020, 11:55 AM
RE: Virus Epidemics SIR Model - SlideRule - 04-09-2020, 12:39 PM
RE: Virus Epidemics SIR Model - Ángel Martin - 04-20-2020, 10:28 AM
|
User(s) browsing this thread: 4 Guest(s)