Research on improved genetic simulated annealing algorithm for multi-UAV cooperative task allocation

In order to solve the cooperative search problem of multiple unmanned aerial vehicles (multi-UAVs) in a large-scale area, we propose a genetic algorithm (GA) incorporating simulated annealing (SA) for solving the task region allocation problem among multi-UAVs on the premise that the large area is divided into several small areas. Firstly, we describe the problem to be solved, and regard the task areas allocation problem of multi-UAVs as a multiple traveling salesman problem (MTSP). And the objective function is established under the premise that the number of task areas to be searched by each UAV is balanced. Then, we improve the GA, using the advantages of the SA can jump out of the local optimal solution to optimize the new population of offspring generated by GA. Finally, the validity of the algorithm is verified by using the TSPLIB database, and the set MTSP problem is solved. Through a series of comparative experiments, the validity of GAISA and the superiority of solving the MTSP problem can be demonstrated.


Introduction
In recent years, natural disasters have occurred frequently and the scope of disasters has continued to expand. When a natural disaster occurs, the search and rescue of people and the survey of secondary disasters become particularly important. We can use UAVs to search the disaster-stricken areas and protect the lives and property of disaster-stricken people. However, when UAVs perform search tasks in large-area scenes, it is difficult to achieve the expected results due to the limitations of endurance and load capacity. The multi-UAV collaboration technology can solve this problem.
When performing a search task in a large area, the large area can be divided into several small areas to improve the search efficiency. Further, the multi-UAVs cooperative search problem is transformed into three subproblems: area division, sub-area allocation, and sub-area full coverage path planning. First, the large area is divided into several sub-areas by a certain method [1]. Then, the subareas are assigned to the UAVs according to the idea of equal division. Finally, the UAVs traverse their respective sub-task area in turn. And then, the multi-UAVs cooperative search problem turns into a multi-UAVs task allocation problem. Therefore, this paper focuses on the task allocation problem of multi-UAVs. Multi-UAVs task allocation is one of research contents in UAV swarm collaboration technology [2]., which can be regarded as the MTSP, the MTSP is often seen as a further extension and application of the TSP. Intelligent heuristics commonly used to solve the MTSP problem include ant colony algorithms [3]., simulated annealing algorithms [4]., genetic algorithms [5]., etc.
Omar Cheikhrouhou [6]. summarized the relevant research on MTSP problems in recent years, and many scholars have improved the quality and efficiency of solving MTSP problems by improving the traditional algorithms. Although the ant colony algorithm (ACA) is robust and has a strong solving capability, it is slow to converge and prone to fall into local optima when solving optimization problems of large scale [7].. To address this drawback, Ebadenezhad Sahar [8]. proposed an adaptive ACA with unique strategy, which can improve the uncertain convergence time and random decision of the traditional ACA by dynamically adjusting the parameters, so as to improve the convergence speed and search precision. Although the simulated annealing algorithm (SA) can jump out of the local optimum using the Metropolis criterion, the convergence speed is slow. Yan Zhang [9]. proposed a state-transfer SA, firstly, a new intelligent operator is added to generate the solution space of MTSP, then introducing a 2-opt neighborhood search structure to improve the ability of capturing the global optimal solution, and finally using the Metropolitan criterion to perform the solution, which improves the convergence speed to some extent. To address the problem that genetic algorithms (GA) converge faster but are prone to fall into local optima, Shuai Yuan [10]. improved a crossover operator to improve the search ability of GA and obtained near-optimal solutions in dealing with the MTSP problem. Among other studies of intelligent algorithms, Yongbo Chen [11]. proposed an improved wolfpack algorithm by improving the individual coding method, and improved the searching ability of the algorithm by introducing transposition and extension operation.
The above research is based on the traditional single algorithm proposed the corresponding improvement strategy, the optimization effect has certain promotion, but still has certain limitation. So, some scholars integrate the traditional algorithm two by two. Chao Jiang [12]. proposed an ant colonypartheno GA to solve the large scale MTSP problem, which solves the problem of slow convergence, but this algorithm mainly solves the MTSP problem of single target, the multi-objective MTSP problem remains to be studied. He Qing [13]. proposed an improved genetic simulated annealing algorithm to solve the problem that GA is easy to fall into local optimum and the convergence speed of SA is slow, but the algorithm mainly solves the TSP problem, and the feasibility of solving the MTSP problem is to be verified.
In summary, for the MTSP problem, most scholars improve on the basis of a single algorithm, and the optimization effect is not good. The related studies on algorithm fusion are less and mainly focus on TSP or MTSP single-objective problems. And most algorithms take the first point as the starting point directly, without considering the effect of the starting point in the practical application. To address the above problems and the main research object of this paper, a genetic algorithm integrating simulated annealing (GAISA) is proposed. The SA is used to optimize and adjust the updated population, which can effectively avoid the GA falling into the problem of local optimum, and at the same time, combined with the fast convergence of the GA itself, to solve the MTSP problem of multi-UAVs task allocation.

Problem Description
Suppose that a large area has been divided into N sub-areas according to a certain method. These subareas need to be assigned to M UAVs as a task. Assume that the UAVs fly at a certain altitude during the search process. As shown in Figure 1, a point S is selected in each sub-task area, and the UAVs need to reach this point in the sub-region before starting the traversal in the task area. These points form a task set 1 2 { , ,..., } N S S S S = , at which point the multi-UAVs task allocation problem can be transformed into MTSP problem to solve.

Modeling
In the TSP problem, a traveling salesman visits all the cities, only once per city, and then returns to the starting point after visiting all the cities. In practical applications, when a UAV performs a search task, it often takes off outside the task area, and then visits the task area in turn, and each task area is visited only once. Return to the starting point after traversing all task areas. So, the model is:  With the objective of minimizing the total path cost of all UAVs, the objective function established is:

Initialization
Firstly, the initial population size is m G , and the maximum iteration number is max K .When the number of tasks is known to be N , the length of the initialization chromosome is N .Then the chromosome is decimal coded, and the N genes of the chromosome correspond to N different values, i.e., the . Then initialize the current iteration number 1 K = and start the loop iteration.

Selection
In the case of the three UAVs, as shown in Figure 2, the initialized chromosome is divided into three segments. Then the starting position 0 i S is added to the corresponding chromosome fragment. Chromosome segment 1 represents the first UAV needs to visit the task point and the order of the visits. Then the cost of each chromosome's fragment is calculated separately and then summed up and noted as the total cost total C .  The larger the value of the generation, the worse the solution, so the inverse of the total cost is taken as the fitness function.
Firstly, the fitness values of all individuals are calculated according to the fitness function. Then, a binary tournament method is used to select the highly adaptive individuals as the next generation, and keep the population always evolving in a favorable direction. Finally, the child population with the number of individuals sel N is selected for subsequent operations by setting the genetic proportion gap P .

Crossover
The crossover operation involves randomly selecting two individuals in the offspring population with probability c P and then manipulating their chromosomes. As shown in Figure 3, first, two numbers are randomly generated within the chromosome length, and the chromosome segment between the two numbers is moved to the forefront of the other chromosome. Then, each gene on the chromosome is traversed in turn, and the duplicate gene that follows is removed. This operation is repeated until there are no duplicate genes on that chromosome. That is, a new chromosome is obtained.
The mutation operation is performed with probability m P on the chromosomes in the population after crossover. Any two genes are selected on the chromosome, and the selected 2nd gene is inserted after the 1st gene. If the first gene is located behind the second, the genes at the other locations move back in turn. Otherwise, move forward in turn. That is, a mutated chromosome is generated. For example, the gene sequence on the chromosome is (3,7,1,4,2,6,8,5) , the first gene selected at random is 2, and the second gene selected at random is 7. After performing the mutation operation, the gene sequence on the new chromosome becomes (3,1,4,2,7,6,8,5) . Follow this method until all individuals have been traversed.

SA optimizes child population
The SA simulates the process of solid physical annealing. The initial temperature 0 T is lowered continuously, and a certain number of cycles are carried out at each temperature. Each cycle perturbs the current solution, resulting in a new solution. When the new solution is better than the current solution, the new solution is actively accepted. When the new solution is worse, the new solution is accepted according to the probability ( ) This process is iterated until the temperature reaches the set threshold or the set number of iterations is reached.
The advantages of the SA in its ability to climb the slope and easily jump out of the local optimum are fully utilized to further optimize and adjust the new population of the generated child population. The specific process is as follows.
(1) Initialization. Initialize the current child population, making Selch newSelch = , size sel N , temperature 0 T , maximum number of cycles for the outer layer (3) Output the optimized new population, Selch .

Verify the validity of the algorithm
There is no database like TSPLIB to verify the MTSP algorithm, so select the special case of MTSP--TSP to verify the effectiveness of the algorithm. In this paper, the simulation tool is MATLAB2020b, the computer processor is Intel I5 processor, the memory is 16G. Eight cases of different sizes and types from the official website of TSPLIB were selected for the experiments. SA, GA and GAISA are run 20 times respectively, and the optimized results are shown in Table 1. The optimal solutions are all reserved for four decimal places.
Compared with the official optimal solution and other algorithms, 8 sets of results are equal to or better than the official optimal solution, and are better than other optimal solutions. It can be proved that the improved algorithm is effective and has some advantages compared with other algorithms.   The above results show that the cost of GAISA in optimizing the MTSP problem is all smaller than that of the GA and SA before improvement. And the optimized routes have no crossover, and the effect is significantly better than the algorithm before improvement, which can prove the superiority of GAISA.

Conclusions
In this paper, the multi-UAVs task areas assignment problem is firstly transformed into an MTSP. Then, an improved genetic simulated annealing algorithm is proposed to solve it. Finally, by solving 8 examples in the TSPLIB database and comparing with the pre-improved algorithm and other papers, the effectiveness of GAISA is verified. And then, GAISA is used to solve the set MTSP problem, and the superiority of GAISA in solving the MTSP problem is verified by comparing it with the preimprovement GA and SA. The improved algorithm not only retains the advantages of fast convergence of GA, but also further enhances the ability to jump out of local optimum. Therefore, GAISA can be used to solve the task area allocation problem of multi-UAVs, and other types of task allocation problems of multi-UAVs. Then, combined with related path planning algorithms and so on, the cooperative search of large-scale areas of multi-UAVs can be accomplished. But we only consider the MTSP problem of the same type of UAV under the condition of mission number equilibrium. The study of the MTSP problem for heterogeneous UAVs can be considered in subsequent studies.