# Optimal Control of an SIR Model with Delay in State and Control Variables

Authors: Mohamed Elhia; Mostafa Rachik; Elhabib Benlahmar
Journal: ISRN Biomathematics
 (2013)

---

## Abstract

We will investigate the optimal control strategy of an SIR epidemic model with time delay in state and control variables. We use a vaccination program to minimize the number of susceptible and infected individuals and to maximize the number of recovered individuals. Existence for the optimal control is established; Pontryagin’s maximum principle is used to characterize this optimal control, and the optimality system is solved by a discretization method based on the forward and backward difference approximations. The numerical simulation is carried out using data regarding the course of influenza A (H1N1) in Morocco. The obtained results confirm the performance of the optimization strategy.


---

## Body

## 1. Introduction

For a long time, infectious diseases have caused several epidemics, leaving behind them not only millions of dead and infected individuals but also severe socioeconomic consequences. Nowadays, mathematical modeling of infectious diseases is one of the most important research areas. Indeed, mathematical epidemiology has contributed to a better understanding of the dynamical behavior of infectious diseases, its impacts, and possible future predictions about its spreading. Mathematical models are used in comparing, planning, implementing, evaluating, and optimizing various detection, prevention, therapy, and control programs. Many influential results related to the development and analysis of epidemiological models have been established and can be found in many articles and books (see, e.g., [1–3]).Epidemiological models often take the form of a system of nonlinear, ordinary, and differential equations without time delay. However, for various biological reasons, the real dynamic behavior of an epidemic depends not only on its current state but also on its past history. Thus, to reflect the real behavior of some diseases, many researchers have proposed and analyzed more realistic models including delays to model different mechanisms in the dynamics of epidemics like latent period, temporary immunity and length of infection (see, e.g., [4–8] and the references therein).To the best of our knowledge, including time delay in both state and control variables in the context of an epidemic controlled model has not been studied. There have been some works (like [9, 10]) which study an optimal control problem with time delay but only in the state variable. In this paper, we will investigate the effect of a vaccination program in the case of an SIR (susceptible-infected-recovered) epidemic model with time delay in the control and the state variables. To do this, we will consider an optimally controlled SIR epidemic model with time delay, where the control means the percentage of susceptible individuals being vaccinated per time unit, and the time delay represents the required time so that a vaccinated susceptible person moves from the susceptibles class to the recovered class. We use optimal control approach to minimize the number of susceptible and infected individuals and to maximize the number of recovered individuals during the course of an epidemic.This paper is organized as follows. In Section2, we will present a mathematical model with time delay and a control term. The analysis of optimization problem is presented in Section 3. In Section 4, we will give a numerical appropriate method and the corresponding simulation results. Finally, the conclusions are summarized in Section 5.


## 2. Mathematical Model

We consider the SIR epidemic model with constant total population size. The population is divided into three disease-state compartments: susceptible individuals (S), people who can catch the disease; infectious (infective) individuals (I), people who have the disease and can transmit the disease; recovered individuals (R), people who have recovered from the disease. We assume that an individual can be infected only through contacts with infectious individuals and that immunity is permanent. The transitions between different states are described by the following parameters:(i)
Λ is the recruitment rate of susceptibles;(ii)
β is the effective contact rate;(iii)
d is the natural mortality rate;(iv)
γ is the recovery rate;(v)
ϵ is the disease induced death rate. The population dynamics is given by the following system of ordinary differential equations subject to nonnegative initial conditions:
(1)dS(t)dt=Λ-βS(t)I(t)N(t)-dS(t),dI(t)dt=βS(t)I(t)N(t)-(γ+d+ϵ)I(t),dR(t)dt=γI(t)-dR(t),
where S(0)=S0, I(0)=I0, R(0)=R0, and N(t)=S(t)+I(t)+R(t) is the total population number at time t.The strategy of the control we adopt consists of a vaccination program; our goal is to minimize the level of susceptible and infected individuals and to maximize the recovered individuals. Into the model (1) we include a control u that represents the percentage of susceptible individuals being vaccinated per time unit. In order to have a realistic model, we need to take into account that the movement of the vaccinated susceptible individuals from the class of susceptibles into the recovered class is subject to delay. Thus, the time delay is introduced in the system as follows: at time t only a percentage of susceptible individuals that have been vaccinated τ time unit ago, that is, at time t-τ, are removed from the susceptible class and added to the recovered class. So the mathematical system with time delay in state and control variables is given by the nonlinear retarded differential equations:
(2)dS(t)dt=Λ-βS(t)I(t)N(t)-dS(t)-u(t-τ)S(t-τ),dI(t)dt=βS(t)I(t)N(t)-(γ+d+ϵ)I(t),dR(t)dt=γI(t)-dR(t)+u(t-τ)S(t-τ).
In addition, for biological reasons, we assume, for θ∈[-τ,0], that S(θ), I(θ), and R(θ) are nonnegative continuous functions and u(θ)=0. Note that the control u is assumed to be integrable in the sense of Lebesgue, bounded with 0≤u≤b<1, and b is a given constant.To show the existence of solutions for the control system (2), we first prove that the system (2) is dissipative; that is, all solutions are uniformly bounded in a proper subset Ω∈ℝ+3.Let(S,I,R)∈ℝ+3 be any solution with nonnegative initial conditions. Adding equations of (2) we get
(3)dNdt=Λ-dN-ϵI<Λ-dN.
After integration, using the constant variation formula, we have
(4)N(t)≤Λd+N(0)e-dt.
It then follows that
(5)0≤N(t)≤Λdast⟶∞.
Therefore all feasible solutions of the system (2) enter into the region
(6)Ω={(S,I,R)∈ℝ+3:N≤Λd}.
Then we can rewrite (2) in the following form:
(7)dXdt=AX+F(X,Xτ)=G(X,Xτ),
where
(8)X(t)=[S(t)I(t)R(t)],A=[-d000-(d+γ+ε)00γ-d],F(X(t),Xτ(t))=[Λ-βS(t)I(t)N(t)-uτ(t)Sτ(t)βS(t)I(t)N(t)uτ(t)Sτ(t)],uτ(t)=u(t-τ),Xτ(t)=X(t-τ).The second term on the right-hand side of (7) satisfies
(9)|F(X1(t),X1τ(t))-F(X2(t),X2τ(t))|≤M1|X1(t)-X2(t)|+M2|X1τ(t)-X2τ(t)|,
where M1 and M2 are some positive constants, independent of the state variables S(t), I(t), and R(t), and
(10)|X1(t)-X2(t)|=|S1(t)-S2(t)|+|I1(t)-I2(t)|+|R1(t)-R2(t)|,|X1τ(t)-X2τ(t)|=|S1τ(t)-S2τ(t)|+|I1τ(t)-I2τ(t)|+|R1τ(t)-R2τ(t)|.
Here
(11)Siτ(t)=Si(t-τ),Iiτ(t)=Ii(t-τ),Riτ(t)=Ri(t-τ)fori=1,2.
Moreover, we get
(12)|G(X1,X1τ)-G(X2,X2τ)|≤M(|X1-X2|+|X1τ-X2τ|),
where
(13)M=max(M1+∥A∥;M2)<∞.Thus, it follows that the functionG is uniformly Lipschitz continuous. From the definition of the control u(t) and the restriction on S(t), I(t), and R(t)≥0, we see that a solution of the system (7) exists (see [11]).


## 3. The Optimal Control Problem

Our goal is to minimize the number of susceptible and infected individuals and to maximize the number of recovered individuals during the course of an epidemic. Mathematically, for a fixed terminal timetf, the problem is to minimize the objective functional
(14)J(u)=∫0tf‍{A1S(t)+A2I(t)-A3R(t)+A42u2(t)}dt,
where Ai≥0 (for i=1,…,4) denote weights that balance the size of the terms. In other words, we seek the optimal control u* such that
(15)J(u*)=min{J(u):u∈𝒰},
where 𝒰 is the set of admissible controls defined by
(16)𝒰={u:0≤u≤b<1,t∈[0,tf],uisLebesguemeasurable[0,tf]}.


### 3.1. Existence of an Optimal Control

The existence of the optimal control can be obtained using a result by Fleming and Rishel in [12].Theorem 1.
Consider the control problem with system (2). There exists an optimal control u*∈𝒰 such that
(17)J(u*)=minu∈𝒰J(u).Proof.
To use an existence result in [12], we must check the following properties. (1)
The set of controls and corresponding state variables is nonempty.(2)
The control set𝒰 is convex and closed.(3)
The right-hand side of the state system is bounded by a linear function in the state and control variables.(4)
The integrand of the objective functional is convex on𝒰.(5)
There exist constantsc1,c2>0 and ρ>1 such that the integrand L(S,I,R,u) of the objective functional satisfies
(18)L(S,I,R,u)≥c2+c1(|u|2)ρ/2.An existence result by Lukes [13] was used to give the existence of solution of system (2) with bounded coefficients, which gives condition 1. The control set is convex and closed by definition. Since the state system is linear in u, the right side of (2) satisfies condition 3, using the boundedness of the solution. The integrand in the objective functional (14) is convex on 𝒰. In addition, we can easily see that there exist a constant ρ>1 and positive numbers c1 and c2 satisfying
(19)L(S,I,R,u)≥c2+c1(|u|2)ρ/2.


### 3.2. Characterization of the Optimal Control

In order to derive the necessary condition for the optimal control, Pontryagin’s maximum principal with delay given in [14] was used. This principal converts (2), (14), and (15) into a problem of minimizing a Hamiltonian, H, defined by
(20)H=A1S(t)+A2I(t)-A3R(t)+A42u2(t)+∑i=13‍λifi,
where fi is the right side of the differential equation of the ith state variable.Theorem 2.
Given an optimal controlu*∈𝒰 and solutions S*, I*, and R* of the corresponding state system (2), there exist adjoint functions λ1, λ2, and λ3 satisfying
(21)λ˙1=-A1+λ1d+(λ1-λ2)βI*N*+χ[0,tf-τ](t)(λ1+-λ3+)u*,λ˙2=-A2+(λ1-λ2)βS*N*+(d+γ+ϵ)λ2-γλ3,λ˙3=A3+λ3d
with the transversality conditions
(22)λ1(tf)=λ2(tf)=λ3(tf)=0.
Furthermore, the optimal control u* is given by
(23)u*(t)=min(b,max(0,(λ1+-λ3+)A4χ[0,tf-τ](t)S*)),
where λi+(t)=λi(t+τ) for i=1,…,3.Proof.
The adjoint equations and transversality conditions can be obtained by using Pontryagin’s maximum principle with delay in the state and control variables [14] such that
(24)λ˙1=-∂H(t)∂S(t)-χ[0,tf-τ](t)∂H(t+τ)∂S(t-τ),λ1(tf)=0,λ˙2=-∂H∂I,λ2(tf)=0,λ˙3=-∂H∂R,λ3(tf)=0.
The optimal control u* can be solved from the optimality condition:
(25)∂H∂u+χ[0,tf-τ](t)∂H(t+τ)∂uτ=0.
That is,
(26)A4u+χ[0,tf-τ](t)(λ3+-λ1+)S=0.
By the bounds in 𝒰 of the control, it is easy to rewrite u* in the form (23).


## 3.1. Existence of an Optimal Control

The existence of the optimal control can be obtained using a result by Fleming and Rishel in [12].Theorem 1.
Consider the control problem with system (2). There exists an optimal control u*∈𝒰 such that
(17)J(u*)=minu∈𝒰J(u).Proof.
To use an existence result in [12], we must check the following properties. (1)
The set of controls and corresponding state variables is nonempty.(2)
The control set𝒰 is convex and closed.(3)
The right-hand side of the state system is bounded by a linear function in the state and control variables.(4)
The integrand of the objective functional is convex on𝒰.(5)
There exist constantsc1,c2>0 and ρ>1 such that the integrand L(S,I,R,u) of the objective functional satisfies
(18)L(S,I,R,u)≥c2+c1(|u|2)ρ/2.An existence result by Lukes [13] was used to give the existence of solution of system (2) with bounded coefficients, which gives condition 1. The control set is convex and closed by definition. Since the state system is linear in u, the right side of (2) satisfies condition 3, using the boundedness of the solution. The integrand in the objective functional (14) is convex on 𝒰. In addition, we can easily see that there exist a constant ρ>1 and positive numbers c1 and c2 satisfying
(19)L(S,I,R,u)≥c2+c1(|u|2)ρ/2.


## 3.2. Characterization of the Optimal Control

In order to derive the necessary condition for the optimal control, Pontryagin’s maximum principal with delay given in [14] was used. This principal converts (2), (14), and (15) into a problem of minimizing a Hamiltonian, H, defined by
(20)H=A1S(t)+A2I(t)-A3R(t)+A42u2(t)+∑i=13‍λifi,
where fi is the right side of the differential equation of the ith state variable.Theorem 2.
Given an optimal controlu*∈𝒰 and solutions S*, I*, and R* of the corresponding state system (2), there exist adjoint functions λ1, λ2, and λ3 satisfying
(21)λ˙1=-A1+λ1d+(λ1-λ2)βI*N*+χ[0,tf-τ](t)(λ1+-λ3+)u*,λ˙2=-A2+(λ1-λ2)βS*N*+(d+γ+ϵ)λ2-γλ3,λ˙3=A3+λ3d
with the transversality conditions
(22)λ1(tf)=λ2(tf)=λ3(tf)=0.
Furthermore, the optimal control u* is given by
(23)u*(t)=min(b,max(0,(λ1+-λ3+)A4χ[0,tf-τ](t)S*)),
where λi+(t)=λi(t+τ) for i=1,…,3.Proof.
The adjoint equations and transversality conditions can be obtained by using Pontryagin’s maximum principle with delay in the state and control variables [14] such that
(24)λ˙1=-∂H(t)∂S(t)-χ[0,tf-τ](t)∂H(t+τ)∂S(t-τ),λ1(tf)=0,λ˙2=-∂H∂I,λ2(tf)=0,λ˙3=-∂H∂R,λ3(tf)=0.
The optimal control u* can be solved from the optimality condition:
(25)∂H∂u+χ[0,tf-τ](t)∂H(t+τ)∂uτ=0.
That is,
(26)A4u+χ[0,tf-τ](t)(λ3+-λ1+)S=0.
By the bounds in 𝒰 of the control, it is easy to rewrite u* in the form (23).


## 4. Numerical Simulation

In this section, we give a numerical method to solve the optimality system which is a two-point boundary value problem, with separated boundary conditions at timest0=0 and tf.Let there exist a step sizeh>0 and (n,m)∈ℕ2 with τ=mh and tf-t0=nh. For reasons of programming, we consider m knots to left of t0 and right of tf, and we obtain the following partition:
(27)Δ=(tf<tn+1<⋯<tn+mt-m=-τ<⋯<t-1<t0=0<t1<⋯<tn=tf<tn+1<⋯<tn+m).Then, we haveti=t0+ih(-m≤i≤n+m). Next, we define the state and adjoint variables S(t), I(t), R(t), λ1, λ2, λ3, and the control u in terms of nodal points Si, Ii, Ri, λ1i, λ2i, λ3i, and ui. Now using combination of forward and backward difference approximations, we obtain the Algorithm 1.Algorithm 1
Step 1: For
i
=
-
m
,
…
,
0  doSi=S0, Ii=I0, Ri=R0, ui=0
End for
For
i
=
n
,
…
,
n
+
m  doλ1i=0, λ2i=0, λ3i=0
End for
Step 2: For
i
=
0
,
…
,
n
-
1, do
S
i
+
1
=
S
i
+
h
(
Λ
-
u
i
-
m
S
i
-
m
)
1
+
h
(
β
(
I
i
/
N
)
+
d
)
I
i
+
1
=
I
i
1
+
h
(
γ
+
d
+
ε
-
β
(
S
i
+
1
/
N
)
)
R
i
+
1
=
R
i
+
h
(
γ
I
i
+
1
+
u
i
-
m
S
i
-
m
)
1
+
h
d
λ
1
n
-
i
-
1
=
λ
1
n
-
i
+
h
(
A
1
+
β
(
I
i
+
1
/
N
)
λ
2
n
-
i
+
(
λ
3
n
-
i
+
m
-
λ
1
n
-
i
-
1
+
m
)
χ
[
0
,
t
f
-
τ
]
(
t
n
-
i
)
u
i
)
1
+
h
(
d
+
β
(
I
i
+
1
/
N
)
)
λ
2
n
-
i
-
1
=
λ
2
n
-
i
+
h
(
A
2
+
λ
3
n
-
i
γ
-
λ
1
n
-
i
-
1
β
(
S
i
+
1
/
N
)
)
1
+
h
(
γ
+
d
+
ε
-
β
(
S
i
+
1
/
N
)
)
λ
3
n
-
i
-
1
=
λ
3
n
-
i
-
A
3
h
1
+
d
h
T
i
+
1
=
(
λ
1
n
-
i
-
1
+
m
-
λ
3
n
-
i
-
1
+
m
)
A
4
χ
[
0
,
t
f
-
τ
]
(
t
i
+
1
)
S
i
+
1
u
i
+
1
=
min
(
b
,
max
(
0
,
T
i
+
1
)
)
Step 3: For
i
= 0,…, n, write
S
*
(
t
i
)
=
S
i, I*(ti)=Ii, R*(ti)=Ri, u*(ti)=ui
End forThe numerical simulations were carried out using data regarding the course of the influenza A (H1N1) in Morocco. The initial conditions and parameters of the system (2) are taken from [15, 16], while the time delay value is taken from [17]:
(28)β=0.3095,Λ=1174.17,d=3.9139×10-5,γ=0.2,ε=0.0063,τ=10,
the initial conditions for the ordinary differential system were
(29)S(0)=30×106,I(0)=30,R(0)=28,
and the transversality conditions for the ordinary differential system were
(30)λi(tf)=0(i=1,…,3).Figure1 indicates that the number of susceptible individuals (S) decreases more rapidly in the case with control. It reaches 7.399×105 at the end of the vaccination period against 6.732×106 in case without control, that is, a reduction of 5.992×106.Figure 1
The functionS with and without control.Figures2, 3, and 4 represent the number of infected individuals (I) with control (solid curve) and without control (dashed curve). It shows that in the presence of a control, the number of infected individuals (I) decreases greatly. The maximum number of infected individuals in the case with control is 1.787×104 and is 4.404×106 in the case without control; then the efficiency of our strategy in reducing the spread of infection is nearly 99.52%.Figure 2
The functionI with and without control.Figure 3
The functionI with control.Figure 4
The functionI without control.Figure5 shows that the number of people removed begins to grow notably from 24th day instead of 48th day in the absence of control. Moreover the number of recovered individuals at the end of the vaccination period is 2.926×107 instead of 2.342×107, which represents an increase of 5.840×106 cases.Figure 5
The functionR with and without control.Figures6 and 7 represent, respectively, the optimal control and optimal value of the cost. The curves start to increase during the first month because of the high infection level; then they drop off steadily which is because of the constant and steady eradication of the infection.Figure 6
The optimal controlu*.Figure 7
The optimal value of the cost.


## 5. Conclusion

The work in this paper contributes to a growing literature on applying optimal control techniques to epidemiology. We proposed a more realistic controlled model by including time delay which represents the needed time for the migration from the susceptible class to the recovered class after vaccination. The optimal control theory has been applied in the context of an SIR model with time delay in state and control variables, and that includes a controlu that represents the percentage of susceptible individuals being vaccinated per time unit. By using Pontryagin’s maximum principle, the explicit expression of the optimal controls was obtained. Simulation results indicate that the proposed control strategy is effective in reducing the number of susceptible and infected individuals and maximizing the recovered individuals.



---

*Source: 403549-2013-08-13.xml*