Optimal Containment Control Strategy of the Second Phase of the COVID-19 Lockdown in Morocco

: This work investigates the optimal control of the second phase of the COVID-19 lockdown in Morocco. The model consists of susceptible, exposed, infected, recovered, and quarantine compartments (SEIRQD model), where we take into account contact tracing, social distancing, quarantine, and treatment measures during the nationwide lockdown in Morocco. First, we present different components of the model and their interactions. Second, to validate our model, the nonlinear least-squares method is used to estimate the model’s parameters by ﬁtting the model outcomes to real data of the COVID-19 in Morocco. Next, to investigate the impact of optimal control strategies on this pandemic in the country. We also give numerical simulations to illustrate and compare the obtained results with the actual situation in Morocco.


Introduction
On 31 December 2019, a novel coronavirus named (COVID-19) was detected in Wuhan City, Hubei Province of China [1]. Human coronaviruses chiefly cause respiratory infections that can be a simple mild cold or a severe and sometimes fatal lung disease. The speed of the worldwide spread of the virus is unprecedented. The human mobility means that almost all countries are now infected [2]. As there is currently no vaccine available to protect against COVID-19 and no specific drug treatment [3], the government in each country has adopted extreme measures to mitigate the outbreak, suspending all public traffic within the cities, and closing all inbound and outbound transportation. Therefore, several researchers have studied a mathematical model to estimate the transmissibility [4][5][6][7][8], and the dynamic of the transmission of the virus and the calculation of the basic reproduction number R 0 [9,10].
Chen et al. [5] studied a mathematical model describing the transmissibility of SARS-CoV-2, by developing an RP transmission model, which takes into account the reservoir-to-person and person-to-person pathways of SARS-CoV-2. Zhao et al. [10] modeled the epidemic curve of the 2019-nCoV cases' time series, in mainland China, through the exponential growth. They demonstrated that changes in reporting rate substantially affect estimates of the basic reproduction number R 0 . Lina et al. [6] have investigated a model for the COVID-19 outbreak in Wuhan with the consideration of individual behavioral reactions and governmental actions, e.g., holiday extension, travel restriction, hospitalization, and quarantine.
Liu et al. [7] have proposed a quarantine-susceptible, exposed, infection-resistant model, which considers the strict quarantine imposed in almost all of China to contain the epidemic. They estimated the model's parameters with the statistical method and stochastic simulation. In [11], the authors have presented a new mathematical model describing the evolution of COVID-19 in countries under a national lockdown and studied the impact of staying at home on the pandemic spread, especially in Morocco and Italy, in which they have considered two new classes of people: those who underestimated the quarantine and left their home, called the partially controlled people, and those who respected the national quarantine by staying at home, called the totally controlled people.
In this paper, we consider a new COVID-19 epidemic discrete mathematical model that considers the strict quarantine measures imposed in almost all countries to resist the epidemic. We sought the optimal strategies to minimize the number of exposed and infected people. We looked at optimal strategies to reduce the infected and susceptible contact by adopting the quarantine strategy for the infection and choosing containment throughout the country. To achieve this purpose, we looked at optimal control strategies that represent awareness campaigns that aim to introduce health measures to protect individuals from being infected by the virus and the security campaigns and health measures to prevent individuals' movement. We set the characterization of optimal control strategies, and we give the explicit expression of the optimal controls by using Pontryagin's maximum principle.
The paper is organized as follows. In Section 2.1, we present a description of the COVID-19 discrete mathematical model that describes the dynamics of the COVID-19 disease propagation and which includes contact tracing, quarantine, and treatment during the strict national closure in the whole of a country to resist the epidemic. In Section 2.2, we estimate the parameters to validate the proposed model by fitting the model outputs to real data. In Section 2.3, we present the optimal control problem for the proposed model, and we characterize these optimal controls using Pontryagin's maximum principle in discrete time. Numerical simulations and comparison of the different strategies are given in Section 3 . Finally, we conclude the paper in Section 4.

Model Description
In this paper, we propose a discrete-time SEIRQD-type COVID-19 epidemic model. We take into account that the exposed are asymptomatic, which means that they are also infectious. The model is describe by the following discrete system (1) subject to non-negative initial conditions. S i , E i , I i , R i , and D i denote the number of susceptible, exposed, infectious, recovered, and dead persons. E q i and I q i denote the number of exposed and infectious persons in quarantine. In such a SEIRQD-model type of the COVID-19, N i is the total population size, the incubation period is estimated to be 7 days and the infectious period of the virus is estimated as 10 days.
A susceptible person can infected by contacting either an infected person or an exposed (asymptomatic) person. The number of these contacts is β 1 The control strategy that was introduced into this system aims to reduce contact between susceptible people and infected or exposed people.
For a period of 10 days of virus incubation, the symptoms might appear in a portion of E i individuals. Hence, a fraction of these individuals, γ 1 E i , will choose not to be hospitalized, as their symptoms are mild and can be treated at home. We also assume that infected person become infected again with the rate ρ 3 I i . There are cases of infected people who died, and their autopsy confirmed COVID-19 as cause of death; therefore, a fraction µ 1 I i will be added to the number of deceased caused by COVID-19. The other fraction of the asymptomatic γ 2 E i is hospitalized and put under medical care. Once a person is infected and hospitalized, the health service tries to trace the people who contacted the infected person during the 10 days of the virus incubation period. The individuals that are traced will be quarantined and placed under medical care.
is the total number of people who were in contact with infected people before being quarantined. The γ 3 E q i of cases will have symptoms and will be placed under medical surveillance, or they will have to get medical care if their symptoms are mild. The contacts who tested negative, after an observation period, find themselves newly susceptible with a ρ 1 E q i rate. Among these infected cases, a number of µ 2 I q i will have died and a number of TI q i will be recovered. The recovered people do not have immunity from the COVID-19; therefore, they may be susceptible again. The birth rate Γ i is 16.5% of the total population [12] and the natural mortality rate d is equal to 5.8%.
All the above parameters are assumed to be non-negative and defined in Table 1. Schematically, the flow between compartments is represented in Figure 1.

Parameter Description
Γ i the number of people born at the moment i. β 1 The transmission rate from I to S. β 2 The transmission rate from E to S. α The rate that a quarantined individual is exposed to infection. γ 1 rate changes of an exposed state E to infected state I. γ 2 rate changes of an exposed state E to infected state I q . γ 3 rate changes of an exposed state E q to infected state I q . µ 1 rate changes of an infected state I to susceptible state S. µ 2 rate changes of an infected state I q to death state D. ρ 1 rate changes of an exposed state E q to susceptible state S. ρ 2 rate changes of an cure state R to susceptible state S. ρ 3 rate changes of an infected state I to susceptible state S. T rate changes of an infected state I q to the cure state R. u control measures for reduce contact between susceptible and infected persons. v control measures for reduce contact between susceptible and exposed persons. d The death rate of people.

Estimation of the Parameters
Our study focuses on the second phase of national lockdown in Morocco, from 6 April to 25 April, which is the time when wearing facial masks become obligatory, social distancing was implemented in all public places and many tests were carried out, as depicted in Figure 2. This is due to the rapid response of the Moroccan government, applying the nationwide quarantine after only 63 cases and two deaths on 20 March.  To verify the validity of our model, we used nonlinear least-squares regression to fit the model to actual data. Therefore, the following process was followed for parameter estimation: The system of difference equations is solved numerically, the initial values chosen for the parameters, and the initial state variables of Table 2. The results of the model are compared with the field data, and the Levenberg-Marquardt optimization algorithm defines a new set of parameter values, with the results of the model better suited to field data. After determining the values of the new parameters with this optimizer, the system of difference equations is solved numerically using the value of these new parameters, and the results of the model are again compared with the field data. This iteration process continues between the updating of the parameters and the numerical solutions of a system of difference equations, using iterative diagrams until the criteria for convergence of the parameters are fulfilled. In this process of estimating the parameters, around one thousand values, are chosen using a random process for each of the parameters to be estimated. Table 2. Estimated parameters' values and the initial conditions for SEIRQD Model.

Parameter
Value Due to the effectiveness of large-scale awareness programs in the whole country, it is easy to identify infected people by their symptoms. Thus, the cases that were not reported are almost non-existent in the midst of the efforts exerted by the authorities and the different control strategies. This is why we can see that the parameter γ 1 has a small value. We can also see the percentage of people sent home to take care of themselves, that is to say, ρ 1 , which means that the space for new patients allocated by the Moroccan authorities is very sufficient and there is still space available.
In Figure 3, we can see that our model fits correctly with the real data of Morocco, especially the data of infected and dead cases, see the sub-figures (a) and (c). In (a), (b), and (c) we can see the estimation of the I function, R function, and the D function, respectively, where there are some errors plotted with the filled area.
Because the residuals needs to be determined numerically, we examined the accuracy of the normality of the estimation of the parameters. In order to carry out this examination, we generated the residuals of the infected, recovered and dead populations for data of Morocco. First, residuals are plotted in Figure 4, where we can see ranges of I k − I data k in (a) and R k − R data   In order to make valid inferences during regression analysis, it is necessary to check the assumptions, in order to be able to trust the results. One of the most useful assumptions for regression analysis is that the residuals are normally distributed. It can be seen from these figures that the residuals follow a normal distribution, furthermore, they remain within small ranges, thus the estimated parameters are reliable and correctly predict the observed data of Morocco, especially the number of infections and deaths.
The objective of this part of the article is not to predict what will happen in the coming months, but to validate the proposed model by fitting the model's outputs to real data. Therefore, our next objective is to suggest optimal control strategies to make the national lockdown more effective in reducing new infections and saving more lives.

The Optimal Control
During this pandemic, all affected countries over the world adopted national lockdowns, social distancing, and quarantines. The Moroccan authorities started the lockdown on the 20th March, when the infections reached 63 cases, which is considered early compared to some countries that intervened after huge numbers of COVID-19 cases were recorded. Optimal control techniques are of great use in developing optimal strategies to control various kinds of diseases. To solve the challenges in obtaining an optimal control strategy, we consider the variables (u i , v i , T i ) ∈ U T ad . (u i ) to be control measures for reducing contact between susceptible and infectious person per unit of time, by providing people with all the necessary information to identify symptoms of a suspected case and the necessary precautions to avoid infection, (v i ), which include control measures for reducing contact between susceptible and exposed persons per unit of time by imposing social distancing, self-isolation and not leaving home unless absolutely necessary, and wearing masks. T i is the treatment per unit of time. The set U T ad is defined by this indicates an admissible control set. Now, we consider an optimal control problem to minimize the objective functional subject to system (1). Here, A 1 , A 2 and A 3 are positive constants to keep a balance in the size of E i , E q i and I q i . In the objective functional, τ 1 , τ 2 and τ 3 are the positive weight parameters, which are associated with the controls u i , v i and T i .
Our goal is to minimize the exposed group, minimize the systemic costs which increase the number of contacts between the susceptible, the infected and exposed. In other words, we are seeking an optimal control u * i , v * i and T * i such that The sufficient condition for existence of an optimal control for the problem follows the following theorem.
At the same time, by using Pontryagin's Maximum Principle [14], we derive the necessary conditions for our optimal control. For this purpose, we define the Hamiltonian as Theorem 2 (Necessary Conditions). Given the optimal controls u * i , v * i , T * and solutions S * , E * , I * , R * , E q * , I q * and D * , there exists ζ k,i , i = 1...N, k = 1, . . . , 7, with the adjoint variables satisfying the following equations ζ 7,i = 2ζ 7,i+1 ; ζ 1,N = 0, ζ 2,N = A 1 , ζ 3,N = 0 and ζ 4,N = ζ 5,N = A 2 , ζ 6,N = A 3 , ζ 7,N = 0. Furthermore, the optimal controls u i * , v i * and T i * are given by Proof. Using Pontryagin's Maximum Principle [14], and setting we obtain the following adjoint equations with transversality conditions To obtain the optimality conditions, we take the variation with respect to control u * i , v * i , T * i and set it equal to zero Then we obtain the optimal control By the bounds in U ad , it is easy to obtain u i * , v i * , T * i in the following form

Results and Discussion
In order to illustrate our theoretical results, we present, in this section, some simulations obtained by numerically solving the optimality system given by Theorem 2. This system consists of the state system, adjoint system, initial and final time conditions, and the control characterization.
The optimality system is solved based on an iterative discrete scheme that converges following an appropriate test, similar the one related to the Forward-Backward Sweep Method (FBSM) [15]. The state system with an initial guess is solved forward in time, and then the adjoint system is solved backward in time because of the transversality conditions. Afterwards, we updated the optimal control values using the values of state and adjoint variables obtained at the previous steps. Finally, we executed the previous steps until a tolerance criterion was reached.
In this simulation, we propose three types of strategies. The first is to find the optimal controls u and v only. Their roles allow the distance between people and therefore the reduction in contact between susceptible people or people being exposed at the same time. The second strategy aims only to find an optimal treatment. The third strategy is to combine the two previous strategies, i.e., reducing contact and improving treatment.

The Lockdown Only
From the evolution of the variables of the model, between the 6th and 26th April, with and without controls in Figure 6, we observe, clearly, the possibility of the impact of enhancing the efficacy of the lockdown in the epidemic situation of COVID-19 in Morocco. In fact, with an initial state E 0 = 2000 estimated on 6 April, we note an increasing evolution of the number of people exposed, which reaches a peak of 4800 people on 15 April, then decreases to 3200 cases on 26 April. On the other hand, by introducing optimal controls, i.e., the optimal containment strategy which reduces contact between people with the disease and susceptible people, we observe that the number of people exposed decreased to reach a minimum value on 15 April, then rebounded and grew to reach 1900 cases on 26 April. The number of contacts E q decreases from E q 0 = 2000 to reach 1800 cases on 8 April, then increases exponentially to reach its maximum value of 7650 at the end of the period. By introducing the optimal controls u and v, the number of contacts E q decreases at the start from 2000 to 1600 after 5 days and then increases to reach 3200 in 25 April.
For (I q ) the number of infected increased from 1000 cases in the beginning to 3400. On the other hand, by applying optimal containment, the number of infected remained constant in the beginning of 6 April to 13 April, then increased slightly to reach 1400 by the end of the year.
The estimated number of recovered, R, with and without control, initially increases in the same, However, with control it reaches 220 cases on 25 April and the number for the non-control group exponentially to reach 540 cases.
The estimated number of cases recovered, R, with and without control, initially increases in the same way, however, with control it reaches 220 cases in 25 April while this number, without control, grows exponentially up to 540.
Similarly, the number of deaths increases for both cases; we observe that they are the same between the period from 6 April to 13 April. In fact, the control strategy does not much affect the number of deaths as, with the optimal control, it reached 150 cases of death towards the end of the period and 168 for the cases without control.
The optimal control strategy reduces the susceptibility of the population by 11,500 by 25 April. However, without control, the number would increase by 447,100 persons.
Note that the optimal control pair (u, v), as shown in Figure 7, should be initiated for the exposed population (on the day 8) before the infected population (on the day 12). Figure 8 represents the dynamic evolution of the states of the system (1) with only the treatment and without lockdown. We remark that the treatment only does not affect much the populations of exposed E and E q , as well as death D (with reduction of number of death by about 25 death) and susceptible S. However, it reduces the number infected in quarantine and increases the number of recovered. In fact, with the treatment, the number infected in quarantine cases would be reduced by 2050 cases and the number of recovered would be increased by about 700 cases.

Treatment Only
We note also that the optimal rate of cure is less, 22%, in most of the period between the 6th and 26th April, as shown in Figure 9.

Treatment and Lockdown Strategies
Now, we present the case where we combine the optimal treatment control and optimal lockdown strategy. From Figure 10, it can be seen that this pair of controls is more beneficial to contain COVID-19. In fact, we notice that for S, E and E q , the outcome of applying these controls is similar to the case of lockdown only in Figure 6. However, there is a substantial reduction in the I q , compared to the previous control approaches (treatment only and lockdown only). As for the number of deaths, we do not see much difference between combined control and treatment only. Although there is an increase in the number of recovered people in the beginning of studied period, surprisingly, we notice a slight reduction in this population compared to the fitted data. For the functions of optimal control strategy, we see clearly from Figure 11 that the optimal control pair (u, v), should be initiated for the exposed population from 5 April and for the infected population from 10 April. The optimal treatment's cure rate starts with 80% and reaches less than 10% over the rest of the period.  Figure 11. The optimal control function u, v and T.

Conclusions
As the COVID-19 pandemic is still taking many lives around the globe ( over 766,000 death by 17 August 2020) and public health capacities are overwhelmed, many countries have rushed to take different control measures, such as lockdown, treatment, tracing contact and testing, that help to contain the spread of the disease. The question is what the best approach is to limit the impact of COVID-19 on the population. For this purpose, we studied the optimal strategy of lockdown during the COVID-19 in Morocco. First, using the nonlinear least-squares method, we fitted our discrete epidemic model to the COVID-19 data in the period between 6 April 6 and 25 April 2020. By such a fitting, we determined the values of the parameters of our model. Next, we derived a control strategy for the COVID-19 that aims to minimize the exposed and infected populations and the treatment. We used optimal strategies to reduce the contact between the infected and the susceptible by adopting the quarantine strategy for the infectious and choosing containment throughout the country. Using the Pontryagin's maximum principle, we obtained an explicit expression of the optimal control. Our numerical simulation of the optimal control showed the lockdown's effect only, the treatment;s effect only, and both controls simultaneously. The lack of an anti-COVID-19 treatment or an effective vaccine against COVID-19, and limited medical resources are all factors that make it difficult to stop the transmission of this epidemic. For this reason, we have considered each control strategy separately. The first scenario is to use only closure, and this strategy gives a satisfactory health outcome, but, given that a nationwide lockdown has a major economic impact, it seems that we need another strategy to reduce its burden. Second, we looked at the scenario where only treatment was used. This control strategy also gives good results, especially for the number of infections, but it still appears insufficient when we see the number of people exposed. This control requires more medical equipment and more places available in hospitals. Finally, we combined the previous control strategies and found that this third control strategy is the best and most effective in terms of people isolated and the number of infections. Thus, we have alleviated the burden on medical establishments as well as the economic side effects of the lockdown.