How pedestrian simulations could be used to assess the effectiveness of COVID-19 restrictions

During the coronavirus pandemic in 2020, governments around the world have introduced social distancing measures to help reduce the virus transmission (Courtemanche et al. 2020). However, some essential activities require that people come into contact, for example, shopping for food. To reduce the exposure risk of customers, supermarkets have taken measures such as limiting the maximum occupants, introducing one-way systems, and encouraging social distancing between customers (Coronavirus, 2020). However, these restrictions also make it harder for customers to complete their shopping quickly, which could increase exposure risk.

Little data is currently available on the how people move and interact under these new restrictions, so if policy makers and business managers want to know what effect different restrictions will have on infection risk and the throughput of people in a building, they must rely on simulators of pedestrian dynamics.

Using such simulations, we may be able to answer questions such as:

  • What is the quantitative relationship between social distancing and risk of infection?
  • Should businesses use the one-way system?
  • What shopping habits are best for reducing exposure for occupants?
  • How to find the balance between the risk of infection and maintaining turnover?

To illustrate the usefulness of such simulations, we employ a simple pedestrian simulator to simulate supermarket shopping. This is used to assess the risk of exposure and the time taken for customers to complete their shopping (shopping efficiency) under different restrictions and shopping habits. We then determine which scenarios are best at minimising infection risk or maximising shopping efficiency.

We consider several scenarios based on shopping habits and current COVID-19 guidelines. The first case is the shopping situation pre-pandemic, where people can move freely without social distancing which acts as our reference case. We look at this scenario with 1m and 2m social distancing in place. We also look at two possible one-way systems, one where passages are wide enough for people to move past each other (one-way wide), and one where they cannot (one-way narrow). Finally, two shopping habits are considered, one where people visit supermarkets less often, but spend more time buying more items, and the other where people visit frequently but buy fewer items.

The simplified supermarket environments used are shown in Figure 1, where (a) and (b) respectively show one-way systems with narrow and wider passages. Figure 1 (c) shows the free-for-all environment used in the other scenarios. Each space is 20mx20m, with black regions representing impassable areas, i.e., walls, aisles etc. Coloured dots signify places where people can browse and buy items.


Figure 1: The three simulated supermarket environments- two versions of a one-way system, one with narrow passages which prevent people from passing each other (a), and one with wider passages, allowing for overtaking (b), and an environment where people can move freely (c).

To simulate how people move and interact with their environment and others, we use the social force model (Helbing et al., 2000). Here, we treat people as objects acted upon by forces, which represent the internal motivations of people, such as moving towards a place of interest, avoiding collisions with people and objects, and maintaining personal space. Using Newton’s Second Law of Motion (Eq. 1), each pedestrian i, of mass m_i, with a velocity v_i, experiences an attractive force towards a desired location, and repulsive forces between other pedestrians, f_{ij} and between obstacles, f_{iW}. To obtain different social distances for our study, we modify f_{ij}. Here, we sum the repulsive forces from other agents and obstacles over all other agents and all obstacles, respectively.

    \[ m_i\frac{dv_i}{dt} = f_a + \Sigma_{\forall j \ne i}f_{ij} + \Sigma_{W\in E}f_{iW} \]

For the interested reader, there is a video showing the simulator in action.

The simulations are run for 1 hour of real time with a maximum of 20 people present at any one time (representing maximum occupancy restrictions). People are added at the entrance if maximum occupancy is not exceeded. Each person then begins visiting each location in their schedule. Once their schedule is complete, each person heads toward the exit and are removed from the simulation. Table 1 summarises the differences between scenarios.


Table 1: Summary of the different scenarios.

To quantify the infection risk, we use a framework described in recent work (Ronchi and Lovreglio, 2020). The total exposure of every person to every other person per hour per activity performed is calculated. We define the shopping efficiency as the total number of activities completed during the simulation by everyone.

We give each scenario a ranking to compare them in terms of exposure risk and how quickly people can complete their shopping. Here, the rank, R, of a given strategy is given by:

    \[ R = aG + (1 - \alpha)\varepsilon \]

Where G is the inverse-normalised exposure per activity per hour, such that a high G indicates a low exposure.  This is because we are trying to minimise exposure, so a high exposure should reduce the ranking of a strategy. \varepsilon is the shopping efficiency, in terms of the total number of activities completed by everyone per hour, and \alpha is the exposure weighting parameter, such that 0\leq \alpha \leq 1. When , we only care about minimising our exposure to others. When , we only care about completing our shopping quickly. Some people will be more concerned with reducing their exposure than others, so we plot R as a function of \alpha, as shown in Figure 2. The strategy with the highest rank for a given \alpha value is the optimal strategy.


Figure 2: ranking strategies according to the importance of exposure.

As expected, obeying social distancing does reduce your exposure, and reduces shopping efficiency. If you value lowering your exposure, you should adopt social distancing, even though it means that you spend longer in the store. In our experimental settings, the rank for long schedules is always higher than that of short schedules, which means that the more shopping activities you perform, the less exposure you receive per activity. The amount of exposure from three shopping trips where you buy three items each time is larger than that of one trip buying nine items. Finally, we see that the one-way system with wide passageways is the best in terms of reducing exposure and increasing shopping efficiency for all values of \alpha, even than the pre-pandemic case. However, we assume that everyone always obeys one-way systems and social distancing, and do not need to double back.

We have studied and compared customer management and pedestrian shopping strategies under the current situation through pedestrian dynamics and virus transmission simulations. The simulation results revealed the effectiveness of maintaining social distancing in reducing the spread of the virus. They confirm that obeying government and commercial guidance will reduce your exposure, at the cost of efficiency. From the perspective of store managers, the one-way system is the best preventive measure, if customers strictly follow it. For customers, reducing the number of shopping trips but buying more at once can reduce the risk of infection. These results, while intuitive, demonstrate that even simplistic pedestrian dynamics simulators can be informative for policymakers and business owners for predicting infection risk and customer turnover. If combined with real data (supermarket size, daily shopping volume and opening hours, etc), these can provide reliable and accurate quantitative predictions.

To conclude, pedestrian dynamics agree with common sense: obey social distancing and one-way systems to reduce your chance of infection and infecting others!


Courtemanche, C., Garuccio, J., Le, A., Pinkston, J., & Yelowitz, A. (2020). Strong Social Distancing Measures In The United States Reduced The COVID-19 Growth Rate: Study evaluates the impact of social distancing measures on the growth rate of confirmed COVID-19 cases across the United States. Health Affairs, 10-1377.

Coronavirus (COVID-19): safer transport guidance for operators.(n.d.).Retrieved October 1,2020, from

Ronchi, E., & Lovreglio, R. (2020). EXPOSED: An occupant exposure model for confined spaces to retrofit crowd models during a pandemic. arXiv preprint arXiv:2005.04007.

Helbing, D., Farkas, I., & Vicsek, T. (2000). Simulating dynamical features of escape panic. Nature, 407(6803), 487-490

More simulation videos are available here.

Chris King, Yunhe Tong and Yanghui Hu are Engineering Mathematics PhD students at the University of Bristol as part of the Collective Dynamics Research Group.