An Investigation of the Effects of Lifting Quarantine Conditions after the Peak of COVID-19 Pandemic Using the Cellular Automata Approach


 A cellular automata model for simulating the epidemic dynamics of COVID-19 disease in a small city is given. In the model, people are allowed to leave and return to their homes, and the time of the peak in different quarantine conditions is estimated. It is shown that the removal of quarantine conditions, even one month after reaching the peak, increases the number of total infected and total dead cases significantly.


Introduction
Coronavirus disease 2019, also known as COVID-19, is an infectious disease which rst appeared in Wuhan, China in December 2019 and has since spread throughout the world. By 21 April 2019 1 , the number of the infected and dead cases across the world had reached 2,503,456 and 171,810 respectively. It is, therefore, of critical importance for the o cials to be able to form predictions about the time of the outbreak's peak and the most effective time for removing the quarantine conditions. The widely used models for investigating epidemic dynamics are SIR, SEIR 2, 3 , and recently SUQC 4 , which are based on coupled differential equations with adjustable parameters. The value of parameters is obtained by tting the results with the real available data. But the real available data depends strongly on many factors, such as medical resources and facilities, quarantine conditions, population density, the number of the infected cases at the start of the quarantine, etc. These factors vary dramatically between different locations, and, as a result, so do predictions. An alternative for modeling infectious diseases is based on cellular automata 5-8 . This paper aims at performing an experiment that would be impossible in the real world, and cellular automata is a good frame work for this purpose. In this experiment, people can freely move between their homes and the street, and quarantine conditions can be introduced into the experiment by limiting the people's movement between these two locations. We know that the transmission of COVID-19 is mainly due to the transfer of droplets during close contact. To mimic similar conditions, in the simulation people can walk in the streets of the city feely. The aim of this work is to investigate the effect of imposing quarantine conditions at different times on four different groups: the total infected, the active infected, the critically affected, and the dead cases. Nowadays, with different countries choosing diverse approaches for removing quarantine conditions, nding an optimal time for this removal has remained an unanswered problem. The novelty of this work is in its showing the effect of removing quarantine conditions after the breakout's peak on a number of different cases at different times. This can work as a starting point for further planning.
The detail of the model and method are introduced in section 2. Simulation results and discussions are given in section 3. Lastly, section 4 is devoted to the conclusion.

Page 3/13
The model of the city is a rectangle on a two-dimensional r×c square lattice, which is composed of b blocks and streets around each block. The width of the streets is 10 meters, and each block is a 40×100 meters rectangle made of 5 oors buildings. Each oor consists of the 50 house, so each block contains 250 house. The population is divided into four groups: Healthy (H), Infected (I), Critically Affected by Infection (C), and Recovered Healthy cases (R). Each cell in the lattice can either be occupied by one person, or remain empty. To simplify the algorithm, one separate matrix is de ned for each case, and the state of each cell is represented by either 1 (existence of case) or 0 (empty space). According to the real world's available data, the average time between exposure to COVID 19 and recovery is approximately 14 days in both mild cases and C cases. In the simulation, three dimensional matrices are de ned for I and C cases. So the state of the street matrices is de ned by H k]where 1≤i≤r, 1≤j≤c, and 1≤k≤14, with k representing how many days a case has been infected. These four matrices are transparent and imposed over each other in such a way that each cell of the street can be either occupied by only one kind of a case or empty. In other words, the sum of these elements for all k must be equal to 0 or 1. A separate state for dead people is not considered, and during the simulation these cases simply will be removed from the city. The H, I, and R cases can move inside and outside of their home, but C cases, because they need special care, are transferred to their home at each time step and remain there until their fate has been decided. In the street, people can move, but no movement at home is accounted for. The basic supposition is that the space of the home is small and peoples are in close contact with each other. The maximum population at each home is limited to 6 people. All homes in the city can be represented by one matrix with b×250 rows and 6 columns. Each row of matrix represents one home. To simplify the algorithm, for each case a separate matrix is de ned and the home matrix is made by imposing these 4  Each time step in the simulation is equal to one hour and composed of several stages. In the rst stage, one person from each home will be selected randomly and moved to another randomly selected empty location in the street with a P exit probability. The value of the P exit depends on the quarantine conditions. In this stage, H, I, and R cases can come out of the home and distributed randomly in streets, but C cases remain in their home. We know that many infected people are not aware of their infection, so I cases can come outside freely, but C cases need special care and remain in their home or in a hospital. When each case has left its home, its state in the home matrices is represented by the number 2. These numbers will be helpful because, in the nal stage, each person must come back to its own home, otherwise quarantining is meaningless.
The second stage, called the reaction stage, is converting the cases according to the following transition rules. For the H cases in the street, the Moore neighborhood is used. If the H case has at least one I or C case in its neighborhood, it will be converted to an I case with a k = 1, with the probability of infection represented by P I. Otherwise, the H case remains an H. As shown in the next section, the value of P I is very important, and we do not have any experimental knowledge about it, but with available data from the growth of the number of infected cases in each country, the value of P I can be estimated for that country.
If at least one I or C case stays at home, the H cases at home will be infected with a P I probability and converted to an I case with a k = 1. Otherwise, the H cases remain an H.
The transition rules for the I and C cases at home or in the street at this stage are as follows: For an I case with a k = 14, the infected case can recover and become a healthy R case with a P R probability. Otherwise, the I case converts to a C case with a k equal to 1. For an I case with a k < 14, after each 24 time steps, one day will be added to its k value (k will be changed to k +1).
For critically affected cases with a k equal to 14, the C case may die with a P D probability and its state will be either replaced by zero or recovered to become a healthy R case with a 1-P D probability. For a C case with a k < 14, after each 24 time steps one day will be added to its k value (k will be changed to k +1). The recovered healthy case remains an R in the reaction stage. indicator reminding us that we had one case in the corresponding location before the cases moved out of the home.
After the reaction stage, we let the cases move in the street. For the movement of the cases, the algorithm rst introduced by Vanag 9 is used. In this method, the lattice is partitioned into 3 by 3 squares. In each partition, in each time step, the number of H, I, C, and R cases will be counted and redistributed randomly in such a way that the number of each case remains xed. In the second, third, and fourth time steps, partitions move one cell to the right, down, and left respectively. In the next time step partitions move one cell up, and this procedure will be continued throughout the simulation. This method is similar to the random movements of the cases, and the movement of the partitions allows the cases to walk in the streets.
In the nal stage, all cases can come back to their homes. The movement of the cases from the streets to home must be done with care. We must pay attention that the number of members in each home not exceed its initial state. The second point is that in the real world, the I and C cases must not move freely between homes and each case must come back to his or her original home. But so long as we put such polite manners and morality aside, returning to one's original home will not matter in a simulation, as long as the I and C cases return to any home with similar conditions to their original homes. We know in the reaction stage the number of all cases will change, and we need a simple strategy for manipulating the movement of the cases from the streets to their home. The number of H cases in the street will be reduced during the simulation, because in the reaction step, the H cases may be converted to I cases. So each H case can leave the street with a 1-P exit probability and come back to a randomly chosen home with H home [m][[n] = 2 and the number 2 will be replaced with 1. What about the infected cases? The infected cases in the streets have two sources. Some of them have come from a home in the rst stage and some of them are created in the reaction stage from H cases. So, at rst, each infected case with a k (

I[i][[j][[k] = 1) can leave the street with an 1-P exit probability and come back to a randomly chosen home with I home [m][[n][[k] = 2 and stay there. If there is not a home with an I home [m][[n][[k] = 2, then it goes to a randomly chosen home with a H home [m][[n] = 2. In other words, we set H home [m][[n] = 0 and I home [m][[n][[k]
= 1, because this additional infected cases came from H cases and all the H cases had been at a home at the beginning of simulation. All C cases must be removed from the streets because they need special care or hospitalization. Remember that the C cases in the street have a k = 1 (they are created in the reaction stage) and are produced from the infected cases whose k = 14, which themselves have two sources as explained. So each C case must go to one randomly chosen home which has an I home [

Results And Discussion
All the simulations are carried on a 343×163 square lattice with b = 9 blocks. In the initial state, the H cases are randomly distributed between homes in such a way that each home contains a random number between 0 to 5 H cases. On average, each home is occupied with 2.5 H cases, the total population is 5698 cases, and the streets are free of all people. Based on the daily reported data , nearly 80% of the infected cases who have mild symptoms recover after a couple of. The remaining 20% are patients with a critical disease who need special care (C cases). The fatality rate for COVID-19 varies for different locations and has been estimated between 2% to 4.9%, so the values of P R and P D will be 0.8 and 0.2 respectively (the mortality being rate 4%).
Epidemiologists represent the attack rate by the reproductive number R 0 , which differs from P I. Measuring the probability of infection from the available data is not a simple task. Fig. 1 shows the number of active infected cases versus time for different values of P I. In these plots, the initial state is made by inserting two infected cases at two randomly chosen homes, and the value of P exit is xed on 0.8, which means 0.23% of the population (on average 1311 cases) stays outside the homes in each time step. For the values of P I > 0.1, the outbreak's peak is reached in 14 days, which is not compatible with reality. As shown, by decreasing the value of P I, the peak goes to the right. For P I = 0.04, the maximum peak occurs on the 24 th day, and in cases P I equal to 0.03 and 0.02, this peak will be seen in the 30 th and 40 th days respectively.
For the value of P exit = 0.4, which means 4% of the population stays in the street at each time step (228 cases on average), if we set the value of P I = 0.02 we see a small peak on the 14 th day, and the active infected cases are reduced to zero after 20 days. Variation in the number of active infected cases versus time for the case of P I = 0.03 and P exit = 0.4 is shown in Fig. 2. The sharp maximum in 14 th day appears as a result of transition rules in the reaction stage because it was supposed that the I cases with k = 14 can convert to an H or a D case. Table 1 shows the percentage of the population in the streets at different values of P exit. This value of P exit is for hard quarantine conditions, and it seems the value of 0.03 for P I is an appropriate estimate for this simulation. The value of P exit is determined by the quarantine conditions. The effect of the value of P exit on the height and location of the peak in the case of P I = 0.03 is shown in Fig. 3. In this situation, all data is obtained by averaging over 30 different samples (30 different simulation runs) with the same initial conditions, and the initial state is made by inserting 20 infected cases in various randomly chosen homes. As is seen, by decreasing P exit, the height of the peak decreases and the peak shifts to the right.
By comparing Fig. 2 and 3 with daily data , it can be seen that the location of the peak of South Korea and China is similar to Fig. 2 and the situation at many countries like the USA, Italy, and Spain may be similar to Fig. 3c (at the time of writing this manuscript). The total number of the infected and the dead cases for the different values of P exit after 170 days in the case of P I = 0.03 are given in Table 2. Nowadays, one of the most controversial challenges is nding the best time for the removal of quarantine conditions. For example, in the case of P I = 0.03 and P exit = 0.5, the quarantine condition is removed after 54, 69, 88, and 100 days and the results are shown in Fig. 4. Removal of quarantine conditions can be done by changing the P exit from 0.5 to 0.6 in the chosen time.
As shown, if we remove quarantine conditions a few days after the peak, the number of the active infected cases increases substantially, about 143 cases on 54 th day , but if the quarantine conditions are lifted much later after the outbreak's peak, there will be little increase in the number of the active infected cases; about 13 cases by the 100 th day. Fig. 5 shows the total number of infected cases versus time in different scenario of removing the quarantine conditions. Clearly the total number of the infected cases has increased signi cantly in all scenarios.
The nal number of the total infected and dead cases after the removal of quarantine conditions in different days is given in Table 3. But this data shows the other side of the coin. In all cases, the total number of the infected cases has increased considerably, and, as a result, the number of the total dead cases has also increased.

Conclusion
In this experiment, a city with a population of 5718 people, who live in 9 blocks (a dense population) is simulated. It is shown that quarantine conditions have serious effects on the decrease of the number of total infected and dead cases (Fig. 3). Although the removal of the quarantine conditions after maximum peak has a small effect on the number of active infected cases, the number of total infected cases, and, consequently, the number of the dead cases, increases considerably. In this simulation, the basic supposition is that all the critically affected cases receive su cient care and hospitalization, but in the case of limited and low hospital facilities, the number of the dead cases will increase. This situation can be added to the simulation by introducing hospital matrices to the simulation and transferring the C cases to a hospital. It seems the height and location of the maximum peak of the active infected cases depend on the size of the city and the density of the population. The investigation of this effect remains for a future work with better hardware facilities. The number of active infected cases versus time in the case of PI =0.03 and Pexit =0.4.
Page 11/13 Figure 3 The number of active infected site versus time in the case of PI =0.03 and a) Pexit =0.7 b) Pexit =0.6 c) Pexit =0.5.