An Agent-Based Simulation of Deep Foundation Pit Emergency Evacuation Modeling in the Presence of Collapse Disaster

: With the gradual expansion of high buildings and underground spaces, deep foundation pits have been widely used in these engineering projects, but if they are not well-designed, safety problems occur. Proper deep foundation pit design requires proper exit distribution. However, calculating an adequate number of exit distributions for evaluation is difﬁcult due to the numerous inﬂuential factors existing in the deep foundation pit environment. To this end, this paper presents a prototype of a decision-making system that uses agent-based modeling to simulate deep foundation pit evacuation in the presence of collapse disaster. By modeling the collapse occurrence process and agent escape process, an agent-based evacuation model is built, and a modiﬁed simulation-based particle swarm optimization algorithm is used to solve the optimization problem of exit distribution. Extensive experiments are conducted to verify the system, and the results show that the system provides a feasible framework for deep foundation pit evacuation.


Introduction
With the development of high buildings and the spreading use of underground space, deep foundation pit projects have been built to complete the groundwork.A deep foundation pit usually refers to a pit that is deeper than five meters and with large scale.Once certain disaster occurs in the pit, it will spread rapidly, result in an emergency, and cause serious injury to the workers inside.For example, in 2008, a collapse disaster happened at the Hangzhou metro building site, which caused 21 worker deaths and four worker injuries [1].A proper exit distribution plan designed for early escape is an important safety measure to protect workers from deep foundation pit collapse.
Unlike traditional engineering, a deep foundation pit is a semi-closed environment, which means the disaster occurrence process and evacuation process are different.As one of the most frequent disasters in a deep foundation pit, collapse is caused by changes of soil structure.The deeper the pit is dug, the higher the soil pressure that is put on the supporting structure.When the soil structure changes, the supporting structure cannot support the sidewall, and collapse occurs.Since the environments and soil situations are different in each pit, it is difficult to predict evacuation performances for deep foundation pits with complex layouts [2].Traditional optimization methods [3][4][5] such as linear or nonlinear planning, graph theory, network optimization, multi-objective planning, and game theory can be used for solving optimization problems.However, since the disaster propagation and agent escaping are difficult to describe, traditional analytical methods cannot solve this kind of problem, which is dynamic and changing.In order to prevent injuries caused by collapse disaster, a proper evacuation model is needed to simulate the disaster process and produce accurate results for occupants in a deep foundation pit.
For emergency evacuation, since the cost of holding realistic experiments cannot be easily afforded and the experimental data are difficult to capture, the computer simulation method has become popular to solve safety problems [6].Some evacuation models [7][8][9] have been successfully established to solve crowd evacuation in high buildings and fireworks, which makes it possible to calculate relevant quantitative solutions in the field without practical experiments.Such systems use a bottom-up modeling approach in which system control is decentralized and governed only by the behavior of agents.
The safe exit in a deep foundation pit is usually a ladder set on the sidewall.The steel pipe of the ladder is driven into the soil, and handrails are arranged on both sides of the ladder.Since the setting of such escape exits must be stable, it will be tightly adhered to the sidewall.Therefore, it will affect the supporting structure of the sidewall.So, it is not suitable to set too many.How to set up a reasonable number of ladders to ensure sufficient escape routes and properly allocate them is an important issue to be solved.At present, researches on the safety of deep foundation pits mainly focus on the design of the supporting structure [10,11], but lack designs for exit distribution and setting.
This paper presents a prototype of an agent-based simulation for evacuation in deep foundation pits, named DPE.First, a collapse disaster model and agent-based escape model are designed.Intelligent technology is included to represent the self-motivation, response, and decision-making ability of agents in the escape process.Then, an effective optimization algorithm that can be adopted to simulate occupant evacuation is presented.According to the given ratio of sidewall collapse probability, a large sample of disaster events is generated.With the generated initial exit distribution, we use the parallel simulation method to simulate the escape rate.Through the simulation-based optimization algorithm, the iterative updating strategy is used to optimize the exit distribution.The contribution of this study is twofold: 1.
It provides an agent-based system that is specifically designed for a deep foundation pit evacuation simulation of a collapse disaster, and a novel collapse model and agent escape model is built.2.
The system is built for customization, and provides the user with the ability to seek optimal exit distribution.A simulation-based optimization algorithm is applied to optimize the distribution, the particle swarm optimization (PSO), and generalized Voronoi diagram (GVD) algorithm is mixed in the simulation-based algorithm.
The remainder of this paper is organized as follows.Related work is presented in Section 2. The framework of system is introduced in Section 3. The mathematical method is presented in Section 4. The particle swarm optimization and weighted Voronoi algorithm are presented in Section 5. Experimental results are presented in Section 6.Finally, we conclude the paper and present an indication of future work in Section 7.

Related Work
Deep foundation pit emergency evacuation is a typical problem for crowd evacuation.Since the disaster in a deep foundation pit occurs suddenly, people have little time to escape.Designing proper exit distribution becomes one important approach to improve the survive rate.If the proper exit distribution is implemented beforehand, harmful effects can be significantly mitigated.Agent-based simulation is an effective approach to solve the evacuation optimization problem [12].
Several recent studies involving agent-based models for crowd evacuation simulation exist in the current literature.Simulations have been proposed to solve the crowd evacuation problem.For the evacuation process simulation, Levin et al. [13] used a model of pedestrian behavior to investigate the mechanisms of panic, and jamming by uncoordinated motions in crowds is used to prevent dangerous crowd pressures.Kirchner et al. [14] presented the simulation of evacuation processes by using a recently introduced cellular automaton model for pedestrian dynamics.Joo et al. [8] abstracted the evacuation progress as a progress that the agent objects are driven by various factors with time flow.Boje and Li [15] investigated the level of integration between digital building models and crowd simulation.Weiss et al. proposed [16] a position-based dynamics for real-time crowd simulation.
For agent modeling in evacuation, Yang et al. [17] proposed an agent-based fire and human interaction model, and analyzed the grid resolution to determine the appropriate grid that will optimize the solution accuracy and time.Wang et al. [18] employed an ant colony evacuation model that included avoidance and preferential path selection behaviors.Hong et al. [19] proposed a self-evacuation modeling and simulation of passengers in metro stations to provide a quantitative analytical basis for developing evacuation strategies.Multiple agent-based models at differing resolutions have been integrated to simulate building evacuation dynamics [20].Ha et al. [21] proposed a system of self-moving particles whose motion is governed by the social force model to investigate the effect of complex building architecture during urgent evacuation.Anh et al. [22] provided a hybrid agent-based model for roadway evacuation simulation that combined macro and micro-level simulations to increase the overall simulation efficiency while capturing necessary low-level simulation details.Pan et al. [23] used a multi-agent model to simulate behavior during evacuation that exhibits competitive, queuing, and herding behaviors.Yuksel [24] studied the pedestrian dynamics and learning process and applied the NeuroEvolution of Augmenting Topologies in evacuation simulation.Trivedi [25] proposed an agent-based evacuation model considering human panic behavior.
Researches on deep foundation pits have focused on the supporting structure design and emergency planning.Zhou et al. [26] proposed a numerical simulation of deep foundation pit dewatering and the optimization of controlling land subsidence, and presented a case study on Shanghai Metro station.Zhang et al. [27] studied the effect of foundation pit excavation on the buried pipeline.A three-dimensional model of a pipeline and a foundation pit was established, and the variation regulations of a pipeline's deformation under the foundation pit excavation were investigated.Luo et al. [28] proposed a finite element numerical simulation of three-dimensional seepage control for deep foundation pit dewatering.By analyzing the supporting structure for the deep foundation pit of the Hangzhou metro, Yang et al. [29] discussed the factors of supporting structure and soils.Zhou et al. [30] proposed a fuzzy comprehensive evaluation method based on Bayesian networks to apply in the risk precautions for deep foundation pit constructions.LiZheng Company developed a system named "LIZHENG deep foundation pit design software" [31] to simulate the building process for deep foundation pits, which can be used to design supporting structure settings.
The latest research on optimization algorithms has focused on using neural networks and fuzzy controllers to improve the searching precision.Saadat et al. [32] proposed the harmony search algorithm for training the echo state network in an online manner.Vrkalovic et al. [33] presented model-free sliding mode controllers and Takagi-Sugeno fuzzy controllers for the flux and conductivity control of reverse osmosis desalination plants.Hosen et al. [34] proposed a neural networks ensemble procedure to construct quality prediction intervals.Precup et al. [35] proposed the tuning of a class of fuzzy control systems to ensure a reduced parametric sensitivity on the basis of a new gravitational search algorithm.Due to a lack of sufficient real evacuation data, we use traditional evolutionary algorithms to solve this problem, and we will consider using the learning method in future work.Genetic algorithms (GAs) and particle swarm optimization (PSO) [36][37][38] have been found to be very robust and general for solving engineering design problems.They require the use of large population size, and may suffer from slow convergence.Both of these lead to large number of function evaluations, which can significantly increase the computational cost.Since the parameter in the PSO algorithm is relatively less, we apply the PSO algorithm in the system.
Agent-based simulation is a mature approach to solve evacuation, but has not been used for deep foundation pit evacuation.In this paper, taking advantage of the agent-based approach, we propose an agent-based simulation that has been used for deep foundation pit evacuation safety research.Based on the modeling of the collapse disaster process and agent escape process, a simulation-based PSO algorithm is proposed to calculate the optimal exit distribution.

Simulation Framework of DPE System
In this section, we will introduce the framework of the proposed DPE system and explain the working flow between different modules.The DPE system focuses on the simulation of the deep foundation pit collapse disaster process, and can be used to calculate the optimal exit distribution for different exit numbers.First, we put user input parameters such as the pit size and related environmental information into the DPE system.Then, the DPE system will simulate the disaster process, and optimize the exit distribution and output result.During the optimization process, the simulation-based optimization method is used to obtain the result of different solutions.The modular method is applied to reduce the coupling between modules, which is convenient for users to remove or extend modules.
The framework of the DPE system is shown in Figure 1, which consists of three modules: input module, simulation engine module, and output module.propose an agent-based simulation that has been used for deep foundation pit evacuation safety research.Based on the modeling of the collapse disaster process and agent escape process, a simulation-based PSO algorithm is proposed to calculate the optimal exit distribution.

Simulation Framework of DPE System
In this section, we will introduce the framework of the proposed DPE system and explain the working flow between different modules.The DPE system focuses on the simulation of the deep foundation pit collapse disaster process, and can be used to calculate the optimal exit distribution for different exit numbers.First, we put user input parameters such as the pit size and related environmental information into the DPE system.Then, the DPE system will simulate the disaster process, and optimize the exit distribution and output result.During the optimization process, the simulation-based optimization method is used to obtain the result of different solutions.The modular method is applied to reduce the coupling between modules, which is convenient for users to remove or extend modules.
The framework of the DPE system is shown in Figure 1, which consists of three modules: input module, simulation engine module, and output module.The input module refers to the User Interface(UI), which allows users to enter parameters and control the simulation process.Specifically, it is used to start, pause, continue, and stop the simulation and set the simulation speed.The simulation engine module includes a simulation engine, mathematical models, optimization, and data collection.The mathematical models refer to the mathematical representations for the environments, collapse disaster, and agent behaviors.The optimization module refers to the particle warm optimization algorithm and the adaptive weighted Voronoi diagram algorithm.The data collection module can record the data generated during the simulation.The output module contains the display module and result generation module.The system provides several different display modes, and a tree structure is constructed to display the agents' information during simulation.The result generation module generates a report about the simulation result, which includes the following parts: description of environmental information, an optimal plan, and agents' escape tracks.In each simulation, users input the parameters of deep foundation pits into the system.After receiving the input parameters, the simulation begins to run for the optimal results of each solution using the optimization algorithm, and the mathematical model is used to support the modeling in the simulation.In the following section, the mathematical model and optimization algorithm will be introduced.

Mathematical Model for the DPE System
In this section, the mathematical model of our DPE system is proposed.In order to simulate the whole process of deep foundation pit evacuation, two models are designed: a collapse model and an agent-based escape model.The collapse model uses the discrete element method to simulate the gradual process of rock slopes.The agent-based escape model uses an artificial potential field to simulate the agent behavior and uses a single-serve queuing model to simulate the escape process in exit.The input module refers to the User Interface (UI), which allows users to enter parameters and control the simulation process.Specifically, it is used to start, pause, continue, and stop the simulation and set the simulation speed.The simulation engine module includes a simulation engine, mathematical models, optimization, and data collection.The mathematical models refer to the mathematical representations for the environments, collapse disaster, and agent behaviors.The optimization module refers to the particle warm optimization algorithm and the adaptive weighted Voronoi diagram algorithm.The data collection module can record the data generated during the simulation.The output module contains the display module and result generation module.The system provides several different display modes, and a tree structure is constructed to display the agents' information during simulation.The result generation module generates a report about the simulation result, which includes the following parts: description of environmental information, an optimal plan, and agents' escape tracks.In each simulation, users input the parameters of deep foundation pits into the system.After receiving the input parameters, the simulation begins to run for the optimal results of each solution using the optimization algorithm, and the mathematical model is used to support the modeling in the simulation.In the following section, the mathematical model and optimization algorithm will be introduced.

Mathematical Model for the DPE System
In this section, the mathematical model of our DPE system is proposed.In order to simulate the whole process of deep foundation pit evacuation, two models are designed: a collapse model and an agent-based escape model.The collapse model uses the discrete element method to simulate the gradual process of rock slopes.The agent-based escape model uses an artificial potential field to simulate the agent behavior and uses a single-serve queuing model to simulate the escape process in exit.

Collapse Model
The collapse model describes the process of collapse that happened on the sidewall of a deep foundation pit.As one of the most frequent disasters in deep foundation pits, collapse is characterized by rapid occurrence and strong destructive force, accompanied by physical and mechanical phenomena such as a discontinuity of the displacement field, large displacement, and impact collision.To simplify the process, the discrete element model (DEM) [39,40] is used to model the collapse process.Using the discrete element model, the collapsed region can be decomposed into subunits, which could be calculated for simulation, and the whole collapse process can be simulated by analyzing each subunit's movement.
The DEM is designed to simulate the gradual process of rock slopes, and has been applied to study the mechanical behavior of discontinuous media such as rock [41].It divides the research object into a large number of granular discrete units according to the structure.By calculating the stress of each unit, the collapse process is modeled.
Using the DEM to decompose the collapsing sidewall into subunits, the stress of these subunits is modeled and calculated.Each decomposed subunit cell is gridded into a size of 1 × 1 × 1.The mass of each cell is put on centroid.The stress between adjacent cells produces a particle internal force.Cells will move under the resultant forces of gravity force, internal force, and damping force.When the moving displacement is more than the deformation threshold of the supporting equipment, the supporting force becomes weaker, and the sidewall will fall into the deep foundation pit, causing its collapse.The stress characteristic is shown in Figure 2.

Collapse Model
The collapse model describes the process of collapse that happened on the sidewall of a deep foundation pit.As one of the most frequent disasters in deep foundation pits, collapse is characterized by rapid occurrence and strong destructive force, accompanied by physical and mechanical phenomena such as a discontinuity of the displacement field, large displacement, and impact collision.To simplify the process, the discrete element model (DEM) [39,40] is used to model the collapse process.Using the discrete element model, the collapsed region can be decomposed into subunits, which could be calculated for simulation, and the whole collapse process can be simulated by analyzing each subunit's movement.
The DEM is designed to simulate the gradual process of rock slopes, and has been applied to study the mechanical behavior of discontinuous media such as rock [41].It divides the research object into a large number of granular discrete units according to the structure.By calculating the stress of each unit, the collapse process is modeled.
Using the DEM to decompose the collapsing sidewall into subunits, the stress of these subunits is modeled and calculated.Each decomposed subunit cell is gridded into a size of 1 × 1 × 1.The mass of each cell is put on centroid.The stress between adjacent cells produces a particle internal force.Cells will move under the resultant forces of gravity force, internal force, and damping force.When the moving displacement is more than the deformation threshold of the supporting equipment, the supporting force becomes weaker, and the sidewall will fall into the deep foundation pit, causing its collapse.The stress characteristic is shown in Figure 2. We use the classical earth pressure model in Rankine's theory to calculate the stress force [42].As shown below, the stress can be calculated with the stress in the semi-infinite elastic body combining and the limit equilibrium conditions: is the coefficient of soil pressure, which can be inferred from the standard table.  is the weight of soil above the cell.The supporting force is decided by the supporting material and structure: refers to the support structure, which includes row piles, continuous walls, etc.  refers to the support materials, such as cement, steel and so on.
On the basis of the computational force, the deformation of each element is calculated using the discrete element displacement model: is the mass of cell a,  ̈ is the acceleration vector of a, and    is the external force on a.We use the classical earth pressure model in Rankine's theory to calculate the stress force [42].As shown below, the stress can be calculated with the stress in the semi-infinite elastic body combining and the limit equilibrium conditions: K ai is the coefficient of soil pressure, which can be inferred from the standard table.σ ajk is the weight of soil above the cell.The supporting force is decided by the supporting material and structure: structure refers to the support structure, which includes row piles, continuous walls, etc. material refers to the support materials, such as cement, steel and so on.
On the basis of the computational force, the deformation of each element is calculated using the discrete element displacement model: M a is the mass of cell a, .. d a is the acceleration vector of a, and F ext a is the external force on a.
Symmetry 2018, 10, 581 The calculation is performed using the explicit integration method, and the acceleration of the particle is described using a central difference formula.By calculating the stress and historical displacement, the displacement at next moment can be calculated: d n+1 , d n , and d n−1 are the displacement in time n + 1, n, and n − 1. ∆t is the time step.
The supporting structure has a fixed threshold for holding the wall.When the total displacement is close to the threshold, an early warning is issued.When the displacement exceeds the threshold, the supporting structure will be destroyed, and the sidewall will fall horizontally into the pit, which can be regarded as parabolic movement.The initial velocity v 0 is generated at a short duration of action under acceleration: .. d 0 is the initial acceleration, and ∆t is the time the initial velocity is generated.The falling time t is calculated using the free fall formula: h is the falling height of collapse central, and g is the acceleration of gravity.The location of the dropped cell p(x, y, 0) is calculated according to a parabolic formula: p(x 0 , y 0 , z 0 ) is the initial position of the cell and ∆ f → p 0 , s is the position displacement of the cell.

Agent-Based Escape Model
An agent-based escape model is used to simulate the agent escape process.When collapse occurs, agents need to escape from the dangerous area, and approach a safety exit.In order to simply the problem, we only focus on the agent's maneuver behavior.
We base our model on the steering model developed by Thunderhead Engineering [43], and modify it by modeling the disaster's influence on agent evacuation.The artificial potential field method [44] is used to model the maneuver model.The maneuver model is used to plan agents' paths to their target exit, and can dynamically adjust the path while moving.By analyzing the factors that affected agents' movement, a comprehensive potential field in the deep foundation pit is formed.The obstacles generate a repulsive force, and the target provides an attraction force, integrating into a resultant force to drive the agent's movement.Under this resultant force, agents can move in the shortest path according to the gradient descent, avoiding obstacles and moving toward the target exit.
The agent decision model is single target decision model that is used to look for the nearest exit and select it as the maneuvering target T: T = (e s |S(p a , p e s ) ≥ S(p a , p e i ), e i {e}) a (8) In the artificial potential field method, the gravitational potential energy is defined as follows: w a refers to attraction constant, p a = (x a , y a ) refers to the position of an agent, and p g = x g , y g refers to the position of the target.The repulsive force U i re created by obstacles is as follows: (10) η refers to the repulsive force coefficient, P a is the position of attraction, P i ob is the position of obstacle i, and the resultant force U t is as follows: U a is the force of attraction, and U i re is the force of obstacle i.According to the above formulas, an artificial potential field can be constructed in the grid map through the following steps: 1.
Initializing the grid potential energy field, gravitational constant, and repulsion constant η; 2.
For each tile, calculating the distance to the target point and the gravitational potential energy; 3.
Extracting the threats in a map, calculating the repulsion potential, and superimposing the force; 4.
Adding the attracting potential force and the repulsion potential force to obtain the total potential force and assign it to tile square (i,j) ;

5.
If it is the last tile, the algorithm comes to an end.If not, goes to step 2.
Figure 3 shows the artificial potential field calculating process.After the value is assigned by the artificial potential field method, the image after three-dimensional display is performed.In the figure, the agent moves according to the method of selecting the minimum potential energy value around it, and can reach the target point.
is the force of attraction, and    is the force of obstacle i.According to the above formulas, an artificial potential field can be constructed in the grid map through the following steps: 1. Initializing the grid potential energy field, gravitational constant, and repulsion constant η; 2. For each tile, calculating the distance to the target point and the gravitational potential energy; 3. Extracting the threats in a map, calculating the repulsion potential, and superimposing the force; 4. Adding the attracting potential force and the repulsion potential force to obtain the total potential force and assign it to tile  (,) ; 5. If it is the last tile, the algorithm comes to an end.If not, goes to step 2.
Figure 3 shows the artificial potential field calculating process.After the value is assigned by the artificial potential field method, the image after three-dimensional display is performed.In the figure, the agent moves according to the method of selecting the minimum potential energy value around it, and can reach the target point.When collapse happens, the falling wall will cover continual area.Agents need to approach to the safety exit and get out of the pit.Unlike a traditional block-out emergency evacuation, agents are still in danger until they completely get out from the exit and arrive on the ground.Agents would not change their target exit unless the target exit is destroyed.If so, the decision-making model is used to select a new target.The escape process at an exit should represent this process.
An exit starts to have attraction for agents when collapse occurs.Since the number of exits is generally less than the number of agents, agents need to wait to use the exit and climb out to the ground.This process is similar to the queuing system, so we use the server model to model the escape process at an exit.
A typical queuing system can be described as: in order to obtain service, customers need to wait in the queue while waiting for service, and will leave after receiving service.In a deep foundation pit evacuation, exits are the servers and agents are the customers.Since the congestion of agents will cause the escape speed in the exit to decrease, we assume that each agent needs to spend time to enter the exit.The interval time between adjacent agents' entry is λ.By importing the interval time, the influence on agents' escape speed is eliminated.After receiving service, agents begin to climb out via the exit or a safety ladder.The climb process will take time before the agents finally get to the ground.The escape process has the following features: 1. Input process.Agents arrive at the server according to the time they move to the escape route, and the arrival times are independent of each other.2. Queuing rules.When the server is occupied, agents will wait in the queue, and the queue length is not limited.The service order follows the first-come, first-served rule.The waiting time of agents for the service is only related to the pit situation.While waiting for service, the impact of When collapse happens, the falling wall will cover continual area.Agents need to approach to the safety exit and get out of the pit.Unlike a traditional block-out emergency evacuation, agents are still in danger until they completely get out from the exit and arrive on the ground.Agents would not change their target exit unless the target exit is destroyed.If so, the decision-making model is used to select a new target.The escape process at an exit should represent this process.
An exit starts to have attraction for agents when collapse occurs.Since the number of exits is generally less than the number of agents, agents need to wait to use the exit and climb out to the ground.This process is similar to the queuing system, so we use the server model to model the escape process at an exit.
A typical queuing system can be described as: in order to obtain service, customers need to wait in the queue while waiting for service, and will leave after receiving service.In a deep foundation pit evacuation, exits are the servers and agents are the customers.Since the congestion of agents will cause the escape speed in the exit to decrease, we assume that each agent needs to spend time to enter the exit.The interval time between adjacent agents' entry is λ.By importing the interval time, the influence on agents' escape speed is eliminated.After receiving service, agents begin to climb out via the exit or a safety ladder.The climb process will take time before the agents finally get to the ground.The escape process has the following features: 1.
Input process.Agents arrive at the server according to the time they move to the escape route, and the arrival times are independent of each other.2.
Queuing rules.When the server is occupied, agents will wait in the queue, and the queue length is not limited.The service order follows the first-come, first-served rule.The waiting time of agents for the service is only related to the pit situation.While waiting for service, the impact of disaster is still calculated.When the disaster approaches, agents will give up the queue and reselect another escape exit.

3.
Service characteristic.There are multiple exits in the deep foundation pit, which can be regarded as a parallel connection of multiple servers.Due to the long distance between each server, an agent can select a server at any time.Therefore, each exit can be seen as a single-server model.
Figure 4 shows the exit ladder for escaping.Based on above features, the escape process in exit can be modeled as a generally GI/M/1/∞/FCFS server model [45].Each exit is modeled as a single-server model in which customers arrive at random, with constant service time, unlimited team leaders, and first-in, first-out rule.The service process can be modeled by using the Markov state transition equation, as shown in Figure 5. 3. Service characteristic.There are multiple exits in the deep foundation pit, which can be regarded as a parallel connection of multiple servers.Due to the long distance between each server, an agent can select a server at any time.Therefore, each exit can be seen as a single-server model.
Figure 4 shows the exit ladder for escaping.Based on above features, the escape process in exit can be modeled as a generally GI/M/1/∞/FCFS server model [45].Each exit is modeled as a single-server model in which customers arrive at random, with constant service time, unlimited team leaders, and first-in, first-out rule.The service process can be modeled by using the Markov state transition equation, as shown in Figure 5.

Optimization Algorithm
Based on above models, an evacuation system is built.Simulation can be conducted in the system.In order to generate an optimal solution, an optimization algorithm is need.We use the particle swarm optimization algorithm to optimize the exit distribution, and during each epoch, we use the weighted Voronoi diagram to generate a global optimal exit-agent corresponding solution, which is needed in calculating a particle's fitness.3. Service characteristic.There are multiple exits in the deep foundation pit, which can be regarded as a parallel connection of multiple servers.Due to the long distance between each server, an agent can select a server at any time.Therefore, each exit can be seen as a single-server model.

Particle Swarm Optimization Algorithm
Figure 4 shows the exit ladder for escaping.Based on above features, the escape process in exit can be modeled as a generally GI/M/1/∞/FCFS server model [45].Each exit is modeled as a single-server model in which customers arrive at random, with constant service time, unlimited team leaders, and first-in, first-out rule.The service process can be modeled by using the Markov state transition equation, as shown in Figure 5.

Optimization Algorithm
Based on above models, an evacuation system is built.Simulation can be conducted in the system.In order to generate an optimal solution, an optimization algorithm is need.We use the particle swarm optimization algorithm to optimize the exit distribution, and during each epoch, we use the weighted Voronoi diagram to generate a global optimal exit-agent corresponding solution, which is needed in calculating a particle's fitness.

2.
Accept the service: wait queue: s = s − 1, and the server status is set to False.

3.
Service completed: exit queue: r = r + 1, the server status is set to True.

Optimization Algorithm
Based on above models, an evacuation system is built.Simulation can be conducted in the system.In order to generate an optimal solution, an optimization algorithm is need.We use the particle swarm optimization algorithm to optimize the exit distribution, and during each epoch, we use the weighted Voronoi diagram to generate a global optimal exit-agent corresponding solution, which is needed in calculating a particle's fitness.

Particle Swarm Optimization Algorithm
The goal of the DPE system is to generate an optimal exit distribution, which can be abstracted into a single-objective constraint satisfaction problem, and be solved by applying an evolution optimization algorithm [46].
The optimization problem is to maximize the total escape rate of agents, which is influenced by the exits' distribution p i : i is the exit ID. j is the agent ID. survive j is the state of agent j (survival or death).p i is the exits distribution.f (∑ survive j , p i ) is the escape rate under the exits' distribution j.The optimization algorithm is used to optimize the exits' distribution to reach a higher escape rate.The result of the optimization algorithm is the exits' distribution.
This problem is a typical NP-hard (Non-deterministic Polynomial) planning problem, which can be solved by applying the evolutionary algorithms.A traditional genetic algorithm is complex, with many intermediate factors, which is not suitable for rapid iterative optimization.The PSO algorithm is an evolution algorithm that simulates bird crowd behavior to search for the optimal result.Starting from a random solution, the PSO algorithm iteratively finds the optimal solution, and the quality of the solution is evaluated by fitness.Compared with the genetic algorithm, the PSO algorithm does not have the "crossover" and "mutation" operations.It follows the current searched optimal value to look for global optimality.Since the PSO algorithm is easy to implement and has high precision in this paper, we use the PSO algorithm to solve the exits' distribution optimization problem, which is easy to code and has less parameters to be adjusted.
For this problem, the positions of randomly generated exits are first input into the PSO algorithm as the initial particles.In each iterative epoch, the particles stand for different exits' distribution.The algorithm process is shown in Figure 6.First, we randomly initialize the exit distribution, and calculate the average escape rate of each exit in large sample disasters, which stands for the fitness of each particle.Secondly, we update the velocity and vector of each particle's next position according to the fitness of each particle.According to the qualification, we judge whether the maximum number of iterations is reached or the global optimal value is reached.Finally, we output the optimal result and end the simulation.
The search space is a two-dimensional stand for coordinate x and coordinate y.The total number of particles is n, which we set as 30.The position of particle i is expressed as X i = (x i1 , x i2 ); the optimal position searched so far of particle i is P i = (p i1 , p i2 ).The optimal position is P g = p g1 , p g2 , and the position change rate of particle i is V i = (v i1 , v i2 ).The position of each particle is calculated as follows: c 1 , c 2 are acceleration factors.The learning factors c 1 , c 2 are used to control the relative influence between the particle's own cognition and the social shared information.We set c 1 as 3 and c 2 as 5. rand() is a random number between [0, 1].It is used to randomly generate initial particles.p id (t) is position, v id (t) is speed, and x id (t + 1) is the distance of particle i in time t.x id (t + 1) = x id (t) + v id (t + 1), 1 ≤ i ≤ n, 1 ≤ d ≤ 2. The positions of each particle indicate the position of each exit v i = {p 1 , p 2 , p 3 , • • • , p k }. k is the exit's number.w is the inertia factor.When w is larger, the global search ability of the particles is stronger.When the latter is smaller, its local search ability will be strengthened.Since there is no initial information at the beginning, the particles should fly forward at a large speed.
Through simulation, the escape rates of different exits' numbers are obtained, which stand for the fitness of particles.According to the updating rule, the exit distribution will optimize to reach a higher escape rate.
and has high precision in this paper, we use the PSO algorithm to solve the exits' distribution optimization problem, which is easy to code and has less parameters to be adjusted.
For this problem, the positions of randomly generated exits are first input into the PSO algorithm as the initial particles.In each iterative epoch, the particles stand for different exits' distribution.The algorithm process is shown in Figure 6.First, we randomly initialize the exit distribution, and calculate the average escape rate of each exit in large sample disasters, which stands for the fitness of each particle.Secondly, we update the velocity and vector of each particle's next position according to the fitness of each particle.According to the qualification, we judge whether the maximum number of iterations is reached or the global optimal value is reached.Finally, we output the optimal result and end the simulation.

Adaptive Weighted Voronoi Diagram
In each generation epoch of PSO, the escape rate needs to be calculated.To search for the optimal escape rate under different exit distribution situations, an adaptive weighted Voronoi diagram is used to calculate the global optimal exit-agent corresponding solutions.Comparing with a behavior-based model, this global method can reach a higher escape rate, because it considers the agent jam in exits.
By using a global optimization algorithm, the problem can be abstracted as a multi-agent constrained task assign problem considering following factors: the distance between agents and exits, the queuing problem at exits and the disasters' influence on agent's behavior.Planning the optimal escape route for a single agent will result in the overall benefit that is not optimal even the result for the individual agent is optimal.Therefore, in order to achieve a higher team score, we change the research perspective, not from the perspective of agent selection, but from the perspective of exit service.
The Generalized Voronoi Diagram algorithm is used to solve the pit partition problem.And the agents in the same subarea will escape from the same exit.The optimization goal is to average the total escape time in each exit.We use the Voronoi diagram method to construct a generalized Voronoi diagram (GVD) map and assign weights to dynamically adjust the diagram.By constructing the Voronoi diagram, it is possible to assign agents to different exits.
(suba 1 , suba 2 , • • • , suba n ) are the subareas.sa i , sa j are the numbers of escape agents in i, j. n a is the agent in the subarea a.
Assuming the pit is a plane, Q = {q 1 , q 2 , • • • , q n }(3 ≤ n ≤ ∞) are the points on the plane, and the weighted Voronoi diagram [47] is defined as: d(x, q m ) and d(x, q l ) are the distances of point x to vertexes {q i }. ω m is the weight of the vertex q m .By calculating the density distribution of agents, each exit's weights are obtained, so that the density of agents in each diffused area is ensured to be almost the same.
n a represents the agents included in the normal partition, n a i represents the agents included in each actual partition, and f a represents the density of agents.
Since the weight value is calculated by overall agents' density, there is still a deficiency in dealing with the details whether the distance between two exits is close.We use the adaptive weight Voronoi method to dynamically adjust the weight according to the specific conditions of each area and the arrival time of agents, so that the diffusion speed of the source in each direction is no longer fixed.Taking the waiting time at exits into consideration, it is also necessary to calculate the number of agents that arrives at the same exit in a short period of time.Therefore, a modified weighted Voronoi diagram is proposed.Figure 7 shows the GVD for exits, the broken line refers to the borderline between each exit.Since the weight value is calculated by overall agents' density, there is still a deficiency in dealing with the details whether the distance between two exits is close.We use the adaptive weight Voronoi method to dynamically adjust the weight according to the specific conditions of each area and the arrival time of agents, so that the diffusion speed of the source in each direction is no longer fixed.Taking the waiting time at exits into consideration, it is also necessary to calculate the number of agents that arrives at the same exit in a short period of time.Therefore, a modified weighted Voronoi diagram is proposed.Figure 7 shows the GVD for exits, the broken line refers to the borderline between each exit.The adaptive weight   is calculated as follows: is the agents' density coefficient, which reflect the number of agents in the region.The agents' density coefficient is related to direction .  = ̅ /  .  is the agents' density in the region, and ̅ is the average density.  is the carrier rate factor of an exit.  is the distance coefficient.a, b, c are weighting coefficients,  +  +  = 1.
We assume that collapse has a binding effect on the spread of all of the exits.That means that the further an exit is to the collapse resource, the smaller the Voronoi weight.The impact is as follows: 0 refers to the original adaptive weight, and s  refers to the distance of disaster to the exit .
The adaptive weighted Voronoi diagram algorithm is shown in Figure 8. First, we partition the map into uniform grids.Second, we calculate the weights of each exit based on agent density of different regions.If agents exist that are not assigned to exits, a new iteration is started.In each iteration, an exit has its radius, and those agents that are not farther than this radius will be assigned to this exit.At the end of the iteration, the radius of each exit will increase according to its The adaptive weight w i is calculated as follows: r m is the agents' density coefficient, which reflect the number of agents in the region.The agents' density coefficient is related to direction i. r m = ρ/ρ i .ρi is the agents' density in the region, and ρ is the average density.r l is the carrier rate factor of an exit.r d is the distance coefficient.a, b, c are weighting coefficients, a + b + c = 1.
We assume that collapse has a binding effect on the spread of all of the exits.That means that the further an exit is to the collapse resource, the smaller the Voronoi weight.The impact is as follows: w 0 refers to the original adaptive weight, and s i refers to the distance of disaster to the exit i.
The adaptive weighted Voronoi diagram algorithm is shown in Figure 8. First, we partition the map into uniform grids.Second, we calculate the weights of each exit based on agent density of different regions.If agents exist that are not assigned to exits, a new iteration is started.In each iteration, an exit has its radius, and those agents that are not farther than this radius will be assigned to this exit.At the end of the iteration, the radius of each exit will increase according to its weight.When all of the agents are covered by exits, the algorithm comes to the end.

Experimental Environment and Settings
In order to verify the simulation, an empirical study is carried out, and the performance of the optimization algorithms is compared to that of traditional algorithms.The experiment is carried out in three deep foundation pits, whose shapes are pentagon, rectangle, and octagon.The setting of the three deep foundation pits is shown in Table 1.The dimension represents the type and size of the deep foundation pits.The vertex coordinates represent the vertexes' positions.The agent number stands for the total agent number in the pit.The collapse probability stands for the collapse occurring probability of each sidewall, which can be used to generate a disaster set.

Experimental Environment and Settings
In order to verify the simulation, an empirical study is carried out, and the performance of the optimization algorithms is compared to that of traditional algorithms.The experiment is carried out in three deep foundation pits, whose shapes are pentagon, rectangle, and octagon.The setting of the three deep foundation pits is shown in Table 1.The dimension represents the type and size of the deep foundation pits.The vertex coordinates represent the vertexes' positions.The agent number stands for the total agent number in the pit.The collapse probability stands for the collapse occurring probability of each sidewall, which can be used to generate a disaster set.Collapse probability 15%, 35%, 20%, 10%, 20% 35%, 10%, 25%, 30% 5%, 30%, 5%, 10%, 0%, 20%, 15%, 15% The three-dimensional scene of deep foundation pits is shown in Figure 9.

Experimental Results and Analysis
Three serial experiments are conducted to verify the algorithms improvement: the exit distribution optimization experiment, the agent-exit match optimization experiment, and the warning time influence experiment.The partial algorithms and datasets are available in Github: http://github.com/hccz95/FoundationPit.git.

Exit Distribution Optimization Experiment
This experiment is carried out to validate the effect of the exit distribution optimization algorithm.Compared with the PSO algorithm, we use a randomly generated algorithm as the benchmark algorithm.The warning time is limited to 10 s.Since the size of the deep foundation pits is different, the number of exits that we calculate is also different.In each pit, we calculated twice the number of sidewalls as the maximum number of exits.That is 10 exits for pit A, eight exits for pit B, and 16 exits for pit C. The results are shown in Figures 10-12.
It can be seen that for all three pits, the optimal distribution achieves a higher escape rate than the random distribution.Compared with the random distribution algorithm, the optimal distribution that was generated by the PSO optimization algorithm improves the escape rate by 73.7% in pit B, and 5% in pit A. For different exit numbers, the escape rate improved within a range.That is because the agent initial distribution is random, and the disaster occurrence place is not the same, resulting in the results not having a linear increase.Although more exits means that agents are easier gather to the exits, if the disaster spreads to the exits, the agents in the exits will all die.We can see that in pit B, the escape rate reaches almost 90%, which is higher than the other two pits.That is because the pit B is an inerratic shape, and the length of each sidewall is the same.

Experimental Results and Analysis
Three serial experiments are conducted to verify the algorithms improvement: the exit distribution optimization experiment, the agent-exit match optimization experiment, and the warning time influence experiment.The partial algorithms and datasets are available in Github: http://github.com/hccz95/FoundationPit.git.

Exit Distribution Optimization Experiment
This experiment is carried out to validate the effect of the exit distribution optimization algorithm.Compared with the PSO algorithm, we use a randomly generated algorithm as the benchmark algorithm.The warning time is limited to 10 s.Since the size of the deep foundation pits is different, the number of exits that we calculate is also different.In each pit, we calculated twice the number of sidewalls as the maximum number of exits.That is 10 exits for pit A, eight exits for pit B, and 16 exits for pit C. The results are shown in Figures 10-12.
It can be seen that for all three pits, the optimal distribution achieves a higher escape rate than the random distribution.Compared with the random distribution algorithm, the optimal distribution that was generated by the PSO optimization algorithm improves the escape rate by 73.7% in pit B, and 5% in pit A. For different exit numbers, the escape rate improved within a range.That is because the agent initial distribution is random, and the disaster occurrence place is not the same, resulting in the results not having a linear increase.Although more exits means that agents are easier gather to the exits, if the disaster spreads to the exits, the agents in the exits will all die.We can see that in pit B, the escape rate reaches almost 90%, which is higher than the other two pits.That is because the pit B is an inerratic shape, and the length of each sidewall is the same.
distribution that was generated by the PSO optimization algorithm improves the escape rate by 73.7% in pit B, and 5% in pit A. For different exit numbers, the escape rate improved within a range.That is because the agent initial distribution is random, and the disaster occurrence place is not the same, resulting in the results not having a linear increase.Although more exits means that agents are easier gather to the exits, if the disaster spreads to the exits, the agents in the exits will all die.We can see that in pit B, the escape rate reaches almost 90%, which is higher than the other two pits.That is because the pit B is an inerratic shape, and the length of each sidewall is the same.In all three pits, the escape rate of the adaptive weighted Voronoi diagram algorithm is higher In all three pits, the escape rate of the adaptive weighted Voronoi diagram algorithm is higher than the naive Voronoi diagram algorithm.Especially in pit B and pit C, the adaptive weighted Voronoi diagram algorithm can quickly achieve a high escape rate.The optimization algorithm has a rate of increase of 1-23% compared to the naive algorithm.With the addition of exit numbers, the escape rate will increase, and finally tend to stabilize.This is because the agent initial distribution is random, which means there are some agents who are far away from all of the exits.Therefore, the escape rate is difficult to improve.The improvement rate of the optimization algorithm after stabilization is 23% for pit A, 11% for pit B, and 11% for pit C, which is shown in Figures 13-15.

Warning Time
In addition to comparing the effects of the optimization algorithm, we also analyze the warning time factor.The warning time experiment is shown in Figures 16-18.
We compare the escape rate under different warning times and different numbers of exits with the naive Voronoi diagram algorithm.If the warning time is below 10 s, adding more exits cannot certainly improve the escape rate, because the exits can be destroyed and the agents near them will be killed, which will reduce the escape rate.If the warning time exceeds 15 s, the escape rate tends to be stable.It will only be effective if the number of exits is small.When the warning time is moderate, about 10 s to 15 s, increasing the number of safe passages will increase the escape rate.If the exit number is more than four, the increment in warning time has less impact on the escape rate.If the exit number is less than three, regardless of the length of the warning time, adding the exit number will greatly increase the escape rate.If the exit number is between three and six, with a certain warning time, the escape rate will increase as the number increases.If the exit number is more than six, adding the exit number increases the escape rate very slowly.Similar to experiment 1, the escape rate in pit B reaches the highest among the three pits for almost all of the time series.We compare the escape rate under different warning times and different numbers of exits with the naive Voronoi diagram algorithm.If the warning time is below 10 s, adding more exits cannot certainly improve the escape rate, because the exits can be destroyed and the agents near them will be killed, which will reduce the escape rate.If the warning time exceeds 15 s, the escape rate tends to be stable.It will only be effective if the number of exits is small.When the warning time is moderate, about 10 s to 15 s, increasing the number of safe passages will increase the escape rate.If the exit number is more than four, the increment in warning time has less impact on the escape rate.If the exit number is less than three, regardless of the length of the warning time, adding the exit number will greatly increase the escape rate.If the exit number is between three and six, with a certain warning time, the escape rate will increase as the number increases.If the exit number is more than six, adding the exit number increases the escape rate very slowly.Similar to experiment 1, the escape rate in pit B reaches the highest among the three pits for almost all of the time series.

Discussion of Experimental Results
In this section, we will discuss the simulation-based method and the traditional analysis method, and we will simulate the evacuation process and compare the escape rate under two methods.
We choose the constraint satisfaction problem (CSP) method as the benchmark method.The constraint satisfaction problem refers to a set of variables with constraints; each has its own assignment domain.A feasible solution can be obtained when the assignment of each variable satisfies the constraints of all variables simultaneously.The constraint satisfaction problem usually includes three components X, D, and C: The range set D is a collection of possible values of the variable set X.Each constraint is an ordered pair of < scope, rel >, in which scope is the set of variables in the constraint, and rel defines the relationship that these variables should satisfy.For this problem, you can abstract the solution problem into the following functions:

Discussion of Experimental Results
In this section, we will discuss the simulation-based method and the traditional analysis method, and we will simulate the evacuation process and compare the escape rate under two methods.
We choose the constraint satisfaction problem (CSP) method as the benchmark method.The constraint satisfaction problem refers to a set of variables with constraints; each has its own assignment domain.A feasible solution can be obtained when the assignment of each variable satisfies the constraints of all variables simultaneously.The constraint satisfaction problem usually includes three components X, D, and C: The range set D is a collection of possible values of the variable set X.Each constraint is an ordered pair of scope, rel , in which scope is the set of variables in the constraint, and rel defines the relationship that these variables should satisfy.For this problem, you can abstract the solution problem into the following functions: where max f (X) is the agents' escape exits set, i is the agent ID, and j is the exit ID.The goal f(X) is to achieve the highest escape rate, that is, the maximum escaped agent number.Constraint conditions include the shortest weighted path for agent path i , the queue length length_q i and the wait time t wait,j .c(p), c length , and c t are the thresholds for constraints.In our DPE system, this information can be obtained by the data collection modules, as shown in Figure 19.Based on the description of the constraint satisfaction method, the branch and bound method is used to solve the problem.The branch and bound algorithm (B&B) was proposed by Land and Dakin to solve the optimization problem.The main principle of the B&B algorithm is to divide and decompose the problem into several sub-problems.The process of decomposing a problem into sub-problems is called a branch, and the process of estimating the target value for each sub-problem is called bounding.Branching simplifies the problem.Bounding determines the target value range of the branch, and removes the branch with a poor trend or no optimal solution.The operation of deleting a branch is called pruning, which can accelerate and optimize the algorithm.The use of the branch and bound method is a process of continuously decomposing and pruning the problem and quickly reaching the optimal solution.
In this problem, the constraint satisfaction problem is A, and the relaxation problem is B. Using the B&B algorithm, we can find the maximum value of the objective function of A. Suppose the optimal objective function of the problem is  * .Since problem B is the relaxation problem of A, then the optimal objective function obtained by problem B must be the upper bound of A, denoted as  − , and any feasible solution of A, The value of the objective function is a lower bound of  * , which is noted.The branch and bound method gradually reduces  − and increases, and finally finds,  * .
Our agent-based method is a simulation-based optimization method.SBO is an optimization method combining simulation technology and optimization technology.The superior optimization algorithm uses the simulation model to obtain the evaluation index of the different solutions, which is used to guide the optimization process of the exits' distribution, and continuously improve the output.The non-enumeration finds the best input variable value from the possible values, so that the output result is the optimal solution or satisfaction.Since SBO is a simulation to evaluate the indicators of actual complex systems, it can better reflect the actual system's operation under the established scheme, and better observe the uncertainty and randomness than the formalized model with a lot of simplification and abstraction.
The escape rates of two methods are shown in Figure 20.The escape rate of the SBO method is higher than the CSP method.When the exit number is 1, the escape rate is almost the same, which is because one exit cannot reflect the advantage of optimal distribution.When the number of exits increases, both methods reach a higher escape rate.In these instances, the SBO method performs Based on the description of the constraint satisfaction method, the branch and bound method is used to solve the problem.The branch and bound algorithm (B&B) was proposed by Land and Dakin to solve the optimization problem.The main principle of the B&B algorithm is to divide and decompose the problem into several sub-problems.The process of decomposing a problem into sub-problems is called a branch, and the process of estimating the target value for each sub-problem is called bounding.Branching simplifies the problem.Bounding determines the target value range of the branch, and removes the branch with a poor trend or no optimal solution.The operation of deleting a branch is called pruning, which can accelerate and optimize the algorithm.The use of the branch and bound method is a process of continuously decomposing and pruning the problem and quickly reaching the optimal solution.
In this problem, the constraint satisfaction problem is A, and the relaxation problem is B. Using the B&B algorithm, we can find the maximum value of the objective function of A. Suppose the optimal objective function of the problem is z * .Since problem B is the relaxation problem of A, then the optimal objective function obtained by problem B must be the upper bound of A, denoted as z − , and any feasible solution of A, The value of the objective function is a lower bound of z * , which is noted.The branch and bound method gradually reduces z − and increases, and finally finds, z * .
Our agent-based method is a simulation-based optimization method.SBO is an optimization method combining simulation technology and optimization technology.The superior optimization algorithm uses the simulation model to obtain the evaluation index of the different solutions, which is used to guide the optimization process of the exits' distribution, and continuously improve the output.The non-enumeration finds the best input variable value from the possible values, so that the output result is the optimal solution or satisfaction.Since SBO is a simulation to evaluate the indicators of actual complex systems, it can better reflect the actual system's operation under the established scheme, and better observe the uncertainty and randomness than the formalized model with a lot of simplification and abstraction.
The escape rates of two methods are shown in Figure 20.The escape rate of the SBO method is higher than the CSP method.When the exit number is 1, the escape rate is almost the same, which is because one exit cannot reflect the advantage of optimal distribution.When the number of exits increases, both methods reach a higher escape rate.In these instances, the SBO method performs better than the CSP, with an improvement of 15-19%, which reveals the superiority of our proposed method above traditional methods.

Conclusions and Future Work
In summary, we have simulated the process of collapse disaster and the agent escape process for deep foundation pit evacuation.By using the simulation-based optimization method, an optimal exit distribution is obtained.Based on the DPE system, several key factors for the prevention of disasters in deep foundation pits are analyzed, and safety precautions are put forward.Our experiments show that the simulation can be used to calculate the escape rate under different conditions.Compared with the CSP method, the proposed SBO method has an improvement of about 19%, and the PSO algorithm and GVD algorithm both contribute to the improvement of the agent escape rate.
Following the results, safety solutions can be adopted to ensure agents' safety inside the deep foundation pit.Effective monitoring and adequate warning time are of great significance for deep foundation pit disasters.It is necessary to establish a detection system that is capable of early warning.Users should rationally arrange different types of monitoring devices to detect indicators such as displacement and pressure, and dynamically adjust the monitoring frequency according to the monitoring data.
Due to the modeling granularity, our modeling only considers some key information, but some details are not considered, such as the influence of terrain changes on the agent escape speed and the randomness of disaster spread.When calculating the disaster occurrence process, it is assumed that the force change can be calculated at any time, but in fact, this process requires calculation time and deviation.In future work, we will research how to use real-time monitoring data for disaster warning and simulate other disasters that occur in deep foundation pits such as fire and water inrush disasters.We will also apply other algorithms, including learning algorithms, to search for the optimal solution more quickly.

Conclusions and Future Work
In summary, we have simulated the process of collapse disaster and the agent escape process for deep foundation pit evacuation.By using the simulation-based optimization method, an optimal exit distribution is obtained.Based on the DPE system, several key factors for the prevention of disasters in deep foundation pits are analyzed, and safety precautions are put forward.Our experiments show that the simulation can be used to calculate the escape rate under different conditions.Compared with the CSP method, the proposed SBO method has an improvement of about 19%, and the PSO algorithm and weighted GVD algorithm both contribute to the improvement of the agent escape rate.
Following the results, safety solutions can be adopted to ensure agents' safety inside the deep foundation pit.Effective monitoring and adequate warning time are of great significance for deep foundation pit disasters.It is necessary to establish a detection system that is capable of early warning.Users should rationally arrange different types of monitoring devices to detect indicators such as displacement and pressure, and dynamically adjust the monitoring frequency according to the monitoring data.
Due to the modeling granularity, our modeling only considers some key information, but some details are not considered, such as the influence of terrain changes on the agent escape speed and the randomness of disaster spread.When calculating the disaster occurrence process, it is assumed that the force change can be calculated at any time, but in fact, this process requires calculation time and deviation.In future work, we will research how to use real-time monitoring data for disaster warning and simulate other disasters that occur in deep foundation pits such as fire and water inrush disasters.We will also apply other algorithms, including learning algorithms, to search for the optimal solution more quickly.

Figure 1 .
Figure 1.The framework of our prototype for an agent-based simulation for evacuation in deep foundation pits (DPE) system.

Figure 1 .
Figure 1.The framework of our prototype for an agent-based simulation for evacuation in deep foundation pits (DPE) system.

Figure 5 .
Figure 5.The queuing process at an exit.

Symmetry 2018 ,
10, x FOR PEER REVIEW 11 of 21   ̅̅̅ represents the agents included in the normal partition,    represents the agents included in each actual partition, and   represents the density of agents.

Figure 9 .
Figure 9.The three-dimensional scene of deep foundation pits.

Figure 10 .
Figure 10.The escape rate of random distribution and optimal distribution in pit A.

Figure 10 . 21 Figure 11 .
Figure 10.The escape rate of random distribution and optimal distribution in pit A. Symmetry 2018, 10, x FOR PEER REVIEW 14 of 21

Figure 12 .
Figure 12.The escape rate of random distribution and optimal distribution in pit C. 6.2.2.Agent-Exit Match Optimization Experiment This experiment compares the adaptive weighted Voronoi diagram optimization method to the naive Voronoi diagram algorithm.The warning time is 20 s.In all three pits, the escape rate of the adaptive weighted Voronoi diagram algorithm is higher than the naive Voronoi diagram algorithm.Especially in pit B and pit C, the adaptive weighted

Figure 11 . 21 Figure 11 .
Figure 11.The escape rate of random distribution and optimal distribution in pit B.

Figure 12 .
Figure 12.The escape rate of random distribution and optimal distribution in pit C. 6.2.2.Agent-Exit Match Optimization Experiment This experiment compares the adaptive weighted Voronoi diagram optimization method to the naive Voronoi diagram algorithm.The warning time is 20 s.In all three pits, the escape rate of the adaptive weighted Voronoi diagram algorithm is higher

Figure 12 . 2 .
Figure 12.The escape rate of random distribution and optimal distribution in pit C.

Symmetry 2018 , 21 Figure 13 .
Figure 13.The escape rate of different solutions in pit A.

Figure 14 .
Figure 14.The escape rate of different solutions in pit B.

Figure 13 . 21 Figure 13 .
Figure 13.The escape rate of different solutions in pit A.

Figure 14 .
Figure 14.The escape rate of different solutions in pit B.Figure 14.The escape rate of different solutions in pit B.

Figure 14 .
Figure 14.The escape rate of different solutions in pit B.Figure 14.The escape rate of different solutions in pit B.

Figure 14 .
Figure 14.The escape rate of different solutions in pit B.

Figure 15 .
Figure 15.The escape rate of different solutions in pit C.Figure 15.The escape rate of different solutions in pit C.

Figure 15 .
Figure 15.The escape rate of different solutions in pit C.Figure 15.The escape rate of different solutions in pit C.
Symmetry 2018, 10, x FOR PEER REVIEW 16 of 21 6.2.3.Warning Time In addition to comparing the effects of the optimization algorithm, we also analyze the warning time factor.The warning time experiment is shown in Figures 16-18 .

Figure 16 .
Figure 16.The escape rate under different warning times in pit A.Figure 16.The escape rate under different warning times in pit A.

Figure 16 .
Figure 16.The escape rate under different warning times in pit A.Figure 16.The escape rate under different warning times in pit A.

Figure 16 .
Figure 16.The escape rate under different warning times in pit A.

Figure 17 .
Figure 17.The escape rate under different warning times in pit B.Figure 17.The escape rate under different warning times in pit B.

Figure 17 . 21 Figure 18 .
Figure 17.The escape rate under different warning times in pit B.Figure 17.The escape rate under different warning times in pit B. Symmetry 2018, 10, x FOR PEER REVIEW 17 of 21

Figure 18 .
Figure 18.The escape rate under different warning times in pit C.

Figure 19 .
Figure 19.The collected information during simulation.

Figure 19 .
Figure 19.The collected information during simulation.

Figure 20 .
Figure 20.The escape rate under the constraint satisfaction problem (CSP) and simulation-based optimization (SBO).

Figure 20 .
Figure 20.The escape rate under the constraint satisfaction problem (CSP) and simulation-based optimization (SBO).

Table 1 .
The setting of deep foundation pits.

Table 1 .
The setting of deep foundation pits.