Evolutionary algorithms (EAs) follow a similar framework. First, initialize the population. When the termination condition is not met, the generation strategy is used to generate new individuals according to the current population information in each iteration. Second, the constraint processing strategy is used to combine the constraint violation value and individual fitness to form individual advantage. Finally, the dominant individuals are selected through the environmental selection mechanism to form the next generation population. The generation operation and retention operation are repeated until the termination condition is satisfied, and the last generation population is output as the optimal solution. Therefore, identifying and producing excellent individuals in each generation is a decisive factor in obtaining the optimal solution.
2.2.1. Multi-Stage Constraint Processing Strategy
The original PPS framework divides the solution process into two stages, namely the push search stage and the pull search stage [
17]. In the push search stage, the population only retains those individuals with superior fitness, and the constrained optimization problem is transformed into an unconstrained problem. In the pull search stage, a relaxation constraint mechanism similar to progressive barrier (PB) approach is used to balance the relationship between optimization goals and constraints [
18]. However, there are two differences involving the PB method. First, in terms of the initial setting of the relaxation constraint, the PPS framework replaces the fixed threshold setting in PB with an adaptive method. At the end of the push search stage, the largest overall constraint violation
among all individuals who violated the constraints in the population is selected as the initial relaxation constraint. Second, the PPS framework can be applied to any evolutionary algorithm almost without any changes.
Since the obstacles in the no-fly zone can only be evaded via bypassing, this has caused the no-fly zone constraints to seriously affect the path planning effect of the gliding UAV. Therefore, this paper does not adopt the unconstrained optimization idea in the original PPS framework in the push search stage, but comprehensively considers the individual’s fitness and no-fly zone constraints to select the individual.
The constraint processing method of the push search stage used in this article is shown in
Figure 2, where the circle is the no-fly zone, the triangle is the terrain obstacle, and the black cross is the path point position. At the end of the push search stage, the waypoints that violate the no-fly zone restrictions are eliminated, but the waypoints (red squares) that violate the terrain restrictions still exist. Since the influence of other constraints on the flight path is not considered, the search space will be reduced to the local optimal area.
The core of the PPS framework comprises two parts: the strategy of switching search behavior and the updating method of relaxation constraint.
The main idea of switching the search behavior strategy is to calculate the max rate of change between the ideal and nadir points during the last
generations.
In Formula (13),
represents the max rate of change, and
is the parameter of the maximum rate of change, which is a minimum value defined by the user.
In Formula (14), the calculation method of change rate is given. where , are the ideal and nadir points in the kth generation, is population size, and the ideal and nadir points in the ()th generation are denoted as and . is a very small positive number used to avoid dividing by zero. In each generation after the generation, is update according to Formula (14). If is less than or equal to the parameter , the search behavior is switched to the pull search.
The update method of the relaxation constraint is listed in Formula (15), represents the ratio of feasible and infeasible solutions in the Tth generation, and is to control the searching preference between the feasible and infeasible regions (). Different from other relaxation constraint mechanism design, two control parameters and are introduced to control the speed of reducing the relaxation of constraints for different feasible solution ratios in Formula (15), which can help to find feasible solutions more quickly and efficiently. is the preset maximum relaxation generation, which is used to control the time when the relaxation constraint is reduced to zero.
In the push search stage, the relaxation constraint is set to 0, and only when the individual’s no-fly zone constraint is greater than , the individual will be identified as an infeasible solution. However, in the pull search stage, Formula (15) is used to update the relaxation constraint , and given a solution , if , is feasible. For all infeasible solutions, additional operations are performed in the environmental selection mechanism to determine whether they can enter the next generation.
The pseudocode of the switch search behavior strategy and the update method of relaxation constraint is introduced in Algorithm 2.
Algorithm 2 Update constraint threshold
|
Input: : Population of the current generation; : The total value of constraint violations of the Current iteration; : The proportion of feasible solutions in population ; : Phase transition flag; : Minimum fitness set for each generation; : Maximum fitness set for each generation; : The maximum relaxation iteration; : Current iteration number; |
Output: : Constraint threshold for the Tth generation; : Phase transition flag; |
1 Initialization: |
2 Set the parameters; |
3 if then |
4 Calculate the maximum rate of change according to Equation (13); |
5 else |
6 ; |
7 end |
8 if then |
9
if and then |
10 ; |
11 ; |
12 end |
13 if then |
14 Update the constraint threshold according to Equation (15); |
15 end |
16 else |
17 ; |
18 end |
In the line 2 of Algorithm 2, the relevant parameters (such as , etc.) required in Formula (15) are configured, and these parameters do not change with the running of the program. From lines 3 to 7, is updated only if the current generation is greater than .
2.2.2. Offspring Generation Strategy
In terms of the generation strategy of the offspring, we retain the original idea of the ANSGA-III algorithm, the crossover operation is the main method, and the mutation operation is supplement. We directly adopted the single-point crossover method, focusing on improving the mutation operation, which helps to transmit the characteristics of the dominant path segment to the offspring to obtain a better solution.
In [
19], the author proposed a targeted mutation (TM) strategy, and the global optimal solution is used as the basis vector to enhance the search ability of the algorithm in the direction of the global optimal solution. Based on the targeted mutation strategy, this paper proposes a preference point mutation strategy to solve the UAV path planning problem.
In Formula (16), is the new coordinate information after the jth path point mutation of the ith individual in the population, where is the coordinate information of the preference point, is the information of the jth waypoint in another individual randomly selected from the population, and F is the variation factor. In particular, the value of is determined by the terrain height at coordinates plus the minimum safe flight altitude. This means that in the subsequent stage of environmental selection, individuals with good performance on the X-axis and Y-axis will be preferentially retained, thereby reducing the complexity of the problem.
Regarding the generation of preference points, we propose three methods: preference points based on straight lines, preference points based on no-fly zones, and preference points based on mountain terrain.
The point of view based on the lines reference point is to find a new point as a preference point on the straight line connecting two adjacent path points. Based on the characteristics of targeted mutation, the newly generated offspring will be located near this preference point. In an ideal situation, the newly generated path points will form a straight line with the adjacent path points, which not only helps to optimize
and
, but also effectively solves the dynamic constraints of the UAV. Because the gliding UAV has the limitation of the minimum steering distance, we chose the middle point of the straight line as the preference point, which is easier to implement. As shown in
Figure 3, when the mutation operation is performed on point B, B′ will be selected as a preference point. The calculation method is given in Formula (17).
- 2.
Preference points based on no-fly zones
When waypoint
violates the
Kth no-fly zone restriction, there will be three situations: (1) There is only one individual
in the population whose
jth waypoint point satisfies the
kth no-fly zone constraint, then
is selected as the preference point. (2) There are multiple individuals in the population whose
jth waypoint satisfies the
kth no-fly zone constraint, then randomly select an individual
from these individuals, and
is selected as the preference point. (3) If all individuals in the population violate the
kth no-fly zone constraint, Formula (18) is used to generate the preference point.
where
is the angle between point
and the diameter of the
kth no-fly zone.
is the standard normal distribution. As shown in
Figure 4, the preference point will be distributed in the alternative region.
- 3.
Preference points based on terrain
The method of selecting preference points based on terrain restrictions is similar to that of no-fly zone preference points. When the
jth waypoint of all individuals in the population violates the terrain constraint, we use Gaussian mutation for waypoint
to generate a reference point (as shown in Formula (19)).
In this section, we propose three reference point selection methods. Obviously, if three preference point mutations are used at the same time in a targeted mutation operation, the mutation effects of different preference points will cancel each other out. In the multi-stage constraint processing framework of this article, a single mutation operation uses only one method of selecting preference points, and the preference points are selected according to the following rules:
In the push search stage, only Formula (17) is used to generate preference points.
In the pull search stage, if and only if the waypoint violates the terrain constraint or no-fly zone constraint, a preference point is generated according to Formula (18) or Formula (19). When two constraints are violated, the preference point based on the no-fly zone is preferred. In other cases, Formula (17) is used to select preference points.
The pseudocode for the generation strategy is listed in Algorithm 3.
Algorithm 3 Offspring generation
|
Input: : Population of the current generation; : the Local mutation rate; : Phase transition flag; |
Output: The offspring ; |
1
Generate a new offspring population by a Single point crossover operator; |
2 Update array members; |
3 Update array members; |
4 ; // The backup array of |
5 ; // The backup array of |
6 ; // The number of mutations |
7 for to do |
8 for to do |
9 ; // Randomly select a waypoint |
10 if and not in then |
11 // Waypoint violates no-fly zone constraints |
12 ; |
13 ; |
14 Generate a new solution according to Equation (16); |
15 ; // Update array members |
16 else |
17 if and not in then |
18 // Waypoint violates terrain constraints |
19 ; |
20 ; |
21 Generate a new solution according to Equation (16); |
22 if then |
23 ; // Update array members |
24 end |
25 else |
26 Calculate the preference point according to Equation (17); |
27 Generate a new solution according to Equation (16); |
28 end |
29 end |
30 end |
31 end |
In line 7 of Algorithm 1, when calculating the objective function and constraint function of the population, we create two two-dimensional arrays
and
. In array
, the waypoints that meet the no-fly zone constraint are used as indexes, and individual serial numbers are used as array members. In the array
, the waypoints satisfying the terrain constraint are used as indexes. In line 10 of Algorithm 3, the selection method of the reference point can be quickly determined according to the created array. Assuming that the 5th, 7th and 10th individuals in the population, the 10th waypoint and the 15th waypoint of these individuals satisfy the constraint functions
and
respectively, then the two arrays of
and
are represented as
and
. In line 1 of Algorithm 3, a single-point crossover method is used to generate the offspring population. Since the crossover operation does not change the value of the waypoint, it is unnecessary to recalculate the constraint function of the new individual when updating
and
. At lines 4–5, we created two backup arrays for
and
. In the subsequent mutation operation, individuals in the two arrays
and
will be preferentially selected as reference points. In line 15 of Algorithm 4, we add new individuals that satisfy the constraints to the backup array instead of the original array. The reason for this is that the new waypoint meets the constraints, but there is no guarantee that the path segment containing the new waypoint meets the constraints. In the line 4 of Algorithm 4, as the number of individuals in the backup array increases, the newly generated individuals will also be selected as reference points to avoid the loss of selection pressure in the population.
Algorithm 4 Generate preference points
|
Input: : A array of individuals satisfying constraints; : Backup array of ; : The sequence number of the waypoint for the mutation operation; : The size of population; : The flag of Constraint; |
Output: :Generated reference point; |
1 if then |
2 // Choose preference points based on no-fly zones |
3 if then |
4 if then |
5 Randomly select an individual from as a reference point; |
6 else |
7 Calculate the preference point according to Equation (18); |
8 end |
9 else |
10 —Randomly select an individual from as a reference point; |
11 end |
12 else |
13 if then |
14 // Choose preference points based on terrain |
15 if then |
16 Randomly select an individual from ; |
17 else |
18 Calculate the preference point according to Equation (19); |
19 end |
20 else |
21 Randomly select an individual from as a reference point; |
22 end |
23 end |
2.2.3. Environmental Selection
The proposed algorithm adopts the same environment selection strategy based on adaptive reference point as the ANSGA-III algorithm [
13]. Algorithm 5 shows the pseudocode of environment selection.
Algorithm 5 Environmental Selection
|
Input: : New population composed of offspring population and parent population; : Population of the current generation; : Reference points; : Desired points; : Phase transition flag; |
Output: ; |
1 Maximum fitness of all individuals in ; |
2 for to do |
3 Calculate the total value of constraint violations according to Equation (12); |
4 if then |
5 // Judgment of no-fly zone restrictions |
6 if then |
7 ; // is an infeasible solution |
8 end |
9 else |
10 if then |
11 ; // is an infeasible solution |
12 end |
13 end |
14 end |
15 = non-dominated-sort (); |
16 , ; |
17 while do |
18 and ; |
19 end |
20 if then |
21 ; |
22 else |
23 ; |
24 Points to be selected from : ; |
25 Normalize objectives and generate reference set; |
26 Associate each individual of with a reference point; |
27 Calculate niche count of reference point ; |
28 Select individuals one at a time from to generate ; |
29 end |
At lines 1 to 14 of Algorithm 5, the principle of feasibility advantage is embedded in Pareto advantage. Specifically, a solution is said to constraint-dominate , if: (1) is feasible but is not; (2) and are both infeasible and < ; (3) or both of them are feasible and .
The detailed technology of ANSGA-III based on the adaptive reference point selection mechanism can be found in the corresponding references, namely [
13,
20]. In this section, this paper briefly describes the principles of environmental selection operations.
In line 14 of Algorithm 5, after the non-dominated solution sorting of the combined population (having individuals), all individuals will be assigned to different non-dominated levels (, , and so on). Next, all individuals in level 1 to are added to . If ; no other actions are required and the next generation is started with . For , the individuals in level 1 to have been chosen, , and the rest () individuals are selected from the last front . After that, normalize the fitness of all individuals in to construct a hyperplane. The reference points whose reference line is nearest to an individual will be associated with the individual. Since the reference points are evenly distributed, when individuals in the new population can be associated with as many reference points as possible, the new population has better diversity.
NSGA-III requires a set of reference points to be supplied before the algorithm can be applied. A reference line for each reference point can be defined as a line joining the origin and the reference point.in many constrained or even unconstrained problems, not every extended reference line may intersect with the Pareto-optimal front. Thus, there will be some reference points with no Pareto-optimal point associated with them, while others will have more than one point associated with them; hence, NSGA-III may not end up distributing all population members uniformly over the entire Pareto-optimal front. This paper uses the adaptive update reference point mechanism of the ANSGA-III algorithm, and the pseudocode of this mechanism is listed in Algorithm 6. For an M-dimensional constraint problem, at line 1 of Algorithm 6, after creating new population
, associate the individuals in the
with the reference point again. In line 5 of Algorithm 1, the distance
between two reference points is calculated. At line 4 of Algorithm 6, find out the reference points associated with over two individuals, and then in the line 9, take these reference points as the center and use a fixed distance
to generate
new reference points. After that, delete new reference points that are not in the first quadrant or that are repeated (line 9 and line 14 in Algorithm 6). Finally, delete the new reference point that is not associated with any individual (line 20 in Algorithm 6).
Algorithm 6 Update points
|
Input: ; : Structured points; The distance between two reference points; |
Output: : New reference points; |
1 Associate each individual of with a reference point; |
2 ; |
3 The set of reference points where in the set ; |
4 while and do |
5 ; |
6 for to do |
7 for to do |
8 Generate a new reference point with reference point as the center; |
9 if then |
10 ; |
11 end |
12 end |
13 end |
14 Delete the repeated reference points in ; |
15 Update the association of the new reference points ; |
16 Update set ; |
17 end |
18 for to do |
19 if then |
20 Remove reference point from set ; |
21 end |
22 end |