The Effect of Social Distancing and Personal Protective Equipment on the Outbreak of SARS-COVID-2: An Agent-Based Modeling Approach

Biological phenomena such as disease outbreaks can be modeled as a subset of natural phenomena. Coronaviruses, first identified in the 1960s, are contagious diseases being constantly in the area of research and modeling in human society. The latest version of this group, COVID-19, has caused the Coronavirus disease one of the greatest pandemics in recent years. Due to the nature of this disease, being aware of the ways of transmission and how to prevent it, including social distancing and the use of personal protective equipment (PPE) to improve the general condition of society is of particular importance. In this study, dynamic systems (Susceptible, Exposed, Infected, Asymptomatic, and Recovered individuals as SEIAR), control systems, and Agent-based modeling (ABM) were used to forecast the behavior of the COVID-19 virus in the community. The numerical results display the undeniable impact of adhering to hygiene protocols. A significant decline in the number of people with the Coronavirus disease, after applying the control measures, indicates their remarkable impact on reducing the disease peak. Moreover, the result of the Agent-based simulation, which is in four ideal cases, show a significant reduction in the number of death as well.


Introduction
In general, due to the internal interactions of the involved components and the external interactions with the environment, systems display miscellaneous and complicated behavior. The complexity of the earlier-mentioned behavior leads researchers to construct a model based on the variable and parameters to understand, describe and predict the behavior of a system to evaluate the outcome by making changes in the parameters. A model, in general, is defined as the representation of reality. In the same vein, a model in mathematics is described as the description of a system using mathematical concepts and language which are appeared in a wide diversity of forms including dynamic systems, differential equations, and statistical models. Undoubtedly, knowing the concept of mathematical models is crucial. One of the most important branches of mathematical modeling is the modeling of natural phenomena such as fog, lightning, tornadoes, tides, erosion, floods earthquakes and even volcanoes are always seen in our daily lives. A group of known natural phenomena is biological. Among the significant illustrations at the micro and individual level, metabolism, catabolism, and anabolism can be named and depopulation can be mentioned as an important example of the macro and social level. Population decline as a biological phenomenon occurs due to various factors such as declining fertility, migration, economic problems, and diseases. In recent centuries, one of the most important issues that have always led to the phenomenon of population decline is the issue of infectious and epidemic diseases. The entire family of coronaviruses is one of the effective pathogens causing the epidemic. They are huge viruses that affect a diverse range of domestic and wild animals, especially bats. These animals are believed to be the natural reservoir of the mentioned type of virus. Coronaviruses generally cause mild respiratory illness in human beings with cold-like symptoms, but their power to cause severe and even fatal respiratory illnesses has been proven. New findings indicate that the coronavirus family is becoming more mutant and transmissible [1]. On November 16, 2002, the first case affected by this viral family appeared in the 21st century. This inherently widespread disease was nominated as an acute respiratory syndrome. The virus was originated in the city of Guangdong, China, and after the first signs of the virus in China, it grew immediately, and the first official report was revealed by the WHO, World Health Organization (WHO), which confirmed the outbreak of the disease on February 11 in Guangdong and the 305 cases and 5 deaths caused by that [2]. Middle East Respiratory Syndrome, a new-brand strain of this viral family, was noticed in 2012 in cases with respiratory problems in Jordan and Saudi Arabia. Although the virus did not tend to grow as quickly as it did whilst its outbreak, contam-inating about 1,600 people, the main concern about this virus is that the coronaviruses family affect the group of people with underlying diseases due to its highly destructive effect; people with cardiovascular problems, diabetics, and even people with lung and kidney problems can be illustrated. The virus showed at the time of the outbreak that it could be easily transmitted to hospitals and target medical staff. Camels seem to have been the source of the virus [3]. In December 2019, much of the collected medical data in China reported unknown viral pneumonia. Early signs of the new viral illness involved fever, dry cough, and respiratory problems. The primary source of this mysterious disease was said to be the seafood market in Wuhan, China. On January 6, 2020, it was first confirmed that a new virus from the coronaviruses family had been discovered that could infect humans. On January 30, the emerging virus triggered the sixth public health emergency in the world, and Congress declared that the new virus a threat not only to China but to all countries around the world. On February 11, 2020, the WHO officially selected "Covid" for the coronavirus, and the International Committee for the Classification of Viruses changed the name of the virus from its predecessor to Acute Respiratory Syndrome on the same day. The chosen name was selected because the virus was genetically related to the virus associated with the 2003 SARS outbreak. There is more than 80 percent similarity between the genomes of these two families of viruses, and, undoubtedly, this small difference has caused fundamental differences in the behavior of the COVID-19 virus. The research conducted in the Wuhan Seafood Market indicates traces of the virus in bats or feces around the market. According to the latest collected information, the main natural host of the COVID-19 virus appears to be a bat, and then the virus enters a medium-sized host that may be ant-eaters or other wild animals that hunt bats. Then the virus in the Wuhan market was transmitted from that host to human beings. Eventually, the process of human-to-human transmission began and the existing epidemic was formed. This was specifically notices in the anteater as the primary host of the COVID-19 virus because 70 percent of the anteater's test results were positive for the COVID-19 virus. On February 20, 2020, for the very first time in Iran, the Ministry of Health announced the positive results of two possible cases of coronavirus in Qom. In this regard, infectious disease identification and management teams and rapid response teams were deployed in the city. The death of both male patients was confirmed by the Ministry of Health an hour later. On March 23, 2020, the number of victims of the Coronavirus in Iran reached 18. On January 30, the WHO declared an international emergency over the outbreak of COVID-19 [1]. Due to the nature of COVID-19, the main cause of which is the COVID-19 virus, being aware of the ways of transmission and the prevention of COVID-19 virus transmission in the community is of particular importance to improve the worrisome situation caused by COVID-19. Concerning this, from a medical point of view, three ways of transmitting are respectively as follows: respiratory droplets, skin contact, and air. Nevertheless, ways to prevent transmission are in various forms such as observing social distancing, wearing face masks, regular washing hands, special precautions in homes, workplaces, and schools, preventing gatherings and quarantine which are the most important mentioned ones [4,5]. In this study, it has been tried to address several issues related to the coronavirus, so that researchers can continue researching more eagerly. The issues include the relation between COVID-19 virus and suicidal thinking [6], death of medical staff due to the COVID-19 [7], the relation between body mass index and Coronavirus disease [8], the persistence of clinical signs of the COVID-19 [9], the COVID-19 and children [10,11], the relation between AIDS (Acquired Immune Deficiency Syndrome) epidemics and lessons learned from appropriate COVID-19 responses [12] and finally, the relation between the body's vitamin D levels and the corona virus [13]. In Figure 1 we show daily reported cases per day as of February 2020.

Dynamic system model
In this section, a dynamic system is defined which describes the behavior of COVID-19 outbreak in human society with the help of some variables shown in Table 1. The initial value of susceptible individuals (data from https://www.amar.org.ir), infected, recovered and exposed individuals (data from https://www.worldometers.info) have been estimated so far. To calculate the initial value of exposed individuals, we have used the number of Active Cases. Also, the initial value of asymptomatic individuals has been approximated (data from https://covid19.healthdata.org). The required parameters for the dynamic system are as follows: Parameter α for the transmission rate transferred from susceptible individuals to exposed individuals, parameter β for the transmission rate from exposed individuals to infected individuals, the parameter γ for the transmission rate from exposed individuals to asymptomatic individuals, parameters δ and ϵ for the recovery rate of infected and asymptomatic individuals and the last parameter, ζ, for the natural death rate. The values and a brief definition of the earlier-mentioned parameters are provided in Table 3. Additionally, the total population at t time equals: The flowchart of the model as well as the information in the parameter table shown in Figure 2 is displaying the same meaning. The system of differential equations related to COVID-19 outbreak behavior model is defined as follows: We consider that X(t) = (S(t), E(t), I(t), A(t), R(t)) ∈ R 5 + with initial condition X(t 0 ) = X 0 where X 0 is equal to initial value in the Table 1 and all parameters are positive. Without loss of generality, the first and last equations of system of differential equations (2) can be excluded because the second, third and fourth equations are not dependent on it. This system of differential equations created with lower dimensions, is called 'The Modified Differential Equations' System' by the researchers.

Model analysis
The modified differential equation system has one equilibrium point in the origin. Lyapunov's theorem helps us show that the origin is a stable point for The modified differential equation system. Theorem: Taking a nonlinear dynamical system into consideration can be as follows:ẏ (t) = g(y(t)) and y(t 0 ) = y p , where t ∈ (t 0 , +∞) and y(t) ∈ ϕ ⊆ R n denotes system state vector, ϕ an open set containing the origin, and g : ϕ → R n continuous on ϕ. Suppose g has an equilibrium point at y 0 and consider a function L : R n → R such that: Then L(y(t)) is called a Lyapunov function and the system is stable for y(t) ̸ = y 0 . By using Lyapunov's stability theorem, we introduce the following function as Lyapunov function for modified differential equations system.
It is just necessary to show thatL(X(t)) = dL(X(t)) dt < 0 for all values of X(t) ̸ = 0. First, we compute the derivative of the Lyapunov function: After simplifying, we have the following mathematical expression: it must not be forgotten that X(t) ∈ R 5 + , so to makeL(X(t)) < 0, it is enough to have: Therefore, according to Lyapunov's theorem, it can be concluded that the origin is asymptotically stable for the modified differential equations system if the obtained conditions meet.

Basic reproductive number
The basic reproduction number R 0 , also called the basic reproduction ratio is an epidemiologic metric used to describe the contagiousness or transmissibility of infectious agents. The basic reproduction number is affected by numerous biological, socio-behavioral, and environmental factors that govern pathogen transmission and, therefore, is usually estimated with various types of complex mathematical models, which make R 0 easily misrepresented, misinterpreted, and misapplied. The basic reproduction number is not a biological constant for a pathogen, a rate over time, or a measure of disease severity, and R 0 cannot be modified through vaccination campaigns. The basic reproduction number is rarely measured directly, and modeled R 0 values are dependent on model structures and assumptions. Some R 0 values reported in the scientific literature are likely obsolete. The basic reproduction number must be estimated, reported, and applied with great caution because this basic metric is far from simple [15]. To get the basic reproduction number, take the steps in [16]. This is a common way to calculate the basic reproductive number. Let: Hence, So, R 0 is trace of Z. We have: The basic reproductive number is directly related to the rate of transmission of the disease to the infected individuals.

Parameter estimation
In numerical analysis, the Dormand-Prince method or DOPRI method, is an explicit method for solving ordinary differential equations. The method is a member of the Runge-Kutta family of ODE solvers. More specifically, it uses six function evaluations to calculate fourth-and fifth-order accurate solutions. The difference between these solutions is then taken to be the error of the (fourth-order) solution. This error estimate is very convenient for adaptive step size integration algorithms. The Dormand-Prince method has seven stages, but it uses only six function evaluations per step because it has the FSAL (First Same As Last) property: the last stage is evaluated at the same point as the first stage of the next step. Dormand and Prince chose the coefficients of their method to minimize the error of the fifth-order solution [17]. Suppose we define the system of differential equations (2) as follows: where vector F is equal to: By defining the appropriate step length, h, we divide the time interval, [a,b], into N equal parts. We have: in a way that: Now we define: The approximate answer to the initial value problem using the Runge-Kutta fourth-order method is equal to: and a better value for the answer is obtained using the Runge-Kutta fifthorder method is equal to: To select the appropriate step length, the mathematical expression S × h is used, where h is the same as the current iteration step length and S is calculated from the following equation: The value of T OL in the above relation is specified accuracy control boundary. Parameter estimation is a good way to find the optimal initial parameters. To estimate the parameters, we use the least-squares error method to explain the steps in the following algorithm: 1. Primarily, the system of differential equations should be solved according to the initial parameters with help of the numerical Runge-Kutta method.
2. The role of variables and parameters changes at this stage. To do so, we consider the answers obtained from the previous step as new parameters and the previous parameters as new variables. 3. The differential equation system created in the previous step is turned into an optimization problem at this stage. In order to do so, we define the following error function: Now, to estimate the parameters, we solve the following optimization problem.
4. By performing the above-mentioned steps, the value of the optimal parameters can be obtained. In this step, we calculate the norm 2 of differences among the initial parameters and the parameters obtained in the previous step, and if its value is less than epsilon, we stop this algorithm. If this does not happen, we repeat the above steps until the stop condition is finally met.

Optimal control model
According to system of differential equations (2), we add the two following boundary controls to create the control model.  Then we rewrite the control SEIAR model as shown below: with the same initial condition of system (2). The optimal control problem is written as follows: subject to constraint system (22). We form the Hamiltonian function as follows: (24) Pontryagin principle shows that the control value is obtained as follows: We calculate state, co-state and control equations. For state equations we have: and for co-state equation: where: and the adjoin variables satisfy the transversality condition: We need the sing of ∂H ∂u sd (t) and ∂H ∂uppe(t) to find the optimal control variables and also, you can see them in Figure 4: (29) So, we have: and in other words, the optimal control can be written as follows: and Figure 4: The image on the left is related to ∂H ∂u sd (t) and the image on the right is related to ∂H ∂uppe(t) .

Fitted polynomial
The Least-square method is a significant method of fitting a curve to data points to minimize the sum of the squares of the distances of the points from the curve. Based on the least square, curve fitting is the process of constructing a curve that has the best fit to a sequence of data points. The fitted curves could be used as an aid for data visualization. Curve fitting tool in MATLAB provides 'polyfit' function, which could find the coefficients of a polynomial p(x) of degree n that fits the data where: The fitted model using MATLAB is shown in Figure 5. The blue points in Figure 5 represent the cumulative number of daily confirmed cases while the red line designates the fitted model.  Figure 6 shows the numerical results using the Runge-Kutta Dormand-Prince method in MATLAB according to the parameters of Table 3.

The Runge-Kutta Dormand-Prince method
The first five parameters of Table 3 are estimated from the following site  (data from https://covid19.healthdata.org) and the sixth parameter from [14]. As it can be seen in Figure 6, the behavior of the graph corresponding to the susceptible individuals in the society is decreasing behavior and their number decreases over time. On the other hand, due to the behavior of the diagram of the susceptible individuals, the population in this group is slightly increased to the exposed individuals and causes the corresponding diagram to climb. Note that similar behavior occurs for the infected and asymptomatic individuals, leading to the two peaks of the disease in the middle of the novel. After passing this peak, the number of people in the recovery group will increase and the number of infection and asymptomatic individuals will decrease at the same time so that we can leave a peak of disease behind. The diagrams related to the system of differential equations, taking into account the final estimated parameters obtained in Table 3, are shown in Figure 7. As you can see, there is no significant difference, which is normal due to the small changes in the estimated parameters compared to the initial parameters and their proper selection.

The optimal control results
As it can be seen in Figure 8, the numerical results show the high importance of observing social distancing and the use of personal protective equipment, which reach their maximum value from the beginning. Applying these control values can greatly reduce the number of people with COVID-19 from the beginning of the period. This result is shown in Figure 9.

Agent-Based Modeling and NetLogo
The Agent-based model is focusing on the actions and reactions among agents and the environment to create dynamic insights within the system. Many agents are introduced as the main components of ABM. The examples include: Agents, Environment, Actions and Reactions, and Transport. Agent: They can be represented as an individual, a family, or even an organ. Besides being unique, they also make decisions based on rules that govern the model, and these decisions may vary from one factor to another. Environment: An Agent-Based simulation is a landscape in which agents interact. The environment can be effective in showing the dynamism of agents. Depending on the purpose, the environment can be a road, a human being, a community, or even a city. Action and Reaction: They include the rules and regulations that develop a system. Rules can be as simple as moving agents in different directions to more complex rules such as finding a specific agent. Transportion: It is somehow in the environmental factor, but the main reason for its separation as a separate part is its importance in the prevalence of epidemics in public transportation. According to the features expressed for ABM, to implement it, we need powerful tools and software in the modeling discussion. One of the most popular and newly-born software, in this case, is NetLogo. With the help of this software, the ability to implement Agent-based models in the best possible way will be possible. NetLogo is a programming environment with programming capabilities to simulate natural and social phenomena, written by Yuri Wilensky, a professor at Northwestern University. The NetLogo is especially suitable for modeling complex systems over time, such as our discussion of the prevalence of an epidemic. Programmers can give instructions to hundreds or thousands of defined agents, all of which operate independently of each other. This enables us to explore the relationships among micro-level factors and macro-level patterns resulting from the interaction among them. Example: Suppose we try to clear the traffic of one of the busiest intersections in the city. Vehicle traffic at an urban intersection can be modeled and implemented in the form of dynamic systems, but let's take a look at it from an ABM perspective. Cars play the role of model agents in ABM, which are constantly moving at the intersection level. The intersection environment is considered as a modeling environment that can be in the form of streets. The actions and reactions in this example can be a traffic light, the distance between cars, the number of lanes on the street, or even the level of compliance with traffic rules. In this chapter, we discuss the following four modes. Primarily, when all the members of our hypothetical society (suppose our community has 100 members) do not use PPE and do not observe social distancing in any way. Secondly, when all members of a society use PPE but refuse social distancing in any way. Thirdly, when all members of a society do not use PPE but observe social distancing and, fourth when all the members use PPE and observe social distancing in the best way. These four states are ideal states that would be impossible to implement in a real society, but simulation gives us the ability to examine these states and estimate our expected results. Figure 11: COVID-19 outbreak simulation environment in the NetLogo.

Mode 1: No Use of PPE and No Social-Distancing
In the worst case, we assume that none of the members of the hypothetical society use PPE and observe social distancing. The three sliders in the initial simulation must be changed. We reduce the number of people using PPE to zero and increase the number of people not using PPE to 100. We also reduce the slider of social distancing to zero percent. After a thousand simulations, the average number of death reached 20.38. This is about one-fifth of the original population, which is, unfortunately, a very high number.

Mode 2: Use of PPE and No Social-Distancing
In the second case, suppose that the members of the community use PPE, but it is not possible to implement the observance of social distancing or it does not matter to the people of that community. However, in this case, we assume that the use of PPE remains as high as possible and the social distance is kept to a minimum. Similar to the previous case, the three sliders in the initial simulation must be changed. The number of people using PPE increases to 100 and the number of people not using PPE decreases to zero. Also, the degree of social distancing is reduced to zero. In this case, after performing a thousand simulations, the average number of deaths reaches only 2.58 it is reported that the use of PPE is very effective in preventing the spread of infectious diseases.

Mode 3: No Use of PPE but Observing Social-Distancing
In the third case, we assume that none of the people in the community use PPE, but all of them adhere to a safe social distance to prevent the transmission of the disease. The third case is something close to the concept of forced quarantine. Similar to the previous modes, the three sliders in the initial simulation must be changed. The number of people using PPE decreases to zero and the number of people not using PPE increases to 100. Also, the degree of observance of social distancing increases to 100 percent. In this case, after performing the simulation a thousand times, the average number of death reaches only 2.1 which indicates a greater effect on reducing the rate of death.

Mode 4: Use of PPE and Observing Social-Distancing
In the most ideal way, suppose we are facing a dream society where all members of the society use PPE and social distancing is implemented properly. We expect the death toll to be zero in this case. Similarly, three sliders change in initial simulation mode. The number of people using PPE increases to 100, and people not using PPE to zero, and the slider related to social distancing is located at 100, which is the peak of observance of social distancing. In this ideal case, after performing a thousand simulations, the average number of death is only 1.8. As we expected, the average death rate has significantly decreased compared to the previous two cases, in each of which the only one of the preventive factors was in its ideal state.

Conclusion
The results of the control system output showed us that observing the two main factors of social distancing and the use of PPE can significantly reduce the number of people with Coronavirus disease Also, the results of Agentbased modeling displayed that only by using PPE, the mortality rate in the community significantly reduces. Nevertheless, the reduction rate was less than the mortality rate in the case of observing the social distancing factor, and, therefore, it can be concluded that the observance of social distancing is more important than using PPE. In other words, the researchers came to this conclusion that the simultaneous implementation of these two preventive factors in society will have better effects than putting each of the factors into practice individually.

Compliance with ethical standards
Conflict of interest The authors declare that there is no conflict of interest regarding the publication of this paper.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.