**6. Conclusions**

For indoor emergency evacuation with a large number of evacuees, a partitioned and staged evacuation planning algorithm considering indoor congestion is proposed. According to the idea of "balanced evacuation", the algorithm coordinates the number of evacuees at different exits by the improved Dijkstra algorithm, which partitions the whole evacuation area and turns the multi-exit evacuation into the single-exit evacuation, thus simplifying the complexity of problem processing. For the single-exit evacuation, the proposed algorithm only needs to consider the time conflict between the time windows of all evacuation groups at exits, then it can calculate the departure time of each group. Compared with the traditional algorithm that considers the conflict between the time windows of all evacuation groups at every node of the evacuation paths to calculate the departure time of each group, it reduces the calculation at redundant path nodes and greatly improves the efficiency of emergency evacuation planning. In practice, the PSEP algorithm in this paper provides not only the best evacuation path but also the optimal departure time for each group to ensure that all groups will not be congested during evacuation, which has a strong operability. The smart city makes it possible to access indoor evacuation information in real time such as the distribution of evacuees and the development of an indoor disaster, which provides a data base for the real-time design of an evacuation scheme. The design requires high efficiency of planning algorithms. Our algorithm is simple and has

grea<sup>t</sup> advantages in operating e fficiency, which will meet the development and demand for intelligent emergency evacuation systems and emergency command.

Although the PSEP algorithm achieves better results in the case of crowded indoor occupants by transforming the multi-exit indoor evacuation problem into the single-exit indoor evacuation problem based on the "balanced evacuation" principle, it is still an approximate optimal result due to the lack of rigorous mathematical reasoning and proofs. Meanwhile, the partition strategy may not obtain the global optimal solution when the indoor occupants are sparse. Therefore, we will consider the influence of the density and distribution of evacuees on the total evacuation time and the connection among all exits in the future to optimize the total evacuation time further. In addition, when an emergency occurs, let the groups that may be congested wait in the original place, which is not applicable to the occurrence of local disasters such as indoor fire. It should be considered to set up an indoor disaster risk area, evacuate the evacuees in the risk area to the safety area first, and then evacuate them to the safety exit. We will attempt to resolve this in a further study.

**Author Contributions:** Conceptualization, Litao Han and Haisi Zhang; Methodology, Litao Han, Huan Guo and Qiaoli Kong; Software, Huan Guo, Haisi Zhang and Cheng Gong; Validation, Huan Guo, Haisi Zhang and Cheng Gong; Writing–original draft, Litao Han, Huan Guo and Aiguo Zhang; Writing–review & editing, Litao Han, Qiaoli Kong and Aiguo Zhang. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Natural Science Foundation of Shandong Province (Grant Nos. ZR2017MD003 and ZR2017MD032), the National Natural Science Foundation of China (Grant No. 41704015), and the Natural Science Foundation of Fujian Province (Grant No. 2016J01198).

**Acknowledgments:** We are grateful for the assistances of the reviewers and editors, and especially would like to express our gratitude to Xiang Li and his team from Key Lab of Geographical Information Science, Ministry of Education, East China Normal University for providing their source code that makes us able to compare our algorithm.

**Conflicts of Interest:** The authors declare no conflict of interest.
