Epidemiology: The SIR model: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 32: Line 32:
var yaxis = brd.createElement('axis', [[0,0], [0,1]], {});
var yaxis = brd.createElement('axis', [[0,0], [0,1]], {});
              
              
var s = brd.createElement('slider', [[0,-0.5], [10,-0.5],[0,0.03,1]], {name:'s'});
var s = brd.createElement('slider', [[0,-0.3], [10,-0.3],[0,0.03,1]], {name:'s'});
brd.createElement('text', [12,-0.5, "initially infected population rate"]);
brd.createElement('text', [12,-0.5, "initially infected population rate"]);
var beta = brd.createElement('slider', [[0,-0.6], [10,-0.6],[0,0.5,1]], {name:'β'});
var beta = brd.createElement('slider', [[0,-0.4], [10,-0.4],[0,0.5,1]], {name:'β'});
brd.createElement('text', [12,-0.6, "β: infection rate"]);
brd.createElement('text', [12,-0.6, "β: infection rate"]);
var gamma = brd.createElement('slider', [[0,-0.7], [10,-0.7],[0,0.3,1]], {name:'γ'});
var gamma = brd.createElement('slider', [[0,-0.5], [10,-0.5],[0,0.3,1]], {name:'γ'});
brd.createElement('text', [12,-0.7, "γ: recovery rate"]);
brd.createElement('text', [12,-0.7, "γ: recovery rate"]);



Revision as of 17:46, 21 January 2009

Simulation of differential equations with turtle graphics using JSXGraph.

SIR model without vital dynamics

A single epidemic outbreak is usually far more rapid than the vital dynamics of a population, thus, if the aim is to study the immediate consequences of a single epidemic, one may neglect the birth-death processes. In this case the SIR system described above can be expressed by the following set of differential equations:

[math]\displaystyle{ \frac{dS}{dt} = - \beta I S }[/math]
[math]\displaystyle{ \frac{dR}{dt} = \gamma I }[/math]
[math]\displaystyle{ \frac{dI}{dt} = -(dS+dR) }[/math]

The lines in the JSXGraph-simulation below have the following meaning:

* Blue: Rate of susceptible population
* Red: Rate of infected population
* Green: Rate of recovered population (which means: immune, isolated or dead)