Coursewk
Coursewk
REGN : 23/U/GMAPM/0805/PE
COURSEWORK III
Questions
1. From the models developed in assignment II,show the following;
2. Read and make brief notes on global stability of equilibrium points(Techniques used)
3. Make a literature search on optimal control analysis (generally, not necessarily in im-
munology)
Solution to question 1
(a)positivity of solutions
Consider the SIR model for transmission dynamics of Hepatitis B virus with demography ;
dS
dt
= Λ − αSI − µS
dI
dt
= αSI − (µ + γ)I (1)
dR
dt
= γI − µR
where:
dN dS dI
= +
dt dt dt
= (Λ − αSI − µS) + (αSI − (µ + γ)I)
= Λ − µ(S + I) − γI
dN
⇒ = Λ − µN − γI (6)
dt
Lemma:
The feasible region Ω is defined by the set
Λ
Ω = {(S(t), I(t)) ∈ R2+ | S(t) + I(t) ≤ }
µ
dN
+ µN ≤ Λ
dt Z
I.F = exp( µdt) = exp(µt)
dN
exp(µt) + µN exp(µt) ≤ Λ exp(µt)
dt
Λ
N exp(µt) ≤ exp(µt) + c
µ
Λ
N (t) ≤ + c exp(−µt)
µ
Λ
⇒ N (0) ≤ + c
µ
Λ
⇒ c = N (0) −
µ
Λ Λ
∴ N (t) ≤ + (N (0) − ) exp(−µt)
µ µ
Page 3
(c)Numerical solution
To show the numerical solution,we used the Runge-Kutta method, a numerical method for
solving ordinary differential equations. A Python code that implements the SIR model using the
fourth-order Runge-Kutta method is given below.In this code,SIR-MODEL function defines
the SIR model and solves it using the Runge-Kutta method implemented through the odeint
function from SciPy. The results are then plotted using Matplotlib.
Page 4
From the solution curves above,the susceptible population is expected to decrease over time
as individuals become infected and then recover. The Infected population is expected to rise
initially indicating the spread of infection, but eventually will decrease as infected individuals
recover. By observing the Infected (I) curve, you can see that the number of infected individuals
eventually reaches zero within two years, indicating that the infection will disappear from the
population.
Page 5
Solution to question 2
Global stability of disease free equilibrium point
Global stability of the disease-free equilibrium can be established for many models, particularly
for models for which the disease-free equilibrium is the only equilibrium when R0 < 1. The basic
reproduction number R0 plays a pivotal role in determining the stability of the DFE. It is defined
as the average number of secondary infections generated by a single infected individual in a fully
susceptible population. When R0 < 1 the disease fails to establish a sustained transmission
chain, leading to the eventual extinction of the infection .Conversely, if R0 > 1 ,the disease can
persist within the population. Global stability analysis techniques, such as Lyapunov functions
or LaSalle’s invariance principle, provide mathematical frameworks to ascertain the stability
of the DFE. These methods evaluate the behavior of the system over time, discerning whether
trajectories converge towards the disease-free state. We note that global stability of the disease-
free equilibrium cannot be established for all models. Establishing global stability for the SIR
model is perhaps possible through many different techniques. We present one that works well
for many models, including partial differential equation models We shall consider the SIR model
with demography:
dS
dt
= Λ − βIS − µS
dI
dt
= βIS − (µ + α)I (7)
dR
dt
= αI − µR
We add the 3 equations to get the rate of change in total population.The model of the total
population is
dN
= Λ + µN
dt
where
N =S+I +R
Since the variable R does not appear in the other equations in the system,the equation of R
can be discarded and the reduced system which is studied has the same dynamical behaviour
as the original system.Hence the reduced form of the model without the ordinary differential
equation for R is given as ;
dS
dt
= Λ − βIS − µS
dI (8)
dt
= βIS − (µ + α)I
• S: number of susceptible individuals,
• α: recovery rate,
• Λ: recruitment rate (constant rate of new susceptible individuals entering the population),
Page 6
Before we do global stability analysis,we first non dimensionalise system (8) From (8),we let
τ = (α + µ)
Therefore;
τ
t=
α+µ
dt τ
⇒ =
dτ α+µ
let:
τ
N (t) = N ( ) = N̂ (τ )
α+µ
Similarly;
ˆ )
I(t) = I(τ
And;
S(t) = Ŝ(τ )
Ŝ(τ ) = S(t)
We get;
dŜ dS
=
dτ dτ
dS dt
= .
dt dτ
1 dS
=
α + µ dt
Applying chain rule on ;
ˆ ) = I(t)
I(τ
We get;
dIˆ dI
=
dτ dτ
dI dt
= .
dt dτ
1 dI
=
α + µ dt
Therefore
dŜ 1 dS
=
dτ α + µ dt
dIˆ 1 dI
=
dτ α + µ dt
Page 7
We rescale Ŝ and Iˆ variables with the total limiting population size ( lim N (t)) Hence
t→∞
µŜ
x(t) =
Λ
and ;
µIˆ
y(t) =
Λ
The new dependent variables x(τ ) andy(τ ) are also dimensionless.
Therefore:
Λx(τ )
Ŝ =
µ
Λy(τ )
Iˆ =
µ
Λ dx(τ ) 1 Λx(τ ) Λy(τ ) Λx(τ )
⇒ = Λ−β −µ
µ dτ α+µ µ µ µ
dx(τ ) µ Λβ
⇒ = (1 − x) − xy
dτ α+µ µ(α + µ)
dx(τ )
∴ = ρ(1 − x) − R0 xy
dτ
µ Λβ
Where ρ = α+µ
and R0 = And also;
µ(α+µ)
Λ dy(τ ) 1 Λx(τ ) Λy(τ ) Λy(τ )
= β − (α + µ)
µ dτ α+µ µ µ µ
dy Λβ
⇒ = xy − y
dτ µ(α + µ)
dy
∴ = (R0 x − 1)y
dτ
Therefore the non dimensionalised system is given by;
dx
dτ
= ρ(1 − x) − R0 xy
dy (9)
dτ
= (R0 x − 1)y
The dimensionless form of the SIR model with demography is equivalent to the original one,since
the solutions of both systems have the same long term behaviour .
ρ(1 − x) = R0 xy
ρ(1 − x)
y=
RO x
1
= ρ(1 −
R0
Theorem
Assume R0 < 1,then the disease free equilibrium is globally stable.
proof;
Working again with the dimensionless SIR model (9) ,we first note that if x(0) > 0,then
x0 (τ ) < 0 .So x(τ ) is a decreasing function if x > 1.Assume τ0 > 0 exists such that x(τ0) = 1,
then x0 (τ0 ) < 1 and x(τ ) ≤ 1 ∀τ ≥ τ0 .If x(0) ≤ 1,we may take τ0 = 0 We consider the equation
for y(τ );
For;
τ ≤ τ0
we have;
y 0 (τ ) ≤ (R0 − 1)y(τ )
Z Z
dy(τ )
≤ (R0 − 1)dτ
y(τ )
y(τ ) ≤ k exp(R0 − 1)τ
y(τ0 ) ≤ k exp(R0 − 1)τ0
k = y(τ0 ) exp(−(R0 − 1))τ0
∴ y(τ ) ≤ y(τ0 ) exp(R0 − 1)(τ − τ0 )
lim y(τ ) = 0
τ →∞
lim sup x ≤ 1
τ →∞
Page 9
We need lim sup ,since we do not know whether the limit exists.From the equation for x,we
have;
x0 ≤ ρ(1 − x)
dx
≤ ρ(1 − x)
Z dτ Z
dx
≤ ρdτ
1−x
−ln(1 − x) ≤ ρτ + c
x(τ ) ≤ 1 − (1 − x(0)) exp(−ρτ )
∴ x(τ ) ≤ 1 + x(0) exp(−ρτ ) − exp(−ρτ )
Hence lim sup x(τ ) ≤ 1 On the other hand,since lim = 0,this implies that for every ,there
τ →∞ τ →∞
exists τ0 > 0 such that y ≤ for τ > τ0 .
For these values of τ ,we have
x0 ≥ ρ(1 − x) − R0 x
dx
≥ −(ρ + R0 )x + ρ
dτ
dx
+ (ρ + R0 )x ≥ ρ
dτ Z
I.F = exp( (ρ + R0 )dτ )
= exp((ρ + R0 )τ )
dx
⇒ exp((ρ + R0 )τ ) + exp((ρ + R0 )τ )(ρ + R0 )x ≥ ρ exp((ρ + R0 )τ )
dτ Z Z
d
(x exp((ρ + R0 )τ ) ≥ ρ exp((ρ + R0 )τ )dτ
dτ
ρ
x exp((ρ + R0 )τ ) ≥ exp((ρ + R0 )τ ) + c
ρ + R0
ρ
x(τ ) ≥ + c exp(−(ρ + R0 )τ )
ρ + R0
ρ ρ
x(τ ) ≥ + x(0) − exp(−(ρ + R0 )τ )
ρ + R0 ρ + R0
ρ
lim inf x(τ ) ≥
τ →∞ ρ + R0
Since the inequality holds for every this means that lim inf x(τ ) ≥ 1 . Furthermore ,the lim
τ →∞
inf and lim sup are the same,the limit as τ → ∞ of x exists and lim x(τ ) = 1
τ →∞
This completes the proof of the global stability of the disease free equilibrium point.
x0 + y 0 ≤ ρ − ρ̂(x + y)
dx dy
+ ≤ ρ − ρ̂(x + y)
dτ dτ
d(x + y)
+ ρ̂(x + y) ≤ ρ
dτ Z
I.F = exp( ρ̂dτ ) = exp(ρ̂τ )
d(x + y)
exp(ρ̂τ ) + exp(ρ̂τ )ρ̂(x + y) ≤ exp(ρ̂τ )ρ
Zdτ Z
d
((x + y) exp(ρ̂τ ))dτ ≤ exp(ρ̂τ )ρdτ
dτ
ρ
(x + y)(τ ) ≤ + C exp(ρ̂τ )
ρ̂
ρ
≤ k exp(−ρ̂τ ) + (1 − exp(−ρ̂τ ))
ρ̂
Where k is the value of the initial conditions.We obtain that;
ρ
lim sup(x + y) ≤
τ →∞ ρ̂
That is, solutions remain bounded. We conclude that the first quadrant is positively invariant
with respect to the solutions of (9) and contains the omega limit set of every initial condition.
0
Therefore, we can apply Poincare –Bendixson theorem. When R0 > 1, if y(0) = 0, then the
solutions will stay on the x-axis and converge to the disease-free equilibrium. If y(0) > 0,
that is, u0 = (x(0), y(0)) ∈ X, then we claim that the disease-free equilibrium does not belong
to the omega limit set of u0 . Suppose the disease-free equilibrium belongs to ω(u0 ). Then,
since the disease-free equilibrium is an unstable saddle, it has a stable manifold that is given
by the x-axis. That is the case, because each solution that starts from y(0) = 0, that is,
that starts on the x-axis, stays on the x-axis and converges to the disease-free equilibrium.
Hence, the stable manifold of the disease-free equilibrium is not in X. Hence, ω(u0 ) would
have to contain another equilibrium, namely the endemic equilibrium. But since the endemic
equilibrium is locally asymptotically stable, every solution that gets close to it, stays close to
it. Therefore, the disease-free equilibrium does not belong to ω(u0 ). Hence, the omega limit
set of u0 consists of the endemic equilibrium only. All solutions with I(0) > 0converge to the
endemic equilibrium.
Page 11
Solution to question 3
Optimal control
In mathematical epidemiology, optimal control problems aim to find strategies that minimize
the spread of infectious diseases while minimizing associated costs or maximizing certain objec-
tives. Optimal control theory aims to find control strategies that minimize a certain objective
function, often representing the cost associated with the disease spread and control measures.
In the context of the SIR model, the objective function typically incorporates factors such as
the number of infected individuals, economic costs, and intervention efforts.
The mathematical theory used to derive optimal control strategies that vary in time is called
optimal control theory.
• Define the Objective Function: Decide on the objective to be optimized. This could be
minimizing the number of infected individuals, minimizing the economic cost of control
measures, maximizing the number of recovered individuals, or any other relevant objec-
tive.
• Introduce Control Variables: Identify variables that can be controlled to influence the
dynamics of the epidemic. These control variables could represent interventions such as
vaccination campaigns, quarantine measures, social distancing policies, etc. Introduce
control functions that dictate how these interventions change over time.
• Formulate the Optimal Control Problem: Define the optimal control problem by specify-
ing the objective function to be optimized, the dynamic equations of the epidemiological
model with the introduced control variables, and any constraints on the control variables
or state variables.
• Analyze and Interpret Results: Examine the optimal control trajectories and correspond-
ing state trajectories to understand the implications of the optimal control strategy. An-
alyze how the control interventions evolve over time and how they affect the dynamics of
the epidemic and the objective function.
• Implement the optimal control strategy in simulations or real-world scenarios and vali-
date its effectiveness. Compare the results with alternative control strategies or with no
intervention to assess the benefits of the optimized approach.
Page 12
Example
consider a simple SIR model
dS
dt
= A − βS − λIS + µR
dI
dt
= λIS − (λ + β + γ)I (10)
dR
dt
= γI − (β + µ)R
where:
• A :Recruitment rate
• λ: transmission rate ,
We consider two control strategies: vaccination and treatment. Vaccination involves administer-
ing a vaccine to susceptible individuals, reducing their susceptibility to the disease. Treatment
is administered to the infective individuals there by reducing the rate of infection. Optimal
control theory seeks to minimize an objective function representing the cost of disease spread
and control measures. The control variables 0 ≤ u2 (t) ≤ 1 and 0 ≤ u1 (t) ≤ 1 represent the
vaccination and treatment rates, respectively.
Objective function
The objective function is formulated as:
Z T
u2 u2
J(u1 , u2 ) = (A1 Ih + A2 1 + A3 2 )dt (11)
0 2 2
where Ih represents the number of infected individuals.
• A1 Ih : Total number of individuals who are infected and is taken as a measure of the
death associated with the outbreak
u21
• A2 2
: Cost of treatment
u22
• A3 2
: Cost of vaccination
A1 , A2 ,A3 are relative weights fixed to the cost of minimizing the total number of infected
individuals,cost of vaccination and cost of treatment respectively
Page 13
Optimal control problem
The optimal control problem can be formulated as:
Z T
u2 u2
J(u1 , u2 ) = min (A1 Ih + A2 1 + A3 2 )dt (12)
u1 ,u2 0 2 2
subject to
dS
dt
= A − βS − λIS + µR − u2 S
dI
dt
= λIS − (λ + β + γ)I − u1 I (13)
dR
dt
= γI − (β + µ)R + u1 I + u2 S
0 ≤ u2 (t) ≤ 1
0 ≤ u1 (t) ≤ 1
such that
0 ∂H
λS = −
∂S
0 ∂H
λI = −
∂I
0 ∂H
λR = −
∂R
Where the Hamiltonian function is defined as;
u21 u2
H(S, I, R) = (A1 Ih + A2 + A3 2 ) + λS (A − βS − λIS + µR − u2 S)+
2 2
λI (λIS − (λ + β + γ)I − u1 I) + λR (γI − (β + µ)R + u1 I + u2 S)
u21 u2
H(S, I, R) = (A1 Ih + A2 + A3 2 ) + λS (A − βS − λIS + µR − u2 S)+
2 2
λI (λIS − (λ + β + γ)I − u1 I) + λR (γI − (β + µ)R + u1 I + u2 S)
Page 14
Therefore;
∂H
= −[λS (−β − λI − u2 ) + λI (λI) + λR (u2 )]
∂S
∂H
= −[A1 + λS (−λS) + λI (λS − (α + β + γ + u1 ) + λR (γ + (u1 )]
∂I
∂H
= −[λS (−µ) + λR (−(β + µ)]
∂R
hence the adjoint system is given as;
0
λS = λS (β + λI + u2 ) − λI λI − λR u2
0
λI = −A1 + λS λS − λI λS + λI (α + β + γ + u1 ) − λR (γ + (u1 )]
0
λR = −λS µ + λR (β + µ)
with final conditions:
λS (T ) = λI (T ) = λR (T ) = 0
Furthermore ,we find the optimal control u∗1 andu∗2 ;
λI − λR I
u∗1 = min{1, max(0, )}
A2
λS − λR I
u∗2 = min{1, max(0, )}
A3
Proof;
We form the hamiltonian H given by ;
u21 u2
H(S, I, R) = (A1 Ih + A2 + A3 2 ) + λS (AN − βS − λIS + µR − u2 S)+
2 2
λI (λIS − (λ + β + γ)I − u1 I) + λR (γI − (β + µ)R + u1 I + u2 S)
and the transversality conditions ; λS (T ) = λI (T ) = λR (T ) = 0
Therefore we differentiate the Hamiltonian with respect to u1 &u2 ,we obtain the optimality
condition that follows;
∂H
= A2 u1 − λI I + λR I
∂u1
(λI − λR )I
⇒ u∗1 =
A2
∂H
= A3 u2 − λS S + λR S
∂u2
(λS − λR )S
⇒ u∗2 =
A3
We impose some bounds on the control variables ;
0 ≤ u1 ≤ 1 and 0 ≤ u2 ≤ 1
Initially, the number of susceptible individuals will decrease as some individuals get infected.
However, with the introduction of vaccination, this decline may slow down as more individuals
become immune through vaccination.The number of infectious individuals will typically rise
at the beginning as the disease spreads through the population. However, with the introduc-
tion of treatment and vaccination, the rate of increase in the number of infectious individuals
should decrease. Treatment will reduce the duration of infectiousness for those infected, while
vaccination will decrease the number of susceptible individuals who can become infected.The
number of recovered individuals will increase over time as more people recover from the disease.
Treatment may speed up this process by reducing the duration of infection, while vaccination
may also contribute by reducing the number of individuals who become infected in the first
place.
However, over time, the number of recovered individuals might start to reduce. The introduc-
tion of control measures may slow down the rate of recovery, as fewer individuals are getting
infected and subsequently recovering from the disease
Page 16