Social distancing with the Optimal Steps Model
SS OCIAL DISTANCING WITH THE O PTIMAL S TEPS M ODEL
A P
REPRINT
Christina Maria Mayr ∗ Munich University of Applied SciencesDepartment of Computer Science and MathematicsLothstrasse 6480335 Munich [email protected]
Gerta Koester
Munich University of Applied SciencesDepartment of Computer Science and MathematicsLothstrasse 6480335 Munich [email protected]
July 6, 2020 A BSTRACT
With the Covid-19 pandemic an urgent need to simulate social distancing arises. The Optimal StepsModel (OSM) is a pedestrian locomotion model that operationalizes an individual’s need for personalspace. We present new parameter values for personal space in the Optimal Steps Model to simulatesocial distancing in the pedestrian dynamics simulator
Vadere . Our approach is pragmatic. Weconsider two use cases: in the first we demand that a set social distance must never be violated. In thesecond the social distance must be kept only on average. For each use case we conduct simulationstudies in a typical bottleneck scenario and measure contact times, that is, violations of the socialdistance rule. We derive rules of thumb for suitable parameter choices in dependency of the desiredsocial distance. We test the rules of thumb for the social distances . m and . m and observe thatthe new parameter values indeed lead to the desired social distancing. Thus, the rules of thumb willquickly enable Vadere users to conduct their own studies without understanding the intricacies of theOSM implementation and without extensive parameter adjustment. K eywords Optimal Steps Model · Social distancing · Bottleneck · Parameter adaption · Locomotion modeling,
Vadere simulation framework
In 2020, distance rules were imposed in many countries to slow down the spread of the corona virus. Obeying suchrules leads to a change in crowd behavior: pedestrians keep more distance and, to achieve this, might slow down theirwalking speed. In summer 2020, at the time of writing of this manuscript, we are noticing an increased use of the
Vadere simulation framework for pedestrian dynamics. In particular, we are getting requests from users who want tosimulate social distancing with the Optimal Steps Model (OSM), one of several locomotion models implemented in
Vadere . The Optimal Steps Model explicitly models psychological personal space needs as introduced by Hall [3].Default parameters in
Vadere’s
OSM are calibrated to empirical data that was collected without social distancing [4]. Inthese, agents come into close contact when passing a bottleneck. See Figure 1.In this study, we try to find parameter values for the Optimal Steps Model which allow us to simulate social distancing.Our goal is to enable researchers to conduct case studies with default parameters, and without having to understand themathematical intricacies of the model.For this, we look at a classic bottleneck scenario. We argue, that this scenario is particularly suitable, because manygeometries in the built environment can be interpreted as a sequence of bottlenecks. We also consider different desiredsocial distances, which we define trough the Euclidean distance between the centers of agents. Agents in
Vadere arerepresented by circles. We call contact any violation of the desired social distance, even for the shortest time. ∗ See also a r X i v : . [ c s . M A ] J u l PREPRINT - J
ULY
6, 2020Figure 1: Normal crowd behavior in front of a bottleneck. The agents (circles) try to reach the target on the left handside. In this example, we consider agents being in contact if they violate a social distance of . m . Red circles representagents currently in contact. The contact between two agents is represented by a red connection line. Blue circlesrepresent agents out of contact. Vadere’s default parameters for the Optimal Steps Model are chosen to reflect suchnormal behavior. For a simulation with social distancing new parameters must be found.We investigate two use cases: • Use case 1: Social distance as lower bound. In this use case, the social distance value must never be violated.As a consequence, if we find such a parameter combination, there are no contacts at all. In other words, weinterpret the social distance as a lower bound of the actual distances kept by the agents. • Use case 2: Social distance as target distance. In this use case, we accept temporal violation of the distancerequirement, that is, contacts. In other words, we interpret the desired social distance as an average distance.For both use cases, agents need to keep larger distances than before. In the Optimal Steps Model, personal distance ismodeled by introducing ‘repulsion’ between agents, or less physically interpreted, the utility of a position decreaseswhen an agent approaches another agent. The repulsion (or utility drop) is captured by a so-called potential function.Hence, we need to find appropriate parameters of the potential function to strengthen the repulsion between agents.In short, the research question of this study is: • How can one adjust parameters in the Optimal Steps Model to achieve physical distancing that reflect specificdesired ‘social’ distances?
The basic idea of the Optimal Steps Model is that virtual pedestrians (agents) are attracted by targets and repulsed byobstacles and other virtual pedestrians. Less physically spoken, agents, when moving, maximize the utility of theirposition. This utility depends (negatively) on the geodesic distance to the target and (negatively) on the close proximityto other agents. Agents move by ‘stepping’ on the position within a circle around their current spot that optimizes thisutility. The circle radius represents each agent’s personal maximum stride length, which in turn is linearly correlatedto the agent’s free-flow speed [5], that is, an assumed desired speed when the path is free. Thus, agents step towardstargets while skirting obstacles and avoiding collisions. In the reminder of the text, we use the physical interpretation,because it is used in the names of parameters in
Vadere’s implementation of the OSM.The repulsion between two agents is achieved by a distance-dependent potential function. See Figure 2. The potentialfunction is based on Hall’s theory of interpersonal distances which describes four distance zones around a person[2, 3]. Accordingly, the potential function is defined piece-wise on rings around each agent: a circular core for collisionavoidance, a first ring that represents the intimate space, and a second ring that represents personal space. Agentsoutside the personal zone have no influence on other agents’ path choice. This is mathematically modeled by setting thethe potential function to zero.The value of the potential function in the personal space ring is very low. Thus, this area will be kept free only if agentshave ample space to avoid each other [2]. As soon as the space becomes more constricted agents will get closer. This2
PREPRINT - J
ULY
6, 2020 . . . x A g e n t p o t e n t i a l p . C o lli s i o n a r e a 2 . I n t i m a t e s p a ce . P e r s o n a l s p a ce . A r e ao u t o f i n t e r e s t . . . . . . .
81 Distance x between centroids of agents A g e n t p o t e n t i a l p
1. 2. 3. 4.
Figure 2: Default agent potential function. The default parameter values in
Vadere for normal crowd behavior are potential height h = 50 and personal space width w = 1 . . Note: The personal space is around the torso of an agent. Ifthe distance between two agents is smaller than the sum of the torso radii, the agents collide (1. Collision area). Toprevent this, the potential is set to a high value in the torso area. The personal space (2. Personal space) begins at x = 0 . m and ends at x = 1 . m . The upper bound x = 1 . m is the sum of the personal space width w = 1 . andthe torso radii of the agents.is typical for normal human behavior. In the intimate space ring the potential function value increases significantly.Again see Figure 2. In crowds, this area is only kept free if the density is low [2]. Finally, to prevent agents fromoverlapping, the potential is set to a very high value (when compared to the values in the personal and intimate spaces)in the collision area. The exact definition of the potential function, and default parameters, implemented in Vadere canbe found in [1].The shape of the potential function is controlled through several parameters that could be adapted to achieve socialdistancing in the Optimal Steps Model. We try to keep the adaption of the OSM as simple as possible by only changingtwo parameters: the potential height h (in Vadere : pedPotentialHeight) and the personal space width w (in Vadere :pedPotentialPersonalSpaceWidth). Why do we choose these two parameters? The parameter potential height h controlsthe strength of repulsion. If h is increased, we expect agents to increase their distance to others. The parameter personalspace width w controls how far the repulsion reaches: the larger w the bigger the influence area of an agent.Note that the personal space width w is related to but not equal to the desired social distance d the user wants to model.When there is ample space it might suffice to set w = d to keep agents at least the desired social distance apart. Thetrue distance among agents is an emergent value and will then be bigger! In a bottleneck scenario, like Figure 1 on theother hand, the true distance will be much smaller than w .In crowd simulations, we are especially interested in dense crowds which typically occur in front of bottlenecks, suchas doors or narrow passages. As a consequence, if we want to observe a virtual crowd that obeys social distancing, weneed to choose a value for the personal space width w that is bigger than the desired social distance. In this study, wewant to find suitable values for the parameters personal space width and potential height that do just that.Figure 3: Funnel with balls. The ball size represents the repulsion between agents. If the ball size is small (smallrepulsion), the balls just fall through the narrowing. If the ball size is too large, balls get stuck. This is why we must notincrease the repulsion to an infinite value to achieve social distancing.3 PREPRINT - J
ULY
6, 2020
There is currently no empirical data available to calibrate the Optimal Steps Model parameters for social distancing.Nonetheless, we need to find a suitable scenario and define plausible criteria which help us to evaluate how well socialdistancing is captured by the model.
To pick a scenario, we have a closer look at use case 1, where the social distance is a lower bound for permissibledistances. In particular, all distances larger than the social distances are accepted.One might be tempted to achieve such a behavior by increasing the repulsion between agents up to ‘infinity’, that is, toset the potential height h and the personal space width w to extremely high values.But there is a problem with this approach: If the potential is too high, agents get stuck, as illustrated in Figure 3with a funnel analogy. The funnel represents a bottleneck which agents need to pass to reach their target. The ballsize represents the repulsion between agents. If the ball size is small (small repulsion), the balls just fall through thenarrowing. If the ball size is too large, balls get stuck. This effect can be easily observed in test simulations. This iswhy we cannot increase the repulsion at will.We use the bottleneck scenario depicted in Figure 1 with this consideration in mind. The bottleneck scenario coversboth aspects, density and repulsion. We can directly observe what happens if the repulsion is too high.The scenario is set up as follows. The topography of the scenario is m wide and m long. The width of the corridoris . m and its length is . m . 100 agents are generated in the source on the right hand side (green box) and try toreach the target (orange box) on the left hand side. With these settings, the agents are close to each other in front of thebottleneck. The source is placed sufficiently far away from the corridor to exclude any effects of the spawning processon the observation area. We start to count contacts at simulation time t = 20 s to exclude any contacts produced by thespawning process. The distance measure between two agents is the Euclidean distance between their center points. We do not have any empirical data to calibrate our parameters for social distancing. Hence, we need to define othercriteria to decide which parameter values fit our two use cases best. For the choice of the criteria, we consider howthe use cases were originally motivated: The goal of social distancing is to decrease the number of contacts whichdecreases the probability of infection.The question is: How to count contacts? We decide to use a time measure t m for counting contacts.The time measure t m is defined as t m = 1 n (cid:88) i =0 (cid:88) j =0 t i,j (1)In our investigation, the number of agents is n = 100 . t i,j is the time agent i has contact to another agent j . The time t i,j is zero if the distance x i,j between two agents i and j is above the desired social distance: t i,j = (cid:26) , if x i,j > d.t s,e − t s,s , otherwise . (2)where t s,s is the point of time when the social distance is violated for the first time and t s,e is the point of time whenthe contact ends.For use case 1, the contact time has to be zero. This means that all agents always keep a distance larger than the desiredsocial distance d . Thus, the acceptable parameter combinations for use case 1 have to fulfill the condition: t m = 0 Condition for use case 1 (3)We expect that this condition is always fulfilled when the personal space width and the potential height are set to highvalues which lead to high repulsion. Since a high repulsion can lead to clogging, we only want to increase the repulsionas much as necessary. We expect that there are multiple parameter combinations which fulfill condition 1. Hence, thesolution to our problem is not unique but forms an indifference curve.For use case 2, the parameter values are acceptable when the mean value x m of the distribution of the true distance x isequal to the desired social distance d : x m = d . We decide to approach this problem pragmatically.4 PREPRINT - J
ULY
6, 2020We accept parameter combinations which fulfill: x m ≈ d Condition for use case 2 (4)We make use of the fact that some distances x i,j are below the social distance if t m > . Then we try to answer thequestion: how much contact time t m is necessary that Equation 4 holds? For this purpose, we increase the averagecontact time t m iteratively. For each average contact time t m,i we visually check if Equation 4 holds.Note: The detour with t m saves us from measuring distances between agents, and from deciding when agents are toofar apart to count for the measure. We consider the social distances d : . , . , . , . , . . For each, we determine the indifference curves whichfulfill the conditions as defined in Equations 3, 4. Second, we try to derive a rule of thumb which provides acceptableparameter values in dependency of the social distance.For that purpose, we use a simple grid sampling. Each parameter is discretized with 100 values which are equallyspaced between lower and upper bound. See Table 1. In total we get 10000 parameter combinations. For each of theseparameter combinations we run a simulation. Then we analyze the resulting average contact time t m for each of the fivesocial distances d : . , . , . , . , . .We start with use case 1. For each social distance d i , we mark all parameter combinations which fulfill t m = 0 . Thenwe build the convex hull around these points which serves as an approximation for the indifference curve. Visually thisseems a good fit. Then we plot the 5 approximated indifference curves and analyze them visually. Finally, we derive arule of thumb which relates social distance and parameter values for use case 1.For use case 2, we need to find a value for the average contact time for which the average distance is approximately thedesired social distance. For that purpose, we iteratively increase t m . Then we visually analyze whether the condition isfulfilled for the social distances d : . , . . After finding a suitable value for t m we follow the procedure of use case 1.Parameter Default Lower bound Upper bound Number of discrete valuesPersonal space width w h Figure 4 depicts the resulting surfaces for the social distances d : . , . . We can observe that the maximum averagecontact time is located in the lower left corner. This corresponds to the default OSM behavior. The minimum values arelocated in the upper right corner. This is what we expected: the repulsion increases when increasing the personal spacewidth w and the potential height h . The effect of the increased parameter values on the potential function is depicted inFigure 5. Desired social distance d Default average contact time t m, ins t m, . t m, is the average contact time t m for the default parameter values h = 50 and w = 1 . .Figure 6 depicts the five indifference curve approximations for use case 1. Each indifference curve corresponds to acertain social distance. The Vadere user might not be interested in all acceptable parameter combinations, but only in5
PREPRINT - J
ULY
6, 2020
A B200 400 600 800 1 , h P e r s o n a l s p a ce w i d t h w
200 400 600 800 1 , h . . . . N o r m a li ze d a v e r ag e c o n t a c tt i m e t m t m , Figure 4: Normalized average contact time (third dimension, see colorbar) over potential height h and personal spacewidth w for a social distance d = 1 . (left) and d = 2 . (right). The normalized average contact time is the ratioof average contact time and average contact time t m, for Vadere’s default parameters, see Table 2. Each parametercombination, e.g. (A) or (B), on the indifference curve (solid line) fulfills the condition of use case 1: t m = 0 . Theparameter combinations on the second indifference curve (dashed line) fulfill the condition of use case 2: x m ≈ d which holds for an average contact time t m = 10 s . . . . x A g e n t p o t e n t i a l p . C o lli s i o n a r e a 2 . I n t i m a t e s p a ce . P e r s o n a l s p a ce . . . x A g e n t p o t e n t i a l p
1. 2. 3.
Figure 5: Agent potential function for a desired social distance d = 1 . and zero contacts. The parameters potentialheight h and personal space width w are set to h = 550 and w = 2 . .one. We could now pick randomly a parameter combination on each indifference curve and list them in a table. Theproblem is that these values are true for the five discrete values of the social distance, but not for values in between.In order to provide parameter values for the complete social distance interval [1 . , . , we need to find a relationbetween parameters and social distance. We anlayze the plot visually and suggest to use w = 1 . d (5) h = 500 d − (6) d ∈ [1 . , . as a rule of thumb. The relation w = 1 . d can be directly seen when analyzing the plot. With Eq. 6 the intersectionpoints of line and indifference curves are almost equally spaced. See Figure 6. Thus we assume that the behavior islinear in between. Under this assumption the rules of thumb can be used for any social distance between . and . . One might be tempted to use regression techniques to find more precise equations. We argue that this would not6 PREPRINT - J
ULY
6, 2020
200 400 600 800 1 , h P e r s o n a l s p a ce w i d t h w d = . . . . . Line, seeEqs. 5, 6 200 400 600 800 1 , h P e r s o n a l s p a ce w i d t h w d = . . . . . Line, seeEqs. 7, 8
Figure 6: Indifference curves for use case 1 (left) and use case 2 (right). In use case 1, contacts are not allowed. Eachindifference curve (left) fulfills the condition t m = 0 . The indifference curves (right) correspond to an average contacttime t m = 10 s . With t m = 10 s , the average distance is approximately the social distance: x m ≈ d . This correspondsto use case 2.Figure 7: Crowd behavior for use case 1 at simulation time t S = 40 s . Agents never violate the social distance d = 1 . (left) or d = 2 . (right). The parameter values were derived using the rules of thumb of Equations 5, 6. The increasedrepulsion increases the probability of clogging. With social distance d = 2 . agents get stuck (right).improve the accuracy of the equations, because the points themselves are not accurate due to the discretization error ofthe grid and the approximation error caused by the convex hull.Finally, we verify our rule of thumb visually for the social distances d : . , . , see Figure 7. We can not observeany contacts. Thus use case 1 is covered by our rule of thumb for at least the social distances d : . , . . We can notguarantee that the rule of thumb holds for any social distance and any topography. Nevertheless, accu:rate [6] hasalready succesfully tested our rule of thumb for some real-life applications.In these two examples, social distancing was achieved successfully with the new parameter combinations. On the otherhand, we also observe that the increased repulsion produces clogging. See Figure 7 (right). Clogging occurs earlierwhen the desired social distance d is increased. The screen shots in Figure 7 were all taken at simulation time t s = 40 s .For a desired social distance d = 1 . , the agents still move at simulation time t s = 40 s . Clogging occurs at a later point.For a social distance d = 2 . , clogging has already occured at t s = 40 s . The probability for clogging can be reducedwhen using a dynamic floor field instead of a static one. But this does not completely resolve the problem of clogging.We will discuss this problem in 4.4. 7 PREPRINT - J
ULY
6, 2020Figure 8: Crowd behavior for use case 2 at simulation time t s = 40 s . Agents in contact are marked red whereas agentsnot in contact are blue. For an average contact time t m = 10 s , distances among agents in contact and out of contact aresimilar when visually compared. Thus Equation 4 holds and agents have a distance distribution which is on average thedesired social distance d = 1 . (left) or d = 2 . (right). The parameter values were derived using the rules of thumb ofEquations 7, 8. For use case 2, we look for an average contact time t m for which Eq. 4 holds. We iteratively increase t m and analyzethe crowd behavior visually. For an average contact time t m = 10 s , Eq. 4 seems to hold when checked visually. Figure6 depicts the five indifference curve approximations for use case 2. We repeat the procedure of use case 1 to find asecond rule of thumb: w = 1 . d − . , d ∈ [1 . , . (7) h = 750 (8)The rules of thumb for the two use cases are summarized in Table 3.Again, we verify our results for use case 2 visually. See Figure 8. In the video analysis, we again observe the problemof clogging which can be improved but not eliminated by using a dynamic floor field. We are of the opinion, that real pedestrians resolve deadlocks by temporarily adapting their behavior. For example, theymight briefly violate social distances to ‘squeeze by’. This must be addressed by suitable behavioral models.Another strategy would be to model a time-dependent agent potential function, where the repulsion decreases whenagents experience a certain time of clogging. This would entail social distance violations and, in our eyes, modelpedestrians’ impatience with deadlocks. Such a behavior is already implemented in the accu:rate’s simulator crowd:it [6].After a certain period of time, agents switch to their default behavior, that is, without keeping any distance rules. Thisusually resolves the clogging. We plan to implement similar behaviors in the
Vadere simulation framework.For the time being, we recommend to keep this problem in mind when using our parameter values in
Vadere . Westrongly recommend to use a dynamic floor field and allow agents to switch places in counterflows. Both measuresdecrease the probability for clogging. See Table 4 for the necessary
Vadere settings.Use case
Vadere parameter Default Value for social distancingUse case 1 pedPotentialPersonalSpaceWidth w h w h PREPRINT - J
ULY
6, 2020Reduce probability of clogging Vadere parameter Default Value for social distancingin unidirectional flows Floor field timeCostAttributes/type UNIT NAVIGATIONin counterflows Psychology usePsychologyLayer false truesearchRadius 1.0 1.5 desired social distanceTable 4: Overview of additional settings in
Vadere to reduce the probability of clogging.
We have found parameter values for the Optimal Steps Model to simulate social distancing. We considered two differentuse cases for social distancing. In the first use case contacts have to be completely avoided. The distance betweenagents must never fall below the required social distance value. In the second use case, the social distance is interpretedas desired distance. The average distance is approximately the social distance, but single distances might be smallerwhich leads to contact. For both use cases we derived rules of thumb to determine the Optimal Steps Models parametersfor any desired social distance d ∈ [1 . m, . m ] .In visual analysis the rule of thumb seems to work for use case 2. Despite this, the precision of the equation couldbe increased by reformulating the problem as an optimization problem where each deviation from the desired socialdistance is punished within a utility function. For this purpose, several questions need to be answered: In which areaaround an agent should a distance deviation be punished? How to choose the utility function? The solution to thisproblem is part of future research.The rules of thumbs are based on a bottleneck scenario where high densities occur. We expect that our parametersuggestions work for scenarios with bottlenecks. We can not guarantee that the they work for any topography.When testing the new parameter values, we observed that the probability of clogging increases when increasing thesocial distance. This is caused by the higher repulsion. The clogging problem can be mitigated but not completelyeliminated by using a dynamic floor field and allowing position switches in counterflow. We list the Vadere parametersettings to achieve this. However, we believe that the problem is better addressed by implementing suitable agentbehaviors. We plan to do this in the
Vadere simulation framework.
Acknowledgments
We thank Dr. Angelika Kneidl and Alex Platt (B. Sc.) from accu:rate who provided insight and expertise that greatlyassisted the research. In particular, we thank for the stimulating discussions and the testing of the parameters in real-lifeapplications.
References [1] Kleinmeier, Benedikt and Zönnchen, Benedikt and Gödel, Marion and Köster, Gerta. Vadere: An Open-Source Sim-ulation Framework to Promote Interdisciplinary Understanding. In
Collective Dynamics. 4. 10.17815/CD.2019.21. https://mediatum.ub.tum.de/doc/1303742/1303742.pdf [3] Edward Twitchell Hall. The Hidden Dimension Doubleday, New York. 1990. [4] Isabella von Sivers and Gerta Köster Dynamic Stride Length Adaptation According to Utility And Personal SpaceIn
Transportation Research Part B: Methodological 74 (104-117) . 2015. doi: 10.1016/j.trb.2015.01.009[5] Michael J. Seitz and Gerta Köster Natural discretization of pedestrian movement in continuous space In
Phys.Rev. E 86-4 (046108) . 2012. American Physical Society. doi: 10.1103/PhysRevE.86.046108. https://link.aps.org/doi/10.1103/PhysRevE.86.046108 [6] accu:rate,
Inc.
Pedestrian Simulation Software crowd:it .