8.3 Spreading of Disease: A System of First Order ODEs
237
The new, extended differential equations with the V quantity become
S
= −βSI + νR − pS,
(8.36)
V
= pS,
(8.37)
I
= βSI − γ I,
(8.38)
R
= γ I − νR .
(8.39)
We shall refer to this model as the SIRV model.
The new equation for V poses no difficulties when it comes to the numerical
method. In a Forward Euler scheme we simply add an update
V
n+1
= V
n
+ pΔtS
n .
The program needs to store V (t) in an additional array V, and the plotting command
must be extended with more arguments to plot V versus t as well. The complete
code is found in the file SIRV1.py.
Using p = 0.0005 and p = 0.0001 as values for the vaccine efficiency
parameter, the effect of vaccination is seen in Figs. 8.15 and 8.16, respectively.
(other parameters are as in Fig. 8.13).
8.3.9 Discontinuous Coefficients: A Vaccination Campaign
What about modeling a vaccination campaign? Imagine that 6 days after the
outbreak of the disease, the local health station launches a vaccination campaign.
They reach out to many people, say 10 times as efficiently as in the previous
(constant vaccination) case. If the campaign lasts for 10 days we can write
p(t) =
0.005, 6 · 24 ≤ t ≤ 15 · 24,
0,
otherwise
Note that we must multiply the t value by 24 because t is measured in hours, not
days. In the differential equation system, pS(t) must be replaced by p(t)S(t), and in
this case we get a differential equation system with a term that is discontinuous. This
237
The new, extended differential equations with the V quantity become
S
= −βSI + νR − pS,
(8.36)
V
= pS,
(8.37)
I
= βSI − γ I,
(8.38)
R
= γ I − νR .
(8.39)
We shall refer to this model as the SIRV model.
The new equation for V poses no difficulties when it comes to the numerical
method. In a Forward Euler scheme we simply add an update
V
n+1
= V
n
+ pΔtS
n .
The program needs to store V (t) in an additional array V, and the plotting command
must be extended with more arguments to plot V versus t as well. The complete
code is found in the file SIRV1.py.
Using p = 0.0005 and p = 0.0001 as values for the vaccine efficiency
parameter, the effect of vaccination is seen in Figs. 8.15 and 8.16, respectively.
(other parameters are as in Fig. 8.13).
8.3.9 Discontinuous Coefficients: A Vaccination Campaign
What about modeling a vaccination campaign? Imagine that 6 days after the
outbreak of the disease, the local health station launches a vaccination campaign.
They reach out to many people, say 10 times as efficiently as in the previous
(constant vaccination) case. If the campaign lasts for 10 days we can write
p(t) =
0.005, 6 · 24 ≤ t ≤ 15 · 24,
0,
otherwise
Note that we must multiply the t value by 24 because t is measured in hours, not
days. In the differential equation system, pS(t) must be replaced by p(t)S(t), and in
this case we get a differential equation system with a term that is discontinuous. This
