Agent-Level Pandemic Simulation (ALPS) for Analyzing Effects of Lockdown Measures

This paper develops an agent-level simulation model, termed ALPS, for simulating the spread of an infectious disease in a confined community. The mechanism of transmission is agent-to-agent contact, using parameters reported for Corona COVID-19 pandemic. The main goal of the ALPS simulation is analyze effects of preventive measures -- imposition and lifting of lockdown norms -- on the rates of infections, fatalities and recoveries. The model assumptions and choices represent a balance between competing demands of being realistic and being efficient for real-time inferences. The model provides quantification of gains in reducing casualties by imposition and maintenance of restrictive measures in place.


Introduction
There is a great interest in statistical modeling and analysis of medical, economical and epidemiological data resulting from current the Covid-19 pandemic. From an epidemiological perspective, as large amount of infection, containment, and recovery data from the this pandemic becomes available over time, the community is currently relying essentially on simulation models to help assess situations and to evaluate options [1]. Naturally, simulation systems that follow precise mathematical and statistical models are playing an important role in understanding this dynamic and complex situation [2]. In this paper we develop a mathematical simulation model, termed ALPS, to replicate the spread of an infectious disease, such as COVID-19, in a confined community and to study the influence of some governmental interventions on final outcomes.
Since ALPS is purely a simulation model, the underlying assumptions and choices of statistical distributions for random quantities become critical in its success. On one hand it is important to capture the intricacies the observed phenomena as closely as possible, using sophisticated modeling tools. On the other hand, it is important to keep the model efficient and tractable by using simplifying assumptions. One can, of course, relax these assumptions and obtain more and more realistic models as desired, but at the cost of increasing computational complexity.
There have been a large models proposed in the literatures relating to the the spread of epidemics through human contacts or otherwise. They can be broadly categorized in two main classes (a more detailed taxonomy of simulation models can be found in [3]): 1. Population-Level Coarse Modeling: A large number of epidemiological models have focused on the population-level variables -counts of infected (I), 0 1/15 susceptible (S), removed or recovered (R), etc. The most popular model of this type is the Susceptible-Infected-Removed (SIR) model [4] proposed by Kermack and McKendrick in 1927. This model uses ordinary differential equations to model constrained growth of the counts in these three categories: dS dt = −βI(t)S(t), dI dt = βI(t)S(t) − γI(t), dR dt = γI(t) .
The two parameters β and γ control the dynamics of infections, and the condition dS dt + dI dt + dR dt = 0 ensures constancy of the community size. A number of other papers have studied variants of these models and have adapted them for different epidemics, such as ebola and SARS [5]. While there are spatial versions of SIR models, they are usually limited in their modeling of spatial dynamics. They typically use a uniform static grid to represent the spread of infections, from a location to its neighbors, over time. In general these models do not explicitly model people dynamics as residents move around in a community. Several recent simulation models, focusing directly on Covid-19 illness, also rely on such coarser community level models [6].
2. Agent-Level Modeling: While population-level dynamical evolutions of population variables are simple and very effective for overall assessment, they do not take into account any social dynamics, human behavior, government-mandated restrictions, and complexities of human interactions explicitly. The models that study these human-level factors and variables , while tracking disease at an individual level, are called agent-level models [7]. Here one models the mobility, health status, and interactions of individual subjects (agents) in order to construct an overall population-level picture in a bottom-up way. The advantages of agent-based models are that they are more detailed and one can vary the parameters of restriction measures, such as social distancing, at a granular level to infer overall outcomes. Agent-based models have been discussed in several papers, including [3,[8][9][10] and so on. The importance of simulations based analysis of epidemic spread is emphasized in [11] but with a focus on infection models within host. Some aspect of spreading of diseases using network contact is also discussed. Hunter et al. [10] construct a detailed agent-based model for spread of infectious diseases, taking into account population demographics and other social conditions, but they do not consider countermeasures such as lockdowns in their simulations. A broad organization of different agent-based simulation methods have been presented in [3]. There are numerous other papers on the topic of agent-based simulations for simulating spread of infections that are not referenced.
The main distinction of the current paper from the past literature is its focus on agent-level transmission of infections, and the influence of social dynamics and lockdown-type restrictions on these transmissions. In this paper we assume a closed community with the infection started by a single agent at initial time. The infections are transmitted through physical exposure of susceptible agents to the infected agents. The infected agents go through a period of sickness with two eventual outcomes -full recovery for most and death for a small fraction. Once recovered, the agents can no longer be infected. The social dynamical model used here is based on fixed domicile, i.e. each agent has a fixed housing unit. Under unrestricted conditions, or no lockdown, the agents are free to move over the full domain using a simple motion model. These motions are independent across agents and encourage smooth paths. Under lockdown conditions, most of the agents head directly to their housing units and generally stay there during that period. A very small fraction of agents are allowed to move freely under the restrictions.
The rest of this paper is organized as follows. Section 2 develops the proposed agent-level pandemic simulation (ALPS) model, specifying the underlying assumptions and motivating model choices. It also discusses choices of model parameters and present a validation using comparisons with the SIR model. Section 3 presents some illustrative examples and discussed computational complexity of ALPS. The use of ALPS in understanding influences of countermeasures is presented in Section 4. The paper ends by discussing model limitations and suggesting some future directions.

Agent-Level Pandemic Simulation (ALPS) Model
In this section we develop our simulation model for agent-level interactions and spread of the infections across a population in a well-defined geographical domain. In terms of the model design, there are competing requirements for such a simulation to be useful. Our main considerations in the design of ALPS are as follows. On one hand, we want to capture detailed properties of agents and their pertinent environments so as to render a realistic model of pandemic evolution with or without countermeasures. On the other hand, we want to keep model complexity reasonably low, in order to utilize it for analysis under variable conditions and countermeasures. Also, to obtain statistical summaries of pandemic conditions under different scenarios, we want to run a large number of simulations and compute averages. This also requires keeping the overall model tractable from a computational perspective to allow for multiple runs of ALPS in short time.

Simplifying Assumptions
The overall setting of the simulation model is the following. We assuming that the community is based in a square geographical region D with h household units arranged in a uniformly-spaced square grid. We assume that there are N total agents in the community and the configuration updates every unit interval (hour) counted by the variable t. The agents are fully mobile to traverse all of D when unconstrained but are largely restricted to their home units under restrictions.
Next, we specify the assumptions/models being used at the moment.
• Independent Agents: Each agent (person) has an independent motion model and independent infection probability. The actual infection event is of course dependent on being in a close proximity of an infected carrier (within a certain distance, say ≈ 6 feet) for a certain exposure time. But the probability of an agent being infected is independent of such events for other persons.
• Full Mobility In Absence of Restrictive Measures: We assume that each agent is fully mobile and moves across the domain freely when no restrictive measures are imposed. In other words, there no agents with restricted mobility due to age or health. Also, we do not impose any day/night schedules on the motions, we simply follow a fixed motion model at all times. Some papers, including [12], provide a two-or three-state models where the agents transition between some stable states (home, workplace, shopping, etc) in a predetermined manner.
• Homestay During Restrictive Measures: We assume that most agents stay at home at all times during the restrictive conditions. Only a small percentage (set as a parameter ρ 0 ) of population is allowed to move freely but the large majority stays at home.
• Sealed Region Boundaries: In order to avoid complications of introducing a transportation model in the system, we assume that there is no transfer of agents into and out of the region D. The region is modeled to have reflecting boundaries to ensure that all the citizens stay with in the region. The only way the population of D is changed is through death of agent(s).
• Fixed Domicile: The whole community is divided into a certain number of living units (households/buildings). These units are placed in square blocks with uniform spacing. Each agent has a fixed domicile at one of the units. During a lockdown period, the agents proceed to and stay at home with a certain fidelity. We assume that all agents within a unit are exposed to each other, i.e. they are in close proximity, and can potentially infect others.
• No Re-Infection: We assume that once a person has recovered from the diseased then he/she can not be infected again for the remaining observation period. While this is an important unresolved issue for the current Covid-19 infections, it has been a valid assumption for the past Corona virus infections.
• Single Patient Ground Zero: The infection is introduced in the population using a single carrier, termed patient ground zero at time t = 0. This patient is selected randomly from the population and the time variable is indicated related to this introduction event.
• Constant Immunity Level: The probability of infection of agents, under the exposure conditions, remains same over time. We do not assume any increase or decrease in agent immunity over time. Also, we do not assign any age or ethnicity to the agents and all agents are assumed to have equal immunity levels.

Model Specifications
There are several parts of the model that require individual specifications. These parts include a model on dynamics of individual agents (with or without restrictions in place), the mechanisms of transmitting infections from agent to agents, and the process of recovery and fatality for infected agents. A full listing of the model parameters and some typical values are given in Table 1 in the appendix.
• Motion Model: The movement of a subject follows a simple model where the instantaneous velocity v i (t) is a weighted sum of three components: (1) velocity at the previous time, i.e. v i (t − 1), (2) a directed component guiding them to their home, α(h i − x i (t − 1)), and (3) an independent Gaussian increment σw i (t), w i (t) ∼ N (0, 1). Note that the motions of different agents are kept independent of each other. The located h i ∈ D denotes the home unit (or stable state) of the i th person.
Using mathematical notation, the model for instantaneous position x i (t) and velocity v i (t) of the i th agent are given by: Here α ∈ R + determines how fast one moves towards their home, and µ quantifies the degree to which one follows the directive to stay home. If µ = 0, then the person reaches home and stays there except for the random component w i . However, if µ = 0.5, then a significant fraction of motion represents continuity irrespective of the home location. The value µ = 1 implies that either there is not restriction in place or the person does not follow the directive.
Reflecting Boundary: When a subject reaches boundary of the domain D, the motion is reflected and the motion continues in the opposite direction. Fig. 1 shows examples of random agent motions under different simulation conditions. The leftmost case shows when there is no lockdown and the agents are moving freely throughout. The middle case shows the case when the restrictions are imposed on day 10 and the restrictions stay in place after that. The last plot shows the case where a lockdown is imposed on day 10 and then lifted on day 20.  • Restrictions (or Lockdown) Model: Once the restriction period starts, at time T 0 , all agents are directed towards their homes and asked to stay there. We assume that ρ% of the subject follow this directive while the others ((100 − ρ)%) follow a different motion model. The variable ρ changes over time according to: We note that the people who do not follow restrictions follow the prescribed motion model with µ = 1.
• Exposure-Infection Model: The event of infection of an agent depends on the level of exposure to another infected person. This process is controlled by the following parameters: -The distance between the subject and the infected person should be less than r 0 .
-The amount of exposure in terms of the number of time units should be at least τ 0 . At the moment we use the cumulative exposure over the whole history, rather than just the recent history.
-Given that these conditions are satisfied, the probability of catching the disease at each time t is an independent Bernoulli random variable with probability p I .
• Recovery-Death Model: Once a subject is infected, we randomly associate the nature of the illness immediately. Either an infected agent is going to recover (non-fatal type, or NFT) or the person is eventually going to die (fatal type, or FT). The probability of having a fatal infection given that a person is infection is -Recovery: A subject with a non-fatal type (NFT) is sick for a period of T R days. After this period, the person can recover at any time according a Bernoulli random variable with probability p R .
-Fatality: A subject with a fatal type (FT) is sick for a period of T D days. After this period, the person can die at any time independently according a Bernoulli random variable with probability p D .

Chosen Parameter Values
A complete listing of the ALPS model parameters is provided in the Appendix in Table  1. In this section, we motivate the values chosen for those parameters in these simulations. These values are motivated by the current reports of Corona virus pandemic.
• We have used a square domain with size 2 miles × 2 miles for a community with population of N agents. For N = 900, the model represents a population density of 225 people/mile 2 . The community contains h living units (buildings) with a domicile of N/h people per unit. In case N/h is high, a unit represents a tall building in metropolitan areas, but when N/h is small, a unit represents a single family home in a suburban area.
The time unit for updating configurations is one hour and occurrence of major events is specified in days. For example, the lockdown can start on day 1 and end on day 60.
• The standard deviation for accelerations in agent mobility are approximately 1-5 feet/hour (fph). Through integration over time, this results in agent speeds up to 1000 fph. We assume that ρ 0 = 0.98, i.e. 98% of the people follow the restriction directives.
• The physical distance between agents to catch infection should at most r 0 ≈ 6f t and the exposure time should be at least τ 0 = 5 time units (hours). The probability p I of getting infected, under the right exposure conditions, is set at 5% at each time unit (hour) independently.
• Once infected, the probability of having a fatal outcome is set at 5-10%. The time period of recovery for agents with non-fatal outcomes starts at 7 days. The probability of reaching full recovery for those agents is p R = 0.001 at each subsequence time unit (hour). Similarly, for the agents with fatal outcomes, the period of being infected is set to be 7 days and after that the probability of death at each time unit (hour) is set to be p D = 0.1.

Model Validation
Although ALPS is perhaps too simple model to capture intricate dynamics of an active society, it does provide an efficient tool for analyzing effects of countermeasures during the spread of a pandemic. Before it can be used in practice, there is an important need to validate it in some way. As described in [3], there are several ways to validate a simulation model. One is to use real data (an observed census of infections over time) in a community to estimate model parameters, followed by a statistical model testing. While such data may emerge for Covid-19 for public use in the future (especially with the advent of tracking apps being deployed in many countries), there is currently no such agent-level data available for Covid-19. The other approach for validation is to consider coarse population-level variables and their dynamics, and compare them against established models such as SIR and its variations. We take this latter approach. Fig. 2 shows plots of the evolutions of global infection counts (susceptible, infection, recovered) in a community under the well-known SIR model (on the left) and the proposed ALPS model (on the right). In the ALPS model the counts for recovered and fatalities are kept separate, while in SIR model these two categories are combined. One can see a remarkable similarity in the shapes of corresponding curves and this provides a certain validation to the ALPS model. In fact, given the dynamical models of agent-level mobility and infections, one can in principle derive parameters of the population-level differential equations used in the SIR model. We have left that out for future developments.

Exemplar Scenarios & Computational Complexity
We illustrate the use of ALPS model by showing its outcomes under a few typical scenarios. Further, we discuss the computational cost of running ALPS on a regular laptop computer.

Examples from ALPS
We start by showing outputs of ALPS under some interesting settings. In these examples, we use a relatively small number of agents (N = 900) and household units (h = 9), with T = 100days, in order to improve visibility of displays. Fig. 3 shows a sequence of temporal snapshots representing thecommunity at different times over the observation period. In this example, the population is fully mobile over the observation period and no social distancing restrictions are imposed. The snapshots show the situations at 10, 20, 50, and 100 days. The corresponding time evolution of global count measures is shown in the bottom right panel. The infection starts to spread rapidly around the 10th day and reaches a peak infection level of 81% around day 35. Then the recovery starts and continues until very few infected people are left. In this simulation, the number of fatalities is found to be 11%.

Example 2 -Early Restrictions:
In the second example, the restrictions are introduced on day 5 after the infection and these measures stay in place after that. The results are shown in Fig. 4.  The bottom right panel shows temporal evolutions of the population-level infection counts: susceptible (blue curve), infected (red), recovered (green), and deceased (magenta). As the picture shows, the infections start growing initially but the gains of lockdown measures start appearing around day 15 -it takes about 10-12 for the restrictions to show results. The subsequent bumps in the infected counts is due to the new infections transmitted by roaming agents. In this run of ALPS, we see an overall fatality rate of 3% and an uninfected population size of 67%.

Example 3: Early Imposition and Then Removal of Restrictions :
In this example, with results shown in Fig. 5, the restrictions are introduced on day 5 after the infection and lifted on day 30. So the restriction period of 25 days is surrounded by unrestricted mobility on both sides. As the plot of global variables indicate, the early restriction helps reduce the infection rates but these gains are lost soon after lifting of the restrictions. The percentage of infected people goes back up and the rate of fatalities resemble the unrestricted situation in Example 1.

Computational Complexity
Since computational efficiency of the simulator is of vital important, we next study the computational cost of running ALPS for different variable sizes. In these experiments, From these results we are see that the computational cost is linear in T with slope 1. For a change in N the number of agents, while keeping other variables fixed, the change in the computational cost is linear also. However, the rate of change is 2 for smaller values but increases to 4 for the larger values. The changes in computational cost due to changes in the number of households, with other variables held fixed, are minimal.

Analyzing Lockdown Measures
There are several ways to utilize this model for prediction, planning and decision making. We illustrate some of these ideas using examples. At first we show individual simulations under different scenarios and then present results on average behavior obtained using hundreds of simulations. In these illustrations, we have used N = 972 agents and h = 81 households. Effect of Timing of Imposition of Restrictions: Fig. 6 shows some examples of ALPS outputs when a lockdown is imposed on the community but at different times. From top-left to bottom-right, the plots show lockdowns starting on day 1, day 5, day 10, and day 20, respectively. Once the restrictions are imposed, they are not removed in these examples. The best results are obtained for the earliest imposition of restrictions.
In the top-left case, the peak infection rises to 22% of the community, on day 18, and then comes down steadily. The fraction of fatalities is 2% and the fraction of community never infected is 77%. In case the restrictions are imposed on day 5, and all other parameters held same, there is a small change in the situation. The peak infection rises to 55%, the fatalities increase to 7% and the fraction of uninfected goes down to 40%. We can see that an early imposition of lockdown measures also helps reduce peak infection rates in the community. Sometimes we notice a saw-tooth shape in the curve for infected people. This implies that the even the small portion of mobile agents can break through and spread infections at other home units despite full restrictions being in place. This saw-tooth shape underscores the need for severely limiting mobility. Even a small fraction of population being mobile can spread infections to the immobile agents and cause infections.
The bottom two panels in Fig. 6 show results for a delayed lockdown, with the restrictions being imposed on day 20 and day 30. One can see that the peak infection rate becomes quite high (82-84%) and casualties mount to 10-11%. The fraction of uninfected population falls to 0% in these cases. This shows that, under the chosen parameter settings, day 20 is quite late in imposing lockdown conditions on the community, and the results are very similar to any later imposition. If the restrictions are imposed after 15-20 days, then there are no uninfected people left in the community in a typical run of ALPS. Effect of Timing of Removal of Restrictions: In the next set of simulations, we study the effects of lifting restrictions and thus re-allowing full mobility in the community. Some sample results are shown in Fig. 7. Each plot shows the evolution for a different starting time T 0 and the end time  Fig. 8 shows an example of the configuration with 25 households and 200 agents in the community. We vary the start time T 0 (start day of restrictions) from 1 to 30 and then to 150 and study the resulting outcomes using 100 runes of ALPS. (The value of T 0 = 150 implies that the restrictions are never imposed in that setting.) The remaining panels in Fig. 8 show box plots of the three variables changing with T 0 .
• Death Rate: Top right shows the percentage fatalities increasing from around 1% to almost 11% as T 0 changes from 1 to 30. the largest rate of increase is observed when T 0 is between 10 to 30 days.
• Number of Uninfected: In the bottom left panel we see a decrease in the number of uninfected population from around 90% to 0% as T 0 increases. In case the restrictions are not imposed in first 30 days after the first infection, there is no agent left uninfected in the community.
• Peak Infection Rate: In case the restrictions are imposed on the first day after the infection, the peak infection rate is contained to be 10%. As T 0 is increased and the restrictions are delayed the peak infection rate rises to almost 80% of the community.
In Fig. 9 we study the effect of changing T 1 while T 0 = 1 is kept fixed (and other experimental conditions being same as in the last experiment). The results show that there is no difference in the eventual number of deaths and the peak infection rates when T 1 is changed from 10 to 40. This is because agent immunity and other infection

Discussion
The strengths and limitations of ALPS model are the following. ALPS provides an efficient yet comprehensive modeling of the spread of infections in a self-contained community, using simple model assumptions. The model can prove very useful in evaluating costs and effects of imposing social lockdown measures in a society.
In the current version, the initial placement of agents is set to be normally distributed with means given by their home units and fixed variance. This variance is kept large to allow for near arbitrary placements of agents in the community. In practice, however, agents typically follow semi-rigid daily schedules of being at work, performing chores, or being at home. Thus, at the time of imposition of a lockdown, the agents can be better placed in the scenes according to their regular schedules rather than being placed arbitrarily.
In terms of future directions, there are many ways to develop this simulation model to capture more realistic scenarios: (1) It is possible to model multiple, interactive communities instead of a single isolated community. (2) One can include typical daily schedules for agents in the simulations. A typical agent may leave home in the morning, spent time in the office during the day, and return to home in the evening. (3) It is possible to provide an age demographics to the community and assign immunity to agents according to their demographic labels [13]. (4) As more data becomes available in the future, one can change immunity levels of agents over time according to the spread and seasons. (5) In practice, when an agent is infected, he/she goes through different stages of the disease, associated with varying degrees of mobility [9]. One can introduce an additional variable to track these stages of infections in the model and change agent mobility accordingly.

Conclusion
This paper develops an agent-based simulation model, called ALPS, for modeling spread of an infectious disease in a closed community. A number of simplifying and reasonable assumptions makes the ALPS efficient and effective for statistical analysis. The model is validated at a population level by comparing with the popular SIR model in epidemiology. These results indicate that: (1) Early imposition of lockdown measures (right after the first infection) significantly reduce infection rates and fatalities; (2) 0 13/15 Lifting of lockdown measures recommences the spread of the disease and the infections eventually reach the same level as the unrestricted community; (3) In absence of any extraneous solutions (a medical treatment/cure, a weakening mutation of the virus, or a natural development of agent immunity), the only viable option for preventing large infections is the judicious use of lockdown measures.