This is a simple SIR model, built to reproduce the one that we made in InsightMaker -- only we’re going to parameterize it, so that it’s parameterized in a more sensible way.

Andy Long
Spring, 2018

It turns out that we have more parameters than we need in the model we introduced initially. The dynamics -- that is, the behavior of the system in time -- is controlled by only two parameters is seems: the ratio of the recovery to infection parameters, and the ratio of the resusceptible to infection parameters.

We rescale time, rescale rates as rates relative to the infection rate (Subscript[r, I]), and introduce a “carrying capacity” K, which represents the total population (which is fixed -- constant -- in this model). We then rescale each population by dividing by K, so that the variables now represent the proportion in each state -- susceptible, infected, or recovered.

Define ρ=((Subscript[r, R])/(Subscript[r, I])), and define λ=((Subscript[r, L])/(Subscript[r, I])). These are the two new parameters that control all of the dynamics of this model. How fast does recovery occur relative to infection (ρ), and how quickly do people become susceptible again (Lose their immunity) relative to the infection rate (λ)?

It will turn out that if the infection rate is greater than the recovery rate (i.e. ρ<1), then you’ll always have some infecteds around -- we will say that the disease is endemic.

It really makes more sense to scale the three populations to their relative contributions in the total population, so that they become proportions of the population. Their sum is then 1.

So we divide each of S, I, and R by K (=S+I+R), turning these into relative proportions in the population.

Finally, and perhaps most oddly, we can rescale time -- so that it becomes expressed in terms of a time step relevant to the infectivity of the disease. For example, the De Vries example discussed a rate of 1/50/day (of the infected population recovering from the disease).

Let’s suppose that the infection rate is 2/50/day, i.e. 1/25/day. We’re going to define
 τ=(Subscript[r, I])t
 so that  time step of τ=1 corresponds to 25 days.

Clear["Global`*"]

Manipulate[
lv=
NDSolve[
{(*  susceptible: *)
sus'[t]==ResusceptibleRatio  rec[t]- sus[t] inf[t],
(* infected: *)
inf'[t]==sus[t] inf[t]-RecoveryRatio inf[t],
(* recovered: *)
rec'[t]==RecoveryRatio inf[t]-ResusceptibleRatio  rec[t],
sus[0]==1-infected-recovered,
inf[0]==infected,
rec[0]==recovered
},
{sus[t],inf[t],rec[t]},
{t,0,tend}];
asymptotePlot=Plot[{
RecoveryRatio,
ResusceptibleRatio(1-RecoveryRatio)/(ResusceptibleRatio+RecoveryRatio),
RecoveryRatio(1-RecoveryRatio)/(ResusceptibleRatio+RecoveryRatio)}
,{t,0,tend},PlotStyle->Dashed];
asymptotePlotNull=Plot[{0,1},{t,0,tend},PlotStyle->Dashed];
p2=Plot[Evaluate[{sus[t],inf[t],rec[t]}/.lv],{t,0,tend},
PlotRange->All,AxesOrigin->{0,0}];
If[RecoveryRatio<=1,Show[p2,asymptotePlot],Show[p2,asymptotePlotNull]],
{{lv,{}},None},
{{tend,25},1,200,1},
{{infected,.02},0,.99,.01},
{{recovered,.01},0,1-infected,.01},
{{RecoveryRatio,.5},0.0,10,.1},
{{ResusceptibleRatio,.05},0,10,.01}
]