A Multi-Zone Staged Indoor Emergency Evacuation Algorithm Based on Time Equalization

: Most of the existing staged evacuation algorithms only consider the impact of crowd density on evacuation partition, but do not take into account the inﬂuence of the spatial distribution of occupants and the capacity of exits on the total evacuation time (TET). Therefore, a novel indoor emergency evacuation algorithm based on time equalization is proposed in this paper. All factors affecting TET such as the position and size of each group and the capacity of exits are fully considered in the proposed algorithm, which are uniformly converted into the occupancy time of each exit. An improved Dijkstra algorithm is used to generate evacuation zones according to the proximity relationship and the occupancy time of different exits. The strategy of waiting at the starting point is adopted to ensure that all evacuees are free from congestion during the escape process. In addition, the method of group merging is proposed to further increase the balance among all zones during the partitioning process. The objectives of the proposed algorithm include minimizing the TET of all evacuees, the path length of each escape group, avoiding congestion during the escape process. The experimental results show that the proposed algorithm effectively reduces TET and the path length of groups compared with existing algorithms, which improves the efﬁciency of evacuation and utilization of all exits and can be applied to the various distribution and density of evacuees.


Introduction
With the rapid development of global urbanization, the scale of cities is becoming larger and larger, and the internal structure of buildings is becoming more and more complex, which makes indoor emergency evacuation more difficult. Once an emergency such as a fire occurs indoors, it will cause huge property losses and casualties if there is no efficient evacuation strategy. Therefore, indoor emergency evacuation has been paid more and more attention. Existing methods are mainly divided into two categories: evacuation drill and computer simulation [1][2][3][4]. The former can provide more accurate and richer information about emergency evacuation, but it has obvious drawbacks such as high cost, time-consuming, and immorality. So, this kind of method is usually used to verify the effectiveness of evacuation strategies in the real world. Computer-aided simulation has become the dominant method for studying emergency evacuations [5].
Nowadays, building information modeling (BIM) and geographic information systems (GIS) are widely used for indoor emergency evacuation. BIM-GIS system has two meanings: one is the integration of the underlying technologies, and the other is the integration at the application level. This paper discusses BIM-GIS at the application level to solve the emergency evacuation problem. Before path planning, a route network model can be generated from the BIM model. Then, all evacuation strategies are obtained by network analysis of GIS. When an emergency occurs indoors, all occupants need to be evacuated immediately and decision-makers are required to formulate the best evacuation strategy in a short time. Therefore, an efficient evacuation strategy must ensure not only the shortest TET but also the shortest formulating time of it. At present, evacuation strategies can be roughly divided into optimization-oriented and simulation-oriented [6]. The research in this paper belongs to the former. Generally, it is easy to cause congestion around the emergency exits or in the corridors when there are many evacuees in a building. In existing studies, although some strategies can reduce the congestion around exits, congestion is inevitable in the evacuation process. Occupants at the congested locations can only run slowly towards exits. The staged evacuation strategy transforms the stagnation time of escape groups into their delay time to solve congestion, but it lacks the optimization of safety exit selection.
Based on staged evacuation, to improve the utilization rate of exits and strengthen the applicability of the algorithm in different scenarios, an indoor emergency evacuation algorithm based on time equalization is proposed. In general, indoor emergency evacuation is a multi-exit evacuation problem that needs to clarify the escape path and departure time of every occupant. To simplify the problem, the multi-exit problem is transformed into multiple single-exit problems by partitioning the whole evacuation zone into several evacuation zones, each of which has one safety exit. The proposed algorithm allocates all occupants to each zone and balances the evacuation time of each zone. Our contributions include: (1) The occupancy time of each exit is introduced as the basis of the evacuation partition, and the evacuation time of each zone is balanced to get the shortest TET; (2) The method of group merging is proposed to further optimize the result of evacuation zone partitioning; (3) The proposed algorithm is generally applicable to various evacuation scenarios.
The rest of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the problem and presents our method of solving it. Section 4 gives the proposed algorithm and its time complexity. Section 5 illustrates the results of the algorithm, evaluates its performance and effectiveness by a series of tests, and gives a testing simulation. Section 6 concludes the paper.

Related Work
Crowd evacuation models are mainly divided into macro-simulation models and micro-simulation models from the perspective of simulation. Similarly, evacuation strategies can also be divided into macro and micro. Macro strategies focus on controlling network flow while micro ones focus on simulating individual behaviors. Micromodels including the cellular automata, social force, lattice gas, and agent-based models are mainly used to simulate some common self-organization phenomena such as transcendence behavior, herding behavior, re-entry phenomenon, small group phenomenon, and so on [7][8][9][10]. Some guiding strategies can rationally evacuate the crowd and reduce congestion [11][12][13]. Lei et al. studied the impact of patience on evacuation efficiency and proved that the strategy of queuing to evacuate is best when the crowd density is low, otherwise choosing the exit with lower density to escape is the best choice [14]. Therefore, TET and crowd density should be balanced among all safety exits during the evacuation [15]. To resolve the problem of underutilization of exits, many strategies have been proposed. Xu et al. proposed an optimized regional division [16]. Yue et al. integrated many strategies based on distance and time [17]. Kurdi et al. assigned the same number of occupants to each exit [18]. Jin et al. classified occupants according to the degree of danger to avoid the congestion caused by the excessive crowd density [19]. Rozo et al. designed an evacuation strategy that considered various behaviors and multiple paths of occupants [4]. Other scholars discussed the evacuation strategies of high-rise buildings by using stairs and elevators [20,21]. All the evacuation strategies above are based on the micro models and their time complexity is large, which causes the slow simulation.
The macro models focus on the overall characteristics of the crowd. Network-based models usually abstract the evacuation problem into a network flow problem [22]. The timeextended network can dynamically allocate evacuees and make evacuation strategy more reasonable but its time complexity is very high [23,24]. A method was proposed to keep the evacuation process going smoothly by controlling the speed and flow rate of occupants [25]. Noh et al. planned evacuation routes for occupants with different speeds to minimize the blocking effect [26]. In addition, there are many strategies for path planning to reduce the exposure time of occupants in a hazardous environment [27,28]. Liu et al. proposed a dynamic guidance method based on digital twin [29]. Zheng et al. used the Vickrey model to reduce queuing time and to improve the utilization rate of all exits [30]. Yang et al. adopted the principle of "balancing evacuation time" and prioritized evacuation of floors that required a long time to escape [31]. Xiong et al. also proposed a distinguishing model that can avoid congestion and stagnation [32]. Based on the Dijkstra algorithm, Cao et al. proposed an intelligent path optimization method for crowd emergency evacuation [33]. Jin et al. suggested a method of finding congestion and gave a more targeted evacuation strategy [34]. Taneja et al. proposed an optimization model of a two-layer network to ensure the change of optimal capacity and more efficient evacuation [35].
When a large number of occupants escape from the building where a fire breaks out, path conflicts are easy to occur. It is necessary to adopt reasonable methods to solve these conflicts because they will cause a severe reduction in evacuation efficiency. Simultaneous evacuation increases the congestion on paths within a short period, which makes it difficult for escape groups to evacuate according to the prescribed plan. This behavior further aggravates the path conflicts with other escape groups. The partitioned and staged evacuation planning (PSEP) algorithm [36] adopted an evacuation partitioning strategy to assign a large number of occupants to each emergency exit and a staged evacuation strategy to compute out the escape path and delay time of each group. The algorithm is better than the distance-based staged algorithm in evacuation efficiency and superior to the algorithm proposed by Li [37] in computation efficiency. However, the PSEP algorithm can achieve better results only in the condition of high density and even spatial distribution of occupants and takes no consideration of low density of occupants, the uneven spatial distribution of occupants, and capacity of exits. Therefore, an improved partitioned and staged evacuation algorithm based on time equalization is proposed in this paper, which overcomes the shortcomings of the current staged evacuation algorithms and further reduces TET.

Methodology
To evacuate all occupants as quickly as possible is what all decision-makers need to consider when an emergency occurs indoors. In general, indoor population density is a key factor affecting evacuation strategy. Occupants can choose the nearest exit to escape without any congestion when the density is low. However, the same choice will cause congestion in the evacuation process when the density is high. So, the utilization ratio of each exit should be improved to reduce congestion. Figure 1a is an illustration of the evacuation problem. Occupants are grouped according to their proximity. Emergency evacuation planning is carried out in a group, that is, a group of evacuees is seen as a whole. The related variables used in this paper are listed in Table 1.  Evacuation strategies can be divided into simultaneous evacuation and staged evacuation. Simultaneous evacuation means that in case of emergency, all pedestrians will escape at the same time. But in case of congestion, they need to wait until the front groups pass through. Waiting in a crowded place is not a wise choice because increased congestion can slow the evacuation speed of occupants. The situation will reduce traffic efficiency and even lead to serious accidents such as stampedes. Staged evacuation is an evacuation strategy based on evacuation partitioning, the advantage of which is that occupants in different zones have no path conflicts with each other. Meanwhile, occupants in the same zone can avoid path conflicts by setting a delayed departure time for each group. The delay time of each group should be as short as possible to reach the minimum TET, as shown in Figure 1b. Therefore, staged evacuation is chosen as the basic strategy for emergency planning in this paper.
We mainly study the impact of the density of occupants, the spatial distribution of occupants, and the capacity of exits on evacuation partitioning and TET respectively. To simplify the problem, it is assumed that the speed of all groups is equal. The order of evacuation is in accordance with the principle of "first in first out, second delay" [36]. That is, the delay time of each group in the same zone is calculated according to the path length in ascending order. The formula of delay time is as follows: where, i denotes group i in zone a. If the delay time of the group is less than 0, it is set to 0. If T a i,d > 0, it means that group i and group i − 1 are evacuated end-to-end. The simultaneous evacuation strategy uses the following equation to calculate the evacuation time of group i.
It is assumed that escape groups evacuate immediately, namely T a i,res = 0. T a i,t is the time from the group beginning to escape to the last member of the group leaving the exit, regardless of the congestion condition. The larger T a i,que is, the longer the queueing time will be. Obviously, it is very prone to congestion during the evacuation in the situation.
During the staged evacuation, the delay time of groups can avoid waiting in the queue during the evacuation, namely T a i,que = 0. Therefore, the evacuation time of groups using the staged strategy is equal to the delay time plus the travel time. In fact, the delay time of groups takes the place of their queuing time. The evacuation time of each zone is determined by the maximum evacuation time of all groups in the zone. The equation of T a is as follows: Similarly, TET is determined by the maximum evacuation time of all zones. The equation is as follows: Each zone has a safety exit. TET is one of the key factors to determine the quality of evacuation strategies. It can be seen from Equation (5) that the TET of the staged evacuation strategy is jointly determined by the evacuation time of all zones. Therefore, the partitioning method is the key to the staged evacuation strategy and is one of the important factors to determine evacuation efficiency. Equation (6) is the objective function, indicating that a good staged strategy should make the maximum evacuation time of all zones as small as possible. To shorten TET, a reasonable partitioning method taking into account the density and spatial distribution of occupants and the capacity of exits should be proposed to make the evacuation time of each zone approximately equal.
The partitioning methods of staged evacuation are generally divided into two categories: the distance-based partitioning method and the partitioning method of balancing the number of occupants at all exits. The former is suitable for low crowd density, while the latter is suitable for evacuation partitioning with high density. The PSEP algorithm is a typical staged evacuation algorithm based on population equalization. In this paper, a partitioning method of balancing the evacuation time at all exits is suggested, to make it better applicable to various indoor evacuation scenarios.
According to Equation (4) and the principle of "first in first out, second delay" [36], the evacuation time of each zone is determined by the evacuation time of the group with the longest path length in each zone. Dijkstra algorithm is used to determine which group in the zone is the group currently extended. The evacuation time of the group is the current evacuation time of this zone. As the zone is expanded, the current evacuation time of the zone is updated accordingly. When the last group is extended, the evacuation time of the group is the final evacuation time of the zone. According to Equation (6), the evacuation time of the last group extended in the current zone is taken as a function of the occupancy time of each exit for expansion, which includes the delay time and travel time of the group. The travel distance of the group consists of the length and path length of the group (Figure 2). Then the exit with the minimum occupancy time should be chosen to expand its evacuation zone each time. Finally, the process of evacuation partitioning based on time equalization is finished. The function of T e is In the process of evacuation partitioning, the Dijkstra algorithm may cause an imbalance of evacuation partitioning if there are branch paths. The following pictures of a simple partial route network illustrate this problem and the proposed solution for it, as shown in Figure 3. In Figure 3, node D is the branch of node A. The serial numbers of nodes indicate the order of path length. For example, the path length of group B is longer than that of group A. The path length of group D is longer than that of groups B and C. According to the principle of "first in first out, second delay", groups B and C are extended by zone E before group D. If the Dijkstra algorithm is used, group D must pass through node A. Group D is extended by default when the node A is being extended. If the evacuation time of group A is used as the evacuation time of zone E, it must be shorter, because the occupancy time represents the evacuation time of the zone. Therefore, the evacuation time of group D should be used as the current occupancy time of zone E, so that some groups, such as groups B and C, may not be extended by zone E. The group merging method is used to increase further the balance of expansion of zones. Node operation needs to be executed before the group merging method as the following steps:

1.
Add non-exit nodes to array M, and create an empty array B; 2.
Add a virtual node, which connects to all exits, and the length of new arcs is set to 0;

3.
The virtual node is set as the search starting node; 4.
Use Tarjan's algorithm to search a cut vertex in the unvisited nodes, then mark the visited nodes; 5.
If there is a cut vertex, go to the next step; otherwise, break; 6.
Except for the cut vertex, add all nodes in the bi-connected component to the array B, return step (4).
If there are sink nodes in the bi-connected component, all groups can choose their own exits belonging to the bi-connected component to escape without going through the cut vertex.
The general steps for the group merging method are as follows: 1.
Determine the currently extended node g and the corresponding exit E (details about this are described in the next section); 2.
Select the group i closest to the exit E in the array B; 3.
If T E ≥ D i /V, go to the next step; 4.
Calculate the delay time of the group i, and update the occupancy time of the exit E with the evacuation time of the group i; 5.
Remove the group i from arrays M and B, return step (2).
The expansion results partitioned by the group merging strategy are shown in Figure 3b. When node A is extended, the evacuation time of group A is actually the evacuation time of group D because group D is merged by node A. The continuity of groups will not increase the evacuation time of the current zone. So, the evacuation time of group D can be used as the occupancy time of the exit e. The PSEP algorithm can also use the group merging method to solve the problem of the lack of local information on buildings. It only needs to add the population on branch nodes to their own trunk node.

Algorithm
Based on the problem and solution proposed in Section 3, a staged evacuation algorithm based on the balance of occupancy time of exits is proposed in this paper. The algorithm considers the change of different densities and spatial distribution of occupants and the capacity of exits.

Algorithm Idea
The PSEP algorithm is a multi-exit emergency evacuation strategy proposed for indoor crowded conditions, but it uses the partitioning strategy of "balanced evacuation" based on the population of each exit without consideration of the density and spatial distribution of indoor population and capacity of exits. Therefore, we proposed the partitioning strategy of "balanced evacuation" based on the occupancy time of each exit to improve the evacuation efficiency and to shorten TET. The proposed method uses the improved Dijkstra algorithm to assign all groups to different exits. During the partitioning process, the evacuation time of each group is taken as the occupancy time of the safety exits to form evacuation zones. The basis of partitioning is to ensure that the occupancy time of each exit is approximately equal. For all groups in the same zone, the "delayed waiting" strategy is implemented, and the time window for each group to occupy the safety exit is calculated according to the path length to ensure that no path conflicts occur. In addition, it is proposed to transfer the information of branch nodes to the trunk nodes for group merging. Therefore, the basic idea of the proposed algorithm for constructing zones is: (1) Taking each exit as the starting point, the Dijkstra algorithm and the group merging method are used to expand the evacuation zone according to the path length, and the occupancy time of each exit is updated; (2) Choose the exit with the minimum occupancy time for the next expansion of zone until all nodes are assigned to different exits. If all nodes are extended, the process of evacuation partitioning is completed.

Algorithm Description
Different from the PSEP algorithm, the proposed algorithm carries out the partitioning and the calculation of the delay time at the same time, while the PSEP algorithm performs the partitioning first and then calculates the delay time. The detailed algorithm flow is described as follows: Input: indoor route network, the location and capacity of exits, the number and spatial location of escape groups Output: the escape path and delay time of each group, TET Algorithm procedure: 1.
Node operation, get arrays M and B; 2.
Initialize the occupancy time of each exit as zero; 3.
Select the exit E with the smallest occupancy time value, then use the Dijkstra algorithm to find the group g closest to E in M; 4.
Calculate the delay time of g, remove g from arrays M and B, then update the occupancy time of the exit E; 5.
If there is a node in the array B, go to the next step; otherwise, go to (7); 6.
Group merging, seen as the previous section for specific steps; 7.
If there is a node in the array M, go to (3); otherwise, go to the next step; 8.
The flow chart of the algorithm above is shown in Figure 4.

Performance Evaluation Index
Optimal Performance Statics (OPS) and Mean Non-flow Statics (MNS) are usually used to quantify the efficiency of multi-exit evacuation. Especially, OPS is mainly used to evaluate the utilization ratio of all exits [13,38], whose definition is as follows: where, EET a is the evacuation time of the last group in zone a, which is equal to the evacuation time of zone a. The value of OPS is in the interval [0,1]. The closer OPS is to 0, the better the utilization ratio of each exit is. On the contrary, the closer it is to 1, the lower the utilization ratio of other exits is, which indicates that most groups escape to the same exit. In this paper, OPS is mainly used in scenarios with a large population. It should be noted that the OPS of the evacuation in the group may be slightly larger than that in individuals. In addition, TET is used to judge the quality of evacuation strategies. The average path length of all evacuees is used to evaluate the safety during evacuation.

Time Complexity
Before the group merging method is carried out, the improved Tarjan's algorithm is required first to find out all branch nodes with the time complexity O N 2 .
Each time the evacuation zone is expanded, the exit with the minimum occupancy time will be determined. The time complexity is O(m). It is assumed that there are N b nodes in array B. Each node is extended by the Dijkstra algorithm, and the path length of all nodes in the network needs to be compared N times. In the best case, all nodes in array B are extended in the first loop, whose time complexity is O N 2 . In the worst case, no group is extended by group merging, whose time complexity is O N 2 After the process of evacuation partitioning is completed, the evacuation time of each zone needs to be compared to get TET, and the time complexity is O(m).

Case Study
Two experiments of single-exit network evacuation and multi-exit network evacuation were carried out respectively. The single-exit network evacuation experiment is used to verify the correctness and computation efficiency of the proposed algorithm. The multi-exit network evacuation is used to compare the evacuation efficiency of different staged evacuation algorithms. The experimental building is the teaching building J6 of Shandong University of Science and Technology (SDUST). Its indoor network is composed of 818 nodes and 853 arcs, shown in Figure 5. Nodes of the network are divided into three categories: source node, sink node, and intermediate node. The sink node is the exit of the building. There are three exits E1, E2, and E3 on the first floor of the building. Once a group has completely passed through the sink node, it is deemed that the group has escaped. The route and delay time of the group will be recorded. The source node is the initial location of one group. To accurately simulate evacuation situations in the real environment, the principle of the setting source node is that it must be a room node. The number and location of room nodes on different floors are shown in Table 2. The rest of the nodes are intermediate nodes.  All involved algorithms were developed in C-Sharp and ran on the desktop computer whose configuration was as follows: CPU i7-6700, main frequency 3.4 GHz, running memory 8G, and Windows 7 operating system.

Influence of Evacuation Density on TET
Evacuation density ER = EL/NL, where EL is the length of all groups and NL is the length of all arcs of the route network, which is 5443.3 m. In this experiment, we tested the influence of the evacuation density on TET by setting different evacuation densities. Exit E1 is set as the sink node with the capacity of 3 person/s, 6 person/s, and 9 person/s, respectively, to conduct three single-exit experiments. There are 338 source nodes, each of which represents an escape group. The speed of groups is set as a fixed value of 3 m/s. The size of groups is set to (1,5), (6,10), (11,15), (16,20) and (21,25), and the corresponding ERs are 18.6%, 48.7%, 80.7%, 111.8%, and 142.8%. Here, (1,5) indicates that the size of a group is a random number in the range of 1 to 5. The comparisons of TET of three algorithms under different evacuation densities are shown in Figure 6. When the speed of groups remains the same, the TET of the single-exit network evacuation experiment increases linearly with the increase of evacuation density. TET obtained by the proposed algorithm is equal to that of the other two algorithms. This is because only one evacuation zone in the single-exit network. The single-exit network evacuation can be seen as a network problem with one sink node solved by the Dijkstra algorithm, so the escape route of each group in the three algorithms is the same. The delay time is calculated according to the principle of "first in first out, second delay", so the delay time of each group in the three algorithms is the same. As a result, TET is also completely identical. The experiments of different capacities of the exit show that TET is significantly shortened as the exit capacity increases. Furthermore, the group merging method doesn't affect experimental results in the single-exit network evacuation, which indicates that it is feasible.

Influence of Number of Groups on Efficiency of Algorithms
The efficiency of the proposed algorithm and the PSEP algorithm is compared in Experiment 2. The number of groups is set to be 200, 400, 600, and 800, respectively. Adding the sink node E1, the number of the total nodes of the corresponding route networks will be 201, 401, 601, and 801, respectively. The size of groups is set to a random number among (5,20), and the escape speed is fixed at 3 m/s in the experiment. The results are shown in Figure 7. As shown in Figure 7, the execution time of the two algorithms is increasing as the number of groups increases. Compared with the PSEP algorithm, node operation increases the execution time before the implementation of group merging, but the group merging method can reduce the search range of the Dijkstra algorithm. When the evacuation zones are expanded, the delay time of each group is obtained in the proposed algorithm, which shortens the execution time. In fact, there is little difference in the computation efficiency of the two algorithms because their computation speeds are at the millisecond level.

Multi-Exit Network Evacuation Experiment
The PSEP algorithm adopts the partitioned and staged evacuation strategy to evacuate occupants with high population density, but takes no consideration of the density and spatial distribution of occupants and the capacity of exits. In fact, these factors have a great impact on evacuation efficiency. Accordingly, the density and spatial distribution of occupants are simulated by setting the room nodes with different sizes as the source nodes. Three exits, E1, E2, E3, are set in different capacities, respectively. It is assumed that the capacity of arcs is 9 person/s. The experimental route network model has five floors, and each floor is divided into five types of room nodes in different directions: southwest, southeast, northwest, northeast, and north. As shown in Figure 5a, there are mostly conference halls and bathrooms in the south, where the density of occupants is small, so they are treated as intermediate nodes. This is more conducive to the study of the impact of the uneven spatial distribution of occupants on evacuation efficiency.

Influence of Distribution of Occupants on Evacuation Efficiency
The room nodes are set as the source nodes in different directions in the building respectively. Sink nodes are set to E1, E2, and E3 with the capacity of 6 person/s, and other nodes are set to intermediate nodes. The size of groups is set to (1,10), and the speed is 3 m/s. When the distribution of groups changes, TET and the average path length of the three algorithms are compared. The influence of the distribution of occupants on evacuation efficiency is analyzed, as shown in Figure 8 and Table 3. TET d , TET p , and TET b represent TET of the distance-based staged algorithm, the PSEP algorithm, and the proposed algorithm respectively. L d , L p , and L b represent the average path length of all groups of them.   As shown in Figure 8, the TET of the proposed algorithm is the shortest and that of the PSEP algorithm is the longest in all experiments. Compared with the PSEP algorithm, the TET of the proposed algorithm is reduced by more than 16%. TET in the northeast is up to the maximum reduction of 34.29%. Except for the experiment in the northeast, the proposed algorithm is not far from the distance-based staged algorithm in terms of TET and the average path length. In the experiment in the north, although the evacuation density is half of the other directions, TET doesn't decrease significantly in the proposed algorithm, which means the evacuation density is low, and TET is mainly determined by the length of the path. The groups in the southeast are far away from exits E1 and E2, and they choose the nearest exit E3 to escape, so the result of the proposed algorithm is the same as that of the distance-based staged algorithm. The average path length of the PSEP algorithm is much longer than the other two algorithms in all experiments. In the case of uneven distribution of occupants and low evacuation density, the evacuation zones of the PSEP algorithm are expanded only according to the number of occupants. As a result, many escape groups are not assigned the shortest path to the emergency exit, which will increase the exposure time of evacuees in the hazardous environment during evacuation. Compared with the distance-based staged algorithm, the proposed algorithm further shortens TET by allocating some groups to non-nearest exits in the experiment in the southwest, northwest, northeast, and north. When occupants are unevenly distributed, the proposed algorithm is better than the other two algorithms.

Influence of Evacuation Density on Evacuation Efficiency
The purpose of this experiment is to study the influence of evacuation density on the TET of three algorithms under the condition of the uneven distribution of occupants. The larger the size of groups is, the greater evacuation density is. To highlight the inhomogeneity of spatial distribution of occupants, the room nodes in the southwest district are selected as the source nodes in the experiment. The size of groups is set to (1,5), (6,10), (11,15), (16,20), (21,25), (26,30), (31,35), (36,40), (41,45), and (46,50) respectively, and the speed is 3m/s. The distance-based staged algorithm and the PSEP algorithm are used to compare with the proposed algorithm. The results are shown in Figure 9 and Table 4.  As shown in Figure 9, the TET of the distance-based staged algorithm is less than that of the PSEP algorithm when ER is 3.58%. This is because, in small-scale evacuation, the path length has a greater impact on TET. As ER increases, TET of the distance-based staged algorithm increases rapidly and the evacuation efficiency decreases significantly. As shown in Table 4, all room nodes in the southwest are extended by the exit E1, and the range of the evacuation zone does not change with the change of ER in the distance-based staged algorithm. Its expansion mode is only related to the location of exits. When ER is higher than 9.55%, the evacuation efficiency of the distance-based staged algorithm drops, which is mainly affected by the number of occupants. In the PSEP algorithm, when ER is low, there will be no serious congestion along the shortest path. If the process of partitioning expands base on the number of occupants, some groups may not be assigned to the closest exit. This will lead to a longer TET. However, with the increase of ER, if all groups choose the nearest exit, there will be serious congestion during the evacuation, resulting in a decline in evacuation efficiency. In this case, groups are equally allocated to each exit according to the number of occupants, which improves the evacuation efficiency. Therefore, the PSEP algorithm is superior to the distance-based staged algorithm in the case of relatively high evacuation density. As ER increases, OPS decreases in the PSEP algorithm and finally tends to 0.2. In the proposed algorithm, when ER increases from 15.52% to 21.49%, the reduction rate of TET increases, and OPS is lower than 0.1. The experimental results show that the proposed algorithm has better evacuation efficiency for the change of evacuation density under the uneven distribution of occupants.

Influence of Exit Capacity on Evacuation Efficiency
All room nodes are set as the source nodes. The capacity of the exit E1 is 3 person/s, 6 person/s, and 9 person/s, respectively, and the capacity of other exits is 6 person/s. The speed of groups is 3 m/s, and the size of groups is set to (1,5), (6,10), (11,15), (16,20), (21,25), and (26,30), respectively. The purpose of this experiment is to test the performance of the proposed algorithm in the condition that the capacity of exit is different. The experimental results of the proposed algorithm and the PSEP algorithm are shown in Figure 10 and Table 5. From Figure 10, the TET of the proposed algorithm linearly increases with the increase of ER. When ER is fixed, increasing the capacity of exit E1 can shorten the TET. The impact of the capacity of the exit E1 on the TET is not very obvious, but that of the PSEP algorithm is very great. When the capacity of the exit E1 is 3 person/s, the reduction rate of TET of the proposed algorithm is about 33%. In the PSEP algorithm, the occupants in the evacuation zone E1, with the weakest traffic capacity, need more time to evacuate. In this case, TET is equal to the evacuation time of zone E1, resulting in a large OPS value. When the capacity of the exit E1 is 6 person/s, TETs and OPS values obtained by the two algorithms are very close. The number of occupants in each zone becomes a key factor affecting TET if the capacity of different exits is the same. When the capacity of the exit E1 is 9 person/s, occupants in zone E1 complete evacuation first, and TET is equal to the evacuation time of zone E2 or E3. TET of the proposed algorithm is reduced by 12% compared with that of the PSEP algorithm. When the PSEP algorithm is used to formulate an evacuation plan, the influence of the exit capacity on the evacuation efficiency is ignored. When ER is high, TET is determined by the evacuation zone with the weakest traffic capacity. However, the capacity of exit E1 does not affect the OPS value obviously, which is lower than 0.1. The proposed algorithm can dynamically adjust the number of occupants in each zone according to the exit capacity to balance the evacuation time of each zone, providing a stable and efficient evacuation plan.

Evacuation Process Simulation
To visually verify the effectiveness of the proposed algorithm, we simulated the emergency evacuation process using our software. In the simulation scene, different colors of lines indicate different groups, which are produced randomly by the simulating system. The length represents the length of a group, and the width indicates the traffic flow of a group. There are 383 source nodes and three sink nodes in the testing network. The capacity of exit E1 is 3 person/s, and that of other exits is 6 person/s. The size of groups decreases with the height of the floor, and the speed is 3 m/s. Table 6 statistics the information of each zone. The evacuation process of the PSEP algorithm is shown in Figure 11. That of the proposed algorithm is shown in Figure 12. Table 6 shows the number of groups, the number of occupants in different zones, and their evacuation time of the PSEP algorithm and the proposed algorithm respectively. It can be seen that most of the groups belong to zone E1, but each zone has nearly the same number of occupants when the PSEP algorithm is adopted. This means that many groups on the high floor are extended by zone E1. The evacuation strategy of "time equalization" makes many nodes originally belonging to zone E1 assigned to zones E2 and E3, so that each evacuation zone has approximately equal evacuation time. The evacuation time of zones E2 and E3 increases by 30 s compared with that of the PSEP algorithm, but the evacuation time of zone E1 reduces by 180 s.   The visual simulation process of the PSEP algorithm is shown in Figure 11. It is assumed that the start time of evacuation is 0. All occupants in zones E2 and E3 already have completed evacuation after 280 s. However, some groups on floor 5 still have not left safety exits after 420 s. Therefore, the evacuation strategy planned by the PSPE algorithm under this condition is not optimistic. By comparison, the strategy of the proposed algorithm makes all groups complete evacuation after 300.28 s, as shown in Figure 12. If the capacity of exits is considered, the evacuation time of the three zones is still almost equal. The proposed algorithm improves the utilization rate of exits and greatly reduces the evacuation time. On the whole, the proposed algorithm is better than the other two staged evacuation algorithms, which provides a new method for indoor emergency evacuation.

Conclusions
The density and spatial distribution of occupants and the capacity of exits have an impact on emergency evacuation indoors. Based on the analysis of staged evacuation algorithms, a novel multi-zone staged indoor emergency evacuation algorithm based on time equalization is proposed. It can perform excellently in various evacuation scenarios and significantly shorten TET. In the partitioning process, a group merging method is proposed to overcome the drawbacks of the PSEP algorithm that causes unreasonable expansion of evacuation zones. In addition, a "delayed waiting" strategy is adopted to ensure that there will be no path conflicts during the evacuation process. The strategy makes the indoor emergency evacuation more orderly, safe, and efficient. In addition, the proposed method can also be applied to outdoor emergency evacuation, which has strong operability and robustness.
As a staged evacuation method considering the balance of time, the proposed algorithm can get better planning results. However, it does not take into account the real-time state of the route network. In the case of an actual fire disaster, some nodes and arcs in the network may become impassable. Therefore, how to combine the staged evacuation strategy with dynamic path planning needs further research. In addition, the strategy of waiting in the original place of emergency needs to be further discussed, because it may be unsafe and does not apply to the occurrence of local disasters such as an indoor fire.