OPTIMAL CONTROL PROBLEMS WITH TIME DELAYS: TWO CASE STUDIES IN BIOMEDICINE

. There exists an extensive literature on delay diﬀerential models in biology and biomedicine, but only a few papers study such models in the framework of optimal control theory. In this paper, we consider optimal control problems with multiple time delays in state and control variables and present two applications in biomedicine. After discussing the necessary optimality conditions for delayed optimal control problems with control-state constraints, we propose discretization methods by which the delayed optimal control problem is transformed into a large-scale nonlinear programming problem. The ﬁrst case study is concerned with the delay diﬀerential model in [21] describing the tumour-immune response to a chemo-immuno-therapy. Assuming L 1 -type objectives, which are linear in control, we obtain optimal controls of bang-bang type. In the second case study, we introduce a control variable in the delay diﬀerential model of Hepatitis B virus infection developed in [7]. For L 1 -type objectives we obtain extremal controls of bang-bang type.


1.
Introduction. Differential dynamic systems with time delays play an important role in the modeling of real-life phenomena in various fields of applications. There exists an extensive literature on delay differential models in biology and biomedicine; see e.g., [6,7,16,18,24,26,27]. Though there is a vast literature on optimal control problems with time delays in control and state variables, so far only a few papers have applied the framework of optimal control with delays to biomedicine; cf. the recent papers [15,21,23]. The aim of this paper is to present two case studies in biomedicine which illustrate the application of delayed optimal control problems and demonstrate that there exist efficient numerical techniques to solve such problems.
In Section 2, we consider optimal control problems with multiple time delays in control and state variables The control process can be subject to mixed controlstate constraints. We review the necessary optimality conditions that were derived in [10] in the form of a Pontryagin type Minimum Principle. It is assumed that the so-called commensurability assumption holds which requires that the time delays and the terminal time are integer multiples of a joint stepsize. This assumption also underlies the discretization and nonlinear programming techniques that are briefly reviewed in Section 3. In Section 4, we study the delay differential model for tumour-immune-response with chemo-immunotherapy in Rihan et al. [21]. Aside from the state delay in this model we introduce a time delay in the control variable representing the immune therapy. The delay accounts for the fact that the human immune system needs some time to respond to the immune therapy. In contrast to the L 2 -type objectives in [21] we consider L 1 -type objectives characterized by linearly appearing controls which seem to be more appropriate in the biological framework; cf. the remarks in [22]. The computations show that all controls are of bang-bang type. For the non-delayed problem, we can verify the second-order sufficient conditions in [19,17] and thus show that the computed solution provides a strict strong minimum.
Section 5 considers the delay differential model in [7] describing the spread of Hepatitis B virus (HBV). The dynamical model exhibits a delay in the state variables. We introduce a control variable into this model and formulate an optimal control problem using L 1 -type objectives. Again, all controls are of bang-bang type. We show that the non-delayed bang-bang control provides a strict strong minimum, whereas the delayed controls are extremal solutions that satisfy the necessary conditions with high accuracy.
2. Optimal control problems with multiple time-delays in state and control variables.
2.1. Problem statement. Let x(t) ∈ R n denote the state variable and u(t) ∈ R m the control variable at time t ∈ [0, t f ] with fixed terminal time t f > 0. The timedelays in the state and control variables are given by a constant vector (τ 1 , . . . , τ d ) ∈ R d satisfying 0 =: τ 0 < τ 1 < . . . < τ d .
Thus τ 0 represents the non-delayed variables. In [9,10] we have studied the following optimal control problem with multiple time-delays and mixed control-state constraints (MDOCP): determine a pair of functions ( subject to the delayed (retarded) differential equation, boundary conditions and mixed control-state inequality constraintṡ ψ(x(T )) = 0, The functions g : Without lack of generality we have assumed that the cost functional is given in Mayer form (1). It is well known that an objective in Bolza form, can be reduced to Mayer form by introducing an additional state variable x n+1 defined bẏ Then we have to minimize the functionalJ(x, In the following, we shall use the placeholder variables y 0 , y 1 , . . . , y d for the delayed state variables and v 0 , v 1 , . . . , v d for the delayed control variables. The delayed variables are defined by Note that we do not necessarily assume an equal number of state and control delays.
The case of an unequal number of delays in state and control variables is included in this formulation as we admit that ∂h ∂y δ = 0 or ∂h ∂v δ = 0, h ∈ {f, C, L}, for some δ ∈ {0, . . . , d}.

2.2.
Minimum principle: First-order necessary conditions. A Pontryagintype minimum principle for problem (MDOCP) has been derived in [9,10]. The main result requires that all positive time delays τ 1 , . . . , r d can be expressed as integer multiples of a sufficiently small positive constant (stepsize).
Assumption 2.1 (Commensurability Condition). Assume that there exist a constant h > 0 and integers k 1 , . . . , k d , N with In view of 0 = τ 0 < τ 1 < . . . < τ d we have 0 < k 1 < . . . < k d . Then in analogy to the non-delayed case we define the Hamiltonian function by where the adjoint variable λ ∈ R n is a row vector. The augmented Hamiltonian function is defined by adjoining the mixed control-state constraint (6) to the Hamiltonian using a multiplier µ ∈ R p (row vector): For ease of notation we refrain from denoting an optimal pair by a hat or a similar symbol. We require the following regularity condition for the active control-state constraints.
Assumption 2.2 (Regularity Condition). Let (x, u) be a locally optimal pair and let denote the set of active indices for the inequality constraints (6). Assume that the gradients are linearly independent.

Transversality Condition
: 3. Minimum Condition for the Hamiltonian: for all u ∈ R m satisfying where

Local Minimum Condition for the Augmented Hamiltonian Function
5. Non-negativity of Multiplier and Complementarity Condition: for t ∈ [0, t f ], 3. Numerical discretization methods. Similar to the case of non-delayed differential equations, we can employ integration methods of Runge-Kutta type or multistep methods, e.g., the Euler method and trapezoidal rule, to discretize the delay differential equatioṅ Any integration method based on an equidistant discretization scheme utilizes a uniform step size h > 0. Due to the presence of time-delays it is crucial to match the delays τ 1 , . . . , τ d to the grid. This is ensured by the commensurability condition (8) in Assumption 2.1. For this purpose, let h > 0 be a step size satisfying (8), i.e.
with integers 0 = k 0 < k 1 < . . . < k d and N . Note that this grid can be refined by use of any integer fraction of h, This defines an equidistant discretization mesh with grid points t i = ih for i = 0, 1, ..., N . Let x i ∈ R n and u i ∈ R m denote approximations of x(t i ) and u(t i ) at the grid points t i for i = 0, 1, . . . , N . For convenience, we shall use the abbreviations The initial value profiles x 0 (·) and u 0 (·) provide the values Since the focus in this paper is not on discussing various numerical methods, we present only two integration methods that can be easily implemented. The simplest method is the first order method of Euler which is defined by the recursion The trapezoidal rule is an implicit method of second order: Then for the Euler method and the optimization variable we obtain the following nonlinear programming problem (NLP) with equality and inequality constraints: and initial values (17). Using the trapezoidal method (19) we simply replace the equations (21) by the equations defined in (19).
, be the Lagrange multipliers for equations (21) and let µ = (µ 0 , µ 1 , . . . , µ N −1 ) ∈ R p·N , µ i ∈ R p (i = 0, . . . , N −1), be the multipliers for the inequality constraints (22) and ν N ∈ R q be the multiplier for the boundary condition (23). In [9,10] we have discussed the Karush-Kuhn-Tucker (KKT) necessary optimality conditions for the (NLP) using the Euler scheme (18) and showed that the property of consistency holds. This means that the Lagrange multipliers provide approximations for the adjoint variable λ(t), the multiplier µ(t) and ν according to This follows from the fact that the Lagrange multipliers λ i satisfy the advanced adjoint equations using the same discretization scheme in a backward mode.
To solve the optimization problem (NLP) in (20)-(22) numerically, we employ the Applied Modeling Programming Language (AMPL) developed by Fourer, Gay and Kernighan [8] which can be linked to the interior-point optimization solver IPOPT developed by Wächter et al. [28] or to the SQP solver WORHP by Büskens and Gerdts [4]. Every solver provides the Lagrange multipliers and therefore gives access to approximations of adjoint variables and multiplier functions for the control problem (MDOCP) according to (24). Thus we can test whether the numerical solution is an extremal solution which satisfies the necessary optimality conditions in Theorem 2.3.

4.1.
Optimal control problem. We consider the delay differential model in Rihan et al. [21] that proposes a chemo-immuno-therapy of cancer. The authors introduce a time delay only in the state variable and present a stability analysis of drug free steady states. We shall extend the model by including also a control delay in the control u 2 of immune therapy. The delay accounts for the fact that the human immune system takes some time to respond to the immune therapy. The state and variables have the following meaning: E: concentration of effector cells (plasma B cells, producing antibodies).
T : concentration of tumour cells. N : concentration of healthy cells. U : concentration of cytostatic agent for chemotherapy. u 1 : dose control for chemotherapy, u 2 : dose control for immune therapy of the effector cells. Denoting the state delay by τ 1 and the control delay by τ 2 , the dynamical system is given bẏ The initial values and initial functions for the delayed state and control variables are as follows: We shall consider the control constraints Let us denote the state and control variables by For notational convenience, we simplify the notations (7) for the delayed state and control variables. In the context of the dynamical system (25) it is more convenient to consider the delayed state variables y 1 , y 2 and control variable v 2 defined by With these notations the dynamical system (25) can be written aṡ Then the optimal control problem is as follows: determine a control function u = subject to the dynamic constraints (25), initial conditions (26) and control constraints (27). The objective functional (30) represents a trade-off between minimizing the tumour cells and the total doses of the cytotoxic and immunologic agents on one hand and maximizing the plasma cells on the other hand. The constants B 1 > 0, B 2 > 0 are appropriate weights which are listed in Table 1 together with the system parameters.
Rihan et al. [21] consider only the L 2 -type functional J 2 (x, u) in (30) which is quadratic in the control variable u. L 2 -type functionals are often used in economics to describe, e.g., production costs, but are mostly not appropriate in a biological framework; cf. the remarks in [22]. The L 1 functional J 1 (x, u) incorporates the total amount of drugs used as a penalty and thus appears to be more realistic. For that reason, we shall mainly focus on the functional J 1 (x, u) in the sequel. Now we apply the necessary optimality conditions in the form of a Minimum Principle as stated in Theorem 2.3. Denoting the adjoint variable by the row vector λ = (λ E , λ T , λ N , λ U ) ∈ R 4 , the Hamiltonian for the objective J 1 (x, u) and the control system (29) is given by According to Theorem 2.3 (1), the advanced adjoint equations are given bẏ We do not write out the adjoint variables explicitly, since the adjoint variables can be computed as Lagrange multipliers of the discretized control problem as explained in the preceding section. Due to the free terminal state, the transversality condition (13) is λ(t f ) = (0, 0, 0, 0). (33) The optimal control u(t) minimizes the sum of Hamiltonians in (14). Since both controls appear linearly in the Hamiltonian, the minimizing controls are determined by the switching functions weights (5,10) according to the control law Singular controls will not be discussed further, since our computations only yield bang-bang controls. Due to the transversality condition λ(t f ) = 0 the switching functions satisfy φ k (t f ) = B k > 0 for k = 1, 2. Hence, the control law (35) shows that u k (t) = 0 holds on a terminal interval [t k , t f ] for k = 1, 2. Parameters for the subsequent computations are given in the Table 1.

4.2.
Optimal solution of the non-delayed control problem. First, we present the solution for the non-delayed control problem with τ 1 = τ 2 = 0 and the functional J 1 (x, u). Recall the upper control bounds u 1,max = u 2,max = 1, the terminal time t f = 30 (days) and the weights B 1 = 5 and B 2 = 10 from Table 1. Applying AMPL/IPOPT with N = 3000 grid points and the trapezoidal rule (19) we find the following bang-bang controls u k (t) with only one switch at t k , To obtain a refinement of the solution, we solve the Induced Optimization Problem (IOP) with the switching times t 1 and t 2 as optimization variables; cf. [17,19]). The arc-parametrization method [17] and the optimal control package NUDOCCCS due to Büskens [2] yield the following numerical results The initial values of the adjoint variables are The non-delayed solution is shown in Figure 1. A common strategy in medical practise is the administration of a pulse therapy or a blockwise application of drugs. Such a strategy is promoted by the controls in Figure 1. Now we show that the second-order sufficient conditions in [19], Chapter 7, are satisfied for the bang-bang control (36). For that purpose, we have to check two further conditions. First, notice that the objective J 1 (x, u) becomes a function J 1 (t 1 , t 2 ) of the two switching times t 1 , t 2 , if we assume the control structure (36). The Hessian of J 1 (t 1 , t 2 ) is computed as the positive definite 2 × 2 matrix 19.167 11.120 11.120 10.887 .
Furthermore, as can be seen in Figure 2, the following strict bang-bang property with respect to the Minimum Principle holds for k = 1, 2: Hence, the solution shown in Figure 1 provides a strict strong minimum. We briefly compare the solutions for the functionals J 1 (x, u) and J 2 (x, u). The controls u 1 and u 2 for the functional J 2 (x, u) are continuous, since the strict Legendre-Clebsch condition holds and the Hamiltonian has a unique minimum with respect to u 1 and u 2 .

4.3.
Numerical solution of the delayed control problem. We choose the state delay τ 1 = 1.5 and the control delay τ 2 = 3. To obtain a rather precise reference solution, we apply AMPL/IPOPT with N = 6000 grid points and tolerance tol = 10 −8 . As in the non-delayed case we obtain a bang-bang control u(t) = (u 1 (t), u 2 (t)), where each u k (t) has only one switch at t k : We obtain the numerical results Using the Euler method (18) with the same number N = 6000 grid points, the numerical results are less accurate by two decimals. The control and state trajectories are shown in Figure 4. Figure 5 displays the controls and the switching functions in a neighborhood of the switching times. The zoom into the controls confirms that the control law (35) is precisely satisfied and that the strict bang-bang property (37) holds as well for the delayed solution. Unfortunately, we can not check any kind of sufficient conditions for the delayed solution, since numerically verifiable sufficient conditions are not available in the literature.  Finally, as in the non-delayed case we briefly compare the solutions for the functionals J 1 (x, u) and J 2 (x, u). The controls u 1 and u 2 for the functional J 2 (x, u) are continuous, since the strict Legendre-Clebsch condition holds and the Hamiltonian has a unique minimum with respect to u 1 and u 2 . Figure 6 displays a comparison of the controls u 1 and u 2 for both functionals.

4.4.
Numerical solution of the delayed control problem with mixed control-state constraint U (t) + u 2 (t) ≤ 3. We add the following mixed controlstate constraint to the delayed optimal control problem: This constraint means that sum of the cytotoxic agent and the immune dose is bounded from above. Here we consider the augmented Hamiltonian H(x, y 1 , y 2 , u, v 2 , λ, µ) = H(x, y 1 , y 2 , u, v 2 , λ) + µ(U + u 2 ), where the mixed constraint is adjoined to the Hamiltonian (31) by a multiplier µ ≥ 0. The local minimum condition (15) yields where φ 2 (t) = B 2 +χ [0,tf −τ2] (t) λ E (t+τ 2 )s 1 is the switching function defined in (34). The multiplier satisfies the complementarity condition µ(t)(U (t) + u 2 (t) − 3) = 0 for t ∈ [0, t f ]. Hence, on a boundary arc with U (t) + u 2 (t) = 3 for t ∈ [t 1 , t 2 ] we obtain an explicit formula of the multiplier in view of (41): Computations show that the control u 2 (t) is constant on a boundary arc and thus we obtain by differentiation Since we have u 2 (t) = 1 on a boundary arc, the control u 1 (t) on the boundary arc is given by Using the trapezoidal method (19) with N = 3000 grid points we find the control structure with 0 < t 1 < t 2 < t 3 < t f and the boundary arc [t 1 , t 2 ]. We obtain the numerical results:   [7] report that currently about two billion people -roughly 30% of the human population -have been infected by Hepatitis B virus (HBV). The disease has attracted considerable attention from mathematical biologists who have developed various models to study the HBV dynamics. Eikenberry et al. [7] present a dynamical model with state variables x: number of healthy cells, p: number of exposed cells, y: number of infected cells, v: free virion load. The model (4.1)-(4.4) in [7] does not yet involve a control variable. We choose the control variable u as the effect of treatment which corresponds to the coefficient γ in the dynamic equation (4.4) in [7]. Denoting the time by t ∈ [0, t f ] with fixed final time t f > 0 and the delay in the state variable by τ ≥ 0, the dynamic system (4.1)-(4.4) in [7] reads as follows: The variable T denotes the total number of cells defined by The delay τ appears in all three variables x, p, y. Hence, the initial conditions are given by initial functions for x, p, y and an initial value for v: We impose the control constraint Denoting the state vector by X := (x, p, y, v) ∈ R 4 and the delayed variable by Y , where Y (t) = X(t − τ ), the dynamical system can be written aṡ with initial functions and conditions given in (45). The optimal control problem then consists in determining a control function u ∈ L 1 ([0, t f ], R) that minimizes the cost functional subject to the dynamics (44) with initial conditions (45) and the control constraint (46). The objective functional represents a trade-off between maximizing the number of healthy cells and minimizing the treatment cost.

5.2.
Necessary optimality conditions: Minimum principle. We briefly discuss the necessary optimality conditions in Theorem 2.1. The Hamiltonian is given by We do not explicitly write out the advanced adjoint equation (12): The control variable u appears linearly in the Hamiltonian and does not involve a delay. Hence, defining the switching functions by the minimizing control is characterized by the control law (52) Singular controls will not be discussed further, because we only found bang-bang controls. The following parameters from [7], page 294 below, will be used in our computations: The state variable X = (x, p, y, v) is scaled by 10 −11 so that we can choose, e.g., the following initial conditions: The time horizon is t f = 500 (days) and the weight parameter in the objective (48) is taken as B = 0.05 .

5.3.
Comparison of solutions for several delays. We compare the solutions for the delays τ = 0 (non-delayed solution), τ = 10 and τ = 15. Applying AMPL/IPOPT with N = 5000 grid points and using the trapezoidal rule (19), we find a bang-bang control u(t) with only one switch at t 1 , In the non-delayed case, a refinement of the solution is obtained by solving the Induced Optimization Problem (IOP) with respect to the switching time [17,19]. We get the numerical results: A comparison of the controls and switching functions for the delays τ = 0, 10, 15 is shown in Figure 8. The bang-bang control for τ = 0 provides a strict strong minimum, since second-order sufficient conditions (SSC) in [17,19] are satisfied. The numerical test of SSC proceeds as follows. Since the bang-bang control (55) has only one switch at t 1 , the objective functional becomes a function J = J(t 1 )  of the scalar optimization variable t 1 . One verifies numerically that the second derivative is positive: d 2 J/dt 2 1 = 0.005028 > 0. Moreover, the following strict bang-bang property [17,19] for the switching function φ(t) holds; cf. Figure 8, left: φ(t) < 0 for 0 ≤ t < t 1 ,φ(t 1 ) > 0 , φ(t) > 0 for t 1 < t ≤ t f = 500 .
Note that the strict bang-bang property is also satisfied for the delayed control with delays τ = 10 and τ = 15. However, as in the preceding section we can not conclude that the delayed controls in Figure 8 provide a strict strong minimum. Figure 9 displays a comparison of the state variables for delays τ = 0, τ = 10, τ = 15.
6. Conclusion. We presented two applications of delayed optimal control problems in biomedicine. In the first case study, we extended the delay differential model of tumour-immune-response in Rihan et al. [21] by including a time delay in the control variable u 2 which represents the immune therapy. The delay is due to the delayed response of the human immune system to the immune therapy. Rihan et al. [21] considered a L 2 -type objective which is quadratic in the control variables. From a numerical point of view, the control solution in [21] remained a bit obscure. Therefore, we improved the results in this paper in two regards. First, we considered a more realistic L 1 -type objective which is linear in the two control variables. Secondly, we applied the discretization and nonlinear programming methods [10] (see Section 3) to obtain extremal solutions that satisfy the necessary optimality conditions in Theorem 2.1 with high accuracy. The computations showed that both controls u 1 and u 2 are of bang-bang type with only one switch from the upper bound u k (t) = u k,max to the zero control u k (t) = 0 for k = 1, 2. Apparently, it is much easier to administer the therapy protocol induced by a bang-bang control then applying a treatment plan resulting from a L 2 -type objective; cf. Figure 3. In the non-delayed case we could show that the bang-bang controls are indeed optimal, since they satisfy the second-order sufficient conditions in [19,17]. To our knowledge, sufficient conditions for delayed bang-bang controls are not available in the literature. We have also studied the solution under the mixed control-state constraint (39) which combines the cytostatic agent U (t) and the immune control u 2 (t). The computations gave very accurate extremal solutions.
The second delay differential model, which describes the spread of Hepatitis B virus, was taken from Eikenberry at al. [7]. We introduced a control variable into the originally uncontrolled model and considered L 1 -type objectives. For different delays we obtained only bang-bang controls as in the first case study. Sufficient optimality conditions [19,17] could only be verified for the non-delayed bang-bang control.