CrowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments
CCGI2019 - TVCJ manuscript No. (will be inserted by the editor)
CrowdEst: A Method for Estimating (and not Simulating)Crowd Evacuation Parameters in Generic Environments
Estˆev˜ao Testa, Rodrigo C. Barros, Soraia Raupp MusseAbstract
Evacuation plans have been historicallyused as a safety measure for the construction ofbuildings. The existing crowd simulators requirefully-modeled 3D environments and enough time toprepare and simulate scenarios, where the distributionand behavior of the crowd needs to be controlled.In addition, its population, routes or even doorsand passages may change, so the 3D model andconfigurations have to be updated accordingly. Thisis a time-consuming task that commonly has to beaddressed within the crowd simulators. With thatin mind, we present a novel approach to estimatethe resulting data of a given evacuation scenariowithout actually simulating it. For such, we divide theenvironment into smaller modular rooms with differentconfigurations, in a divide-and-conquer fashion. Next,we train an artificial neural network to estimate allrequired data regarding the evacuation of a single room.After collecting the estimated data from each room,we develop a heuristic capable of aggregating per-roominformation so the full environment can be properlyevaluated. Our method presents an average error of5% when compared to evacuation time in a real-lifeenvironment. Our crowd estimator approach has severaladvantages, such as not requiring to model the 3Denvironment, nor learning how to use and configure acrowd simulator, which means any user can easily useit. Furthermore, the computational time to estimateevacuation data (inference time) is virtually zero, whichis much better even when compared to the best-casescenario in a real-time crowd simulator.
Pontifical Catholic University of Rio Grande do Sul, School ofTechnology, Graduate Program in Computer Science, PortoAlegre, Brazil
Keywords
Crowd simulation, Crowd estimation,Neural Networks.
As new buildings are designed and constructed byengineers and architects, evacuation procedures toassure the needed safety standards are a majorconcern. Evacuation drills are usually used toanalyze and evaluate predefined evacuation plans, butdespite presenting strong similarities with real-worldemergency scenarios [26], they still pose significantethical, practical, and financial challenges to beaddressed [12].Crowd simulation is an interesting tool forevaluating real-world behavior of crowds in controlledscenarios. It can be defined as the process of simulatingthe movement of large amounts of agents, or crowds, ina previously-defined environment. The different ways inwhich crowds can behave has been object of research foralmost thirty years [25], including a variety of fields suchas architecture, computer graphics, physics, robotics,safety engineering, training systems, psychology, andsociology [25,30].Regarding evacuation planning, crowd simulationcan be used to evaluate evacuation plans, given aparameterized environment. For instance, Cassol etal. [3] employed
CrowdSim [10,2], which is a crowdsimulator tested and validated in real-world scenarios,to create and gather data from simulations. They alsoemployed CMA-ES [14,13], an evolutionary algorithmthat varies the population data so that differentportions of the crowd follow different routes.Albeit simple, when considering all possibleevacuation routes an environment can have, a very a r X i v : . [ c s . M A ] S e p Estˆev˜ao Testa, Rodrigo C. Barros, Soraia Raupp Musse large amount of simulations have to be executed,growing exponentially as more details are added to thatenvironment. Even though simulations can run in asimilar time needed for real-world evacuation drills, it isstill the most computationally-demanding step in suchan evacuation planning approach.Hence, this paper presents a method whose goalis to estimate results of evacuation scenarios withoutthe need of actually doing simulations in a complexenvironment within its run-time. For achieving thatgoal, we divide the environment to be analyzed intoa set of smaller connected rooms. We hypothesize thatby estimating the evacuation data on each room, we arecapable of estimating the required information for theenvironment as a whole. For estimating per-room data,we make use of a machine learning approach, namelyArtificial Neural Networks (ANN), which are previouslytrained on data collected from a number of simulationscenarios simulated beforehand. Furthermore, we definea proper heuristic to unify per-room data in complexenvironments that comprise a set of connected rooms.To the best of our knowledge, this is the first workto makes use of a hybrid machine learning and crowdsimulation approach for the task of evacuation planningin generic environments and to compare results withreal-life scenarios.This paper is organized as follows. Section 2 presentsrelated work on crowd simulation and evacuationplanning. Section 3 describes our new approach toestimating parameters for evacuation plans based onmachine learning. Section 4 reports the results of adetailed experimental analysis for validating our newapproach, whereas in Section 5 we discuss our findingsand point to future work directions.
The study and modeling of crowd traffic and theirbehavior, as well as the environment and evacuationcharacteristics is vital to the use of critical spaces [7,23,27,28]. We briefly review some existing papers in areasrelated to the three mains aspects of this paper: crowdsimulation, evacuation planning, and crowd learning.We are not exhaustive in our analysis since the majorityof them are not focused in the exact same problem weaddress on this work, i.e., estimating crowd parametersinstead of simulating it.2.1 Crowd simulationSeveral studies were proposed to elaborate ways ofsimulating crowds in egress scenarios.
SAFEgress (Social Agent For Egress) [5] isa force-based approach that models evacuatingpedestrians which are able to make their actionsaccording to their knowledge of the environmentand their interactions with the social groups andneighboring crowds. MIMOSA: Mine Interior ModelOf Smoke and Action [20] is a specific applicationof agent modeling within the context of a virtualunderground coal mine, with a fire and smokepropagation model, and a human physiology andbehavioral model. The approaches described in [21,1,9]make use of cellular automata to reproduce pedestrianbehavior and exit selection using a least-effort cellularautomaton algorithm, in which the motions and goalsare probabilistic.Van Den Berg et al. [34] propose the method
Optimal Reciprocal Collision Avoidance ( ORCA ),which is used for robots to avoid collisions witheach other. The method searches for the optimalvelocity for each agent to move so all agents movethrough the environment without colliding. For that,it predicts the future positions of other agents andprioritizes velocities that minimize the probability ofthem colliding, ensuring that the agents adopt thevelocities that will result in the lowest number ofcollisions by the time it performed the predictions.Regarding evacuation planning, the work of Cassolet al. [3] makes use of crowd simulation (
CrowdSim )and evolutionary strategy (CMA-ES) to search forthe best configuration of routes for evacuation withina given environment. Similarly, Garrett et al. [11]employ Evolutionary Computation methods to evolvethe placements of exits and other equipment in aneffort to minimize the simulated evacuation time of theenvironment occupants. The simulation is made usingan artificial potential-fields model in which exits attractagents and obstacles and other agents repel them.2.2 Crowd learningTripathi et al. [32] recently surveyed techniques thathave been used in the context of crowd analysis andconvolutional neural networks. In particular, the crowdlearning area is heavily focused on the crowd countingproblem, also called density estimation. Chan et al. [4]create a privacy-preserving system for estimating thesize of inhomogeneous crowds in a video. By segmentingthe video and analyzing features detected betweenframes and regions, the number of people is estimatedusing Gaussian Process regression. Similarly, Fradiet al. [6] extract features from videos and use aGaussian symmetric kernel function to generate a rowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments 3 crowd density map, allowing more specific locations ofpotentially-crowded areas.Liu et al. [22] is the closest approach to our work.They make use of artificial neural networks to learnthe behavior of simulated crowds with the objectiveof replacing simulation with estimations, which isbasically our same goal. However, the authors simulatethe crowd on a fixed environment (walls and routes)containing mobile parts whose disposition varies oneach simulation. The position and rotation of thesemobiles parts are used as input to the neural networkto obtain the statistics of speed, number of collisions,and traveling time of each agent for this environmentand crowd configuration.In this work we propose a methodology forestimating the evacuation of crowds in generic modularrooms using neural networks. These rooms canbe connected to form larger and more complexenvironments, and we also propose heuristics toestimate this environment using the data obtained fromestimating each particular room.
In this section, we describe in details our proposedapproach. First, we present the development of thecrowd simulator that is employed to generate datafor the learning process. Then, we present the processthat was used to validate that simulator. Finally, wedescribe our per-room estimation strategy as well asthe heuristics to unify the estimated results.3.1 Crowd SimulatorTo develop the crowd simulator, we make use of the
Unity3D game engine as a platform and implementedagents endowed with the main inherent collectivebehaviors as referred to in the literature: i) goal seeking , ii) collision avoidance , and iii) least effort strategy behaviors [8,17,18,19,16,29].A goal seeking agent means that the agent will moveinside the environment in order to reach a goal it isseeking. This behavior is simple to implement, just bykeeping a goal position for each agent and moving theagent towards it.When applying a least effort strategy , the agent willmove in trajectories that require less effort, avoidingturns while selecting the shortest paths. This behaviorwas implemented using path finding over a NavMesh , anetwork of connected 3D planes which represents thenavigable area. The
NavMesh used was the native’sfrom
Unity3D . When applying a collision avoidance behavior,the agent will move avoiding physical contact withobstacles and with other agents. In order to do that, weimplemented the
ORCA model [34]. The main goal ofthis method is to find the optimal velocity of each agentso that it manages to move through the environmentwithout colliding with obstacles or agents. It correctsthe course of their movements considering every otheragent’s velocity and position in a future time, reactingpreemptively and avoiding possible collisions betweenthem. We used as the optimization velocity for
ORCA the direction each agent is following toward its goal onthe
NavMesh . For validating our crowd simulation, we compare ourapproach with the original ORCA method. For doingso, we recreated one of the
ORCA ’s showcases availableat the developer’s website [33]. Some images of thisshowcase can be seen in Figure 1.One of the showcases was created to depict theagents’ behaviors using
ORCA to avoid collision andits capacity to move efficiently while looking natural tothe human eye. We recreated this showcase using solelyvisual information from real ORCA cases, and withoutknowing the agents parameters (e.g., agents positionsor speeds), so we expect similar results from our model,though maybe not the same.The showcase consists of 41 agents organized intothree groups, where the agents from each group arepositioned to form the letters of the word “RVO”. Then,they proceed to move down the screen to form the word“UNC”. The group forming the letter “R” moves toform the letter “N” at the end of the showcase, whereasthe one forming the letter “V” goes on to form theletter “C”. Similarly, the one forming the letter “O”follows to forms the letter “U”. Easier movements couldbe made to complete this transformation, however thisspecific movement was chosen in order to promotemore potential collisions, thus requiring the use ofcollision avoidance mechanisms, which is ideal fortesting ORCA. A comparison showing the showcaseand our simulation as well as the movement patterngenerated by both simulators can be visualized inFigure 1. In both cases, the agents succeeded in movingand forming the other word, in a quite similar way.3.2 Estimation of Rooms Parameters based on ANNsThis section presents our model to estimate crowddata resulting from the evacuation process instead ofhaving to simulate it. We are interested on testing
Estˆev˜ao Testa, Rodrigo C. Barros, Soraia Raupp Musse
Fig. 1
Comparison between the
ORCA ’s showcase (left) andour simulation (right). A total of 41 agents are positionedto form the word “RVO”, and then move down the screento form the word “UNC” while avoiding collisions with eachother.
Artificial Neural Networks as a tool to estimatecrowd parameters instead of generating them throughsimulations. The overview of our method comprisesthree phases: i) performing several simulations inorder to generate the training dataset for theANN (see Section 3.2.1); ii) ANN training andvalidation, as discussed in Section 3.2.2; iii) testing thelearning methodology for rooms estimation in complexenvironments (Section 3.3).The room i parameters are described as follows: – W idth i is the room width (meters); – Length i is the room length (meters); – es i is the exit size (meters); – f i is the input flow: agents per second that enterwithin the room; – F i is the flow duration: duration in seconds definingthe period where agents enter the room; – ip i is the initial population: number of agentswhich are inside the room at the beginning of thesimulation.Next, the estimation proceeds by estimating the evacuation total time ( tt i ), in seconds, for the i th room.Details on the estimation procedure is given in thefollowing sections. To create a dataset of simulations that could be used totrain and test the learning algorithms, we automatizethe process of creating rooms. This process generatessimulations based on the input parameters, which arerandomized for each simulation, and it collects dataof the output parameters. Each generated simulationcomprises a rectangular room with a single exit. Inthis paper, we use specifically the scope of rectangularrooms to represent the walkable space in a certainroom and single exits in the training dataset. Wedecided to do so because if we were to include allpossible geometries for rooms and all possible exitnumbers, this would result in a combinatorial explosionof environment possibilities to be simulated.Note that during inference time we can testnon-rectangular rooms with more than one exit. Forsuch, we have to approximate the room by a rectangle,and if we want to consider rooms with more thanone exit, the user has to inform a single exit whosesize is the sum of the size of all available doors. Theroom’s dimensions vary according to the room width and room length parameters, whereas the exit size variesaccording to the exit size parameters.Agents are placed in the room using the initialpopulation , input flow and flow duration parameters.The agents informed in the initial population are thosealready in the room at the beginning of the simulation.They are created and placed in a squared spiral pattern,forming a diamond at the center of the room as moreagents are placed, to avoid agents overlapping eachother. Figure 2 shows agents placed according to thispattern. As the number of agents rises, the area ofthe diamond increases. However, since their positionsare restricted by the size of the room, if no space isavailable to accommodate all agents that are createdit may be inevitable that some agents will start withoverlapping positions. If this happens, agents will tryto avoid collisions among them when the simulationstarts, eventually finding enough space to move withoutcolliding as other agents exit the room.New n agents are created w.r.t to the flowinformation. These agents are created at the entrance inthe opposite direction of the exit in room i , consideringa constant flow defined as: n i = f i × F i , (1)where f i is the input flow defined for room i , and F i is the flow duration for r i . Indeed, we considerthat the input flow in a certain room to be simulatedis constant because we do not have more detailed rowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments 5 Fig. 2
Agents placed in a squared spiral pattern in a 6 × information considering that we are only simulating asingle room. If crowds are self-organized, which is whathappens when people have space and time to adaptto the restricted physical space, their flow tend to beconstant (e.g., already organized in a previous room inthe environment hierarchy) [15] and [24].Regarding the remaining parameters present thesimulation: the space each agent occupies is representedthrough a cylinder with a radius of 0.3 meters andit moves trying to maintain a max desired speed of1.2 m/s. Both of those values are extracted from theliterature [31].To generate the training and validation sets, theparameters of the room were randomly defined withinthe intervals specified in Table 1. We generate 18000rooms for training and 2000 for validation. The testsare presented later in Section 4. Parameter Min value Max value Value Type
Room width width i ) Room length length i ) Exit size es i ) Input flow f i ) Flow duration F i ) Initial population ip i Table 1
Intervals for each parameter in the datasetgeneration process.
We train an ANN to estimate the evacuation totaltime tt i . The training process was performed usingthe Stochastic Gradient Descent (SGD) optimizationapproach for 100 epochs with a 10 e − tt i is estimated, the validationerrors were measured using the absolute relative errorcomparing the predicted value and the simulated value,here considered as the ground truth. We measured thequality of our estimations according to how many caseshad less than 10% error.We experiment with 1, 2, and 3 hidden layers withthe 6 values of input from the dataset, 6 neurons oneach layer and a single output value: the evacuationtotal time estimated. From those models, the one whichachieved the best accuracy was the one with the singlehidden layer. Then we proceeded to test several numberof neurons on this layer. We tested with 2, 3, 6, 50, 200,400 and 500 neurons on the hidden layer and we gotthe best validation accuracy with 400 neurons. Then,we proceeded to train the defined ANN stopping onlywhen no more reduction on the loss was observed innew epochs, even when reducing the learning rate. Theevacuation time in the 2000 rooms estimated by a 400neurons ANN resulted in 91.5% of the validation casesbelow 10% error, as illustrated in Figure 3.The next section describes our heuristic capable ofaggregating per-room information in order to estimatecomplex environments. Fig. 3
Hidden layer with 400 neurons, total evacuation timeerror percentage. Estˆev˜ao Testa, Rodrigo C. Barros, Soraia Raupp Musse e comprises N rooms r to be estimated. We estimate the crowd parametersof each room r i using the ANN for obtaining tt i .Therefore, we have two types of rooms within anenvironment e : i) rooms of type D , whose populationimpacts another room, i.e., people from r D i goes toanother room; and ii) rooms of type E (exit rooms),which are rooms that lead the population to the outputof the environment. Moreover, those two types of roomsare mutually-exclusive, i.e., rooms D never lead to exitsand rooms E never impact any other room in e .Figure 4 presents the overview of our estimationmethod. Note that some parameters are input forthe rooms structure. For instance, r k (room withoutdependent rooms, on the left) has the following inputdata: width k , length k , es k (exit size) and ip k (initialpopulation). In addition, for this specific room the inputflow f k = 0 and flow duration F k = 0 because noagents arrive in such space coming from other rooms.These are the input parameters for running the ANNand it results in tt k (total time of simulation of r k ). Inaddition, variables gf et k (global first exit time) and f et k (local first exit time) are computed using ourheuristics (described later) and impact the next roomin the hierarchy. r i is a room with a dependent room( k ) and it is also a dependent room regarding room j .Because r i has a dependent room, f i and F i are nolonger 0 and are impacted by r k data, as shown inFigure 4. It means that variables gf et k and f et k areused to compute f i and F i , which are then used asinput to the ANN together with the remaining inputparameters: W idth i , length i , es i and ip i to estimate tt i . The same process happens for room j . On the rightside of the figure, we illustrate the simulation processthat happens using the 3D environment, and finallythe measured error can evaluate the correctness of ourestimation process ( Err e ), where e is the simulated andestimated environment. A - Heuristics to Estimate per-Room Data
The environment estimator loads the specifiedenvironment (using the editor presented inSection 3.3.1) and performs the data estimationusing the ANN for each room separately. The ANNoutputs the estimated total time ( tt ) for each room.However, some rooms are dependent on others, i.e., agiven room r k (as illustrated in Figure 4) is impactedby other rooms (type D ) whose population movestowards r k . This is the definition of the set r D k ofdependence rooms that impact r k . That is why somerooms have to be estimated before others. We dealwith this problem by computing global and local-timeparameters in order to synchronize the rooms. Firstwe are going to present the execution flow for roomsthat do not have dependence ( N D k = 0), i.e., the firstrooms within the environment graph.1. Since nobody enters room k coming from anotherroom (as illustrated in Figure 4), then the input flow f k = 0 and the flow Duration F k = 0.2. Once all parameters for r k are set ( width k , length k , es k , ip k — those four coming from the EnvironmentEditor — and f k = 0 and F k = 0), the estimationof r k can happen normally. The neural network isloaded and the total time is estimated ( tt k ).3. In order to provide data regarding the agentsthat leave r k and go to the next room, twoother parameters are computed, f et k and gf et k , asfollows: f et k = (cid:40) , ip k = 0 lengthk MaxSpd , ip k > , (2)where f et i is the first exit time from r k , meaningthe time that the first agent exits that room, and ip k is the number of agents initially created in room k . f et i = 0 if there are no agents inside r k . Conversely,if ip k >
0, the first agent to exit will not need towalk throughout all the room length, so we considerhalf of the room length as an average for all agentsto walk and exit the room. The next equation iscomputed afterwards the ANN execution: gf et i = f et i , (3) rowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments 7 Fig. 4
Overview of the estimation method. The environment graph shows the hierarchy of rooms to be considered and howthey affect other rooms. On the right we have the same environment but modelled in 3D and simulated using our crowdsimulation. In addition, the measured error is also illustrated. where gf et i is the time the first agent exited theroom considering all rooms. For rooms withoutdependence, it is exactly the value of f et i sincethey are those that “start” the crowd movement inthe estimation. Therefore, f et i and gf et i are usedto propagate values to the following rooms in theenvironment. In addition, pop is the final populationconsidered in a given room, i.e., pop = ip + ( f.F ),and for r k without dependent rooms it is set as pop k = ip k .For each room with N D i > i and j in Figure 4), we perform the following execution flow:first, if the room has a dependence ( r D i ) that was notyet estimated, the estimation of this room is postponeduntil all dependents are estimated.1. In order to estimate the population in r i , we needto know the flow of people who enter in thisroom coming from other rooms. In our model,those concepts are represented through the followingparameters: F i (flow duration defined in Equation 4)and f i (input flow defined in Equation 5), whichconsider data coming from dependent rooms ( r D i )as follows: F i = ( max ( gf et D i − f et D i + tt D i )) − min ( gf et D i ) , (4) f i = (cid:80) N Di i =1 ( pop D i .in D i ) F i , (5)where N D i is the number of dependent rooms of i , in D i is the percentage of agents from D i that moveto r i , and pop D i is the population of r D i .2. With the data from all dependents properlypropagated for room i , the neural network canestimate the total evacuation time of such room ( tt i )as detailed before.3. Finally, in order to propagate the agents parametersto the following rooms, parameters f et i and gf et i are computed according to Equations 6 and 7,respectively. Such equations are different fromEquations 2 and 3 because room i has dependents,so pop is considered instead of ip . f et k = (cid:40) , pop k = 0 lengthk MaxSpd , pop k > , (6) gf et i = f et i + min ( gf et D i ) . (7)After we finish the estimation of a certain room r i , this entire process is repeated until all N rooms inthe environment are estimated. Note that these simpleequations have the unique goal of aggregating the flow Estˆev˜ao Testa, Rodrigo C. Barros, Soraia Raupp Musse of population passing through the rooms to computethe global time. The next section presents how suchinformation is aggregated and used to estimate theentire environment.
B - Aggregating per-Room Estimations
The last step of the environment estimation isto estimate the crowd parameter for the entireenvironment based on the per-rooms estimations. Weconsider the exit rooms data (type E ) to estimate the evacuation total time tt e of a specific environment e .Indeed, this is the greatest total evacuation time of M existing exit rooms that represent the exits in theenvironment, computed as: tt e = max ( git E e + tt E e ) , (8)where E e are the exit rooms of the environment e ,and tt e is the obtained total time estimation usingCrowdEst for environment e .In order to evaluate the precision of our estimation,we compare tt e with st e , the latter being the simulationtime obtained with our simulator as discussed inSection 4. The Environment editor is a simple graphicalapplication to allow users to easily create and editenvironments to be used for estimation. It consists ofthe main window divided into two regions, the controlpanel and the canvas, as shown in Figure 5. The controlpanel provides a file menu with options to save thecurrent environment into a file, load an environmentfrom a file, and to clear the current environment. Also,it has a list of available tools and a button to add a newroom to the current environment.
Fig. 5
Environment editor main window, with the controlpanel and the canvas regions. Arrows indicate the connectionsbetween rooms.
The editor allows for the following actions: i) move aroom in the canvas in order to locate and organize it as the user wants; ii) create a connection from one room toanother, indicating that the agents from the first roomwill move towards the second one; and iii) remove anexisting room, together with its connections.It is also possible to select a room and check itsparameters. In this case, a new window will appear, asin Figure 6, showing the room width , room length , exitsize , and initial population parameters along with theconnections presented in the selected room. The valueof the parameters can be modified by the user and theconnections may be removed at any time. Fig. 6
Window for configuring room parameters within theeditor. It shows the values of the parameters for a givenelected room.
This section presents the experimental results.Section 4.1 describes the results when simulating andestimating 20 full scenarios with variable populationdistribution within the rooms. Then, we proceed with apractical usage of our method applying it in a real-lifeenvironment and comment about the usability of ourapplication with real users.4.1 Evaluating Environments with Varied PopulationsFor the first set of scenarios to be tested, we createseveral distinct environments to be estimated andsimulated. Our goal is to show the estimation errorswhen comparing our method for estimation with thefull simulation execution.First, using the Environment Editor, we havemanually created 10 environments to be tested in ourmethod using the application illustrated in Figure 5.These environments, illustrated in Figure 7, comprisea set of consecutive rooms, each of which with itsown width, height, and exit sizes. In order to simulate rowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments 9 those environments, we used our simulator developedat Unity. Figure 8 shows an example of an environmentmodeled using the Unity Engine (on the left) and usingthe Environment Editor (on the right).For each of those environments, we configured twoscenarios, one in which the initial population is placedonly in the initial rooms of the environment (nodependents) and move towards the exit (last room), andother where the same number of agents is distributedthroughout all rooms.When analyzing the results, we note that theaverage errors for the total evacuation time tt forscenarios Sim1 to Sim10 is 20.9%, while the averageerror for scenarios Sim1’ to Sim10’ is 12.6%. The reasonwhy the environments in which people are only placedin the initial rooms (Sim1 to Sim10) have the largesterrors is because crowd simulators can take benefitfrom the self organization of crowds. A populationfixed in the initial rooms of the environment organizethemselves in lanes and other crowd structures fromthe beginning of the simulation, and does not need tochange anymore in most of cases. CrowdEst, in turn,estimates each room separately without benefiting fromthe crowd previous organization, so we can say thatthe worst case when comparing crowd estimation andsimulation is when the simulation takes benefit fromthe crowds’ previous organization (Sim1 to Sim10).4.2 Testing a Practical ExampleIn order to test our method in a practical example,we use the night club as described in [3]. We used thesame 3D environment as illustrated in Figure 9 to definethe environment to be estimated using our editor andsimulate it containing 240 agents, as described in [3].The 3D environment has 3 floors and many rooms.There are rooms that have more than one exit (whichis a feature that our method does not address), so weproceed by simply summing the widths of the doorsto be the exit size value of the room and estimatesuch room using the ANN. Then, in the heuristicstep, we propagate the percentage of population intotheir correct following rooms, since this information ispresent in the scenario. This step considers that thecrowd is exiting by the doors at the same time andthey finish at the same time. Such a decision makesit possible to simulate the night club (and any otherenvironment) using our approach. Nevertheless, it canproduce errors and should be better addressed in futurework. Figure 10 shows the graph generated using theeditor to model the night club (named SM).Table 2 shows the comparison of evacuation timestested in the night club with several methods. On the left we have the evacuation time obtained in thereal drill and simulated using CrowdSim (performedby Cassol et al. [3]). On the right we have resultsobtained with our work, CrowdEst. Note that ourestimator presents an error of approximately +5%error in comparison to the real-life experiment. Hence,our simulation method achieves the lowest error whencompared with our own estimation method and Cassol’ssimulator [3].It is interesting to see that the previous workusing CrowdSim achieves -18%, and it has beenused with experts to guide the crowds in severalreal-life experiments, so the experts consider suchan error to be acceptable in real-life scenarios. Eachsimulation/estimation have been executed 10 times andthe average results are presented in Table 2. Cassol et al. [3]
Our work
Real drill Crowdsim CrowdEst OurSimulEvactime 175s 142s 183 s 176 sRelativeerror -18.85% +4.57% +0.57%comparedwithRealdrill
Table 2
Nightclub evacuation time obtained using differentmethods and comparison with the real-life drill.
In terms of advantages when using CrowdEstinstead of simulations, we present the followingremarks:1. Regarding the modeling of the environment:- was the time to model thenight club in CrowdEst once the user has the floorplan with the detailed information needed from theenvironment;- is the time for a skillful designerto model the 3D environment, once s/he has thefloor plan of the environment.2. Regarding the environment and populationconfiguration:- The time to prepare a 3D geometry to besimulated using a crowd simulator is a complex task.The user has to learn how to operate a simulationsoftware, define rooms to walk, place people andgroups, define escape routes. The time to accomplishthis task using CrowdSim (as defined in [3]) toprepare the night club to be estimated can take weeks , and this needs to be repeated for each newenvironment to be simulated.- Using CrowdEst, we define the population androutes while we define the graph in the editor.
Ten
Fig. 7
Ten scenarios modeled in the crowd simulator for the 20 cases for evaluating environments. In the first 10 cases, thepopulation is in the first rooms of the environments, while in the second set of simulation, the population is distributed alongthe rooms.
Fig. 8
Example of an environment case: five consecutiverooms with different exit sizes. On the left: the environmentat Unity. On the right: the environment at the EnvironmentEditor. minutes was the time to accomplish this task andthe task presented in item 1).3. Regarding the computational time:- The environment estimation is virtuallyinstantaneous, i.e., to estimate the ANN inferencetime takes less than one second (in CPU, sinceour method does not require a GPU).
Fig. 9
Architecture of the nightclub used as base forsimulation and estimation. - As described in [3], a full simulationcontaining 240 agents in the night club executingat 24 frames/second takes around toevacuate the full environment. rowdEst: A Method for Estimating (and not Simulating) Crowd Evacuation Parameters in Generic Environments 11
Fig. 10
Modeling of the SM night club in our editor.
As discussed in [3], we reinforce that if we wantto simulate various distributions of people within thenight club, our method can also be used. We caneasily define the amount of people in the rooms, e.g.,scripting it or using our editor, and instantaneouslyestimate the total evacuation time. Indeed, consideringthe night club that has three bifurcations, depending onthe granularity used in the population distribution (e.g.10% in exit and 90% in the other) we can have morethan 1300 different plans to be executed. As mentionedin [3], approximately 80 from the 1300 possible planswith 240 agents took about 4 hours, and 1,010 agentstook approximately 30 hours to simulate. By usingCrowdEst, we can easily and quickly find out the bestevacuation plan considering only the evacuation time,among the 1331 plans, which takes approximately 22mins of processing.CrowdEst presents an error in comparison toreal-life drills, but so does any crowd simulator. Themain question is not really to achieve error = 0,considering that it is impossible even when comparingtwo different real populations evacuating the samereal-life environment. The main intention is to obtaina realistic result not faraway from the expected one.CrowdEst obtains a 5% error in the only availablepractical example, which is a very promising result. Inaddition, if such results can be provided by a tool thatcan be easily tested, we can imagine one applicationwhere safety personnel can generate the environmentgraph, analyze the estimations, and make available thefiles for the population that is currently in the specificenvironment. Hence, people can learn and be properlytrained for events in an easy and accurate way.
In this paper, we proposed a methodology forestimating the total evacuation time for complex and generic environments instead of simulating it. Weused ANNs to train and estimate data for individualrooms, considering their geometry and population.Then, using such estimations, we propose heuristics toestimate the full environment parameters such as thetotal evacuation time. The approach we used to trainANNs over individual rooms and then aggregating datausing simple heuristics seems quite promising, since weachieve an error of approximately 5% when comparingCrowdEst estimations with a real-life drill.CrowdEst can save weeks (maybe months) of workwhen compared to the simulation approaches. Webelieve our tool is a further step in the direction to haveall environments from real life estimated and tested.Recall that this work is not about simulation, butestimation, so it explains why our paper does not haveany attached videos, as commonly expected in crowdsimulation research.With respect to the limitations of the model: thetraining dataset was created solely with per-roominformation, containing only one entrance and one exitdirectly opposed to the entrance, which may not alwaysbe the case in the environments to be tested. Webypassed this problem increasing the width of doors.One way to improve the versatility of the model andto approach its usability for real cases is to add moreparameters, which are important to define rooms suchas multiple doors and exits. Obstacles are an entire issueby themselves, since there is a lot of information aboutthem: shapes, sizes, positions, orientations, etc, for eachobstacle present within the environment. In order tonot lose too much of the abstraction of the model, wesuggest creating a “level of obstruction” parameter forthe rooms, with a value of 0 meaning the room is free ofobstacles and can be traversed without problems, andincreasing values for improving the obstacles difficultyon the movement of the agents. Defining this parameterwould improve the similarity of the model with realityand we think it is worth a research path of its own.As future work, we want to test CrowdEst in morereal-life environments, besides modeling obstacles andincreasing the number of input parameters for refiningthe ANN estimation.
Compliance with Ethical Standards–
Funding: This work was partially funded byBrazilian Research Agency CNPq (grant number:305084/2016-0) – Disclosure of potential conflicts of interest: AuthorEstˆev˜ao Testa declares that he has no conflict ofinterest, author Rodrigo Barros declares that he has no conflict of interest and author Soraia Mussedeclares that she has no conflict of interest – Research involving Human Participants and/orAnimals: Not applicable – Informed consent: Not applicable
References
1. Aik, L.E., Choon, T.W.: Simulating evacuations withobstacles using a modified dynamic cellular automatamode. Journal of Applied Mathematics (2012)2. Cassol, V., Oliveira, J., Musse, S.R., Badler, N.:Analyzing egress accuracy through the study of virtualand real crowds. In: 2016 IEEE Virtual Humans andCrowds for Immersive Environments (VHCIE), pp. 1–6(2016). DOI 10.1109/VHCIE.2016.75635653. Cassol, V., Testa, E., Jung, C., Usman, M., Faloutsos,P., Berseth, G., Kapadia, M., Badler, N., Musse, S.R.:Evaluating and optimizing evacuation plans for crowdegress. IEEE Computer Graphics and Applications(2017)4. Chan, A.B., Liang, Z.S.J., Vasconcelos, N.: Privacypreserving crowd monitoring: Counting people withoutpeople models or tracking. In: Computer Visionand Pattern Recognition, 2008. CVPR 2008. IEEEConference on, pp. 1–7. IEEE (2008)5. Chu, M.L., Parigi, P., Law, K., Latombe, J.C.: Modelingsocial behaviors in an evacuation simulator. ComputerAnimation and Virtual Worlds (3-4), 373–382 (2014).DOI 10.1002/cav.1595. URL http://dx.doi.org/10.1002/cav.1595
6. Fradi, H., Dugelay, J.L.: Crowd density map estimationbased on feature tracks. In: Multimedia Signal Processing(MMSP), 2013 IEEE 15th International Workshop on,pp. 040–045. IEEE (2013)7. Fruin, J.: Pedestrian Planning and Design. MetropolitanAssociation of Urban Designers and EnvironmentalPlanners (1971)8. Fruin, J.J.: Designing for pedestrians: a level of serviceconcept. Highway Research Record (355), 1–15 (1971)9. Fu, L., Song, W., Lv, W., Lo, S.: Simulation ofexit selection behavior using least effort algorithm.Transportation Research Procedia (0), 533 – 540 (2014).DOI http://dx.doi.org/10.1016/j.trpro.2014.09.093. TheConference on Pedestrian and Evacuation Dynamics 2014(PED 2014), 22-24 October 2014, Delft, The Netherlands10. Galea, E.R.: A general approach to validating evacuationmodels with an application to EXODUS. Journal of FireSciences (6), 414–436 (1998)11. Garrett, A., Carnahan, B., Muhdi, R., Davis, J.,Dozier, G., SanSoucie, M.P., Hull, P.V., Tinker, M.L.:Evacuation planning via evolutionary computation. In:Evolutionary Computation, 2006. CEC 2006. IEEECongress on, pp. 157–164. IEEE (2006)12. Gwynne, S., Galea, E.R., Owen, M., Lawrence, P.J.,Filippidis, L.: A review of the methodologies used inthe computer simulation of evacuation from the builtenvironment. Building and environment (6), 741–749(1999)13. Hansen, N.: A CMA-ES for Mixed-Integer NonlinearOptimization. Tech. Rep. RR-7751, INRIA (2011)14. Hansen, N., Ostermeier, A.: Adapting arbitrary normalmutation distributions in evolution strategies: thecovariance matrix adaptation. In: IEEE International Conference on Evolutionary Computation, pp. 312–317(1996)15. Helbing, D., Buzna, L., Johansson, A., Werner, T.:Self-organized pedestrian crowd dynamics: Experiments,simulations, and design solutions. Transportation Science (1), 1–24 (2005). DOI 10.1287/trsc.1040.0108. URL http://dx.doi.org/10.1287/trsc.1040.0108
16. Helbing, D., Keltsch, J., Molnar, P.: Modelling theevolution of human trail systems. Nature (6637),47–50 (1997)17. Henderson, L.: The statistics of crowd fluids. nature ,381–383 (1971)18. Henderson, L., Lyons, D.: Sexual differences in humancrowd motion. Nature (1972)19. Henderson, L.F.: On the fluid mechanics of human crowdmotion. Transportation research (6), 509–515 (1974)20. Huang, P., Kang, J., Kider, J.T., Sunshine-Hill, B.,McCaffrey, J.B., Rios, D.V., Badler, N.I.: Real-timeevacuation simulation in mine interior model of smokeand action. In: The 23rd Annual Conference onComputer Animation and Social Agents (CASA), pp.312–317 (2010)21. Ji, L., , Qian, Y., Zeng, J., Wang, M., Xu, D., Yan, Y.,Feng, S.: Simulation of evacuation characteristics usinga 2-dimensional cellular automata model for pedestriandynamics. Journal of Applied Mathematics (2013)22. Liu, W., Hu, K., Yoon, S., Pavlovic, V., Faloutsos, P.,Kapadia, M.: Characterizing the relationship betweenenvironment layout and crowd movement using machinelearning. MIG, ACM (2017)23. Ma, W., Yarlagadda, P.K.: Pedestrian dynamics in realand simulated world. Journal of Urban Planning andDevelopment (3), 04014,030 (2014)24. Musse, S.R., Cassol, V.J., Jung, C.R.: Towards aquantitative approach for comparing crowds. Comput.Animat. Virtual Worlds (1), 49–57 (2012). DOI 10.1002/cav.1423. URL http://dx.doi.org/10.1002/cav.1423
25. Nasir, F.M., Sunar, M.S.: A survey on simulatingreal-time crowd simulation. In: Interactive Digital Media(ICIDM), 2015 4th International Conference on, pp. 1–5.IEEE (2015)26. Pauls, J., Jones, B.: Building evacuation: researchmethods and case studies (1980)27. Polus, A., Schofer, J.L., Ushpiz, A.: Pedestrian flow andlevel of service. Journal of transportation engineering (1), 46–56 (1983)28. Schadschneider, A., Seyfried, A.: Empirical results forpedestrian dynamics and their implications for modeling.Networks and heterogeneous media , 545–560 (2011)29. Still, G.K.: Crowd dynamics. Ph.D. thesis, University ofWarwick, Coventry, UK (2000)30. Thalmann, D., Musse, S.R.: Crowd rendering. In: CrowdSimulation, pp. 195–227. Springer (2013)31. Tilley, A.R.: The measure of man and woman: humanfactors in design, vol. 1. John Wiley & Sons (2002)32. Tripathi, G., Singh, K., Vishwakarma, D.K.:Convolutional neural networks for crowd behaviouranalysis: a survey. The Visual Computer(2018). DOI 10.1007/s00371-018-1499-5. URL https://doi.org/10.1007/s00371-018-1499-5
33. Van Den Berg, J., Guy, S.J., Lin, M., Manocha, D.:Optimal reciprocal collision avoidance. URL http://gamma.cs.unc.edu/ORCA/http://gamma.cs.unc.edu/ORCA/