Abstract
In order to solve the problem of finding the best evacuation route quickly and effectively, in the event of an accident, a novel evacuation route planning method is proposed based on Genetic Algorithm and Simulated Annealing algorithm in this paper. On the one hand, the simulated annealing algorithm is introduced and a simulated annealing genetic algorithm is proposed, which can effectively avoid the problem of the search process falling into the local optimal solution. On the other hand, an adaptive genetic operator is designed to achieve the purpose of maintaining population diversity. The adaptive genetic operator includes an adaptive crossover probability operator and an adaptive mutation probability operator. Finally, the path planning simulation verification is carried out for the genetic algorithm and the improved genetic algorithm. The simulation results show that the improved method has greatly improved the path planning distance and time compared with the traditional genetic algorithm.
Introduction
With the continuous improvement of people’s living standards, various accidents also accompany us. Especially in buildings, accidents such as fires, explosions, etc. Among them, construction fire is the most direct and serious type of fire that causes property losses and casualties [1]. When an emergency occurs in a complex building with high density of people and strong mobility, people’s blind obedience and clustering effect often make the best evacuation time missed. When a fire occurs, due to the complexity of the structure and materials of the building itself, building fires generally have the characteristics of rapid smoke spreading, rapid fire spreading, and difficulty in evacuation [2]. Therefore, how to quickly find an escape route and smoothly reach a safe place has become the focus of many researchers.
With the emergence of optimization algorithms, scholars have gradually introduced intelligent optimization algorithms into the study of evacuation routes. In terms of path planning algorithm research, Abdelghan [3] integrated the cellular automata simulation model in the evacuation optimization framework based on genetic algorithm, and proposed an evacuation path planning method based on genetic algorithm. Reference [4] proposed a path planning algorithm based on neural network. Its energy function consists of two parts: path length and collision penalty function. Through this energy function, the robot can avoid obstacles and reach the target point safely and in the shortest time. Reference [5] analyzed the Kohonen neural network algorithm and its recognition mechanism, proposed a method of combining Kohonen neural network and BP neural network for path planning, given a specific algorithm, and discussed the introduction of learning mechanism in neural network technology. Genetic algorithm is a method that is widely used in path planning research at present. Chen Gang designed a genetic algorithm to solve the path planning problem in a complex environment, and designed an effective path genetic operator according to the characteristics of the complex environment, and also proposed a new calculation method for measuring the fitness of individual paths. Tests prove that the algorithm has strong robustness [6]. Zhang Ying use the grid method to represent the evacuation environment model, used serial number coding, mixed application of rectangular coordinates and serial number, used genetic algorithm to generate the initial path population, and optimized it to find the shortest path, and then added deletion and insertion operators to achieve path planning Obstacle avoidance requirements [7]. According to Reference [8], an improved crossover operator is suggested, for solving path planning problems using genetic algorithms (GA) in static environment. In Reference [9], to make the welding robot more reasonable and furthermore improve the productivity and reduce costs, two intelligent algorithms for welding path optimization, genetic algorithm and discrete particle swarm optimization, are proposed to optimize the welding robot path.
Aiming at the shortcoming of the slow convergence speed of the simulated annealing algorithm, Wang Zhongmin proposed a new hybrid optimization algorithm based on the combination of the conjugate direction method and the simulated annealing algorithm, and successfully applied it to the path planning of the robot neural network. This algorithm can make the optimization solution not fall into the local extreme value solution and obtain the global optimal solution. And the simulation experiment research shows that: this new hybrid optimization algorithm has simple calculation and fast convergence speed, which significantly improves the calculation efficiency of solving the global optimization problem of mobile robots [10]. Park, M, Jeon, J. and Lee, M. proposed a path planning method that combines artificial potential field method and simulated annealing. The introduction of artificial potential field method increases the robustness of system planning, while simulated annealing The introduction of can jump out of the local optimum [11]. Literature [12] proposed a global path planning method based on the genetic simulated annealing algorithm based on the regional hierarchical model, which solved the path planning problem of underwater robots in a large-scale ocean three-dimensional environment, and introduced the regional hierarchical model and genetic simulation in detail. The annealing algorithm is realized, and the simulation results prove the effectiveness of the algorithm.
An adaptive simulated annealing genetic algorithm is proposed based on the traditional genetic algorithm in this paper. On the one hand, the genetic operator is adaptively designed. Double-layer crossover and mutation can effectively avoid the “premature problem” of genetic algorithms and ensure population diversity. On the other hand, the paper introduces the idea of simulated annealing algorithm. Simulated annealing has a strong local optimization ability, and can prevent the search process from falling into a local optimal solution.
The rest of this paper is organized as follows: The principle of genetic algorithm is described in Section 2. Section 3 introduces improved genetic algorithm, which introduced stimulated annealing genetic algorithm and proposed adaptive crossover operators. The adaptive stimulated annealing genetic algorithm is introduced in Section 3.3. In Section 4, the results are given for simulation to verify the adaptive stimulated annealing genetic algorithm. Finally, conclusions are drawn in section 5.
Principle of genetic algorithm
Algorithm principle
Genetic Algorithm (GA) is a relatively complete theory and method developed by John H. Holland of the University of Michigan and his colleagues and students from the late 1960 s to the early 1970 s. Starting from trying to explain the complex adaptation process of organisms in natural systems, the model of artificial systems is constructed by simulating the mechanism of biological evolution. After more than 30 years of development, fruitful application results and theoretical research progress have been made, which is an important direction of artificial intelligence research [13, 14].
Genetic algorithm is a part of evolutionary calculation, a computational model that simulates Darwin’s genetic selection and natural elimination of biological evolution. Genetic algorithm is a method to search for the optimal solution by simulating the natural evolution process. Genetic algorithm is simple, versatile, robust, and suitable for parallel processing. The basic genetic algorithm includes operations such as species estimation, selection, crossover, and mutation, as shown in Fig. 1.

Schematic diagram of the genetic algorithm.
Flow chart of the genetic algorithm is shown in Fig. 2.

Flow chart of the genetic algorithm.
The algorithm steps are as follows:
STEP 1: establish the initial population of the problem to be solved, and encode it.
STEP 2: Calculate the fitness value of each individual in the established population.
STEP 3: Determine the next generation of individuals according to the fitness value of the individual and the corresponding selection rules.
STEP 4: Use the crossover operator to cross over the next generation of individuals.
STEP 5: Use the mutation operator to mutate the next generation of individuals.
STEP 6: Determine whether the individual after genetic manipulation meets the conditions. Run the next step if the conditions are met, otherwise go back to STEP 2.
SETP 7: Determine the optimal solution from the fitness value, and output the optimal solution.
Using genetic algorithm to solve the optimal path problem, on the one hand, the population needs to be initialized according to specific rules. On the other hand, a suitable fitness calculation method is designed according to the constraints given by the problem. The following content will explain these two steps in detail, and other operations in the algorithm, such as selection, crossover, and mutation, respectively use classic methods.
According to the problem of obstacle avoidance path planning between two points, each individual in the population is considered as a path, and the individual is composed of a series of coordinate points (x, y). Therefore, the length of an individual’s chromosome is the number of coordinate points. In order to facilitate implementation, the coordinates are stored separately, and two populations Popx and Popy are obtained. In the process of evolution, the two populations are regarded as one population to optimize together [15, 16].
Where Popx i and Popy i together represent the i-th individual in the population, i ∈ [1, M]. x j and y j are a pair of codes in individual chromosomes, which form the horizontal and vertical coordinates of a point, j ∈ [1, N]. M and N represent the population number and chromosome length, respectively.
The fitness function should effectively reflect the gap between each individual and the optimal individual in the problem. The genetic algorithm basically does not use external information in the evolutionary search. It only uses the fitness function as the basis and uses the fitness value of each individual in the population to search. This paper sets the goal of the problem to be the shortest total path length. The reciprocal of the total path length can be used as a fitness function:
In order to calculate the distance, it is necessary to judge the relationship between the point and the connection between the two points and the obstacle. If the existence point (x, y) does not satisfy the following relationship, the fitness value of the individual is 0.
Where (x, y) is the moving coordinate position, and (x0, y0) is the location of the obstacle. After the judgment in the previous step, the individual coding coordinate points that meet the conditions are all outside the circular obstacle. Therefore, at this time, judging the relationship between the line segment composed of two adjacent coordinate points and the obstacle can be divided into three situations as shown in Fig. 3 for discussion:

The relationship between the line segment composed of two adjacent coordinate points and the obstacle.
Before discussing the situation, we need to calculate the distance d from the center of the circle to the straight line. This is to distinguish the special case where the center of the circle is on a straight line. The calculation formula is:
For the first and second cases, d < r. Calculate the cosine functions of ∠OAB and ∠OBA. If both are greater than 0, the line segment intersects the circle. Set the fitness value of the individual to 0. The calculation formula is:
For the third case, the distance between BA and BO needs to be judged, d = 0. If
Simulated annealing genetic algorithm
In order to improve the quality of the genetic algorithm, this paper introduces the simulated annealing algorithm. Stimulated Annealing (SA) has strong local optimization ability, and can prevent the search process from falling into the local optimal solution [17, 18]. This paper uses Stimulated Annealing Genetic Algorithm (SAGA) to solve the path optimization problem.
Specifically, the simulated annealing genetic algorithm is an improvement on the fitness function. In the early stage (high temperature), the difference in fitness between individuals is reduced, and in the later stage (low temperature), the difference in fitness between individuals is enlarged, outstanding individuals are highlighted, and the effect of fitness stretching is completed. To a certain extent, SAGA makes up for the shortcomings of genetic algorithms that are easy to mature in the early stage and stagnate in the later stage. The specific fitness value calculation formula is shown in formulas (6) and (7):
Where M represents the size of the population, f i represents the fitness value of the i-th individual, g represents genetic algebra, T represents temperature, T0 represents the initial temperature, and V = 0.99 represents the annealing rate. Flow chart of the SAGA is shown in Fig. 4.

Flow chart of the SAGA.
GA has many excellent characteristics, however there is a “premature problem". The “premature problem” of GA refers to the phenomenon of premature convergence to the local optimal solution. After several iterations of the group, individuals have a high average fitness and grow exponentially. Due to the limited population size, these excellent individuals will account for the majority of the population, while other individuals will quickly disappear. This trend is similar to the “survival of the fittest” rule in nature, however if it continues to develop without artificial control, it will result in a single species, increased reproduction of neighbors between parents, and the loss of the original function of genetic operators and the algorithm will fall into a local optimal solution. Whether the “premature phenomenon” is obvious depends on the crossover probability P c and the mutation probability P m of the gene string. If the crossover probability P c is too small, the number of iterations increases and the algorithm speed is slow. If the P c is too large, individuals with high fitness are quickly destroyed. If the mutation probability P m is too small, it is difficult to produce new individuals. If P m is too large, the genetic algorithm will be exhaustively indefinitely. Aiming at the “premature problem” of genetic algorithms, it is necessary to design an adaptive genetic operator to achieve the purpose of maintaining population diversity.
Adaptive genetic operators include adaptive crossover operators and adaptive mutation operators. The crossover probability P
c
is adaptively improved, and the formula is as follows:
Where f
max
represents the maximum fitness value in the group,
The mutation operator P
m
is adaptively improved, and the formula is as follows:
Where f max represents the maximum fitness value in the group, f av represents the average value of the population fitness value, f represents the fitness value of the individual to be mutated, and Pm0 and Pm1 represent the maximum and minimum mutation operator, respectively. Pm0 = 0.1, Pm1 = 0.01.
The proposed Adaptive Stimulated Annealing Genetic Algorithm (ASAGA) steps are as follows:
STEP 1: initial population, and initialize genetic parameters.
STEP 2: Calculate the fitness value of each individual in the initial population, and initialize the annealing parameters for the first time.
STEP 3: Calculate the fitness value of individuals in the current population.
STEP 4: Judge the convergence of the optimal individual. If it converges, output the result, including the optimal path and its path length. If it does not converge, go to the next step.
STEP 5: According to formulas (6) and (7), judge whether the annealing conditions in the second stage are met. If it is satisfied, the annealing temperature is changed. If not satisfied, keep the current annealing temperature.
STEP 6: Select the operator to perform the selection operation. The current best individual is selected and kept, and the other individuals continue to calculate.
STEP 7: According to formula (8), calculate the crossover operator and perform the crossover operation to generate a new population.
STEP 8: According to formula (9), calculate the mutation operator, perform mutation operation on the individuals of the new population, and generate the next generation population.
STEP 9: Add 1 to the population algebra. Go back to the third step.
According to the above algorithm steps, the proposed algorithm flowchart is shown in Fig. 5.

Flow chart of the proposed ASAGA.
The influence of different parameters on GA
This section will analyze the influence of each parameter in the genetic algorithm on the performance of the algorithm in order to provide a basis for the selection of parameters for subsequent applications. First, set up the evacuation route planning environment. The simulaiton assumption parameters for GA is listed in Table 1.
Simulation assumption parameters for GA
Simulation assumption parameters for GA
Figure 6 shows a schematic diagram of the evacuation environment, where the initial position coordinates is (0 m, 0 m) and the target position coordinates is (1.5 m, 8.9 m), the unit is m. Obstacle 1, obstacle 2 and obstacle 3 are set up in the entire environment. In the genetic algorithm simulation.

Schematic diagram of evacuation environment.
In order to verify the influence of the population size on the algorithm, different population sizes are set to verify the results of the algorithm. Contrastive of evolution results in different population is listed in Table 1. It is obvious from the simulation results that selecting a larger number of initial populations can process more solutions at the same time, so it is easy to find the global optimal solution. However, when the population size increases to a certain extent, the quality of the solution no longer has a significant improvement, but the evolutionary algebra that converges obviously increases with the increase of the population size. If the population size is too small, it is easy to converge to the local extreme point.
According to the Table 2, draw the relationship curve between the population number and the number of iterations, and the relationship curve between the population number and the optimal fitness value. As shown in Fig. 7, on the one hand, as the number of populations increases, the optimal fitness value becomes larger and larger (The larger the best fitness value, the shorter the path). On the other hand, as the number of populations increases, the number of iterations of the algorithm also increases, and the time consuming becomes longer and longer.
Contrastive of evolution results in different population

The graph of the influence of the population size on the algorithm.
Contrastive of evolution results in different crossover operators is listed in Table 3. It can be seen from the simulation results that the selection of the crossover rate determines the frequency of the crossover operation. The higher the frequency, although it can converge to the optimal area solution, too high a frequency will easily lead to premature convergence.
Contrastive of evolution results in different crossover operators
The graph of the influence of the crossover operators on the algorithm is shown in Fig. 8. From the Fig. 8 we know that As the crossover factor increases, the optimal fitness value and the number of iterations both show a decreasing trend.

The graph of the influence of the crossover operators on the algorithm.
Based on the above analysis, we select a population size of 3000 and a crossover factor of 0.7 to verify the algorithm proposed in this article.
In order to verify the effectiveness of the method proposed in this paper, a schematic diagram of the path planning environment is designed as shown in Fig. 9. The simulaiton assumption parameters is listed in Table 4.

Schematic diagram of the path planning environment.
Simulation assumption parameters
The initial position coordinates is (0 m, 0 m) and the target position coordinates is (11 m, 16 m), the unit is m. Obstacle 1, obstacle 2 and obstacle 3 are set up in the entire environment.
In the simulation process, genetic algorithm (GA), simulated annealing genetic algorithm (SAGA) and the adaptive simulated annealing genetic algorithm (ASAGA) proposed in this paper are designed respectively.
Figs. 10, 11 and 12 respectively show the path planning simulation results based on GA, SAGA and ASAGA three methods. It can be seen from the figure that the planned route based on GA is the longest, while the planned route based on ASAGA is shorter.

Simulation results of path planning based on GA.

Simulation results of path planning based on SAGA.

Simulation results of path planning based on ASAGA.
The relationship between the path distance and the number of iterations is shown in Fig. 13. We know that the minimum path planning distances of the three methods are 24.126 m, 22.319 m and 21.434 m. The number of iterations completed by the three methods when reaching the minimum path planning distance is 27, 22, and 14, respectively. It can be seen that under the same environment, the ASAGA proposed in this paper has the smallest path planning distance and the smallest number of iterations (the least time-consuming).

The relationship between the path distance and the number of iterations.
The relationship between the fitness value and the number of iterations is shown in Fig. 14. The larger the fitness value, the smaller the path planning distance.

The relationship between the fitness value and the number of iterations.
In order to illustrate the repeatability of the method, the simulation is repeated 10 times for each method.
Simulation results of ten times path planning based on GA is listed in Table 5. It can be seen from the table that multiple simulation results of GA-based path planning show that the shortest distance varies from 23.480 m to 24.580 m, and the number of iterations varies from 24 to 30.
Simulation results of ten times path planning based on GA
Simulation results of ten times path planning based on SAGA is listed in Table 6. It can be seen from the table that multiple simulation results of SAGA-based path planning show that the shortest distance varies from 21.901 m to 22.410 m, and the number of iterations varies from 19 to 22.
Simulation results of ten times path planning based on SAGA
Simulation results of ten times path planning based on ASAGA is listed in Table 7. It can be seen from the table that multiple simulation results of ASAGA-based path planning show that the shortest distance varies from 20.432 m to 21.562 m, and the number of iterations varies from 13 to 16.
Simulation results of ten times path planning based on ASAGA
In order to compare the results in the table more intuitively, draw the line graphs of Figs. 15 16 respectively. Ten simulation results for the optimal planning distance of the three methods is shown in Fig. 15. We can see that the optimal planning distance of the ASAGA proposed in this paper is the smallest in the ten simulation experiments. The traditional GA best planning distance is the largest. In ten simulation experiments, the average value of optimal planning distance based on GA is 24.0740 m, the average value of optimal planning distance based on SAGA is 22.1323 m, and the average value of optimal planning distance based on ASAGA is 21.0679 m. It can be seen that the ASAGA proposed in this paper has the best performance in terms of path planning distance.

Ten simulation results for the optimal planning distance of the three methods.

Ten simulation results for the number of iterations of the three methods.
Ten simulation results for the number of iterations of the three methods is shown in Fig. 15. We can see that the number of iterations of the ASAGA proposed in this paper is the smallest in the ten simulation experiments. The traditional GA number of iterations is the largest. In ten simulation experiments, the average value of number of iterations based on GA is 26.5, the average value of number of iterations based on SAGA is 20.5, and the average value of number of iterations based on ASAGA is 14.7. It can be seen that the ASAGA proposed in this paper has the best performance in terms of number of iterations.
In summary, the ASAGA method proposed in this paper is optimal in terms of path planning distance and number of iterations compared with traditional GA methods and SAGA.
This paper proposes an adaptive simulated annealing genetic algorithm based on the traditional genetic algorithm. By introducing simulated annealing algorithm and designing adaptive factors, the traditional genetic algorithm is low in efficiency and easy to fall into the shortcomings of local optimal solutions. The simulation experiment of path planning verifies the effectiveness of the method proposed in this paper. The results show that the adaptive simulated annealing genetic algorithm proposed in this paper is optimal in terms of path planning length and number of iterations.
Footnotes
Acknowledgments
This work was supported by China Civil Aviation Administration Project (Grant Nos. ASSA2018/17 and ASSA2017/12).
