Making unconventional emergent plan for dense crowd is one of the critical issues of evacuation simulations. In order to make the behavior of crowd more believable, we present a real-time evacuation route approach based on emotion and geodesic under the influence of individual emotion and multi-hazard circumstances. The proposed emotion model can reflect the dynamic process of individual in group on three factors: individual emotion, perilous field, and crowd emotion. Specifically, we first convert the evacuation scene to Delaunay triangulation representations. Then, we use the optimization-driven geodesic approach to calculate the best evacuation path with user-specified geometric constraints, such as crowd density, obstacle information, and perilous field. Finally, the Smooth Particle Hydrodynamics method is used for local avoidance of collisions with nearby agents in real-time simulation. Extensive experimental results show that our algorithm is efficient and well suited for real-time simulations of crowd evacuation.

1. Introduction

With the rapid development of society, densely populated places are increasing, and the security safety of the crowds is becoming more and more prominent, and the crowd trampling is an extreme event in natural crowd motion. Due to time and space constraints, it is difficult to complete the whole process of experimental exercises in the real life. Evacuation simulation is using computer to establish an effective simulation scene model to help solve the crowd evacuation behaviour in public environment. It is of great significance to prevent and deal with all kinds of major public safety incidents and reduce personal injury and economic loss [1]. In the real world, the emotional state of an individual plays a vital role in his/her decision-making and is easily influenced by others emotions. This process can be called emotional contagion [2]. In a specific group environment, emotional contagion will have an important influence on individual’s emotions, behaviours, and decisions [3]. For example, during the emergency evacuation of a fire accident, emotional contagion will exacerbate the panic of the individual and prompt an individual to take immediate evacuation measures to reduce the time. Traditional multiagent navigation algorithms, like Reciprocal Velocity Obstacles (RVO) [4], have not considered the emotion of individuals. Emotional Reciprocal Velocity Obstacles (ERVO) model [5] improved the RVO with integrating the emotional effect into velocity decision, but it is limited for path planning. Path planning is one of the core technologies of evacuation simulation, which is used to simulate the behaviour of agents in the emergency scene. With the development of crowd simulation technology, although the traditional path planning method has been improved, the real-time path planning in evacuation simulation still faces many challenges.

Inspired by the above challenge, we proposed a novel evacuation simulation approach based on emotion and geodesic. Specifically, we first discussed the construction of individual emotional models in the process of emotional impact, where the individual emotional intensity, emotional infection, and emotional attenuation in evacuation process are described in detail. Based on the emotional impact method, we can add environmental information into a triangular mesh. By using the optimization-driven geodesic approach on triangle meshes, we could realize path planning in evacuation simulation. The evacuation path can be calculated in real time according to the dynamic state environment information. A complete evacuation simulation system is implemented, and the simulation experiments are carried out for different scenes. The experimental results verify the effective of the proposed model.

In recent years, different types of evacuation simulation models have been proposed to simulate the behavior of evacuation of pedestrians in emergency situations [68]. According to the different objects of concern, these models can be divided into macroscopic [9, 10] and microscopic models [1115]. The former is concerned with evacuating as a whole, assuming that all pedestrians have the same behavior pattern in the evacuation process. The latter is concerned with the simulation of individual behavior of pedestrians, which can generate different individual evacuation details. Compared with the macro model, the micro model can reproduce the influence of individual behavior on the evacuation process and make the simulation results truer. Therefore, the model gradually becomes the mainstream of the current evacuation simulation at home and abroad. This paper is in the micro frame. Under the frame, we focus on the path planning problem in evacuation simulation. Environmental modelling is the preparation of path planning. The evacuation environment is abstracted as a navigation map. The navigation map is usually represented as a graph structure composed of nodes and arcs. Different modelling methods [16, 17] can generate different navigation maps. Path planning means searching a path from the initial node to the target node on the map. In fact, the shortest path planning has become a widely used path planning method. There have been a lot of works on the shortest path planning in the fields of computer and robot. The Floyd algorithm, Dijkstra algorithm, and A algorithm and its variant [18] can effectively find a shortest path on the navigation map.

However, when in a dangerous scene, pedestrians cannot find the shortest path under the influence of many factors and choose the safe area to move forward, or even ignore the optimal escape route to follow the flow passively [11]. The shortest path method is no longer applicable. In order to solve this problem, the extra decision module is introduced to evacuation simulation [15, 19, 20]. The decision module confirms the current subgoal according to the current status of the virtual human and then searches for a shortest path to the target. After arriving at the target, the decision module will continue to choose the next target and repeat until it reaches the security exit. This method can produce a good result when the rule is sufficient and reasonable. But the rule set used by the decision must fully reflect the characteristics of the crowd evacuation behavior under different circumstances and avoid the conflict among different rules. In addition, the local path planning among the subtargets is constantly carried out, ignoring the influence of the global environment information on the path selection.

Compared with the explicit formulation of rules set, the path of individual behavior can be naturally planned by introducing the influence of different factors in the scene directly into the path search process. Toll et al. [21] considered the dynamic population density of various regions in the field environment, and the path of virtual human planning can bypass the crowded area. Jaklin et al. [22] provided a method which can modify the initial path of the plan according to the role identity, and simulate the preference of different individuals to different terrain. The influence of individual emotion on its choice of evacuation path was also reflected in the path planning [23, 24]. The above works considered individual differences in the path planning of pedestrians from different aspects. There is also lack of a path planning method which can take into account the individual psychology, the cognition of the scene, and the ability to act autonomously.

Compared with the real-time path planning method, the optimization method pays attention to the generation of the optimal path in evacuation. This kind of method establishes the optimization function with factors which need to be considered in evacuation and iteratively optimizes it to solve the optimal evacuation route. Usually, the evacuation time is the primary consideration. In recent years, the constraints of the path complexity are also taken into account [1, 25].

The above work can obtain the optimal path to satisfy various constraints; however, the path obtained by the optimization method will be restricted by the constraints considered. Even if sufficient constraints are added, the path generated by this method is too ideal, while the pedestrian in the reality is lacking in the panic and the global environment in the emergency scene. It is difficult to follow such a perfect path, so this kind of method is more suitable for the design of safety route. In addition, the optimization method needs to be solved iteratively. It takes a lot of time to calculate, it is difficult to achieve real time, and it is not suitable for real-time evacuation simulation.

3. Materials and Methods

3.1. Emotional Impact from Hazards and Agents

During the evacuation process, people often choose to stay away from dangerous sources so as not to cause injury to them. The environmental information of pedestrians will directly affect the planning of evacuation routes. We use triangulated mesh to create environmental information and specify a density function to represent the crowd density and information of hazard which will be updated dynamically during the simulation process. The dangerous value of sources to agents is limited, the closer they are to source, the danger is higher, and, to a certain region, the threat decreases rapidly. Assume that the dangerous area is circular, the Gauss function can be used to calculate the hazard value of :where is the -th vertex of the mesh, is the source vertex of hazards on the mesh, and is the danger value in hazard source .

In this paper we use triangulation grid to establish navigation grid and record the area of each triangle. According to the position of agents, we can compute the number of agent in each triangle, then the crowd density of triangle can be calculated using the following:where is the radius of agent which is in the crowd. is the area of the triangle in which the crowd is located. After computing the density, the crowd density information of surface will be stored in the triangle mesh.

Agents are easily affected by the environment and dangerous information in the process of movement; the closer they are to the hazard, the stronger the agent’s willingness to escape the hazard is. At the same time, agents have different reactions to the crowd based on their emotions and environmental factors. In a group environment, the individual is bound to be affected by emotion, but the degree of influence is different. The reason is that the individual has different emotional preferences, the ability to capture emotional clues, and emotional feeling. The group with the same purpose is in the same situation. Although the individual has different degrees of cognition and evaluation to the same stimulus, the emotion of the experience is consistent, only the degree is different. In the calculation of emotional impact, we mainly consider two sources of emotion: special individual emotion and the emotions created by the group. The emotional contagion value of the -th agent at the time of iswhere is the emotional value of the at the time of and is an individual’s attention to the danger value of hazard source in the current position. is the optimistic mood at the time of , expressing the ability of individual emotion to feel positive influence from other groups. is the group emotion, defined as follows: Although crowd emotion is composed of individual emotions, it is not simply a cumulative accumulation of individual emotions. is the leadership coefficient which indicates the influence of ’s emotion on group emotion. defines the influence of on group emotion in a group, and the formula is as follows:

Personality is the unique mental and psychological characteristics of individuals formed in social activities and is different from other individuals. The possible emotional states of include negative emotional state and positive emotional state. Agents who are in positive emotional state are calmer and easier to integrate into groups to reach the destination quickly. The emotion of the agent will be changed with the emotion of the surrounding, in easy step of simulation process, the optimistic emotion of also will be updated with a certain randomness, and the formula is as follows: where is the change value of indicates optimistic emotion, which can be calculated by the following formula: where is the number of agents who could affect the emotion of . represents the coefficient factor of an agent’s optimism. indicates the optimistic emotion value from other agents around , and it can be calculated by the following formula: where is the crowd density of triangle that can be calculated by (2). The weight value of an agent that has emotions is calculated using the following:

takes a value in the range . is composed of two emotions. The two emotions, which are orthogonal dimensions of the emotion space and selected from the OCC model [26], are hope and fear. An agent’s emotion is a two-dimensional vector, where each dimension is represented by an emotion: The variable of (9) can be calculated by the following:where , is the hope emotion and is the fear emotion. Generally, agents will choice a suitable way to escape the dangerous area based on their own emotional state and environmental information. There are always two ways: one is to join an appropriate group and follow the leader to evacuate, and the other is to choose the shortest path to move away from the dangerous area and avoid the crowd. When the agent meets a crowd, the value of the agent following the crowd is calculated as follows: is an adjustment coefficient. The way to update the action of an agent can take the following rules: if , the agent will keep away from the crowd and take the crowd as an obstacle to recalculate the appropriate path. If , the agent will back out the original path planning and join into the crowd and evacuate with others.

3.2. Geodesic Path with Non-Uniform Density

Let be a triangulated polyhedral surface in , defined by a set of vertices, edges, and faces. Given two points , there are infinitely many paths between them. Our task is to calculate the shortest path that passes the obstacles and meet other given requirements. Let us assume the mesh with obstacles have different density with the other base mesh. We use the optimization-driven approach [27] to compute geodesic paths on triangle meshes with nonuniform density setting. Let us assume and are the endpoints of the edge , as shown in Figure 1; the initial path (shown in red) through the face sequence can be described by , where is the intersection point between the geodesic path and the -th edge in the face sequence. Then can be represented by a scalar so that .

We will discuss the case where the base mesh has a non-uniform density function defined on the surface, as Figure 2 shows. Typically, each polygonal face has a constant density value . In this case, the total path length is given bywhose gradient with regard to iswhere denotes the density in the face containing the line segment . It is easy to know that the path tends to go through the area with a low density. The density value of the affected triangle meshes around the hazard source can be calculated by (1). If there is a crowd in scene, the density of triangle can be computed using (2). When the agent meets the hazards or crowds, it will update moving path according to its self-emotion, crowd emotion, and the new geodesic path. The pseudocode of computing geodesic is shown in Algorithm 1.

Input: A triangle Mesh ; two points and an initial path between them; A error tolerance .
Output: A geodesic path between and .
Calculate the hazard value of using equation (1)
Calculate crowd density of triangle using equation (2)
Set density function of according to and
Compute the current length of initial path
while    do
Compute the length of path using equation (13)
Compute the gradient of length using equation (14)
Get the resulting path;
Collect the vertices on the path;
Traverse and update the face sequence such that each is on the other side of the new face sequence.
Compute the new length of path
3.3. Collision Avoidance

Collision avoidance is a way to avoid collisions with other nearby individuals by adjusting their own moving velocity. In the evacuation simulation, these interactions including attraction, repulsion, and friction play key roles in agent evacuation behaviours, speed, and efficiency. It is necessary to adjust the local position of each agent by combining the potential force toward the target and the interaction force among agents to achieve collision avoidance. The final force of agent to control the moving can be calculated as follows: where is the local position of and is the target position, and is the potential force of moving to the target position. is the interaction force between each agent is calculated by using the Smoothed-particle hydrodynamics (SPH) method proposed by Gingold and Monaghan [28, 29]. SPH is a well-known computational method used for simulating the mechanics of continuum media, such as solid mechanics and fluid flows. Unlike grid-based techniques, SPH creates a free surface and pressure from weighted contributions of neighbouring particles rather than by solving linear systems of equations. The reciprocal influence between each agent is equal to the weighted average value of the interaction forces among agents in their scope of view. The interaction force of on position can be calculated by Coulomb’s law [30]. where is a weight function, also could be called smooth kernel function and be expressed as follows: and are constant coefficients and is the position of other who can interact with in feasible range. In our experiment of crowd evacuation simulation, taking , . When using the SPH method to calculate the force, it is important to search other agents in the agent’s scope and the time complexity is , where is the number of agents. The computational efficiency decreases slowly with the increasing rate of . In order to improve the computational efficiency, we use the Approximate Nearest Neighbor (ANN) method [31] to find the agents in its self-scope.

4. Results and Discussion

We implemented and experimented with our algorithm on a computer with a 64-bit version of Win7 system, a 3.07 GHz Intel(R) Core(TM) i7 CPU, and 6 GB memory. The coding language is C++. We shall use extensive experimental results to exhibit demonstrate the algorithm’s efficiency, as well as its insensitiveness to scene resolution, and its robustness to small surface variations and topology. To demonstrate specific features and analyze capability of our method, we carry out the evacuation simulation in different scenarios.

To demonstrate the path planning algorithms efficiency, we developed a program to automatically generate triangulated mesh for scenes and simple interface for users to interactively specify obstacle regions. The radius of agent is set to ; other parameters in our system are set experimentally: ,  ,  ,  ,  ,  . To measure the geodesic algorithm performance, we randomly sample 1K pairs of vertices to take down the average computation time and the max computation time. As shown in Table 1, for scene with around 20K faces, our algorithm takes s averagely to compute a geodesic path and can be used for real-time path planning.

4.1. Evacuate Simulation under Different Scenarios

Our method can handle mesh information changes during the simulation. Taking a simple scenario shown in Figure 3 as an example, a group evacuate from sources to targets with the geodesic path which is calculated based on obstacles and hazard information. This scene has units with triangulated faces and two exports. The group with a leader move from the source position to the target position , respectively. As shown in Figure 3(a), there are some obstacles in the scene; we set density in the region where the obstacles are located and can get the geodesic path in real-time. The geodesic is the shortest path, so the crowd can reach their destination as quickly as possible under their own speed. In Figure 3(b), we add an explosion hazard in the region and agents without emotion will keep moving along the original planned directions. In Figure 3(c), we add the sample hazard into scene and agents with emotion impact, the agents will recalculate their moving path to escape away from the hazard source. We also specify a dangerous factor to the affected triangulation faces and can get the safety geodesic path less than seconds. The simulation results show that the crowd completely avoids the hazards and obstacles.

We also simulate evacuation behaviors in a crowd with the following hazard situations: persistent hazards occur at different moments time. The simulation runs in a simple maze field with two exits. Figure 4 shows some snapshots of crowd movement in this simulation. All the agents move randomly at the beginning of simulation. If a persistent hazard occurs at a specific time as shown in the -th frame of Figure 4(a), those agents will keep far away from the hazards continually as long as they evacuated to an exit along the geodesic path. When another persistent hazard occurs at the evacuating exit as shown in the -th fame of Figures 4(a) and 4(b), all the agents will escape away from both of the hazards and choose to evacuate from another safe exit.

In order to validate the effectiveness of individual emotions and group information, we run crowd simulations in a scene with a crowd and agents with different emotions. There are four obstacles in the scene and each agent has different emotional values and . The agents with and in red circle choose to stay away from the crowd for evacuating. We use (2) to set the crowd density value in the region where the crowd is located when calculating the geodesic path for those agents. In Figure 5, when the agents in the red circle see a group of crowd in scene, the crowd is seen as an obstacle, and the geodesic path is recalculated for evacuating. On the contrary, the agents with and in the blue circle choose to join the crowd and move forward with the crowd.

4.2. Analysis of Emotional Impact

Some simulations of crowd movement with and without emotion model, shown in Figure 6, are used to validate the effectiveness of emotional impact in our method. As shown in Figure 6(a), agents without emotion will keep moving along the geodesic path rendered in red line. In contrast, the agents with emotion will replan the evacuation geodesic path to escape away from the hazards even when they have not reached the nearby region of the hazard, as shown in Figure 6(b). As we can see from Figure 6, the crowd movement in a hazard environment is affected by the panic emotion significantly.

4.3. Comparisons with Other Methods

We compare our algorithm with RVO algorithm in a maze scene with some hazards and multigroups. The effect in Figure 7(b) evacuation result using RVO method, Figure 7(a) is the result of using our algorithm. Figures 7(a) and 7(b) are frames of the same time in the simulation process, they can be observed that if the RVO method is used, agents with similar positions tend to concentrate on the exit and cause blockage. By using our method, we can get all the possible paths in the scene by setting the emotional value of agents. The 40th frame of Figures 7(a) and 7(b) shows that when the evacuation time comes to the end of the simulation, there is still a local blockage in the simulation results of RVO methods and the simulation with our algorithm is close to the end of evacuation.

We use the same scenario with different numbers of agents from to to evaluate its performance and compared it with two representative methods: Reciprocal Velocity Obstacles (RVO) algorithm [4] and Emotion Reciprocal Velocity Obstacles (ERVO) algorithm [5]. Figure 8(a) shows the timing statistics and Figure 8(b) shows the Frames Per Second (FPS) statistics, from which we can clearly see a performance advantage compared with the existing algorithms, whether it is simulation time or FPS.

5. Conclusions

In this paper, we analyzed the importance of exploring the model of emotional impact and evacuation simulation. In view of the deficiencies in the emotional simulation of the population, a model of crowd emotional evacuation is proposed from the perspective of social computing, and a real-time path planning method is proposed for the application of evacuation simulation. The results are as follows.

(1) In the process of constructing emotion model, we fully take into account the effect of personality, emotion, and crowd emotion. The influence of group emotion and special individual emotion on the emotional experience of virtual individuals is taken into account in the intensity of emotional infection.

(2) The individual emotion in the crowd is divided into two types of positive and negative emotions. The key to emergency management of the crowd needs to control the infection of negative emotions in the crowd and avoid the crowd in the negative state.

(3) Based on the emotion method, we can add environmental information into a triangular mesh and use the optimization-driven geodesic approach on triangle meshes, we can realize path planning in evacuation simulation.

The evacuation simulation of dense crowd is a challenging research topic, and there are many problems worthy of further study. The work of this paper is still to be further deepened. The next step is to combine computer vision technology to collect crowd motion parameters and supplement the experiment of crowd calculation.

Data Availability

The simulation data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.


This work is supported in part by the Science and Technology Plan Project of Zhejiang (LGG18F020001, 2017C33079), NSF of Zhejiang (LY17F020002), Philosophy and Social Sciences Project of Zhejiang (19NDJC0103YB), and NSF of Ningbo (2016A610040, 2016A610042, 2017A610120).