Dynamic Path Optimization with Real-Time Information for Emergency Evacuation

In order to ﬁnd 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 ﬁre 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-ﬁrst 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-ﬁrst search algorithm only searches local optimal paths to avoid the blockage node or dangerous area. Because the online optimization solves a local pathﬁnding problem and the entire topology optimization is an oﬄine calculation, the proposed method can ﬁnd the optimal path in a short time when the accident situation changes. The simulation tests the performances of the proposed algorithm with diﬀerent situations based on the topology of a building, and the results show that the proposed algorithm is eﬀective 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.


Introduction
e 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 [4][5][6], 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. e 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 [7][8][9], 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. e 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 [13][14][15], particle swarm algorithm [16][17][18], bee colony algorithm [19][20][21], 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. e authors in references [24][25][26][27] 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 [28][29][30]. Beside the path length, safety is also important for people during the evacuation, and the authors references [31][32][33] took the safest and shortest paths as the cost function to search the optimal paths. Facing the dynamic situation, the authors in references [34][35][36][37] 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 [38][39][40][41] 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. e authors in [42][43][44] 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.
is paper proposes a dynamic path optimization method which includes offline search and online search. e 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. e 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.
is 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. e simulation results and analysis are in Section 4. Section 5 summaries the conclusions.

Evacuation Environment Model
e emergency evacuation model mainly includes microscopic model and macroscopic model [45].
e 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. e 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]. e 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. e 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. e macroscopic model is a weighted graph as follows: where V is the set of nodes, V � v i | i ∈ [1, n] , in which n is the total number of the network nodes. E is the set of graph edges, V � e ij | i, j ∈ V . W 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. is paper uses macroscopic modeling principles to establish the model of an underground shopping mall and related passage spaces. is 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. e macroscopic model represents the fire evacuation environment of the surrounding area, and its graph is shown in Figure 1. e model is a multioutlet network, where V is a set of ordinary nodes and V � N 1 , N 2 , . . . , N 22

Dynamic Path Optimization
e 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. e online optimization dynamically searches the optimal paths when real-time information is different from the prior information.
e 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.

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. is 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. e 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. e flow of the standard Dijkstra algorithm is shown as Algorithm 1. e operation u ← vertex in Q with min dist [u] means the algorithm searches for the vertex u in the vertex set Q that has the least distance. Operation length(u, v) returns the length of the edge connecting two adjacent nodes u and v. e variable expand is the length of the path from the source node to the node v via u.
e principle used to determine whether the node v satisfies the slack condition is as follows: where d (u,v) is the distance between node u and node v. Equation (2) shows that the distance from node u to node v via node q is shorter than the old distance between node u and node v, and then the path p(u, v) is updated as follows: According to the Dijkstra algorithm, we get the evacuation path network of the building shown in Figure 1. e 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 N 3 , 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 Safe exit

Online Local Path
Optimization. e location and time of the fire are unpredictable; the distribution of people inside the building is also changing. e prior evacuation network needs to be modified when some edges are blocked or in a dangerous area. is 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 G � (V, E, W), the evacuation path p(i, j) from the start node i to the end node j is as follows: where N i , N r , N s , and N j are the node number. e total distance dist p(i, j) of the evacuation path p(i, j) is where w (t,t+1) is the actual distance between node t and node t + 1. e 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 IV, then the online optimization problem is as follows: min j t�i w (t,t+1) , t ∈ V, t ∉ IV. (6) Equation (6) is a constraint optimization problem; the optimization result p(i, j) only includes the safe and passable nodes. Suppose PNet is the prior evacuation path network, NBNode is the neighbor nodes of the impassable nodes in IV. e online optimization starts to search for the optimal paths when the PNet is not fit for the real-time situation, and the online optimization algorithm flow is shown as Algorithm 2.
is paper uses the online dynamic optimization algorithm to search for the real-time optimal paths for the graph in Figure 1. Suppose N 7 is in the fire area and the impassable node set IV � N 7 . According to the dynamic optimization algorithm in Algorithm 2, the SNode stores the starting nodes of the prior paths that contains N 7 , and the nodes of SNode are as follows: N 1 , N 2 , N 3 , N 4 , N 5 , N 8 , N 9 , N 10 , N 11 , where SNode(i) contains the starting nodes of the prior paths that are from each node to O i via N 7 . Because the paths from the nodes in SNode to exits are impassable, then these paths are adjusted dynamically. N 3 , N 6 , N 8 , and N 14 are neighbor nodes of N 7 ; then, the nodes of NBNode are as follows: where NBNode(i) contains the neighbor nodes of N 7 in SNode i { }. Because the nodes of NBNode are around node N 7 , the paths from these nodes to the exits help the people to avoid the impassable node N 7 . We use the breadth-first search (BFS) algorithm to search for the optimal paths from the nodes of SNode 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. is 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. e BFS visits nodes of NBNode and checks whether the shortest paths contain impassable node. If path from node N k to exit O h does not contain the impassable node, then the new path from node N i to exit O h is updated as follows: where node N i ∈ SNode, N k ∈ NBNode, and O h is the exit node. e paths from nodes of SNode 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 DPNode is the set of the new dynamic paths, and one of the new paths is where N i , N r , . . ., N n ∉ IV. Nodes around the node of p(N i , O h ) are used to check whether there is a much shorter path; if a node N α around N k satisfies the inequality as follows: then the new shorter path is as follows: e 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 N 7 is in the fire area, there are 35 paths that contain N 7 . Different paths are shown in Figure 3. Path 1 is the prior shortest evacuation path from node N 6 to exit O 2 , Path 2 is a feasible path that avoids node N 7 , and Path 3 is the final shortest path obtained by global search. It takes 11 ms to update the shortest paths from nodes in SNode to the exits.

Simulation Results and Analysis
e more nodes in the network model, the more time it takes to search for evacuation paths in real-time. is 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 O � N 7 , N 77 , N 777 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 N 18 be in the fire area; both the proposed dynamic algorithm and the Dijkstra algorithm are used to search for the shortest paths from node N 1225 to exit N 7 and N 777 . e path optimization results are shown in Table 3. e 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 N 18 is in the fire area. M2 and M3 are online searching that avoid passing through node N 18 . e 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 N 18 . 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. e node from N 1 to N 200 is set as a fire point step by step, and the curve of the number of nodes in SNode is shown in Figure 4. Different nodes cause different sizes of SNode, and the online searching time is also shown in Mathematical Problems in Engineering  Figure 4 show that the online searching time is positively correlated with the size of SNode.
With the same nodes in SNode, 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. e comparison result shows that the proposed dynamic algorithm searches much faster than the Dijkstra algorithm all the time. e Dijkstra algorithm executes a global optimization when facing a new order to search for a path from the node in SNode to the exit; it takes a long time to find out the shortest path. e 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 t p denote the online searching time of the proposed dynamic algorithm and t d denote the online searching time of the Dijkstra algorithm; the ration of t p to t d is also shown in Figure 5. e maximum ratio is 0.92, and the minimum ratio is 0.02, and there are some ratios that have a

Conclusions
e 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. e 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. e proposed dynamic algorithm is suitable for the online evacuation path optimization because of its fast convergence and global searching.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.