Optimal Control of a Tuberculosis Model with State and Control Delays

We introduce delays in a tuberculosis (TB) model, representing the time delay on the diagnosis and commencement of treatment of individuals with active TB infection. The stability of the disease free and endemic equilibriums is investigated for any time delay. Corresponding optimal control problems, with time delays in both state and control variables, are formulated and studied. Although it is well-known that there is a delay between two to eight weeks between TB infection and reaction of body's immune system to tuberculin, delays for the active infected to be detected and treated, and delays on the treatment of persistent latent individuals due to clinical and patient reasons, which clearly justifies the introduction of time delays on state and control measures, our work seems to be the first to consider such time-delays for TB and apply time-delay optimal control to carry out the optimality analysis.


1.
Introduction. Tuberculosis (TB) is the second leading cause of death from an infectious disease worldwide [32]. Active TB refers to disease that occurs in someone infected with Mycobacterium tuberculosis. It is characterized by signs or symptoms of active disease, or both, and is distinct from latent tuberculosis infection, which occurs without signs or symptoms of active disease. Only individuals with active TB can transmit the infection. Many people with active TB do not experience typical TB symptoms in the early stages of the disease. These individuals are unlikely to seek care early, and may not be properly diagnosed when seeking care [31].
Delays to diagnosis of active TB present a major obstacle to the control of a TB epidemic [27], it may worsen the disease, increase the risk of death and enhance tuberculosis transmission to the community [24,26]. Both patient and the health system may be responsible for the diagnosis delay [24]. Efforts should be done in patient knowledge/awareness about TB, and health care systems should improve case finding strategies to reduce the delay in diagnosis of active TB [15,24,25].
Mathematical models are an important tool in analyzing the spread and control of infectious diseases [13]. There are several mathematical dynamic models for TB, see, e.g., [5,6,11,18]. In this paper we consider the mathematical model for TB proposed in [11]. We introduce a discrete time delay which represents the delay on the diagnosis of individuals with active TB and commencement of treatment. The stability of the disease free and endemic equilibriums is analyzed for any time delay.
Optimal control theory has been successfully applied to TB mathematical models (see, e.g., [19,22,23] and references cited therein). We propose and analyze an optimal control problem where the control system is the mathematical model from [11], but with a time delay in the state variable that represents individuals with active TB, and introduce two control functions. The control functions represent the fraction of early and persistent latent individuals that are treated for TB. Treatment of latent TB infection greatly reduces the risk that TB infection will progress to active TB disease. Certain groups are at very high risk of developing active TB disease once infected. Every effort should be made to begin appropriate treatment and to ensure completion of the entire course of treatment for latent TB infection [33]. Treatment of latent TB infection should be initiated after the possibility of TB disease has been excluded. It can take 2 to 8 weeks after TB infection for the body's immune system to react to tuberculin and for the infected to be detected, which justifies the introduction of a time delay on the control associated to treatment of early latent individuals. On the other hand, delays in the treatment of latent TB may also occur due to clinical and demographic patient and health care services characteristics. For these reasons, we consider discrete time delays in both control functions. To our knowledge, this work is the first to apply optimal control theory to a TB model with time delay in state and control variables.
The paper is organized as follows. In Section 2 we formulate the TB model with state delay. The stability of the disease free equilibrium is analyzed in Section 3 while stability of the endemic equilibrium is investigated in Section 4. Optimal control of TB with state and control delays is carried out in Section 5 and some numerical results given in Section 6. We end with Section 7 of conclusions. 2. TB model with state delay. In this section we consider a TB mathematical model proposed in [11], where reinfection and post-exposure interventions for tuberculosis are considered. The model divides the total population into five categories: susceptible (S); early latent (L 1 ), i.e., individuals recently infected (less than two years) but not infectious; infected (I), i.e., individuals who have active TB and are infectious; persistent latent (L 2 ), i.e., individuals who were infected and remain latent; and recovered (R), i.e., individuals who were previously infected and have been treated. As in [11], we assume that the total population, N , with N = S(t)+L 1 (t)+I(t)+L 2 (t)+R(t), is constant in time. In other words, we assume that the birth and death rates are equal and there are no TB-related deaths. We introduce a discrete time-delay in the state variable I, denoted by d I , that represents the delay to diagnosis and commencement of treatment of active TB infection, The initial conditions for system (1) are From biological meaning, we further assume that ϕ i (0) > 0 for i = 1, . . . , 5.
A mathematical model has a disease free equilibrium if it has an equilibrium point at which the population remains in the absence of the disease [28]. The model (1) has a disease free equilibrium given by E 0 = (N, 0, 0, 0, 0).
The basic reproduction number R 0 represents the expected average number of new TB infections produced by a single TB active infected individual when in contact with a completely susceptible population [28]. For model (1) it is given by Note that in [11] the basic reproduction number is deduced under the assumption that τ 1 = τ 2 = 0. The expression (3) generalizes the one given in [11].
Recall that an equilibrium point is asymptotically stable if all roots of the corresponding characteristic equation have negative real parts [1].
Lemma 3.1. If R 0 > 1, then the disease free equilibrium E 0 is unstable for any d I ≥ 0.
1 + a 2 3 a 0 , then the disease free equilibrium E 0 is locally asymptotically stable for d I = 0.
In the case d I > 0, by Rouché's theorem [8], if instability occurs for a particular value of the delay d I , then a characteristic root of (6) must intersect the imaginary axis. Our aim is to prove that the polynomial (6) does not have purely imaginary roots for all positive delays (see, e.g., [2,7] By using Euler's formula exp −ibdI = cos(bd I ) − i sin(bd I ), and by separating real and imaginary parts, we have Adding up the squares of both equations, we obtain that where α 0 = a 0 (a 0 − 2 µ τ 0 c 1 c 2 ), Let z = b 2 . Then (7) becomes By the Routh-Hurwitz criterion, (8) has no positive real roots if α i > 0, i = 0, . . . , 3, α 3 α 2 > α 1 , and α 3 α 2 α 1 > α 2 1 + α 2 3 α 0 . For the parameter values of Table 1 and β = 40 (R 0 = 0.880827), the Routh-Hurwitz criterion does not hold. In fact, equation (8) takes the form and we immediately see that the coefficient α 1 = −221.270089 is not positive. Moreover, the roots of equation (9) are approximately 0.89, −0.00017, −1.03, −241.30, therefore there exists a positive imaginary root given by 0.89i. Thus, there exists at least one time delay such that the disease free equilibrium is unstable. We have just proved the following result.
Then there exists at least one positive time delay d I > 0 such that the disease free equilibrium (N, 0, 0, 0) is unstable.

Remark 2.
Observe that there may exist specific time delays for which the disease free equilibrium (N, 0, 0, 0) is locally asymptotically stable when R 0 < 1. As we show next, this is the case for the time delay d I = 0.1. Indeed, consider the parameter values of Table 1 and β such that R 0 < 1. For example, let β = 40, for which R 0 = 0.880827. The results are given in Figure 1, where to compute the trajectories we have used the Matlab routine dde23, which solves delay differential equations with constant delays. For the theoretical results that underlie this solver we refer to [21]. The characteristic equation (6) Table 1).
In this paper we assume that the time delay d I associated to the diagnosis of active TB is equal to 0.1, that is, 36.5 days. This value makes sense from the epidemiological point of view, since it fits in the intervals available in the literature for the delay in the diagnosis of active TB. For instance, in [24] the reported overall patient delay is similar to the health system delay for diagnosis of active TB, 31.03 and 27.2 days, respectively. The average (median or mean) patient delay and health system delay range from 4.9 to 162 days and 2 to 87 days, respectively, in both low and middle income countries and high income countries. 4. Stability of the endemic equilibrium. System (1) has an unique endemic equilibrium such that I(t) > 0 for any t > 0. The analytic expression is cumbersome and not useful for our purposes. Consider the parameter values from Table 1 with β = 100. Then the basic reproduction number is R 0 = 2.202067. The endemic equilibrium E * is given by I = 11.006448, L 1 = 36.111397, L 2 = 402.155827, S = 8407.668384. The matrices A 1 and A 2 associated to the linearized system (5) at the endemic equilibrium E * are computed as When d I = 0, we have the following characteristic equation: The roots of (11) It is easy to verify that b = 0.453220 is a root of equation (12). Thus, by Rouché's theorem, there exists at least a time delay d I > 0 such that the endemic equilibrium E * is unstable. In the specific case d I = 0.1, the characteristic equation is given by Similarly to Remark 2, it follows from Bolzano's theorem and the monotonicity of the characteristic function associated to (13) that all roots of equation (13) have a negative real part. Therefore, the endemic equilibrium E * is locally asymptotically stable for d I = 0.1 and R 0 > 1.

Optimal control of a tuberculosis model with state and control delays.
We now consider the TB model (1) with a time delay in the state variable I(t) and introduce two control functions u 1 (·) and u 2 (·) and two real positive model constants ǫ 1 and ǫ 2 . The control u 1 represents the effort on early detection and treatment of recently infected individuals L 1 and the control u 2 represents the application of chemotherapy or post-exposure vaccine to persistent latent individuals L 2 . The parameters ǫ i ∈ (0, 1), i = 1, 2, measure the effectiveness of the controls u i , i = 1, 2, respectively, i.e., these parameters measure the efficacy of post-exposure interventions for early and persistent latent TB individuals, respectively. Since after TB infection the human immune system can take from 2 to 8 weeks to react, it takes at least the same time to detect the infection by the medical test [33]. Hence, we introduce a time delay d u1 in the control u 1 which represents the delay in the diagnosis of latent TB and commencement of latent TB treatment. The prophylactic Efficacy of treatment of early latent L1 0.5 ǫ2 Efficacy of treatment of persistent latent TB L2 0.5 Table 1. Parameter values.
treatment of persistent latent individuals may also suffer from a delay due to personal reasons of the patient, who may be resistant to treatment having spent more than two years with latent infection without passing to active disease, or the delay may be caused by priorities given to early latent and active infectious individuals from the health care system. Based on these facts, for numerical simulations we shall consider the following delays with bounds on the control delays: The resulting model is given by the following system of nonlinear ordinary delay differential equations: Recall that the recovered population is determined by R(t) = N − (S(t) + L 1 (t) + I(t) + L 2 (t)), which formally gives the equatioṅ Note, however, that this equation is not needed in the subsequent optimal control computations. We prescribe the following initial conditions for the state variables (S, L 1 , L 2 ) and, due to the delays, initial functions for the state variable I and controls u 1 and u 2 : In the case d u1 = d u2 = 0 of no control delays, the last condition is void. The following box constraints are imposed on the control variables: Let us denote the state and control variable of the control system (15), respectively, by x = (S, L 1 , I, L 2 ) ∈ R 4 and u = (u 1 , u 2 ) ∈ R 2 . We shall consider two types of objectives: either the L 1 -type objective which is linear in the control variable u, or the L 2 -type objective which is quadratic in the control variable. In both objectives, W 1 > 0, W 2 > 0 are appropriate weights to be chosen later. L 2 -type functionals like (19) are often used in economics to describe, e.g., productions costs, but are not appropriate in a biological framework; cf. the remarks in [20]. The L 1 functional J 1 (x, u) incorporates the total amount of drug 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).
The optimal control problem then is defined as follows: determine a control function u = (u 1 , u 2 ) ∈ L 1 ([0, T ], R 2 ) that minimizes either the cost functional J 1 (x, u) in (18) or J 2 (x, u) in (19) subject to the dynamic constraints (15), initial conditions (16) and control constraints (17). Necessary optimality conditions for optimal control problems with multiple time delays in control and state variables may be found, e.g., in [10]. Here, we discuss the Maximum Principle in order to display the controls and the switching functions in a convenient way. To define the Hamiltonian for the delayed control problem, we introduce the delayed state variable y 3 (t) = x 3 (t − d I ) = I(t − d I ) and the delayed control variables v k (t) = u k (t − d u1 ), k = 1, 2. Using the adjoint variable λ = (λ S , λ L1 , λ I , λ L2 ) ∈ R 4 , the Hamiltonian for the objective J 1 and the control system (15) is given by To characterize the optimal controls u 1 and u 2 , we introduce the following switching functions for k = 1, 2: Then the maximum condition for the optimal controls u 1 (t), u 2 (t) is equivalent to the maximization φ k (t)u k (t) = max 0≤u k ≤1 φ k (t)u k , k = 1, 2, which gives the control law We do not discuss singular controls further, since both in the non-delayed and the delayed control problem we did not find singular arcs. In view of the transversality conditions (20), the terminal value of the switching function is φ k (T ) = −W k for k = 1, 2. Hence, we may conclude from the control law (22) that u 1 (t) = u 2 (t) = 0 holds on a terminal interval.

6.
Numerical results for the non-delayed and the delayed optimal control problem. We choose the numerical approach "First Discretize then Optimize" to solve both the non-delayed and delayed optimal control problem. The discretization of the control problem on a fine grid leads to a large-scale nonlinear programming problem (NLP) that can be conveniently formulated with the help of the Applied Modeling Programming Language AMPL [9]. AMPL can be linked to several powerful optimization solvers. We use the Interior-Point optimization solver IPOPT developed by Wächter and Biegler [30]. Details of discretization methods for delayed control problems may be found in [10]. The subsequent computations for the terminal time t f = 5 have been performed with N = 2500 to N = 5000 grid points using the trapezoidal rule as integration method. Choosing the error tolerance tol = 10 −10 in IPOPT, we can expect that the state variables are correct up to 7 or 8 decimal digits. Since Lagrange multipliers are computed a posteriori in IPOPT, we cannot expect more than 6 correct decimal digits in the adjoint variables. Also, the control package NUDOCCCS developed by Büskens [3] (cf. also [4]) provides a highly efficient method for solving the discretized control problem, because it allows to implement higher order integration methods. However, so far NUDOCCCS can only be implemented for non-delayed control problems. For the non-delayed TB control problem, we obtained only bang-bang controls. An important feature of NUDOCCCS is the fact that it provides an efficient method for optimizing the switching times of bang-bang controls using the arc-parametrization method [16]. This approach is called the Induced Optimization Problem (IOP) for bang-bang controls. NUDOCCCS then allows for a check of second-order sufficient conditions of the IOP, whereby the second-order sufficient conditions for bang-bang controls can be verified with high accuracy; cf. [16,17]. 6.1. Optimal control solution of the non-delayed TB model. First, we consider the optimal control of non-delayed TB model, where formally we put d I = d u1 = d u2 = 0. The numerical solutions serve as reference solutions, which later will be compared with the solutions to the delayed control problem. We choose the weights W 1 = W 2 = 50 in the objective (18) and the parameter β = 100 (R 0 = 2.2) in Table 1. The discretization approach shows that controls u k (t) are bang-bang and with only one switch at t k , k = 1, 2: To obtain a refined solution, we solve the IOP with respect to the switching times t 1 and t 2 using the arc-parametrization method [16] and the code NUDOCCCS [3]. We get the following numerical results: The initial value of the adjoint variable λ = (λ s , λ L1 , λ I , λ L2 ) is computed as λ(0) = (0.376159, 0.452761, 4.03059, 0.394839).
The control and state trajectories are displayed in Figure 2. The Hessian HessL of It can be seen from Figure 2, top row (a) and bottom row (a), that the switching functions satisfy the strict bang-bang property (cf. [16,17]) corresponding to the Maximum Principle: φ k (t) > 0 for 0 ≤ t < t k ,φ k (t k ) < 0, φ k (t) < 0 for t k < t ≤ T (k = 1, 2). Hence, the bang-bang controls (23) characterized by the data (24) satisfies the second-order sufficient conditions in [17,Chap. 7] and thus provides a strict strong minimum. Figure 3 displays the comparison of the optimal controls for the functionals J 1 (x, u) (18) and J 2 (x, u) (19). The state variables are nearly identical, since the control variables differ only a terminal interval. Also the objective values are very close: J 1 (x, u) = 28390.73, J 2 (x, u) = 28382.37. Note that the controls for J 2 (x, u) are continuous, since the strict Legendre-Clebsch condition holds and the Hamiltonian has a unique minimum. The proof, that second-order sufficient conditions (SSC) are satisfied for the controls corresponding to J 2 (x, u), is quite elaborated since it requires to test whether an associated matrix Riccati equation has a bounded solution; cf. [17]. When we increase the weights W 1 and Figure 3. Comparison of controls u 1 and u 2 for the L 1 -type objective (18) and L 2 -type objective (19) with weights W 1 = W 2 = 50.
W 2 , the control u 1 stays to be bang-bang with only one switching time which gets smaller, whereas the control u 2 may have an additional zero arc at the beginning. E.g., for W 1 = W 2 = 150 we obtain the controls The objective value and the switching times are computed as J 1 (x, u) = 29175.97, t 1 = 0.00260, t 2 = 2.662, and t 3 = 4.633. The optimal controls are shown in Figure 4. To see more distinctively the difference between delayed and non-delayed solutions, we consider state and control delays with values at their upper bounds in (14), that is, d I = 0.1, d u1 = 0.2, and d u2 = 0.2. Again, we choose the weights W 1 = W 2 = 50 in the objective (18) and the parameter β = 100 in Table 1, for which R 0 = 2.2. The discretization approach with N = 5000 grid points and the trapezoidal rule as integration method yields the following bang-bang controls with only one switch as in the non-delayed case: We obtain the numerical results J 1 (x, u) = 26784.60, t 1 = 3.108, t 2 = 4.581, S(T ) = 1234.598, L 1 (T ) = 24.93928, I(T ) = 11.71451, L 2 (T ) = 469.8865, and R(T ) = 28258.86. However, in contrast to the non-delayed case, we are not able to optimize the switching times directly because the time-transformation in the arcparametrization method [16] cannot be applied to the delayed problem. The initial value of the adjoint variable is computed as λ(0) = (0.3789, 0.4682, 3.6412, 0.4263). When comparing the results for the delayed problem with those in (24) for the non-delayed problem, we notice the surprising fact that the terminal values L 1 (T ), I(T ), L 2 (T ) and the switching times t 1 , t 2 are significantly smaller in the delayed problem on the expense that the terminal value S(T ) is significantly higher. As in the non-delayed problem, the switching functions satisfy the strict bang-bang property related to the Maximum Principle: However, we are not aware in the literature of any type of sufficient conditions which could be applied to the extremal solution shown in Figure 5.
We also compared the extremal solutions for the L 1 -type objective (18) and the L 2 -type objective (19). Since the controls are very similar to those in Figure 3, they are not displayed here. Figure 6 shows the extremal controls for the L 1 -objective (18) for the increased weights W 1 = W 2 = 150. The most significant influence on the optimal controls is exerted by the transmission coefficient β. It can be clearly seen that the increase of the transmission coefficient β triggers a substantial increase in the switching times t k of the bangbang controls u k for k = 1, 2 (cf. Figure 7) as could be expected from the equation forṠ. Let us perform in this case a more detailed sensitivity analysis of the trajectories with respect to the parameter β ∈ [50, 150]. We compute the extremal solutions for a sufficiently fine grid of parameters β ∈ [50, 150] by a homotopy method and plot the objective J 1 (x, u) and the terminal state (S(T ), L 1 (T ), I(T ), L 2 (T ), R(T )) as a function of β. The numerical results are shown in Figure 8.

7.
Conclusions. We introduced a discrete time delay d I in a mathematical model for tuberculosis (TB), which represents the delay on the diagnosis of active TB infection and commencement of treatment. The delay on the diagnosis of active TB has important negative consequences on TB control and eradication. The later the treatment of active TB starts, the more people can be infected and may die from TB. The introduction of a time delay on the state variable of active TB infected individuals I is therefore justified from the epidemiological point of view. When a time delay is introduced into a mathematical model, the stability of its disease free and endemic equilibriums may change. We proved that the disease free equilibrium (DFE) of the TB model with delay in the state variable I is unstable for any time delay d I ≥ 0, whenever the basic reproduction number is greater than one. We derived conditions under which the model is locally asymptotically stable for d I = 0 and proved that there exists at least one positive time delay d I > 0 such that the DFE is unstable for R 0 < 1. Despite of this, we also proved that for the concrete time delay d I = 0.1, the set of parameters of Table 1, and a transmission coefficient for which R 0 < 1, the DFE is locally asymptotically stable. The value d I = 0.1 (36.5 days) fits the data reported in the literature for the delay in the diagnosis of active TB. For the endemic equilibrium (EE), we considered that the transmission coefficient β is such that R 0 > 1 and proved the local stability of the specific EE associated to our set of parameters and discrete time delay d I = 0.1.
We proposed an optimal control problem where the control system is the mathematical model for TB with time delay in the state variable I and where the control functions u 1 and u 2 represent, respectively, the effort on early detection and treatment of recently infected individuals L 1 , and the application of prophylactic treatment to persistent latent individuals L 2 . The objective is to minimize the number of individuals with active and persistent latent TB as well as the cost associated to the implementation of the control measures. Human immune system can take from two to eight weeks to react to TB infection and detection. Moreover, prophylactic treatment of early and persistent latent individuals may face resistance from patients and health care services. Based on these facts, we introduced discrete time delays in the controls u 1 and u 2 . To our knowledge, this is the first time an optimal control problem for TB with delays in the state and control variables is investigated.
Firstly, we considered the non-delayed case (d I = d u1 = d u2 = 0) and compared the solutions for L 1 and L 2 objectives. Our results show that the optimal state variables are nearly identical for both objectives, the control variables differing only on a terminal interval. The optimal values of the objective functionals are also very close. We observed that for the L 1 objective the optimal control u 2 may have an additional zero arc at the beginning if the weight constants associated to the implementation of the control policies u 1 and u 2 are big enough. For the delayed optimal control problem, our focus was on the L 1 objective since it seems to be the more realistic and, comparing the extremal solutions of L 1 and L 2 objectives, the differences are similar to the non-delayed case. In the delayed case, the switching times t 1 and t 2 are significantly smaller and the costs are also smaller, when compared to the non-delayed case. From an epidemiological point of view, when we introduce delays in the TB model, the optimal solutions for the reduction of the number of individuals with active and persistent latent TB infection are associated to control policies that are less costly and can be implemented in a shorter period of time. Associated to these positive facts, we observed that if a delay is introduced in the state variable I and in the controls, the number of individuals with active TB infection at the end of five years is reduced in approximately 45.2 per cent, when compared to the non-delayed case. Similarly, the number of persistent latent individuals at the end of five years is also reduced in approximately 60.1 per cent. Moreover, the terminal number of susceptible and recovered individuals is bigger in the delayed case. Through a sensitivity analysis, we observed that the transmission coefficient β has a significant influence on the optimal controls and the cost functional, and that the number of active infected individuals and the number of early and persistent latent individuals also increase with β. The number of recovered individuals increases for β ∈ [50, 100] and decreases for β ∈ [100, 150], which means that for R 0 > 3.1 the control measures are no longer effective and should be rethought.