A Flower Pollination Optimization Algorithm Based on Cosine Cross-Generation Differential Evolution

The flower pollination algorithm (FPA) is a novel heuristic optimization algorithm inspired by the pollination behavior of flowers in nature. However, the global and local search processes of the FPA are sensitive to the search direction and parameters. To solve this issue, an improved flower pollination algorithm based on cosine cross-generation differential evolution (FPA-CCDE) is proposed. The algorithm uses cross-generation differential evolution to guide the local search process, so that the optimal solution is achieved and sets cosine inertia weights to increase the search convergence speed. At the same time, the external archiving mechanism and the adaptive adjustment of parameters realize the dynamic update of scaling factor and crossover probability to enhance the population richness as well as reduce the number of local solutions. Then, it combines the cross-generation roulette wheel selection mechanism to reduce the probability of falling into the local optimal solution. In comparing to the FPA-CCDE with five state-of-the-art optimization algorithms in benchmark functions, we can observe the superiority of the FPA-CCDE in terms of stability and optimization features. Additionally, we further apply the FPA-CCDE to solve the robot path planning issue. The simulation results demonstrate that the proposed algorithm has low cost, high efficiency, and attack resistance in path planning, and it can be applied to a variety of intelligent scenarios.


Introduction
With the advancement and innovation of science and technology, including the Internet of Things and artificial intelligence, there are a large number of complex highdimensional variable optimization problems in engineering and industrial applications that need resolution, including solving engineering optimization problems [1], energy-saving development and utilization [2,3], and public facility construction [4]. Continuous, linear, and simple problems are typically amenable to traditional optimization algorithms [5][6][7], and yet when exploring larger combinatorial optimization problems, there are often great limitations, namely, low efficiency, high cost, and high energy consumption, which are not conducive to the application of engineers, and the solution accuracy cannot reach the desired value [8]. As a result, numerous academics began to seek out alternative methods, and heuristic algorithms emerged. Heuristic optimization algorithms are developed on the basis of the characteristic of biological systems and physical theory, Darwinian evolution, the swarm behavior of insects or animals, such as ants [9], birds [10], and annealing in physical metallurgy [11]. Heuristic optimization algorithms have high search accuracy, efficiency, and strong robustness [12], which can be classified into three categories. The first category has strong balance ability between local search and global search, such as artificial bee colony (ABC) [13], social spider optimization (SSO) [14], and so on. The second category has superior global convergence and computation robustness, namely, the wolf pack algorithm (WPA) [15], dragonfly algorithm (DA) [16], while algorithm (WA) [17], etc. The third category has greater population density and searching efficiency such as particle swarm optimization (PSO) [18] and genetic algorithm (GA) [19]. Although the aforementioned traditional algorithms have good performance in some situations, they may lack the exploration ability to find better solution space [20][21][22][23].
In view of this, Yang et al. [24,25] proposed a flower pollination algorithm (FPA) on the basis of flowering plants, which has been widely applied in multi-objective optimization. To improve the search capability of flower pollination algorithms, numerous researchers have addressed the shortcomings of flower pollination algorithm search strategies of flower pollination algorithms. In 2016, Zhou et al. [26] proposed the elite opposition-based flower pollination algorithm (EOFPA), in which the elite opposition learning strategy utilized the optimal individual information to extend the search range of the algorithm, which helped to enhance the global superiority seeking ability of the algorithm and increased the probability of searching for excellent solutions. In 2018, Bian et al. [27] proposed the selfadaptive flower pollination algorithm (SFPA) to reduce the probability of falling into a local optimum, and the parameter control mechanism designed in the SFPA fluctuates within a certain range, thus adjusting the algorithm parameters. Nevertheless, the adjustment of the transition probability P is fluctuating on the basis of 0.8, which is a small fluctuation range and may not significantly improve the algorithm's performance. In 2019, Supriya et al. [28] proposed an enhanced global-best-driven flower pollination algorithm (GFPA) to improve the convergence speed of the flower pollination algorithm. The GFPA introduces a search strategy with the best individual as the base individual, which gives the algorithm a chance to mine in the neighborhood of the best individual and increases the algorithm's convergence speed. In 2020, Yang et al. [29] proposed an improved flower pollination algorithm with three strategies (IFPA) to enhance the convergence speed and optimality search accuracy of the algorithm. In the IFPA, the information of two adjacent bags of the majority of individuals is employed to guide the evolutionary direction, which is equivalent to providing two clear and promising directions for the algorithm search, and yet the similarity of two neighboring generations of optimal individuals results in a single overall trend of the algorithm search direction and an increased likelihood of falling into a local optimum. By analyzing relevant studies, the FPA can find the optimum of the objective function by global and local search, but some flaws remain unsolved: (1) The setting of parameters such as inertia weights affects the accuracy of the global search for the optimal solution. (2) The local search process lacks a search guide and falls into local optimum, resulting in lower search efficiency and convergence. (3) The complexity of the optimization problem increases the number of locally optimal solutions and hinders the FPA from obtaining optimal solutions.
To address these issue, we propose an improved flower pollination algorithm based on cosine cross-generation differential evolution (FPA-CCDE) to overcome the mentioned shortcomings of the FPA. The contributions of our work can be summarized as follows: (1) Setting the cosine inertia weight makes the global search initially strengthen the search ability at a faster rate and enhance the convergence speed of the algorithm. (2) The algorithm uses cross-generation differential evolution to guide individuals to approach the optimal solution, so that the local search process of the algorithm is guided. (3) The external archiving mechanism and the adaptive adjustment of parameters realize the dynamic update of the scaling factor and crossover probability to enhance the population richness as well as reduce the number of local solutions and then combine the cross-generation roulette wheel selection mechanism to reduce the probability of falling into the local optimal solution.
For the purpose of evaluating the superiority and robustness of the proposed FPA-CCDE, we compare it with the other five state-of-the-art heuristic optimization algorithms by benchmark functions in [30][31][32][33][34][35][36][37][38]. The experimental results indicate our algorithm has the best performance in terms of searching accuracy, convergence speed, and operation efficiency. Intending to evaluate the performance of the proposed algorithm in practical applications, we consider the robot inspection path planning issue as an illustration and design the inspection path in accordance with the optimization variables to verify the effectiveness of the algorithm. The experimental results prove the proposed algorithm can meet the requirements of low-cost, high efficiency and obstacle avoidance in inspection path planning.
The remainder of this paper is organized as follows. Section 2 introduces the main idea of the FPA. Section 3 describes the details of the proposed FPA-CCDE. Section 4 verifies the effectiveness of the FPA-CCDE by benchmark functions. Section 5 demonstrates the performance of the FPA-CCDE on robot path planning. The last part of this paper is Section 6, which provides conclusions.

Preliminary Review
Cross-pollination and self-pollination are the two components of flower pollination. Cross-pollination signifies that pollination occurs among different flowers due to natural wind transmission and animal carrying. Self-pollination relates to the pollination of the same flower by spontaneous diffusion without consequence by biological factors. In the FPA, Yang [25] regards these two pollination methods as global and local searching processes, respectively. Moreover, Yang employs switch probability to realize the conversion between two methods, which can substantially balance the ratio of global and local searches.
Cross-pollination corresponds to the global searching process of the FPA. Let the population size of pollen be N, then the position of pollen i at iteration t + 1 is: where x t i is the pollen i at iteration t, and g * is the current fittest pollen. L denotes the step size of the pollination, which follows a Levy distribution [39].
Self-pollination is in line with the local searching process of the FPA, and the pollen i at iteration t + 1 is: where x t j and x t k represent two pollen individual positions (different flowers belonging to the same flowering plant) in the population that are distinct from pollen individual i, which essentially mimics the constancy of flowers in a finite region and ε follows a uniform distribution in [0, 1].

The Flower Pollination Algorithm Based on Cosine Cross-Generation Differential Evolution (FPA-CCDE)
As a novel heuristic algorithm for optimization, the FPA has fewer parameters and can achieve high efficiency. Nonetheless, it is prone to falling into the local optimum, and it has insufficient population richness and search accuracy. In light of this, we propose the FPA-CCDE algorithm. The framework of the FPA-CCDE is shown in Figure 1. The cosine inertia weights are introduced in the global search process to enhance the global search accuracy and balance the searching process. Moreover, the introduction of cross-generation difference in the local search process differential evolution can increase the population's diversity and the efficiency of iteration. The parameter adaptive adjustment mechanism can increase the effectiveness of searching, and the roulette wheel selection mechanism can help the algorithm jump out of the local optimal in the searching process. More details are given in the following subsections.

Cosine Inertia Weight
The inertia weight in the traditional FPA is a random value. A larger inertia weight can contribute to better global searching. Smaller inertia weight assists to strengthen the local searching process. Notwithstanding, this kind of weight cannot guide the global search direction and even leads to local optimal [40]. Consequently, in the global searching process, to improve global search precision, we design a cosine inertia weight on the basis of the simulated annealing method as where λ is the weight adjustment factor, T max is the maximum number of iterations, t is the current iteration, and σ is the inertia adjustment factor. The second term on the right-hand side utilizes the beta distribution to adjust the total inertia weight value. The deviation degree of ω can control the inertia weight value then strengthen the global searching as well as the local searching ability. On the basis of the cosine inertia weight, the position of pollinate iteration t + 1 in global searching can be rewritten as: where U i max and U i min are the upper and lower limits of pollen individual values in each dimension, respectively, and d num is the dimension of pollen individual. Here, rand(1, d num ) is a matrix of 1 × d num , and the values of each column are drawn from a uniform distribution in the range [0, 1]. Finally, x t cen refers to the average value of the upper and lower dimensions of each individual.

Cross-Generation Differential Evolution
In the local searching process, we employ cross-generation differential evolution [41] to achieve a balance between convergence speed and diversity, while maintaining a balance between exploration and development.
The cross-generation differential evolution includes two mutation strategies, namely the neighborhood-based cross-generation strategy (NCG) and the population-based crossgeneration strategy (PCG). The NCG estimates the promising search direction by analyzing the differences between consecutive generations. It can direct the algorithm toward the optimal person. In the mutation of the PCG, the populations from two generations participate in the search for the optimal individual. Combining the information from two generations can reduce the numerical oscillation of search results and improve the search stability of the FPA in the local searching process. In this paper, to balance the convergence and search ability, we adopt the NCG and the PCG with the same probability during the mutation process. The generation of new individuals from the NCG and the PCG is described in detail following the table.
In the NCG, each individual called parent individual will be mutated, and two neighborhood pools of the parent individuals are used to generate the mutant vector. One neighborhood pool is formed by T individuals from a population of the current generation, and the other neighborhood pool consists of T individuals from the population of the previous generation.
The selection criteria are listed below. By calculating the Euclidean distance between the parent and other individuals in the population, the nearest T individuals are selected to form one neighborhood pool. In accordance with the Euclidean distance, T individuals are also picked from the previous generation as the members of the other neighborhood pool.
Utilizing two neighborhood pools for mutation, the new individual generated after mutation can be expressed as: where V i,g is the mutant vector, i is the index of the parent individual, g is the index of the mutation generation, x rn 1 ,g is the randomly selected individual in the neighborhood pool of the current generation, and x rn 2 ,g−1 is the spontaneously selected individual in the parent individual neighborhood pool of the previous generation. Subscript rn 1 is an integer randomly selected from I i,g,1 , I i,g,2 , . . . , I i,g,T , which records the indices of T members in the neighborhood pool. Similarly, rn 2 is randomly selected from I i,g−1,1 , I i,g−1,2 , . . . , I i,g−1,T , and the size is 5% of the total population size.
In PCG, the new individual generated after mutation is: where x i,g is the parent individual, x rp 1 ,g is the randomly selected individual in the population of the current generation, individual x rp 2 ,g−1 is in the population of the previous generation of the parent individual, rp 1 and rp 2 are random integers selected from {1, 2, . . . , N}, and N is population size.

External Archiving Mechanism
After the searching process, to select high-quality solutions in the neighborhood pool, an external archiving mechanism is proposed.
Population diversity can be increased by establishing external archives and requiring individuals within those archives to direct the search process. After completing differential evolution, the fitness value of the resulting offspring u i is compared with the fitness value of the parent x i . If the fitness value is smaller, then the offspring u i replaces x i . Otherwise, T − 1 individuals whose fitness value is greater than x i are selected and stored in an archive. External archiving can increase the richness of the population and avoid the search process from falling into a locally optimal solution. In addition, it can direct individuals in their search for potential subregions with high-quality solution options. After completing the search iteration, if the number of solutions contained in the external archive exceeds the threshold value N p individuals are randomly removed from the archive to keep the number within N P .

Parameter Adaptive Adjustment Mechanism
Since NCG and PCG are highly sensitive to scaling factors and crossover probability CR, the value of these two parameters will affect the sear process [41,42]. If the scaling factor is small, the difference vector will generate a small oscillation, and the richness of the population decreases. If F is large, it will increase the blindness of the searching process, and the convergence velocity slows down. CR determines the probability of crossover between the parent individual and mutation vector in balancing local and global search processes. If CR is large, the population diversity and convergence speed will be increased. For distinct stages of the search process, it is essential to formulate distinct parameters.The parameters setting should meet the following requirements: (1) Select appropriate parameters for a specific region in the target scope; (2) Eliminate inappropriate parameters; (3) Reduce the probability of complete convergence of parameters.
With every iteration, the F i,g of each individual x i is determined according to the Cauchy distribution, which can be expressed as: If F i ≥ 1, set F i to 1. If F i ≤ 0, F i will be generated again according to (7). The initial value is 0.5, and the updated formula is as follows: S F is the set in the archive of F i of the successful individuals at iteration t and is used to denote the Lehmer of all successful individuals in the population.
The generation mainly includes two operation processes. The Cauchy distribution is advantageous for the diversification of mutation factors and avoids the drawback of premature convergence in the differential evolution strategy searching process. Likewise, the Lehmer mean will give more weight to the scaling factor of the better solution. The mutation factor information of the better solution is transmitted to improve the optimization efficiency, and the larger scaling factor occupies a greater weight in the calculation of µ F . It can take optimization precision and algorithm operation efficiency into account.
The crossover is probably randomly generated for utility. The crossover probability updates as: where CR i,g is the average fitness for all individuals within the current population. Randomly selecting four individuals, x p1 , x p2 , x p3 , x p4 , from the external archived population, their fitness values are f 1 , f 2 , f 3 , f 4 , respectively, and After completing the local search, the subsequent cross-selection procedure is also carried out as follows: where U i,g is the trailing vector and rand is derived from a uniform distribution in the range [0, 1]. After completing the pollen variation and cross-selection of the population's individuals, the selection is carried out:

Cross-Generation Roulette Wheel Selection
Heuristic optimization algorithms predominantly applied roulette wheel selection to jump out of the local optimal in the searching process [13,43]. After completing a search iteration for all individuals, we select T pollen individuals with the smallest fitness value and then randomly select T pollen individuals from the remaining individuals in the population. For the individual x t+1 i (i = 1, 2, . . . 2T), we design a cross-generation roulette wheel selection mechanism to reduce the likelihood of algorithmic failure falling into a local solution.
We select T individuals which include parent individuals of the current population and individuals of the previous generation (we recommend α = 0.7T and β = 0.3T) to form a roulette wheel pool to engage in the process of roulette wheel selection. The probability of each pollen individual being selected in the roulette pool is: For pollen individuals i, wig i is the mapping weight of the fitness value. The crossgeneration roulette wheel selection strategy selects appropriate parameters in the target scope. Consequently, it can eliminate inappropriate parameters and reduce the probability of complete convergence of parameters. The specific actions are broken down into the following steps.
Step 1: Sort the pollen individuals in the parent population in accordance with the fitness values.
Step 2: Select the top T pollen individuals to form a subpopulation P t .
Step 3: Randomly select β remaining individuals from the parent population.
Step 4: Randomly select α individuals from the current population.
Step 5: Combine subpopulations P t with selected individuals from the current population to form a roulette wheel selection pool.
Step 6: The individuals in the roulette pool perform the roulette process according to (13).
On the basis of the above analysis in this section, the pseudo-code of the FPA-CCDE can be summarized in Algorithm 1.

Algorithm 1 Flower Pollination Algorithm Based on Cosine Cross-Generation Differential
Evolution (FPA-CCDE) 1: Initialize the pollen population size N and optimal individual g * . 2: Set the maximum criterion T max , and select initial crossover probability CR 0 and initial scaling factor F 0 respectively from [CR min , CR max ] and [F min , F max ]. 3: Randomly generate switch probabilities rand1 and rand2 . 4: for each individual in current population do 5: Calculate F i,g according to (7). 6: if rand1 < P then 7: if rand2 < 0.5 then 8: Updating the current pollen position using PCG differential evolution. 9: else 10: Updating the current pollen position using NCG differential evolution. 11: Crossover and selecting operation for x i+1 according to Formulas (10) and (11). 12: end if 13: else 14: For cross-pollination, Formula (4) is used to complete the global search process and update the current pollen position. 15: Select the updated pollen individuals to perform mutation and crossover operations according to Formulas (11) and (12). 16: end if 17: Generate x p i using cross-generation Roulette Wheel Selection Mechanism. 18: Compare x p i with x i+1 and replace x i+1 if x p i has a better fitness value. 19: Compare x i+1 with x i and replace x i if x i+1 has a better fitness value. 20: Compare x i+1 with g * and replace g * if x i+1 has a better fitness value. 21: end for 22: Repeat line 3 to line 19 until the T max is satisfied.

Evaluation for the FPA-CCDE
To verify the optimization performance of the proposed FPA-CCDE and the operation efficiency of the algorithm, in this section, 32 sets of standard test functions [41,42] were chosen to test the FPA-CCDE, and particle swarm optimization algorithm (PSO) was used to conduct research and comparisons with the algorithm, the pollination algorithm (FPA), the artificial bee colony algorithm (ABC), the genetic algorithm (GA), and the spider clustering algorithm (SSO) in the identical testing setting. In accordance with Yang Xin's article [33], each algorithm is run independently 30 times, and the algorithm is suitable for most applications on the condition that the transition probability P = 0.8. The pollen crossover probability CR 0 = 0.15 is randomly initialized, the population size N p = 300 is set for all comparison algorithms, and the maximum number of iterations is set to T max = 2500. The parameters setting for Algorithm 1 are given in Table 1. The selected test functions mainly include three types, namely, the low-dimensional test function (dimension less than 10) in Table 2, the high-dimensional test function (dimension more than 10) in Table 3, and the extensible test function [43]. Among them, F10 is a low-dimensional multipeak function, which makes it simple for the algorithm to find the local optimal solution during the search. Most low-dimensional functions tend to oscillate violently throughout the search process.

Algorithm
Parameters Setting

Performance Comparison on Low-Dimensional Benchmark Functions
The low-dimensional benchmark functions are frequently utilized in numerous performance evaluations of heuristic optimization algorithms and can generate a mass of local optimum solutions. These functions are continuous or discontinuous, convex or non-convex, and unimodal or multimodal.
The fitness value and standard deviation on benchmark functions of divergent algorithms are displayed in Table 2, with EF fixed at 1000. The smaller the fitness value and standard deviation are, the higher the optimization accuracy and stability will be. For instance, the fitness value and standard deviation of the FPA-CCDE on function F2 are smaller than that of other algorithms, so the optimization accuracy and stability of the FPA-CCDE are the best. It can be observed from Table 2       The outcomes demonstrate that for the low-dimensional test function, the FPA-CCDE greatly improves the reliability of the optimization accuracy in the searching process with smaller numerical oscillation and higher stability.

Performance Comparison on High-Dimensional Benchmark Functions
To verify the stability of the FPA-CCDE, we test it on high-dimensional benchmark functions with 30 dimensions. Such capabilities have a huge number of locally optimal solutions, which may hamper the whole optimization process. The corresponding experiment results are shown in Table 3.
We can see that the optimization precision of the FPA-CCDE is superior to that of the FPA for all functions. The FPA-CCDE achieves better solutions and mean error values than ABC in all functions except for F6. Moreover, the FPA-CCDE can obtain better solutions and error values than PSO, the GA ,and SSO in all functions.

Performance Comparison on Scalable Benchmark Functions
To further verify the optimization effect of the FPA-CCDE under scalable dimensions of benchmark functions, we select F9 as the test function. F9 has a global minimum solution (0, 0, . . . 0) n , which is surrounded by a massive local minimum optimum with identical function values. Meanwhile, maximum solutions exist between the global minimum and local minimum solutions. Hence, its global convergence speed is poor, and it is simple to fall into local optimum.
The fitness values of optimum solutions and standard deviations of function F9 are summarized in Table 4. It can be observed that in the case of low-dimensional test functions, the optimum solution fitness values of algorithms, such as ABC and PSO, are close to the FPA-CCDE. This is because in this case, the number of locally optimal solutions is small, and it is simple to deviate from the local optimal solutions. Nevertheless, the increase of the dimension of variables will generate more local optimal solutions, and most heuristic optimization algorithms will lack searching directions, contributing to an unbalanced local-global searching process. In this situation, the superiority of the FPA-CCDE improves search accuracy and guides the search process. In Table 4, we can see that the optimum solution fitness values and standard deviations of the FPA-CCDE are substantially superior to other algorithmic methods.  The iterations to obtain the fitness value of the optimal solution can quantitatively demonstrate convergence and searching efficiency. The experiment results are depicted in Figures 2-4. We continue to select the three types of benchmark functions listed above for comparison. In Figure 2, it is obvious that for F2 the iterations required by the GA and the FPA are much higher than other algorithms, and the iterations of the FPA-CCDE are close to ABC, PSO, and SSO, which have better searching efficiency in Figure 2. For another two functions, the iterations required by the FPA-CCDE are slightly less than other algorithms. In Figure 3, although ABC is close to the FPA-CCDE on optimal solution fitness value, the FPA-CCDE outperforms ABC and other algorithms regarding iterations. Figure 4 demonstrates the fitness values of all algorithms on F9. On the condition of dealing with low-dimensional variables, the optimum fitness value and iteration number of some algorithms are close to that of the FPA-CCDE, respectively. With the increase of variable dimension, the amount of locally optimal solutions increases sharply, and the FPA-CCDE performs better than other algorithms on the fitness value of the optimal solution.  With the majority of low-dimensional functions, the algorithm will oscillate violently. Consequently, the stability of the algorithm can be characterized by oscillation. On the condition that the number of optimization iterations of each algorithm is 50, 100, 150, 200, and 250, the fluctuation of accuracy between the optimal solutions obtained through every algorithm is adopted as the performance index of the optimization stability of the algorithm. Each algorithm's volatility varies concerning specific test functions (F36, F24, F25) and is displayed in Figure 5. Under the low-dimensional test function (F36), each algorithm's fluctuation range is relatively stable. As the dimension of the decision variable of the test function increases (F24, F25), the complexity of optimizing the solution space, and the oscillation amplitude of the algorithm increases. In comparison with the other algorithms, the overall oscillation amplitude of the FPA-CCDE is relatively small and has excellent stability.

Application of the FPA-CCDE in Inspection Robot Path Planning
To evaluate the performance of the FPA-CCDE in a practical scenario, we use it to solve the path planning problem for the inspection robot. The goal of the path planning is to design a motion track in the workplace in accordance with optimization constraints (e.g, minimum energy cost, shortest motion path, minimum duration cost).
In this work, when planning routes, we take into account the following five constraints. The first one is the moving distance limitation. There is a straight-line distance before each turn of the robot for error correction, and the minimum straight-line distance will affect the robot track. If dividing the path into segments, each segment should be greater than the minimum distance limitation. The total distance of segments follows the limitation: where ||P i−1 P i || is the distance of a segment, P 0 is the starting point, P D+1 is the endpoint, and L max is the longest path limit. The second constraint is the turning angle limitation. The robot has a turning radius between two adjacent segments: where θ max is the maximum turning angle. The third constraint is the minimum obstacle distance limitation that guarantees obstacle avoidance. Subsequently, let the current position and direction of a robot be is the position of the robot, θ j is the steering angle, and the minimum Euclidean distance of the obstacle ϑ to the robot i is d(s i , ϑ). Let d min be the shortest distance that must exist between the robot and the obstruction for there to be no risk of collision between the two. The constraint is expressed as: The last two constraints are the velocity and acceleration of the robot. The linear velocity v vi , angular velocity v ωi , linear acceleration a vi and angular acceleration a ωi are defined as: Let the maximum linear velocity be v max , the maximum angular velocity be ω max , the maximum linear acceleration be a max , and the maximum angular acceleration be ϕ max . The limitations can be stated in the following manner: On the basis of the above constraints, we consider four costs, including energy cost, steering cost, threat attacking cost, and time cost.
The energy cost is proportional to the robot's speed as well as the distance it travels, and this relationship can be expressed as: where α is the consumption factor, v is the speed of the robot, and l i is the distance of the segment. The steering cost is related to the steering angle, which can be expressed as: where k is the steering coefficient, and θ max is the maximum steering angle.
It is more likely that the movement track will be affected by threat targets such as communication radar, base stations, and buildings. To avoid threat targets, the threat attacking cost cost t should be considered. At first, we calculate the threat degree of each track point as: where k j is the threat level of the threat target, a and b are the weights of the threat factors, d xj is the distance from the robot to the center of the jth threat target, and R j represents the radius of the threat target. To calculate each threat target in each segment of the total moving track, we evenly divide each segment into 15 parts. The threat attacking cost for mobile robots in each segment is the average value of the robot at the position x = 2 15 , 4 15 , 6 15 , 8 15 , 10 15 , 12 15 , 14 15 . Hence, cost t can be calculated as: where N is the number of threat targets.
Moving time cost cost h is connected with the movement time of each segment and can be expressed as: whereas the movement time factor, ∆T i , is ith segment movement time. The effective cost of the moving track is defined as: where λ 1 , λ 2 , λ 3 , λ 4 represent the weights of cost t , cost e , cost h , andcost s , respectively. In order to verify the operational efficiency of the algorithm and the effectiveness of the path planning, a simulation on the basis of the Matlab R2020a was conducted to verify the experimental simulation parameters as follows: set each algorithm to run independently 30 times, the pollen population size N p = 300, and the maximum number of iterations T max = 1000. We use PSO, the GA, the FPA, SSO, ABC, and the FPA-CCDE to perform mobile robot path planning. The parameter settings are listed in Table 5, which are also used in [25,26].  Table 6 indicates the time spent in the path planning process of the FPA-CCDE is better than that of the FPA, ABC, PSO, and SSO and slightly worse than that of the GA. The cost of path planning is 65.7% lower than the FPA, 2.8% lower than ABC, 1.7% lower than PSO, 1.7% lower than SSO, and 0.9% lower than the GA. Regarding average variance, the FPA-CCDE is 99.8% lower than the FPA, 3.2% lower than ABC, 63.1% lower than PSO, 80.7% lower than SSO, and 89.8% lower than the GA. It can be seen that in comparison to the other algorithms, the FPA-CCDE can maintain better efficiency in path planning, while consuming the least movement cost, whereas at the same time, the average error of the algorithm is the smallest, and the algorithm is more robust.  Figure 6 demonstrates the convergence curve of the objective function of each algorithm as the number of iterations increases. We can see that the ABC algorithm finds the optimal solution on the condition that the number of iterations is 900, and ABC, PSO, and the GA all have the phenomenon of early convergence, which cannot reduce movement expenses. The number of algorithm iterations required for SSO to find the optimal solution is considerably larger than other algorithms. Nonetheless, when the number of iterations of the FPA-CCDE is 700, the value of the objective function does not change. Moreover, the cost of this algorithm is significantly lower than that of the other algorithms.   Figure 7 demonstrates that a route from the lower left corner to the upper right corner of the area must be designed in which the buildings are obstacles encountered during the movement, and the colored icons represent the threat targets. Moreover, it can be observed that the SSO and PSO algorithms are highly volatile during the optimization process, and enormous fluctuations occur at the conclusion of the optimization procedure. The FPA-CCDE has better stability in the optimization process, with smooth curves and low volatility. The effect of the FPA-CCDE is superior to the other algorithms.   Figure 8a demonstrates that as the number of segments D increases, the number of iterations of each algorithm also increases proportionally. When D is set to 35, the number of iterations required by each algorithm to accomplish the path planning tends to be stable. It can be seen from Figure 8b that with the increase in the number of segments, the running time of each algorithm to complete the path planning also increases. When the number of segments D is set to 35, the running time of ABC, SSO, the GA, and the FPA-CCDE to complete the path planning tends to be stable, whereas the execution time of the FPA and PSO increases more rapidly than that of the other algorithms at this time. To verify the stability of these algorithms applied in robot path planning, each algorithm runs independently, and the obtained value of the path planning cost function is demonstrated in Figure 9. The cost value of the FPA-CCDE mostly maintains a stable state, and its value is considerably less than that of the other algorithms.

Conclusions
In order to solve the optimization problem of high-dimensional variables, this paper designs a flower pollination optimization algorithm based on cosine cross-generation differential evolution. Specifically, individuals are directed to approach the optimal solution by means of differential evolution between generations so that the local searching process of the algorithm is oriented. Setting the cosine inertia weight makes the global search initially strengthen the search ability at a faster rate and enhances the convergence speed of the algorithm. At the same time, the scaling factor and crossover probability are dynamically updated through the parameter adaptive adjustment mechanism, thereby improving the population richness, and the cross-generation roulette method is adopted to reduce the probability of falling into the local optimal solution. Simulation results indicate that the FPA-CCDE displays significant performance advantages in terms of accuracy, average error of algorithm, and stability of the algorithm. In addition, we apply the FPA-CCDE to solve the robot path planning issue. The simulation test demonstrates that our algorithm is capable of low-cost, high-efficiency path planning. In the future, it is expected to be employed in industrial scenarios, such as unmanned submarine path design, automobile cargo distribution route planning, and UAV smart grid fault monitoring.