# An Evacuation Route Model of Crowd Based on Emotion and Geodesic

Authors: Bangquan Liu; Zhen Liu; Dechao Sun; Chunyue Bi
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

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.


---

## Body

## 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.


## 2. Related Work

In recent years, different types of evacuation simulation models have been proposed to simulate the behavior of evacuation of pedestrians in emergency situations [6–8]. According to the different objects of concern, these models can be divided into macroscopic [9, 10] and microscopic models [11–15]. 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ψi of pi:(1)ψi=12πexp-vi-v02/2×ψ0where vi is the i-th vertex of the mesh, v0 is the source vertex of hazards on the mesh, and ψ0 is the danger value in hazard source v0.In this paper we use triangulation grid to establish navigation grid and record the areas 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:(2)ρ=∑πri2swhere ri is the radius of agent which is in the crowd. s 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 valueIi(t+1) of the i-th agent AGi at the time of T+1 is(3)Iit+1=Pit×ϖ×ψd+1-ϖ×GE×Iit+Iitwhere Ii(t) is the emotional value of the AGi at the time of T and ϖ is an individual’s attention to the danger value ψd of hazard source in the current position. Pit is the optimistic mood at the time of t, expressing the ability of individual emotion to feel positive influence from other groups. GE is the group emotion, defined as follows:(4)GE=∑βi×μi×Iit Although crowd emotion is composed of individual emotions, it is not simply a cumulative accumulation of individual emotions. βi is the leadership coefficient which indicates the influence of AGi’s emotion on group emotion. μi defines the influence of Agenti on group emotion in a group, and the formula is as follows:(5)μi=Pit∑i∈GPitPersonality is the unique mental and psychological characteristics of individuals formed in social activities and is different from other individuals. The possible emotional states ofAGi 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 Pit of AGi also will be updated with a certain randomness, and the formula is as follows:(6)Pit+1=Pit×1+αp where αp is the change value of indicates optimistic emotion, which can be calculated by the following formula:(7)αp=∑i=1NpλpiNpχp where Np is the number of agents who could affect the emotion of AGi. χp represents the coefficient factor of an agent’s optimism. λp(i) indicates the optimistic emotion value from other agents around AGi, and it can be calculated by the following formula:(8)λpi=1-η×1-ρ 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:(9)η=α1+Bebωη takes a value in the range [0,1]. ω 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:(10)Π=ψH,ψF The variable ω of (9) can be calculated by the following:(11)ω=ψH-ψFwhere ψH+ψF=1, ψH is the hope emotion and ψF 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:(12)Tflow=Q∑i=1NpIitQ is an adjustment coefficient. The way to update the action of an agent can take the following rules: if Tflow<Pt, the agent will keep away from the crowd and take the crowd as an obstacle to recalculate the appropriate path. If Tflow>Pt, 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

LetS be a triangulated polyhedral surface in R3, defined by a set of vertices, edges, and faces. Given two points s,t∈S, 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 vei(1) and vei(1) are the endpoints of the edge ei, as shown in Figure 1; the initial path (shown in red) through the face sequence Γ can be described by (s,p1,p2,…,pk,t), where pi is the intersection point between the geodesic path and the i-th edge ei≜(vei(1),vei(2)) in the face sequence. Then pi can be represented by a scalar λi∈[0,1] so that pi=(1-λi)vei(1)+λivei(2).Figure 1
A discrete path(s,pi,pi+1,…,pk,t) can be encoded using the face sequence.We will discuss the case where the base mesh has a non-uniform density function defined on the surface, as Figure2 shows. Typically, each polygonal face fi has a constant density value ρ(fi). In this case, the total path length is given by(13)LΓ;λ1,λ2,…,λk=ρsp1→sp1→+∑i=1k-1ρpipi+1→pipi+1→+ρpkt→pkt→,whose gradient with regard to λi is(14)∂L∂λi=v12-v11,ρsp1→sp1→sp1→-ρp1p2→p1p2→p1p2→,i=1vi2-vi1,ρpi-1pi→pi-1pi→pi-1pi→-ρpipi+1→pipi+1→pipi+1→,1<i<kvk2-vk1,ρpk-1pk→pk-1pk→pk-1pk→-ρpkt→pkt→pkt→,i=k,where ρ(AB→) denotes the density in the face containing the line segment AB→. It is easy to know that the path tends to go through the area with a low density. The density value ρ(fi) of the affected triangle meshes around the hazard source p0 can be calculated by (1). If there is a crowd in scene, the density ρ of triangle fi 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.Algorithm 1:An optimization based method for computing the shortest path with hazard information.
Input: A triangle Mesh S; two points s,t∈S and an initial path between them; A error tolerance ϵ. Output: A geodesic path between s and t. Calculate the hazard valueψi of pi using equation (1) Calculate crowd densityρ of triangle fi using equation (2) Set density functionρ(fi) of fi according to ψi and ρ Compute the current lengthLt of initial path LetLt-1=0 while  Lt-1-Lt>ϵ  do Let Lt-1=Lt Compute the length of path using equation (13) Compute the gradient of length using equation (14) Get the resulting path; Collect the vertices vi on the path; Traverse and update the face sequence such that each v∈vi is on the other side of the new face sequence. Compute the new length Lt of path endFigure 2
The green path is geodesic path assuming the density is uniform on the surface, while the blue path is geodesic path in the densityρ=5 set on red faces and the other with ρ=1.


### 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:(15)FXi=1pXt-pXi×FdirveXi+pXt-pXi×FrepulseXi where p(Xi) is the local position of agenti and p(Xt) is the target position, and Fdirve(Xi) is the potential force of agenti moving to the target position. Frepulse(Xi) 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 Frepulse(xi) of agenti on position xi can be calculated by Coulomb’s law [30].(16)FrepulseXi=∑k=1KmkFrepulsexkρkWxi-xk where W is a weight function, also could be called smooth kernel function and be expressed as follows:(17)Wxi-xk=αe-pxi-pxk/βpxi-pxkα and β are constant coefficients and p(xk) is the position of other agentk who can interact with agenti in feasible range. In our experiment of crowd evacuation simulation, taking α=1, β=1. 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 O(n2), where n is the number of agents. The computational efficiency decreases slowly with the increasing rate of n. In order to improve the computational efficiency, we use the Approximate Nearest Neighbor (ANN) method [31] to find the agents in its self-scope.


## 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ψi of pi:(1)ψi=12πexp-vi-v02/2×ψ0where vi is the i-th vertex of the mesh, v0 is the source vertex of hazards on the mesh, and ψ0 is the danger value in hazard source v0.In this paper we use triangulation grid to establish navigation grid and record the areas 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:(2)ρ=∑πri2swhere ri is the radius of agent which is in the crowd. s 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 valueIi(t+1) of the i-th agent AGi at the time of T+1 is(3)Iit+1=Pit×ϖ×ψd+1-ϖ×GE×Iit+Iitwhere Ii(t) is the emotional value of the AGi at the time of T and ϖ is an individual’s attention to the danger value ψd of hazard source in the current position. Pit is the optimistic mood at the time of t, expressing the ability of individual emotion to feel positive influence from other groups. GE is the group emotion, defined as follows:(4)GE=∑βi×μi×Iit Although crowd emotion is composed of individual emotions, it is not simply a cumulative accumulation of individual emotions. βi is the leadership coefficient which indicates the influence of AGi’s emotion on group emotion. μi defines the influence of Agenti on group emotion in a group, and the formula is as follows:(5)μi=Pit∑i∈GPitPersonality is the unique mental and psychological characteristics of individuals formed in social activities and is different from other individuals. The possible emotional states ofAGi 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 Pit of AGi also will be updated with a certain randomness, and the formula is as follows:(6)Pit+1=Pit×1+αp where αp is the change value of indicates optimistic emotion, which can be calculated by the following formula:(7)αp=∑i=1NpλpiNpχp where Np is the number of agents who could affect the emotion of AGi. χp represents the coefficient factor of an agent’s optimism. λp(i) indicates the optimistic emotion value from other agents around AGi, and it can be calculated by the following formula:(8)λpi=1-η×1-ρ 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:(9)η=α1+Bebωη takes a value in the range [0,1]. ω 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:(10)Π=ψH,ψF The variable ω of (9) can be calculated by the following:(11)ω=ψH-ψFwhere ψH+ψF=1, ψH is the hope emotion and ψF 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:(12)Tflow=Q∑i=1NpIitQ is an adjustment coefficient. The way to update the action of an agent can take the following rules: if Tflow<Pt, the agent will keep away from the crowd and take the crowd as an obstacle to recalculate the appropriate path. If Tflow>Pt, 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

LetS be a triangulated polyhedral surface in R3, defined by a set of vertices, edges, and faces. Given two points s,t∈S, 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 vei(1) and vei(1) are the endpoints of the edge ei, as shown in Figure 1; the initial path (shown in red) through the face sequence Γ can be described by (s,p1,p2,…,pk,t), where pi is the intersection point between the geodesic path and the i-th edge ei≜(vei(1),vei(2)) in the face sequence. Then pi can be represented by a scalar λi∈[0,1] so that pi=(1-λi)vei(1)+λivei(2).Figure 1
A discrete path(s,pi,pi+1,…,pk,t) can be encoded using the face sequence.We will discuss the case where the base mesh has a non-uniform density function defined on the surface, as Figure2 shows. Typically, each polygonal face fi has a constant density value ρ(fi). In this case, the total path length is given by(13)LΓ;λ1,λ2,…,λk=ρsp1→sp1→+∑i=1k-1ρpipi+1→pipi+1→+ρpkt→pkt→,whose gradient with regard to λi is(14)∂L∂λi=v12-v11,ρsp1→sp1→sp1→-ρp1p2→p1p2→p1p2→,i=1vi2-vi1,ρpi-1pi→pi-1pi→pi-1pi→-ρpipi+1→pipi+1→pipi+1→,1<i<kvk2-vk1,ρpk-1pk→pk-1pk→pk-1pk→-ρpkt→pkt→pkt→,i=k,where ρ(AB→) denotes the density in the face containing the line segment AB→. It is easy to know that the path tends to go through the area with a low density. The density value ρ(fi) of the affected triangle meshes around the hazard source p0 can be calculated by (1). If there is a crowd in scene, the density ρ of triangle fi 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.Algorithm 1:An optimization based method for computing the shortest path with hazard information.
Input: A triangle Mesh S; two points s,t∈S and an initial path between them; A error tolerance ϵ. Output: A geodesic path between s and t. Calculate the hazard valueψi of pi using equation (1) Calculate crowd densityρ of triangle fi using equation (2) Set density functionρ(fi) of fi according to ψi and ρ Compute the current lengthLt of initial path LetLt-1=0 while  Lt-1-Lt>ϵ  do Let Lt-1=Lt Compute the length of path using equation (13) Compute the gradient of length using equation (14) Get the resulting path; Collect the vertices vi on the path; Traverse and update the face sequence such that each v∈vi is on the other side of the new face sequence. Compute the new length Lt of path endFigure 2
The green path is geodesic path assuming the density is uniform on the surface, while the blue path is geodesic path in the densityρ=5 set on red faces and the other with ρ=1.


## 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:(15)FXi=1pXt-pXi×FdirveXi+pXt-pXi×FrepulseXi where p(Xi) is the local position of agenti and p(Xt) is the target position, and Fdirve(Xi) is the potential force of agenti moving to the target position. Frepulse(Xi) 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 Frepulse(xi) of agenti on position xi can be calculated by Coulomb’s law [30].(16)FrepulseXi=∑k=1KmkFrepulsexkρkWxi-xk where W is a weight function, also could be called smooth kernel function and be expressed as follows:(17)Wxi-xk=αe-pxi-pxk/βpxi-pxkα and β are constant coefficients and p(xk) is the position of other agentk who can interact with agenti in feasible range. In our experiment of crowd evacuation simulation, taking α=1, β=1. 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 O(n2), where n is the number of agents. The computational efficiency decreases slowly with the increasing rate of n. 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γi of agent is set to 3; other parameters in our system are set experimentally: ϖ=0.5,  φ0=20,  Q=2,  B=1,  α=2,  b=5. 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 0.15s averagely to compute a geodesic path and can be used for real-time path planning.Table 1
Timing statistics (seconds) for geodesic computation on a workstation with a 3.07 GHz CPU and 6GB RAM.
scenario #Faces Average time(s) Max time(s) scene1(Figure3) 2,000 0.05 0.08 scene1(Figure3) 10,196 0.11 0.19 scene1(Figure3) 51,265 0.34 0.40 scene1(Figure3) 105,767 0.64 0.41 scene2(Figure4) 20,852 0.15 0.20 scene3(Figure5) 12,987 0.11 0.15 scene4(Figure6) 25,632 0.17 0.19 scene5(Figure7) 22,572 0.15 0.21


### 4.1. Evacuate Simulation under Different Scenarios

Our method can handle mesh information changes during the simulation. Taking a simple scenario shown in Figure3 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 300×300 units with 5k triangulated faces and two exports. The group with a leader move from the source position s to the target position t, respectively. As shown in Figure 3(a), there are some obstacles in the scene; we set density ρ=5 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 ρ=10 to the affected triangulation faces and can get the safety geodesic path less than 0.1 seconds. The simulation results show that the crowd completely avoids the hazards and obstacles.Figure 3
Snapshots of crowd simulation in the same scenarios with different hazard and emotional impact. Images in the left line represent the geodesic paths on the triangle mesh. The other three images represent the different snapshots of the simulation process at 1st, 12th, and 15th frame, respectively.
(a)
Without hazards (b)
With hazards and without emotional impact (c)
With hazards and emotional impactWe 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. Figure4 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 10-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 20-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.Figure 4
Snapshots of crowd simulation in different types of hazard scenarios.
(a)
A persistent hazard occurs in a position (b)
Another persistent hazard added into the sceneIn 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φH and φF. The agents with φF=0.6 and φH=0.4 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 φF=0.3 and φH=0.7 in the blue circle choose to join the crowd and move forward with the crowd.Figure 5
Agents with different hope emotionψH and fear emotion ψN choose different evacuation when they meet another group. Four images represent the different snapshots of the simulation process at different moments.


### 4.2. Analysis of Emotional Impact

Some simulations of crowd movement with and without emotion model, shown in Figure6, 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.Figure 6
The comparison of crowd movements with and without emotion.
(a)
Without emotion (b)
With emotion


### 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 Figure7(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.Figure 7
Performance comparison. Our algorithm has a performance advantage compared with the existing algorithms.
(a)
Evacuation simulation result by our approach in a maze (b)
Evacuation simulation result by RVO [4] in a mazeWe use the same scenario with different numbers of agents from100 to 2000 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.Figure 8
Performance comparison.
(a)
Comparison of times (b)
Comparison of FPS


## 4.1. Evacuate Simulation under Different Scenarios

Our method can handle mesh information changes during the simulation. Taking a simple scenario shown in Figure3 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 300×300 units with 5k triangulated faces and two exports. The group with a leader move from the source position s to the target position t, respectively. As shown in Figure 3(a), there are some obstacles in the scene; we set density ρ=5 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 ρ=10 to the affected triangulation faces and can get the safety geodesic path less than 0.1 seconds. The simulation results show that the crowd completely avoids the hazards and obstacles.Figure 3
Snapshots of crowd simulation in the same scenarios with different hazard and emotional impact. Images in the left line represent the geodesic paths on the triangle mesh. The other three images represent the different snapshots of the simulation process at 1st, 12th, and 15th frame, respectively.
(a)
Without hazards (b)
With hazards and without emotional impact (c)
With hazards and emotional impactWe 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. Figure4 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 10-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 20-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.Figure 4
Snapshots of crowd simulation in different types of hazard scenarios.
(a)
A persistent hazard occurs in a position (b)
Another persistent hazard added into the sceneIn 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φH and φF. The agents with φF=0.6 and φH=0.4 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 φF=0.3 and φH=0.7 in the blue circle choose to join the crowd and move forward with the crowd.Figure 5
Agents with different hope emotionψH and fear emotion ψN choose different evacuation when they meet another group. Four images represent the different snapshots of the simulation process at different moments.


## 4.2. Analysis of Emotional Impact

Some simulations of crowd movement with and without emotion model, shown in Figure6, 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.Figure 6
The comparison of crowd movements with and without emotion.
(a)
Without emotion (b)
With emotion


## 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 Figure7(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.Figure 7
Performance comparison. Our algorithm has a performance advantage compared with the existing algorithms.
(a)
Evacuation simulation result by our approach in a maze (b)
Evacuation simulation result by RVO [4] in a mazeWe use the same scenario with different numbers of agents from100 to 2000 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.Figure 8
Performance comparison.
(a)
Comparison of times (b)
Comparison of 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.



---

*Source: 5397071-2018-10-01.xml*