DETERMINING THE EFFECTIVENESS OF PRACTICING NON-PHARMACEUTICAL INTERVENTIONS IN IMPROVING VIRUS CONTROL IN A PANDEMIC USING AGENT-BASED MODELLING

. To determine the eﬀectiveness of non-pharmaceutical interventions on an epidemic, we develop an agent-based model that simulates the spread of an infectious disease in a small community and its emerging phenomena. We vary parameters such as initial population, initial infected, infection rate, recovery rate, death rate, and asymptomatic rates, as inputs. Our simulations show that (i) random mass testing and quarantines decreases the number of deaths, infections, and time duration; (ii) social distancing lengthen outbreak period to an extent and helps ﬂatten the epidemic curve; (iii) the most eﬀective combination of NPIs to minimize death, infection, and duration is no mass testing, no social distancing, and a total lockdown but is not ethical; and (iv) the most feasible intervention is to implement an enhanced community quarantine while doing random testing on a maximum of 100 individuals. Results of this study can aid policymakers in determining interventions for their communities during a pandemic.


Introduction
In late 2019, an unidentified coronavirus had emerged from Wuhan, China, and had initially spread to Southeast Asian countries. In February 2020, the disease was officially named Coronavirus Disease 2019 (COVID- 19) and had been acknowledged by the World Health Organization as a global pandemic due to its rapid human to human transfer. Though it has an estimated 2 -5% mortality rate, the death toll has reached half a million people worldwide since June 2020 [23,24,2].
In the Philippines, the first suspected COVID-19 case was confirmed last January 2020 [7,10]. In early March 2020, the first local transmission was confirmed by the countrys fifth case [11]. Due to the quick surge in the number of suspected and confirmed cases, different interventions such as lockdown procedures were initially implemented in Metro Manila, which eventually expanded to the whole island of Luzon and ultimately the whole nation [21,5]. The house bill Bayanihan to Heal as One Act was written and signed to provide the President further power to combat the pandemic [22]. However, the number of infected still rose due to factors such as difficulty in testing, thus the quarantine protocol continued [4]. Then, it was alleviated in May to minimal risk areas [9]. Since then, multiple interventions/ variations have been attempted by each LGUs (through the support of research) to try and fight the pandemic.
One way experts study patterns of certain phenomena and gain insights in these pandemic situations is through modeling. Some of the advantages in modeling include lesser risk to subjects being infected compared to experimentation and fieldwork, easier to solve and analyze through computer algorithms, and can be done repeatedly with different conditions [15]. In this study, we use agent-based modeling (ABM) to simulate and analyze the underlying patterns and trends of such virus spread.
Here, we first determine the effect of a certain epidemic by varying city information and virus dynamics. Then, we check if the different non-pharmaceutical interventions (NPIs) that have been implemented are necessary for controlling the spread of the said virus. After that, we want to determine if simultaneously practice of such interventions is effective in combating the pandemic. We then determine what levels of preventive measures would minimize the number of deaths and the duration of the epidemic. Lastly, we investigate other parameters that may have an effect on the outbreak.

Model Framework
We use an agent-based model (ABM) to simulate the transmission of the virus among individuals and to determine the effects of factors and NPIs in the process of infection.
2.1. Agent-Based Model. ABM is a type of microscale model used to simulate interactions among individuals agents and their complex behavior [3]. It aims to find and study emergent trends and phenomena that may arise on a given set of autonomous agents that follows specific predefined procedures [1,16]. This has been utilized by different fields ranging from tourism, marketing, and epidemiology due to its flexibility, simplicity and affordability [16,14,20,12]. Here, we consider a model that simulates the infection among individuals given various factors in an environment. We then determine the effects of various NPI to the number of infections, deaths, etc.
The model determines significant developments whenever there are altercations in the population of virus dynamics. It also identifies whenever there is an effect in the the number of cases, deaths if agents practice the NPIs. The agents in this simulation have the following boolean attributes: infected?, confirmed?, hospitalized?, dead?, and permissible? which is simulated per tick (14-day infectious period).
Furthermore, parameters are used in the simulation, and it can be easily revised through the use of sliders, switches, or choosers of the program. They are categorized into two groups namely: city information and virus dynamics.
1 tick represents 1 infectious period for COVID-19 which is 14 days [6], thus, in the simulation environment, all rates are multiplied by 14 signifying the 14 days per tick effect in the simulation.
We also incorporate scientific control in the model for the comparisons between different runs. We assume the control to take on the following default values from Table 1. Moreover, global variables are also declared to update the monitors and plots for every tick of the simulation. They are as follows: population, healthy, infected, confirmed, unconfirmed, hospitalized, dead, permissible, and max infected.
Note that the NetLogo software has two built-in elements namely patches and ticks, which represent the space and time variables respectively. Since we are only concerned with the underlying behavior and trends of the agents including the repercussions after their interactions, we may not specify the variables in actual space and time measurements. However, if researchers and policymakers deemed it necessary for their analysis, they may assign an appropriate conversion table between the simulation and real-time values.
Lastly, these are the procedures that the simulation does to affect all agents behaviors, attributes, and interactions.
With all the variables and procedures declared, we use NetLogo programming environment for our ABM. The simulation environment of the program and its development is shown in Figs 1,2,3.
The setup button generates the agents into random locations inside the environment. The number of agents placed depends on the initial population. Consequently, a 4 by 4 hospital, which has been colored blue, is placed in the bottom-left corner of the environment. All agents parameters are then varied depending on the initial infected and asymptomatic rate. All those who are infected and confirmed The type of quarantine the city is implementing, which have 4 options: none, general, enhanced. and total community quarantine which allows 100%, 50%, 25% and 0% of the present agents to move respectively. Note that the quarantine cannot be changed in the middle of a run.
-Varied social distancing A boolean variable which will be used in the check sd procedure -Varied

infection rate
The chance an agent gets infected if another agent is near them during an infectious period 70/14 [13] recovery rate The chance (in %) an agent don't get infected provided that they are hospitalized during an infectious period 20/14 [8] death rate The chance (in %) an agent die provided that they are infected during an infectious period 20/14 [8] asymptomatic rate The chance (in %) an infected agent will not be confirmed 18/14 [19] Figure 1. NetLogo user interface of the agent-based modelling program before a simulation run becomes red in color. Agents who are infected but not yet confirmed turns to orange. The remaining agents stay green. Monitors will also be updated depending on the simulation. Sets all hospitalized agents movement based on their attributes (all infected towards or within the hospital and all not infected towards outside the hospital), and runs the outside movements procedure outside movements Sets all permitted agents movement outside the hospital to walk randomly infect Checks all infected agents and other non-infected agents near them and runs the get sick procedure based on the infection rate variable get sick Sets agent to be infected and also sets agent to be confirmed or not based on the asymptomatic rate variable recover Checks all hospitalized agents and runs the get healthy procedure based on the recovery rate variable death Checks all infected agents and sets them dead based on the death rate variable update-output Prints the results of the simulation in the output Once the setup is done, the start button proceeds to run the simulation. The procedures, which were defined in Table 2, for agents movement, testing measures, infections, deaths, and recoveries are done until it hits the stopping criterion. The run stops if (1) an extinction occurs where all the agents are dead or (2) the pandemic had subsided meaning there are no more infected agents.  The simulation has three important results after every run: deceased, max infected cases, and ticks taken. Deceased pertains to those agents that have died while the ticks taken refers to the duration of the epidemic regardless if it ended in the survival of the agent set or pure extinction. Moreover, the max infected cases refer to the peak number of infected cases throughout the process.  Consequently, we also observe the minimum number of runs required to observe at which point the simulation results approaches in terms of deceased, infected, and ticks taken. Also, we use the same number of runs to forecast all other remaining experiments. After proceeding on the experiments with a varying number of runs, we need to have at least 1000 runs for every experiment made to achieve a less than 1% error on average from 100000 runs. To ensure the stability of the results from the experiments, we consider 5000 runs for all succeeding simulations. for general, 25% for enhanced, and 0% for a total quarantine. Thus, the percent differences displayed in Table 5 are all referenced from the control run, which is no community quarantine is in place. The same trend can be seen here as well, as the testing capacity. As we implement stricter quarantine policies, we can reduce the death toll, maximum infected cases, and duration. By implementing a total community quarantine, we may be able to reduce virus-related deaths by up to 66%, infected cases by up to 51%, and the situation period by up to 41%. 3.5. Effects of Social Distancing. Interestingly, the advantages of social distancing have increased the number of deaths, the total maximum of infected cases, and the duration of the epidemic. There is a 45% growth in death numbers, 21% in max infected cases, and 24% in ticks taken. This phenomenon might be a result of the stochasticity of the agent-based model and computational programming errors, such as the conditions set by the check sd procedure and zigzagging occurrence. For the procedure, all agents that are near other agents are checked. Then, an agent X will face the nearby agent Y and take a unit step backward. However, this might result in agent X being near to another agent, say Z. This can lead to a recursive problem due to the spatial capacity of the environment. A zigzagging occurrence also happens when a confirmed infected agent does winding movements on its way to the hospital since it also avoids nearby agents, in accordance with the social distancing procedure. This leads to delays in providing medical assistance to infected agents and further infections due to their unnecessary movements.
A study on social distancing has also been proven that it can lengthen the duration of virus outbreaks. This intervention was also said to flatten infection curves [18]. However, by flattening curves, it does not directly imply that the peak, or the maximum infected cases, will be lowered as well. Furthermore, [17] have mentioned that even if social distancing is observed, the outbreak rebounds once it is removed. The researchers suggested that as much as social distancing can delay the spread of the virus, consequent testing of suspected individuals must also take place, as well as developments for improving healthcare systems.
3.6. Effects of Simultaneous NPIs. We now check the different combinations of the non-pharmaceutical interventions and identify which set of the said policies provides us with the minimal average number of fatalities, maximum number of infected cases, and the duration of the epidemic. Using various arrangements of such policies might vary its effects as well and might help us optimize on what policies For a community, populated with 1000 individuals where 10 of those are infected, no mass testing, no social distancing, and a total lockdown must take place in order to minimize deaths, infections, and overall duration. Note that this combination offers the least mobility of agents. Thus, the outbreak slows down since there are no crowding situation in the hospital and no unnecessary movements. Only those who are infected and confirmed are allowed to be admitted to the hospital. However, this leads to ethical and humanitarian issues since asymptomatic individuals are left off to recover for themselves. Moreover, this is unrealistic since the entire population cannot be quarantined.
Looking for an alternative, the next best option, which is the most ethical, is to implement an enhanced community quarantine with no social distancing while doing random testing on a maximum of 100 individuals. By looking at the figures and on sections 3.3 to 3.5, we can observe that the doing stricter quarantine procedures (excluding total) and having greater testing capacity, the deaths, infections, and duration can be minimized. Again, the social distancing protocol may be subject to change provided that the environment space is improved so that there are no zigzagging occurrences.
Another way we can combat the virus is by delaying its spread or simply flattening the infection curve. By practicing no quarantine, no mass testing, and an active social distancing policy, we are able to allocate the maximum time for our scientists and researchers to study and formulate either a vaccine or cure. If successful, this completely eradicates the virus over a guaranteed period of time without having any rebound or subsequent waves. Let us now determine if there will be significant insights that can be found by gradually increasing the initial number of infected cases on the simulation results.
As the initial number of infected cases increases, the number of deaths and maximum infected cases increases as well, while the duration of the outbreak slows down. However, the rate of change in all aspects also decreases as the number of initial infected cases increases. Moreover, looking at Fig 9, if the number of initial infected cases is at least 70% of the general population, the population retains the same number of infected cases. This would imply that throughout the pandemic, the population has at least 70% infected individuals. Thus, quick and effective response against the pandemic must be taken into consideration.
3.8. Initial Population and Spatial Capacity of Environment. As for this experiment, we improve the program by considering a wider environment and check if there will be changes in the results of the simulation. Note that in both cases, we use the default (control) values. The expanded environment is scaled 2 times larger than the original environment and same as before, we simulate this for 5000 runs each.
Given the same population of 1000 people where 10 are infected, Table 7 have shown the drastic effect of the spatial capacity of the environment. Since there is a wider place the agents can move around, the chance of interaction, either inside or outside of the hospital, is lesser compared to the previous environment. This may play a very important role in dense cities and capitals. Governing bodies may opt to space out individuals by slowly decongesting highly populated areas to wider locations    3.9. Virus Dynamics. We now vary these parameters such as infection rate, death rate, recovery rate, and asymptomatic rates to further analyze the effects of each of them in the transmission of the disease.
On Figs 11,12, and 13, we can see that the simulation results almost follow similar trends with each other.
As the infection rate increases, the number of deaths, maximum infection and ticks taken increases as well. This trend also occurs in increments on asymptomatic rate. However, the growth in deceased and max infected results on infection rate seems to follow an exponential curve, while the rest looks linear. The results in varying asymptomatic rates may be due to the fact that it is harder to trace such patients thus lengthening and worsening the outbreak.
On the other hand, there is an inverse relationship on recovery and death rate and in the simulation results. While the recovery rate build up, the deaths, infections and duration lessens in a linear manner. As the virus has an increasing death rate, the number of deaths, infections and duration decreases exponentially. The outcome from varying death rate may be caused by the chance of death overriding the chance of infection, thus reducing transmissions between agents.
Also, we can consider an epidemic with a 0% death rate as a special case as we can see in Fig 14. After 5 runs of the specific experiment, the program does not reach any of the stopping criteria since this situation will not lead to extinction nor the end of the epidemic. It simply reaches an equilibrium  with about 85% of the initial population being infected as seen on the first monitor. However, looking closer to the infected cases, the number of asymptomatic patients becomes greater than the number of confirmed ones as time passes. Unfortunately, this case will not be of further significance to the study of the virus since there are already confirmed death cases due to it. Thus, the virus has a nonzero death rate.  Note that the governing bodies and institutions can make no particular policies that can help control the following virus rates. Nonetheless, these experiments are very beneficial and valuable to research and development teams as these show how crucial further studies on the virus affects the future of the community.

Conclusion
The use of agent-based modeling has never been more important in our current pandemic situation. Without the use of heavy experimentation and costly operations, our model was able to determine how an epidemic/pandemic will behave based on its demographics and the dynamics of the infection/virus. Given an assumed control for the simulations, we have considered three vital outcomes of an epidemic, namely the death toll, peak infected cases, and outbreak duration. We computed with at least 1000 runs for every experiment made to accurately estimate results from 100000 runs.
We then tested non-pharmaceutical interventions individually among 1000 individuals, where 10 of those are infected. Mass testing can lower the death toll by up to 14%, the maximum number of infected cases by up to 3%, and the time extent by up to 14%. By practicing community quarantines, we may be able to reduce virus-related deaths by up to 66%, infected cases by up to 51%, and the outbreak period by up to 41%. Meanwhile, social distancing has lengthened the duration of the outbreak, by up to 24%, to provide ample time for the epidemic curve to flatten and for healthcare facilities to cope up with the number of cases.
By combining these NPIs, the most optimal intervention was to implement no mass testing, no social distancing, and a total lockdown to be implemented in a small virus-infested community. This arrangement minimized the mobility of agents to its fullest. This resulted in the lowest deaths, infections, and duration in comparison to other combinations. Although this is unethical and detrimental to other fields such as, but not limited to, the economy. Thus, a more feasible, recommendable, and realistic option will be to implement an enhanced community quarantine with no social distancing while doing random testing on a maximum of 100 individuals. We may also consider another choice that is to have no mass testing, no quarantine but with active social distancing if the goal was to flatten the curve. Note that this may lead to the longest time taken by the outbreak, which can stretch the duration long enough for scientists to formulate either a vaccine and further control the infections.
Additionally, the infected individuals must not reach 70% of the general population as this situation reaches equilibrium. This made the virus very hard to exterminate and we might need to resort to drastic measures. Also, a wider spatial capacity of the environment has made a significant development on the simulation results since the chances of interaction are minimized. This lowered deaths by up to 90%, infections by up to 81%, and time took by up to 49%.
Lastly, increments on virus dynamics have been analyzed as well. An increase in infection and asymptomatic rates also led to an increase in deaths, infections, and duration. Conversely, as the recovery and death rate increase, the said results decrease.
These results from our simulation model play a vital role in how governing bodies can optimally make guidelines such that we can properly utilize our resources, at the same time mitigating the adverse effects of the virus. This can also be a foundation for policymakers and for all other similar studies that dwell on epidemiology and important insights in mitigating virus spread.

Limitations
The non-pharmaceutical interventions are assumed to be followed and practiced by all of the agents in the simulation environment. Furthermore, there is no delay time considered in such NPIs and no temporal analysis has been made, which may also play an important part in mitigating the outbreak. Moreover, the NPIs that were analyzed are all collective actions, hence, individuals practicing other solitary preventive measures were not considered. Finally, all agents are assumed to have the same protection or immunity rate against the virus.

Recommendations
Note that assumptions such as movement in the study are random, which should be taken into consideration in considering the study. This study can be further extended by determining the minimum testing capacity needed to achieve minimal infections and deaths, in accordance with various parameter testing. Moreover, taking other precautionary measures and physiological factors can be made as procedures in the program as well. Among these are wearing of a mask, frequent handwashing, reproduction rates, or limited foreign travels. Lastly, having actual and accurate data from a reliable and trustworthy source to assign on variables will make all the simulation results as close to the real-world situation.

Supplementary Files
The agent-based model can be accessed by visiting the website: https://github.com/styledcv/EpidemicNPIsSimulations. The Program 1.nlogo is the original program that was used in the simulation testings done on the study. Meanwhile, Program 2.nlogo is the expanded version of Program 1 that was used on section 3.8.