3.3.1. Path Optimization Model
This section aims to find the shortest planned flight path of a UAV. To simplify the model, we assume that the points directly above each cluster head are data collection points (DCP). The UAV starts from the take-off point, and then traverses all DCPs at a fixed speed and height, and finally returns to the take-off point.
The optimization of the UAV path is to minimize the flight distance
, expressed as follows:
where
i and
j are the number of DCPs,
,
,
is the total number of DCPs,
represents the UAV take-off point;
represents the distance from
i to
j;
is the decision variable, representing the UAV from
i to
j. If
i is not equal to
j,
takes 1, otherwise 0. Equation (5) represents the constraint condition, the objective function must meet the requirement that any DCP is traversed and only traversed once, any possible traversal sequence must include all DCPs.
As a TSP problem, which needs to be addressed by heuristic algorithms, such as particle swarm optimization algorithm [
38], ant colony optimization [
39], artificial bee colony algorithm [
40], fruit fly optimization algorithm [
41], tabu search algorithm [
42], and simulated annealing algorithm [
43], the genetic algorithm (GA) has shown good performance in solving problems such as task assignment and route optimization. The advantages of the GA in real applications have also been demonstrated [
21,
22].
3.3.2. Description of the TGA Algorithm
The genetic algorithm (GA) is a heuristic search algorithm based on the process of biological evolution, which generates the next generation of solutions through selection, crossover, and mutation. In this process, the solution with a low fitness function value is gradually eliminated, and the solution with a high fitness function value is increased, so as to approach the optimal solution of the problem gradually through evolution. The algorithm has the advantages of being simple and general, strong robustness, and suitable for parallel processing. However, the local search ability of the genetic algorithm is poor, and the initial solution is uncertain. At this stage, the algorithm is used for blind search and makes the convergence rate slower. Similar to the GA algorithm, the Teaching–Learning-Based Optimization algorithm (TLBO) is also a population-based heuristic stochastic optimization algorithm, which is inspired by the classroom teaching process and imitates the teacher’s influence on students. On the one hand, the number of hyperparameters in TLBO is lower; thus, the search speed is fast. On the other hand, the optimal solution obtained is not as good as the GA. Furthermore, novel state transition rules are utilized to avoid the local optimal and improve the quality of solution. The TGA (improved genetic algorithm based on TLBO) algorithm designed combines the advantages of the two algorithms, which considers the convergence rate while obtaining a better solution.
First, the UAV path planning model is solved by TLBO with fast convergence, and the sub-optimal solution is used as the initial solution of the GA. In the TLBO algorithm, the higher the individual’s learning performance, the better the individual. The goal of UAV flight path optimization is to obtain the shortest flight distance, so the fitness function of TLBO is Equation (6), where
M is the number of students.
In the teaching phase, students improve their own level by learning the difference between the teacher and the average level of the class. For the
jth learner
in the group, the update mechanism is expressed as follows:
where
is the known solution
;
is the current optimal UAV flight path;
is the average state of the population;
is a teaching factor, which determines the degree to which the average value is changed, typically 1 or 2, which is an important step in the heuristic;
is a random vector, each element of which is a random number in the range of [0, 1].
In the learning phase, learning occurs by simulating the way students communicate with each other in order to improve their own level. For
, the updated formula is:
where
is the new value of flight path
,
is another randomly chosen flight path from the population that is different from
.
and
are the fitness of paths
and
, respectively.
is a random vector, each element of which is a random number in the range of [0, 1]. Similar to the teaching phase, the value of
will adopt the larger one between its original fitness and the new fitness, and then enter the next round of teaching. The generated suboptimal solution is used as the initial solution of the TGA algorithm, when the TLBO reaches the set number of iterations and terminates.
A local search update mechanism is added to enhance the local search capability of the TGA algorithm. In order to avoid premature convergence of the algorithm during the calculation process, the result of the non-global optimal solution appears.
The solution generated by each iteration is broken and then repaired. Specifically, firstly a DCP is randomly removed from the current solution
to set
, as the first element of set
,
represents the number of stay points removed, and there are still
elements left. Then, a DCP
is randomly selected from the set
each time, and the remaining DCPs
in
are arranged in ascending order of correlation. The
DCP is selected from
that has the greatest correlation with
,
is removed from
, and added to
. This process is repeated
times until the remaining
elements are selected.
is the Euclidean distance between
and
. The correlation formula is:
In actual situations, there is no perfect correlation function. If over-reliance on the correlation function selects the DCP to be moved, it may be limited to local correlation. To avoid this situation, a random element
needs to be added to the algorithm.
is the number of DCPs remaining in
.
The remaining DCPs in are arranged in descending order of correlation with , and the sorted sequence is , so the result of the above process is . is a random number not less than 1. From that we can conclude, when is 1, the DCP that is removed is completely selected at random; when is equal to positive infinity, it is close to selecting the DCP with the greatest correlation. In other words, the higher the value of is, the more favorable it is to the DCP with high correlation.
Finally, the damaged solution is repaired, and the elements in the removed DCPs set are reinserted back into the partial solution to produce a better solution. First, the optimal insertion position of each DCP in is calculated, and the DCP in is inserted back into the partial solution . In the process of selecting the DCP from and inserting it back to , the increment of the objective function value is calculated where each DCP in is inserted into its optimal insertion position, and the DCP with the largest increment is chosen as the first insertion point. The method is repeated until all the DCPs are reinserted into the partial solution.
The steps of the TGA algorithm are described as shown in Algorithm 1.
Algorithm 1 Implementation of the TGA algorithm
|
Input: Maximum number of iterations, all cluster head nodes , UAV take-off point , population size, crossover probability , probability of variation Output: The optimal transportation route.
Perform TLBO algorithm to randomly initialize population Evaluate population While (number of iterations) for all port do TLBO algorithm produce end for end while Execute the GA algorithm, using solution generated by TLBO as the initial solution of the improved GA algorithm While (number of iterations) for each individual do Calculate the objective function for each individual based on (4) Crossing and mutation to produce a new generation of population New-generation populations perform local search operations with the concept of destruction and repair Delete duplicate individuals from the population and complete the deleted individuals end for Update parameter , according to Equations (11) and (12) end while
|