key: cord-1053400-2nx7vx5k authors: Cavalcante, André Luís Brasil; de Faria Borges, Lucas Parreira; da Costa Lemos, Moisés Antônio; de Farias, Márcio Muniz; Carvalho, Hervaldo Sampaio title: Modelling the spread of covid-19 in the capital of Brazil using numerical solution and cellular automata date: 2021-07-30 journal: Comput Biol Chem DOI: 10.1016/j.compbiolchem.2021.107554 sha: 181918d50143a1d342ec411afc998c6233c256a6 doc_id: 1053400 cord_uid: 2nx7vx5k The novel coronavirus disease 2019 (COVID-19) still challenges researchers due to its spread and deaths. Hence, the classical epidemic SIR and SEIRD models inspired by the epidemic's outbreak are widely used to predict the evolution of the disease. In addition to classical approaches, describing complex phenomena through Cellular Automata (CA) is a highly effective way to understand the iterations on a populated system. The present research analyzed the usage of CA to generate an epidemic-computational model from a micro perspective based on parameters obtained through a statistical fit from a macro perspective. After validating SIR and SEIRD models with the government official data for Brasilia, Brazil, the authors applied the obtained parameters to the Cellular Automata model. The CA model simulated the spread of the virus from infected to uninfected people in a restrained environment (i.e., a supermarket) under several varied conditions applying an approach never adopted before. The manner of applying CA in this research proved to represent an essential tool in predicting the spread of the coronavirus in confined spaces with random movements of people. The CA numerical open-source presented has the purpose of clarifying how the spread occurs not only as a mathematical curve but in an organic way. The numerical simulations from the CA model allowed the authors to conclude that markets and stores are relevant places where might be infections. Thus, every local store and the market owner should reason about the aspects that could avoid the spread of the disease, coming up with efficient solutions. Each environment has specific features that only those who know them are the ones capable of managing. models, usually described in ordinary nonlinear differential equations, have formed a significant part of the traditional mathematical epidemiology literature (Vargas-De-León, 2011 ). Among these models, the predictive model of epidemic phenomena called SIR (Susceptible-Infective-Recovered), and SEIR (Susceptible-Exposed-Infective-Recovered) are frequently used to investigate infection data and epidemic outbreak. These models represent one of the most adopted mathematical models to predict different contagion situations. However, sufficient data need to be available. Then these models can be applied to choose the best restriction and lockdown measures and other restrictive measures in different sectors in the society. The basis of the SEIR model is a series of dynamic ordinary differential equations that consider the population subjected to contagion and the trend over time of individuals who recover after infection (Godio et al., 2020 ). The SEIRD model (a version of SEIR) includes death in modeling, and epidemiologic studies use similar models (Korolev, 2020; Lin et al., 2019; Wang et al., 2020) . The SEIRD model considers five groups of people: susceptible (S), exposed (E), infectious (I), recovered (R), and dead (D). As a result, the SEIRD model should reflect the epidemic's progression more accurately than a more conventional SIRD model that does not include an incubation period. Manners to address and understand the complexity in nature are of great interest to the scientific community. Moreover, as the amount of available computing power grew during the past three decades, the study of dynamical systems has intensified considerably (Ozelim et al., 2016) . The Cellular Automata (CA) approach is a numerical method that models time-based and phenomena-based logical components and discrete nature. Describing complex phenomena using cellular automata (CAs) has shown to be a promising approach in pure and applied sciences (Ozelim et al., 2012) . The rules of a Cellular Automata case are usually simple, i.e., have basic rules describing the behavior of the cells. The abundance of cells and distinct J o u r n a l P r e -p r o o f boundary and initial conditions can generate complex or unexpected results. CA has been studied for a reasonable time (Von Neumann & Morgenstern, 1945; Conway, 1978) and has been extensively explored by modern scientists (Wolfram, 2002; Zubeldia et al., 2016; Ozelim & Cavalcante, 2018; Wolfram, 2018) . In this research, the data of COVID-19 from the Federal District, Brazil, was used to validate the SIR and SEIRD model results. The collected epidemic data from the Ministry of Health of Brazil (Brazil, 2020a) and the Federal District Secretary of Health (Brazil, 2020b) from February 23 th to November 2 th , 2020, studied the approximation of the actual and simulated data. After fitting the parameters, the authors simulated the cellular automata for various scenarios of the spread of COVID-19 in a supermarket. Kermack & McKendrick (1927) created the susceptible (S) -infected (I) -recovered (R) model, which describes the dissemination of a particular communicable disease in a susceptible population of size N. The spreading of the virus (COVID-19) occurs when infected people transmit the illness to susceptible individuals. The transmissible period starts before the symptoms appear and extends throughout the whole course of the disease until the patient's recovery. R is the compartment used for the population infected and then removed from the disease state, either due to immunization or to death. Those in this category are not able to be infected again or transmit the infection to others. The SIR (Susceptible, Infected, Recovered) model has the following variables: S(t) is the susceptible population; I(t) is the population who get laboratory positive confirmation and with J o u r n a l P r e -p r o o f infectious capacity; R(t) is the recovery cases; N = S + I + R is the total population; β is the infection ratio; λ is the coefficient used in the cure rate; The following ODE system describes the mentioned variables: (3) The model's initial values are S0 (t = 0), I0 (t = 0) and R0 (t = 0). These are the number of people in the susceptible, infected, and recovered categories at a time equal to zero. The SEIRD (Susceptible, Exposed, Infected, Recovered, Death) model has the following variables: S(t) is the susceptible population; E(t) is the population exposed to the virus but not infected in the latent period; I(t) is the population with positive laboratory confirmation and with infectious capacity; R(t) is the recovered cases; D(t) is the death number; N = S + E + I + R + D is the total population; γ -1 is the average latent time; κ is the coefficient used in the mortality rate. The following ODE system describes the mentioned variables: The particular Cellular Automata Model applied in this study represents a discrete model that intends to mimic a pseudorandom pattern of people's movement within a supermarket. The description of the model is through conditional statements with both deterministic and stochastic parameters. The goal of the Cellular Automata model is to obtain a micro perspective on contamination. It will be considered only two possible states for the people (Pstate) in the supermarket: those who are susceptible (0) and those who are infected (1). Note that the infected ones here do not show any symptoms but are still capable of contaminating others. This assumption can be reasonably required because most rules do not allow symptomatic people to enter constrained environments such as supermarkets. Moreover, there is one parameter to be adjusted in the simulation, which is βCA. The βCA parameter is the probability of an infected human transmitting the virus to a susceptible person J o u r n a l P r e -p r o o f while they are neighbors. Each iteration and every person generate a specific arbitrary number called the person's chance (PC). All chances vary from 0 to 1. Suppose a susceptible person gets in contact with infected persons. In that case, the sum of the infected neighbors times βCA should be greater than the person's possibility to be infected. Mathematically the model can be described as: . where Pstate is the person's state (0 for susceptible and 1 for infected); NI is the number of infected neighbors a person has; βCA is the numeric parameter subjected to calibration, and PC is the person's chance. Note that Eq. 9 is valid only for those who are still susceptible and uninfected. Those who are infected do not change over the simulated period. To better understand how the Cellular Automata rules work, the following images illustrate the If an uninfected person has more infected neighbors, then there is a greater chance to get infected and change his/her state. For instance, if a person has two infected neighbors ( Figure 3 .b), then the chance to get infected will be two times greater than if there is only one infected neighbor (Figure 3 .a). As stated before, for each numerical iteration, a variable denominated chance (P) is designated for a person. The chance (P) randomly varies from 0 to 1, changing in every iteration. Also, every infected person has a probability of infection denominated βCA. Hence, if the sum of infected neighbors times the βCA parameter is greater than the chance (P), the healthy person gets infected. Using data of the total number of cases, number of deaths, number of recovered, and number of infected people from the public data of the Ministry of Health of Brazil (Brazil, 2020a ) and the Federal District Secretary of Health (Brazil, 2020b) , the parameters were estimated. The authors implemented the coronavirus data and models (SIR and SEIRD) using Wolfram Mathematica 12.1 software. The ParametricNDSolve solved equations 1 to 3 (SIR) and equations 4 to 8 (SEIRD). The use of the NonlinearModelFit function allowed to obtain the adjustment parameters of the SIR model (Io, β, and λ) and the SEIRD model (Io, β, λ, γ, and κ). The Cellular Automata simulation represents a small time frame and limited space representation of the analytical models. It is comparable to a minor part of the infected and susceptible curves from SIR and SEIRD models. Once the analytical models involve more states (those who recovered, died), they also include more parameters. Thus, it is unfeasible to compare every feature. However, the β parameter can be compared to the βCA parameter of the Cellular Automata model. With this correlation, the numerical establish scenarios where the analytical model's parameter can be found. Moreover, the practical concern is to understand how the population size variation influences the β parameter. The flowchart of Figure 5 shows the essential idea of the simulations. is 1 minute, which is when every interaction between people and movement occurs. The adjustment of the data made available from COVID-19 in the Distrito Federal for the SIR and SIERD models considered 02/23/2020 as t = 0. The adjusted data refer to 11/2/2020 (t = 253 days). J o u r n a l P r e -p r o o f The simulation considered four scenarios applying the Cellular Automata model (Table 2 ). Two simulations correspond to the SIR parameter value (βSIR). The other two do not match the analytical parameter but keep the numerical parameter value with changes in the population size. The CA simulations consider the beta model of the SIR model. However, the time of the simulations is too short to consider any recovery of the population (λ→0), making the SIR model behave as the SI (susceptible and infected) model. Therefore, CA simulations do not consider the recovered people and focusing on the susceptible and infected. The first and the fourth simulations describe 20 people inside the supermarket, while the second and the third simulations represent 100 people. The difference in size between the populations is 400%, but the initial proportion of infected and susceptible is the same. The parameters are observed not by a unique simulation but through the average of several simulations and thirty simulations for each parameter. Each simulation has stochastic parameters related to both the movement and the chance of being infected. Thus, it was necessary to run each case several times to find a mean curve. J o u r n a l P r e -p r o o f Fig. 9 shows the supermarket occupation. Not only have people inside it, but also by its entrance, as stated before. Figure 9 .a stands for the case where there are only 20 people, where Fig. 9 .b has a total of 100 people. The simulations of scenarios 1 and 2 compose a pair, described in the flowchart of Figure 5 , and they share the exact parameters of Table 2 , respectively. Fig. 10 shows the initial simulation (t = 0) for all scenarios. Fig. 11 shows the simulation in the time of 90 minutes for all scenarios. Fig. 12 shows the simulation for 180 minutes for all scenarios. Figs. 13 and 14 show the variation of the number of persons infected and susceptible for scenarios 1 and 4 and 2 and 3, respectively. susceptible (green). In this second simulation, the βCA parameter is kept the same as the first one, which implies a different β parameter, once there is an increase in the population. As expected, the β parameter has significantly increased. Scenarios 3 and 4 compose a pair, either. Simulation 3 (Figure 10 .c , 11.c and 12.c) begins with 100 people -20 infected and 80 susceptible. This simulation has the same β parameter as the one found in Table 4 from the analytical fit. Similar to the previous cases, one simulation was chosen to be represented by 30 minutes steps. This specific simulation shares the same parameters as seen in Table 2 . An aspect of being highlighted is that the parameter βCA is linearly inversely proportional to the population simulated. When the population is multiplied by five, to have the same β parameter, the numerical parameter βCA needs to be divided by five. As it can be interpreted from the charts ( Fig. 13 and 14) , if the numerical parameter βCA is constant, but the population simulated increases, it results in more infected cases. An increase of the allowed population inside a constrained environment accentuates the curve steepness. The chart results, although they required computational effort, could be qualitatively generated purely by inspection. Hence, all standard policies must be more careful to avoid crowded stores and supermarkets. Moreover, Fig. 14 The chart in Figure 15 is a numerical curve based on a tridimensional interpolation of scattered points. The curve demonstrates how the number of newly infected people happens after a 180 minutes interaction in the supermarket, for different infection rates and the total J o u r n a l P r e -p r o o f number of people. This curve has a fixed initial rate of 20% of infected to 80% of susceptible. As one can notice, the curve becomes steeper when both the β parameter and the number of people are higher than 0.015 and 60, respectively. (2020) does not mention any unique geometry of the simulated mesh or discuss elements' movement. The traditional mathematical epidemiology theories are appropriate tools to understand and predict the time evolution of disease outbreaks. These tools are valuable to guide countries and cities in decision-making. In this research, the classic SIR and SEIRD models helped predict and obtain parameters and the number of susceptible, infected, and deceased people in Distrito Federal, Brazil. The simulations were supplemented by recorded data from the Ministry of Health of Brazil and the Distrito Federal Secretary of Health. The fitted simulation indicated good agreement with the data, and the obtained parameters allowed good results. After predicting the SIR and SEIRD parameters, the cellular automaton simulated a supermarket case using the parameters obtained in the models. Thus, the lockdown policy used in many cities across Brazil, which closed retail and department stores, has to be more careful about not redirecting people to supermarkets. The present simulations lead to the perception that markets and stores are relevant places with infections. Thus, every local store and the A new look at the statistical model identification Ministry of Health of Brazil Federal District Secretary of Health A gamut of game theories SEIR Modeling of the Italian epidemic of SARS-CoV-2 using computational swarm intelligence A contribution to the mathematical theory of epidemics Identification and estimation of the SEIRD epidemic model for COVID-19 A conceptual model for the coronavirus disease 2019 (COVID-19) outbreak in Wuhan, China with individual reaction and governmental action 3D Cellular Automata as a Computational Tool to Generate Artificial Porous Media Continuum versus Discrete: A Physically Interpretable General Rule for Cellular Automata by Means of Modular Arithmetic. Complex Systems A model based on cellular automata to estimate the social isolation impact on COVID-19 spreading in Brazil Real-time differential epidemic analysis and prediction for COVID-19 pandemic Stability Analysis of a SIS Epidemic Model with Standard Incidente. Foro-Red-Mat: Revista Electrónica de Contenido Matemático Theory of games and economic behavior Modeling and analysis of different scenarios for the spread of COVID-19 by using the modified multiagent systems -Evidence from the selected countries Phase-adjusted estimation of the number of coronavirus disease 2019 cases in Wuhan, China A new kind of science Cellular automata and complexity: collected papers Please find below the data availability statement of the paper entitled "Modelling the spread of covid-19 in the capital of Brazil using numerical solution and cellular automata" coauthored by The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.