Recent Advances on Human Crowd Simulation

—Human crowd simulation is a new technology in the virtual reality field. Since it could simulate evacuation, it has strong demands in risk assessment for public buildings. In this paper we discuss the development of the main related research topics, including semantic description for virtual environments and crowd models which generate continuum human flow. Additionally, we introduce a system named Guarder that is designed for human crowd simulation and is suit for simulating evacuation in public buildings. We also demonstrate some simulation results of Guarder to show that it could efficiently simulate evacuation in a large-scale and complex environment.

Human crowd simulation constitute of several important areas.There are environment representation, crowd model, visualization and etc.
1) Environment representation is the basis of crowd simulation, because the virtual human chooses the path and action according to his/her location and surrounding information.For example, sensing obstacles and other people to make avoidance, keeping standing pose in escalator and walking on flat surface.2) Crowd model is the main problem of crowd simulation which generates path, behavior and locomotion for each virtual human according to the information of a given environment.3) Visualizing the results of crowd simulation in 3D scenes includes creating 3D models of virtual crowds, animating each virtual human according to the given path and motion state, and then rendering the dynamic crowd scenes.It is an important way for demonstration and further analysis.In this paper we discuss the development of the main related research topics, including semantic description for virtual environments and crowd models.
Although there has been some commercial systems, like EXODUS [1], Legion [2], Myriad [3] and Massive Software [4], which are designed for simulating evacuation, their technical details have not been published and can't be used as the basis of the further research.In this paper, we also present a system named Guarder that is designed for human crowd simulation and is suit for simulating evacuation.
The reminder of this paper is organized as following: The problems of environment representation, crowd model are discussed in section 2 and 3 respectively.The system Guarder and its results are introduced in section 4. Finally, we give our conclusions and ideas for future work in section 5.

II. REPRESENTATION OF THE ENVIRONMENT
The cooperative relationship between the virtual humans and the environment is essential in crowd simulation.Pedestrians need perceive their surroundings and react appropriately.Many issues need be solved, for example, which features of the objects or the regions need to be modeled, how to organize large number of objects and facilities, and which kind of representation of the topologic relations can support efficient and accurate query.And the environment used in practical project is very complex and usually has more than one floor such as railway station, subway station and office buildings.In this kind of environment, separate floors are connected by stairs or escalator and each story contains lots of objects.Therefore a reasonable and efficient environment modeling framework is urgently needed to deal with this kind of complex situation.

Environment Representation Related Methods
In crowd simulation, the representation of the environment is deeply concerned with the problem of navigation.And navigation is probably the most crucial behavior for crowds that can be simulated on a computer [5].
Bayazit et al. presented a graph-based roadmap containing topological information and adaptive edge weights for global planning [6].Sung et al. employed a fast path planner based on probabilistic roadmaps to navigate characters through environments [7].Lamarche and Donikian presented a hierarchical path-planning algorithm based on topological precomputation [8].Sud et al. used Voronoi graphs to compute and update navigation graphs [9].Yersin et al. presented a hybrid architecture in which different regions exploit different planning algorithms according to their level of interest [10].Sud et al. used adaptive roadmaps to perform dynamic, global path planning simultaneously for independent agents [11].A two level navigation algorithm that combined a global roadmap and local planning method based on RVOs was introduced by van den Berg [12].Though each of the above mentioned techniques could be used to navigate many agents in a virtual world, none of them exhibited application results in multi-layered complex urban space which is very common in evacuation.
Pettre et al. [13] proposed a novel navigation planning algorithm which could extract topologic information automatically and recognize walk able regions from geometric model of an uneven and multi-layered virtual environment, however, it is difficult to gain full-scale knowledge of objects and regions if there is no hand-marking but only use the geometric database directly.
As far as we know, few existing techniques have used to simulate crowds in multilayered complex environments.Most of them only considered simple environments with few rooms or open scenes.
In [14,15], Shao and Terzopoulos modeled the virtual environment as a hierarchical collection of maps.With each of these maps designed for different purpose, the combination can support accurate and efficient environmental information storage and retrieval.As far as we know, this is the only one explicit environment model used in crowd simulation but it didn't consider the special features of regions and objects in synthetic spaces.

A Semantic Environment Model for Crowd Simulation in Multilayered Complex
We present a novel hierarchy environment model to represent multilayered complex virtual environment and ease the simulation task in such environment in ref [16].It is illustrated in Fig. 1, which includes comprehensive and sufficient environment information for simulating crowd in complex environment.We subdivide this model into three layers and will introduce them respectively in following paragraphs.

Geometric Level:
The geometric level is the basis of our entire environment model.The main part of this layer is 3D geometric model of the environment that is employed for display and the semantic information extraction for the next semantic representation layer.
Semantic Level: The semantic layer is composed of structure map, topologic map and height map which help us to identify or query semantic information of the environment.
Structure map: In a complex environment, there are numerous objects, like handrails, walls, windows, pillars and so on, distributed widely in different regions.In order to facilitate organization and implementation, we divided the whole space into several independent but adjacent regions according to common sense.We called these naturally separated regions, like an entire floor, stairs, or a corridor, as Block, and all the objects placed in the same region are included into the same block.All blocks along with their objects are organized into structure map.
Topologic map: Topologic map is mainly used to store and retrieve the connective relations between separated regions (blocks).Each node in the topologic map corresponds to one block.We will add a directed edge from node A pointed to node B if individuals can move from Block A to Block B. The directed edge in a topologic map is used to indicate the connectivity between blocks.
Height map: The environment height coordinates are indispensable for crowd animation especially in multilayered environment.It is a common way to store digital surface elevations through height map.And we can get 3D position of any points on the surface where the height map is covered.
Application Level: For the purposes of providing efficient interaction between pedestrians and the environment, we will rely on the information of semantic level to generate some high-level maps such as object perception map, individual perception map and individual path map in the application level.
Object perception map: In our model, entire environment is divided into several blocks and each block maintains a list of all objects placed in this region.If we want to fetch all objects in a small sub-region, we have to check each object in the object list one by one.To avoid these repeated operations, we map the 3D sub-space of each block onto a horizontal uniform grid.And each cell of the uniform grid records all the objects overlapped  with this small area.As a result, we could just search the object list of several cells instead of the whole list.
Individual perception map: Like object perception map, a two-dimensional uniform grid in every block is used to store all the individuals located at the block.Each grid cell keeps an individual list that occupied in its small area.Once we update individual's new position, we then refresh the individual list of the cell where the pedestrian currently placed.The main purpose of the map is to empower the efficient query of nearby pedestrians, and it also facilitates trajectory tracking for the analysis of crowd flow characteristics.
Individual path map: Many of the crowd simulation systems are goal-directed.Each individual will be assigned a goal when the individual is initialized.We need to find a global path for every pedestrian according to their initial and target locations.Using our block based topologic map, a relative less nodes can lead to quick search and generate individual path map.Some semantic information of two practical public places are illustrated in Fig. 2.

Crowd Model Related Methods
Crowd simulations model the motion of crowd from two different perspectives, agent-based and continuum dynamics.
Agent-based crowd simulation was first introduced by Craig Reynolds and defined boid flocks in terms of interacting particle systems [17].In his model, simple local rules could help to generate complex flock behaviors.Reynolds later expanded his work with additional behaviors such as seeking, pursuit and evasion [18].Brogan and Hodgins proposed an animation algorithm for controlling the movements of creatures with significant dynamics [19].Sociological aspects were taken into account to simulate crowd behavior by Musse et al. [20].Additionally, psychological effects were considered for obtaining agents' actions by Pelechano et al. [21].Shao and Terzopoulos integrated cognitive components with a rule-based model to attain fully autonomous pedestrians in a large urban environment [14].Many crowd simulation methods have been derived from the social force model presented by Dirk Helbing [22,23].This model assumed a mixture of socio-psychological and physical forces that influence crowd behaviors in panic situations.Hengchin Yeh et al. introduced the concept of composite agents to model emergent behaviors among individual agents [24].Since procedures of human cognition and reasoning are very complex, the computation cost for each individual is large.Most of aforementioned models have been designed as a locally controlled model to decrease the complexity.They prevent collisions locally by changing movement when other people get sufficiently close, which leads to unrealistic path changing especially in cross-flowing situation.
Continuum methods were inspired by fluid dynamics.Hughes introduced a model that describes crowds as a continuous density field and presented a dynamic potential function to guide the density field optimally toward its goal [25,26].Treuille et al. transformed Hughes's continuous density field into a particle description of the crowd and developed a full set of continuous dynamics for this representation [27].Compared to agent-based methods, continuum methods allow simulating thousands of pedestrians in real-time.Moreover, they unify local collision avoidance and global planning in one simulation framework, thereby solve inherent conflicts naturally and exhibit smooth individual motion [27].Additionally, Narain et al. presented a hybrid continuum-based method for capturing both the discrete motion of each agent and the macroscopic flow of the crowd [28], which suggests a way to combine two different perspectives.
Although, there are numerous crowd models designed for various purposes and applications, when the environment become complex as we discussed in the last section, things become tough.Thus, more investigation is urgently needed to deal with this kind of environment.

A Continuum Crowd Model in Complex Environments
We present a novel crowd model for generating continuum crowd flow in complex environments in ref [29].Our method is based on the continuum model proposed by Treuille et al. [27].Compared to the original method, our solution is well-suited for complex environments.First, additional discomfort zones around obstacles are auto-generated to keep a certain, psychologically plausible distance between pedestrians and obstacles, making it easier to obtain smoother trajectories when people move around these obstacles.Then, we propose a technique for density conversion; the density field is dynamically affected by each individual so that it can be adapted to different grid resolutions.The experiment results will be showed in the next section.
Smoother trajectories around obstacles: When navigate virtual humans in an environment, they will try to avoid any collisions with obstacles; in real life, people will not walk too close to the border of obstacles but maintain a certain distance.Treuille et al. [27] suggested predictive discomfort for collision avoidance with moving objects.We extended this idea to address our problem by adding a small amount of discomfort around the obstacles according to following equation: (1) This discomfort causes people to avoid the surrounding region near obstacles; moreover, we found this approach obtains smoother individual trajectories as people move around obstacles.
In Eq. ( 1), Γis a set of points on an object convex polygon, x=<x 1 , x 2 In addition, this part of the discomfort value could be calculated in advance so that it did not add additional real-time system overhead.A comparison of results is shown in Fig. 3.
> denotes the center point of a grid cell, σis the adjustment factor, κis the width factor and denotes the range of the influenced area (in this work, we used κ= 1) and is the max-norm distance.According to this equation, if the max-norm distance between a grid cell and an obstacle is shorter, the discomfort value of the cell will be larger.Individuals will try to avoid walking in regions with large discomfort value; therefore, they will maintain a certain distance from obstacles, such as walls and pillars.The left image in Fig. 3 depicts the original result, without the proposed improvement.In the absence of obstruction from other individuals, the tested virtual human nearly moved along the shortest path, and his trajectory was obviously inflexible.In contrast, the improved result (shown in the right image in Fig. 3) showed a smoother and visually more plausible human trajectory than did the original result, especially in the corners.
Density conversion: In our application, we found that the original continuum model is appropriate for application to a wide range of scenarios if the grid length l is suitable (for instance, if l=1).However, the scenario for our project is very complex and features numerous obstacles and small passages; thus, the cell size needs to be very small (sometimes 0.25 m).In this case, the density conversion function proposed in Ref. [27] would not appropriately reflect the actual impact of an individual on nearby cells, so artifact intersection would take place frequently and would not be resolved by the grid.
As illustrated in Fig. 4, the influence field with respect to the location of the people obviously exceeded the four cells (green cells in Fig. 4) selected by the original method because the cell size was too small.We have defined a new density conversion technique comprised of the following steps.First, we detect an influence factor σfor every individual, according to his radius and the grid size: (2) Where r i denotes radius of the i th Secondly, we find the closest cell center [i, j] for each person whose coordinates are both less than that of the person.person and l is the cell size.
Finally, the person's density is then added to these grids, indexed by as (3) where a is the adjustment factor.We can prove that this piecewise function is continuous because each piece is continuous throughout its domain and the first derivatives of the two constituent functions are equal at x=0.5.An example graph of this density function is illustrated in Fig. 5, where a = 0.8 and σ=1.

IV. SYSTEM GUARDER AND APPLICATIONS
We have developed a simulation system named Guarder based on our semantic environment model and continuum crowd model.In addition, we also developed a tool for efficiently modeling the environment, which semi-automatically manipulates on 3D geometric model.Depend on this tool we can quickly make a semantic file which will be loaded in our crowd simulation system.Consequently, with a single 3D geometric model, we can easily start a simulation task through this set of software in several hours.Some real public buildings have been tested in our system including a subway station, a multi-layered office building, an open-air plaza and etc.We elaborately rebuild the most elements of these scenes and accomplish many tests for different human flows.Currently, real time computation is not the system request but our system is capable of replaying simulation results with ten thousands pedestrians in real time.Exactly, in our system we can save the simulation records of more than 50,000 people in 30 minutes and replay it in real-time.Our tests ran on ordinary PC with Intel Core2 Duo E8300 (2.83GHz), 3.5G RAM, NVIDIA GeForce 8800GT (512MB video Memory).
Fig. 6 and Fig. 7 show the simulation results in a subway station and an office building.As shown in Fig. 6, the first scenario is a big urban subway station in a city that is comprised of a capacious platform and a station hall connected by four escalator and four stairs.During the great events, the number of passengers will rapidly increase, thus the station faces a security risk.So we hope to simulate some extreme instances.As shown in Fig. 7, the second place is a seven-storey office building.If a fire accident happened, more than two thousand people working in here need evacuate from this building.And we hope to simulate an evacuation process in a fire drill.

V. CONCLUSION
In this paper we discuss the development of the main related research topics to human crowd simulation, including semantic description for virtual environments and crowd models.We also survey some of our recent work which is very suited for human crowd simulation, especially for evacuating simulation.We introduce a system named Guarder based on these methodology and some results of it.
For further work, we think there are topics need to be investigated.
First, panic is one of the most important factors which affect the processing of evacuation.Thus, modeling panic  systemically will enhance the realistic of simulation.
Second, conducting by policemen or other organizers is very common in evacuation and is also one of most important factors which affect the processing of evacuation.Therefore, modeling the behavior of them and computing their influence to the crowds will be necessary for further works.
(a) An urban subway station.(b) A seven-storey office building.

Fig. 2 .
Fig. 2. Some semantic information of two scenarios (3D geometric models, colored blocks and sketch map of objects are illustrated from left to right).

Fig. 3 .
Fig. 3.A comparison of trajectories around the obstacles (left: the original result; right: the improved result).(Color Plate 4)

Fig. 4 .
Fig.4.The influenced cells selected by the original method, which is insufficient, according to the radius of an individual (selected cells are green, and red circle is the bounded radius of an individual).(Forinterpretation of the references to color in this figure legend, the reader is referred to the web version of this article.).

Fig. 5 .
Fig. 5.An example graph of the density function (the horizontal axis denotes x, and the vertical axis denotes density ρ).