Epidemiology: The SIR model: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
Simulation of differential equations with turtle graphics using | Simulation of differential equations with turtle graphics using [http://jsxgraph.org JSXGraph]. | ||
===SIR model without vital dynamics=== | ===SIR model without vital dynamics=== | ||
Line 9: | Line 9: | ||
:<math> \frac{dI}{dt} = -(dS+dR) </math> | :<math> \frac{dI}{dt} = -(dS+dR) </math> | ||
The lines in the JSXGraph-simulation below have the following meaning: | |||
* <span style="color:Blue">Blue: Rate of susceptible population</span> | |||
* <span style="color:red">Red: Rate of infected population</span> | |||
* <span style="color:green">Green: Rate of recovered population (which means: immune, isolated or dead) | |||
Line 15: | Line 20: | ||
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script> | <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/prototype.js"></script> | ||
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script> | <script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script> | ||
<div id="box" class="jxgbox" style="width:600px; height: | <form><input type="button" value="clear and run" onClick="clearturtle();run()"></form> | ||
<div id="box" class="jxgbox" style="width:600px; height:600px;"></div> | |||
<script language="JavaScript"> | <script language="JavaScript"> | ||
var brd = JXG.JSXGraph.initBoard('box', {originX: 20, originY: 300, unitX: 20, unitY: 250}); | var brd = JXG.JSXGraph.initBoard('box', {originX: 20, originY: 300, unitX: 20, unitY: 250}); |
Revision as of 17:37, 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)