Abstract

In order to find the optimal path for emergency evacuation, this paper proposes a dynamic path optimization algorithm based on real-time information to search the optimal path and it takes fire accident as an example to introduce the algorithm principle. Before the accidents, it uses the Dijkstra algorithm to get the prior evacuation network which includes evacuation paths from each node to the exit port. When the accidents occur, the evacuees are unable to pass through the passage where the accident point and the blocking point are located, then the proposed method uses the breadth-first search strategy to solve the path optimization problem based on the prior evacuation network, and it dynamically updates the evacuation path according to the real-time information. Because the prior evacuation network includes global optimal evacuation paths from each node to the exit port, the breadth-first search algorithm only searches local optimal paths to avoid the blockage node or dangerous area. Because the online optimization solves a local pathfinding problem and the entire topology optimization is an offline calculation, the proposed method can find the optimal path in a short time when the accident situation changes. The simulation tests the performances of the proposed algorithm with different situations based on the topology of a building, and the results show that the proposed algorithm is effective to get the optimal path in a short time when it faces changes caused by the factors such as evacuee size, people distribution, blockage location, and accident points.

1. Introduction

The most important thing for emergency evacuation is to guide people to move from dangerous areas to safe areas in the shortest time. Facing emergencies such as hurricanes, tsunamis, fires, and poisonous gas leakage [1], some methods were proposed to find the optimal path according to the prior information [2, 3], and the methods are not suitable for the emergency evacuation when the situations are significantly different from the prior information. Studies have shown that fire is the most frequent accident among the above emergencies [46], and it gets more attention from researchers since fire accidents frequently cause huge losses to mankind; then, this paper takes fire accident as an example to introduce the proposed algorithm principle. The evacuation environment includes route topology, exit location, evacuee size, and people distribution, and changes of each element bring different evacuation paths. Fire accidents often happen suddenly and unpredictably, and the static path planning algorithms have limited application in practice since the prior environment information is different from the real-time environment information during emergencies. According to the studies of some fire event cases [79], chaotic and untimely evacuation is the important reason for the high casualty rate. In crowded buildings such as shopping malls, supermarkets, and large cruise, people always move without any regular pattern, and it is necessary to search evacuation paths according to exit locations, real-time evacuee locations, and evacuee size [10, 11]. It is dangerous for evacuees to pass a passageway that is full of smoke, and the smoke spreading changes the route topology during the evacuation. The old path is not fit for the new situation when some passageways change, and it is a time-consuming process to find a new optimal path. In order to find the evacuation path in a short time, some methods [12] simplified the route topology to reduce the computation time, and the incomplete dynamic route topology made the new path different from the shortest one. With the development of stochastic optimization, some intelligent algorithms such as ant colony algorithm [1315], particle swarm algorithm [1618], bee colony algorithm [1921], and genetic algorithm [22] or greedy algorithm [23] were used to find the dynamic path. When route topography and constraints changed, intelligent algorithms took the old path as a feasible solution for dynamic path searching. Although intelligent algorithms are able to search for optimal solutions globally, they converge slowly when facing dynamic evacuation problems.

Recently, the dynamic evacuation problem has become a hot research topic, and many scholars try to get the shortest path according to dynamic situations. The authors in references [2427] built the intelligent integrated fire rescue system which updated optimal paths by using the wireless sensor or vision camera to detect people locations. However, the wireless sensors and vision cameras are difficult to get accurate dynamic information about the people, and the online computation is also complex and time consuming. In order to get the shortest paths in a short time, basic and improved Dijkstra algorithms are the most popular methods used to search the optimal paths [2830]. Beside the path length, safety is also important for people during the evacuation, and the authors references [3133] took the safest and shortest paths as the cost function to search the optimal paths. Facing the dynamic situation, the authors in references [3437] used dynamic planning to search for the optimal paths and informed everyone on the ship how to move toward the exit. Neural networks are good at learning the hidden knowledge from sample data, and the authors in [3841] used neural networks to decide which paths are available for people to evacuate dynamically. Because the smog keeps spreading during the fire accident, feasible evacuation paths should consider the future changes of dangerous areas. The authors in [4244] tried to predict the dangerous area and searched the optimal paths step by step, and the prediction performances influenced the effectiveness of the evacuation significantly.

Effective emergency evacuation paths are important for the safety of personal in accidents, and the basic requirement is that the commander gets the optimal paths to fit the dynamic changes in a short time. This paper proposes a dynamic path optimization method which includes offline search and online search. The offline optimization gets the prior evacuation network which includes evacuation paths from each node to the exit port, and the online optimization searches the local optimal paths based on the prior evacuation network when the accidents happen. The changes from accident locations, dangerous areas, and blocking paths call the online optimization algorithm to search the dynamic optimal paths. Online optimization quickly plans the evacuation paths to adapt the real-time situations.

This paper is organized as follows: Section 2 introduces the method of establishing the network topology of the building. Section 3 details the proposed dynamic optimization algorithm that uses offline optimization and online optimization to search the optimal evacuation paths. The simulation results and analysis are in Section 4. Section 5 summaries the conclusions.

2. Evacuation Environment Model

The emergency evacuation model mainly includes microscopic model and macroscopic model [45]. The microscopic model focuses on the study of individual behavior characteristics, and the path optimization algorithm simulates human individual behavior and mental activities to select evacuation paths. Typical microscopic models include the social force model, cellular automata model, and lattice gas model [46]. Because the microscopic model uses less overall information about the environment, it always gets local feasible paths and ignores the global optimal paths. The local feasible paths are able to guide people to move toward the exit, but it is different from the optimal solution that considers the evacuation time and personal safety during the evacuation process. In addition, the optimization algorithms based on the microscopic model converge slowly, and the online pathfinding requires fast convergence algorithms [47]. The macroscopic model pays attention to the people flow of each evacuation path at different moments based on global information. People move at different speeds when the density of people changes, and the move speeds are macroviews of individual behavior. The relationship between move speed and people density is summarized by the characteristics of individual movement and saved as a piecewise function. Since the optimization outputs based on the macroscopic model are global optimal solutions, the paths are more effective for emergency evacuation.

In the macroscopic model, paths and intersections of the building are regarded as the edges and nodes of a graph. The macroscopic model is a weighted graph as follows:where is the set of nodes, , in which is the total number of the network nodes. is the set of graph edges, . is the set of weights of each edge. Usually, corridors or stairways in a building are set as edges, and the endpoints of corridors are set as nodes, and the weight of each edge is the actual distance between the connected nodes. In the large-scale macroscopic model, optimization also requires complex computation due to a large number of nodes and edges.

This paper uses macroscopic modeling principles to establish the model of an underground shopping mall and related passage spaces. This shopping mall is the middle floor of a three-floor structure, the bottom floor is the subway station, and the top floor has several urban traffic roads. The macroscopic model represents the fire evacuation environment of the surrounding area, and its graph is shown in Figure 1. The model is a multioutlet network, where is a set of ordinary nodes and and is a set of safe exit nodes and . Each weight is the actual distance between adjacent nodes, and the weight values are shown in Table 1.

3. Dynamic Path Optimization

The proposed dynamic path optimization includes offline optimization and online optimization. With prior information of the evacuation model shown in Figure 1, the offline optimization is used to search for the optimal paths that contain evacuation routes from each node to exit nodes. The online optimization dynamically searches the optimal paths when real-time information is different from the prior information. The online optimization searches the local areas and converges fast, and it gets new optimal paths that fit the real-time requirement in a short time.

3.1. Offline Prior Evacuation Path Network

Before the fire accident, it is necessary to get the shortest evacuation path from each node to each exit for the building. This search is an offline process that uses the Dijkstra algorithm to get the prior evacuation path network that stores the node number of each evacuation path. The Dijkstra algorithm is a typical algorithm for searching the shortest path between nodes in a graph, and it has been widely used to search for the shortest evacuation paths in fire incidents. The flow of the standard Dijkstra algorithm is shown as Algorithm 1. The operation uvertex in Q with min dist [] means the algorithm searches for the vertex in the vertex set Q that has the least distance. Operation returns the length of the edge connecting two adjacent nodes and .

create vertex set Q
for each vertex in Graph:
 dist []  ⟵  Infinity
 path []  ⟵  Undefined
 add to Q
dist [source]  ⟵  0
while Q is not empty:
  ⟵  vertex in Q with min dist []
 remove from Q
for each neighbor of u:
  expand  ⟵  dist [] + length (, )
  if expand < dist []:
   dist []  ⟵  expand
   path []  ⟵  
return dist [], path []

The variable expand is the length of the path from the source node to the node via . The principle used to determine whether the node satisfies the slack condition is as follows:where is the distance between node and node . Equation (2) shows that the distance from node to node via node is shorter than the old distance between node and node , and then the path is updated as follows:

According to the Dijkstra algorithm, we get the evacuation path network of the building shown in Figure 1. The network includes the shortest path from each node to each exit. Since the network is too large to display, Table 2 describes the nodes from node 3 to the four exits and the paths are shown in different colors in Figure 2. If people are at node N3, they will use the information shown in Table 2 to quickly escape to the safety exit, so this network is the prior information for the people to escape. When the fire environment is the same as the offline optimized hypothetical environment, people can move according to the prior evacuation network.

3.2. Online Local Path Optimization

The location and time of the fire are unpredictable; the distribution of people inside the building is also changing. The prior evacuation network needs to be modified when some edges are blocked or in a dangerous area. This modification only adjusts the nodes of the paths that are affected by the fire, and it is a local path optimization based on the prior evacuation network. Because the fire is changing during the evacuation, then the online local path optimization keeps searching for the new solutions. In the network graph model , the evacuation path from the start node to the end node is as follows:where , , , and are the node number. The total distance of the evacuation path iswhere is the actual distance between node and node . The cost function of the dynamic optimization is to search for the paths that do not include the impassable nodes. Suppose the real-time impassable nodes set is , then the online optimization problem is as follows:

Equation (6) is a constraint optimization problem; the optimization result only includes the safe and passable nodes. Suppose is the prior evacuation path network, is the neighbor nodes of the impassable nodes in . The online optimization starts to search for the optimal paths when the is not fit for the real-time situation, and the online optimization algorithm flow is shown as Algorithm 2.

for p in PNet
for d in
  if path p contains node d
   the first node of path p
forin
is updated by the breadth-first search algorithm
forin
update the path ofas
for p in
 for in path p
  pcheck the nodes aroundwhether p is the shortest
return

This paper uses the online dynamic optimization algorithm to search for the real-time optimal paths for the graph in Figure 1. Suppose is in the fire area and the impassable node set . According to the dynamic optimization algorithm in Algorithm 2, the stores the starting nodes of the prior paths that contains , and the nodes of are as follows:where contains the starting nodes of the prior paths that are from each node to via . Because the paths from the nodes in to exits are impassable, then these paths are adjusted dynamically. , , , and are neighbor nodes of ; then, the nodes of are as follows:where contains the neighbor nodes of in . Because the nodes of are around node , the paths from these nodes to the exits help the people to avoid the impassable node . We use the breadth-first search (BFS) algorithm to search for the optimal paths from the nodes of to the exits. Since the paths from each node to the exits are stored in the prior evacuation network, the BFS gets the shortest path from a node when it visits the node. This prior evacuation path network reduces the search time significantly, and it only needs a little lookup time to get the path information when it visits a node. The BFS visits nodes of and checks whether the shortest paths contain impassable node. If path from node to exit does not contain the impassable node, then the new path from node to exit is updated as follows:where node , , and is the exit node. The paths from nodes of to the exit nodes are updated according to equation (9) step by step. Although the new paths avoid impassable node, some paths are not the shortest, and it is necessary to fine-tune the suboptimal paths. Suppose is the set of the new dynamic paths, and one of the new paths iswhere , , …, . Nodes around the node of are used to check whether there is a much shorter path; if a node around satisfies the inequality as follows:then the new shorter path is as follows:

The real-time information triggers the online dynamic optimization to search for the new shortest paths according to the above algorithm principle. In Figure 1, suppose node is in the fire area, there are 35 paths that contain . Different paths are shown in Figure 3. is the prior shortest evacuation path from node to exit , is a feasible path that avoids node , and is the final shortest path obtained by global search. It takes 11 ms to update the shortest paths from nodes in to the exits.

4. Simulation Results and Analysis

The more nodes in the network model, the more time it takes to search for evacuation paths in real-time. This paper establishes a network model with 2000 nodes to compare the performances of the proposed dynamic optimization and the traditional Dijkstra algorithm. Suppose the set of safe exit nodes is and each node has two edges connecting to other nodes, the weight of each edge is randomly assigned a positive value between 0 and 100.

Let node be in the fire area; both the proposed dynamic algorithm and the Dijkstra algorithm are used to search for the shortest paths from node to exit and . The path optimization results are shown in Table 3. The M1 is the method that uses the Dijkstra algorithm to search for the shortest path offline. M2 and M3 are the methods that use the proposed dynamic algorithm and the Dijkstra algorithm to search for the shortest path according to the real-time information as node is in the fire area. M2 and M3 are online searching that avoid passing through node . The results show that the evacuation paths of the online searching algorithms are longer than those of the offline algorithm; this difference is due to the fact that the online search algorithms need to avoid node . M2 gets the same path as M3 in online path searching, and it shows that the proposed dynamic algorithm has the ability to get the shortest path.

The node from to is set as a fire point step by step, and the curve of the number of nodes in is shown in Figure 4. Different nodes cause different sizes of , and the online searching time is also shown in Figure 4. The curves in Figure 4 show that the online searching time is positively correlated with the size of .

With the same nodes in , this paper compares the online searching time of the proposed dynamic algorithm with that of the Dijkstra algorithm, and the results are shown in Figure 5. The comparison result shows that the proposed dynamic algorithm searches much faster than the Dijkstra algorithm all the time. The Dijkstra algorithm executes a global optimization when facing a new order to search for a path from the node in to the exit; it takes a long time to find out the shortest path. The proposed dynamic algorithm takes advantage of the prior evacuation path and only visits the nodes around the fire area to get the local shortest paths. Because the proposed dynamic algorithm does not search each node of the model, it is more effective than the Dijkstra algorithm. Let denote the online searching time of the proposed dynamic algorithm and denote the online searching time of the Dijkstra algorithm; the ration of to is also shown in Figure 5. The maximum ratio is 0.92, and the minimum ratio is 0.02, and there are some ratios that have a value of 0 since they have no node pass through the fire area. At node , there are 256 paths that need to be modified and the ratio is 0.1. At node , there are 178 paths that need to be modified and the ratio is 0.05. It is efficacious to use the proposed dynamic algorithm as there are many nodes in the .

5. Conclusions

The prior evacuation paths are inefficient when the situations are different from the prospective environments. It takes a long time to search for the shortest paths from each node to the exits, and it is unsuitable for online searching. The proposed dynamic algorithm adjusts the prior paths that pass through the fire areas according to the situations. Because the proposed method takes advantages of the prior evacuation path network, it visits the nodes around the fire area to get the path information instead of searching each node of the model. It modifies the paths that pass through the fire areas in a short time, and each path is the shortest one from itself to the exit. The proposed dynamic algorithm is suitable for the online evacuation path optimization because of its fast convergence and global searching.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.