Multi-Strategy Enhanced Dung Beetle Optimizer and Its Application in Three-Dimensional UAV Path Planning

: Path planning is a challenging, computationally complex optimization task in high-dimensional scenarios. The metaheuristic algorithm provides an excellent solution to this problem. The dung beetle optimizer (DBO) is a recently developed metaheuristic algorithm inspired by the biological behavior of dung beetles. However, it still has the drawbacks of poor global search ability and being prone to falling into local optima. This paper presents a multi-strategy enhanced dung beetle optimizer (MDBO) for the three-dimensional path planning of an unmanned aerial vehicle (UAV). First, we used the Beta distribution to dynamically generate reﬂection solutions to explore more search space and allow particles to jump out of the local optima. Second, the Levy distribution was introduced to handle out-of-bounds particles. Third, two different cross operators were used to improve the updating stage of thief beetles. This strategy accelerates convergence and balances exploration and development capabilities. Furthermore, the MDBO was proven to be effective by comparing seven state-of-the-art algorithms on 12 benchmark functions, the Wilcoxon rank sum test, and the CEC 2021 test suite. In addition, the time complexity of the algorithm was also analyzed. Finally, the performance of the MDBO in path planning was veriﬁed in the three-dimensional path planning of UAVs in oil and gas plants. In the most challenging task scenario, the MDBO successfully searched for feasible paths with the mean and standard deviation of the objective function as low as 97.3 and 32.8, which were reduced by 39.7 and 14, respectively, compared to the original DBO. The results demonstrate that the proposed MDBO had improved optimization accuracy and stability and could better ﬁnd a safe and optimal path in most scenarios than the other metaheuristics.


Introduction
Artificial intelligence is one of the most promising technologies for solving problems in various fields.UAV is a powerful auxiliary tool in artificial intelligence technology with high flexibility, low cost, and high efficiency [1].It is also considered as a candidate technology for future 6G networks and has wide applications in various scenarios [2].For example, in hazardous areas such as oil and gas plants, UAVs can replace humans to perform specific tasks and improve work efficiency.However, ensuring the safety of autonomous flight UAVs in complex environments is a significant challenge.Path search has essential research significance as a supporting technology for UAV flight.Path planning allows the UAV to find the optimal safe path from a start point to an endpoint according to specific optimization criteria such as the minimal path length or the lowest energy consumption [3].The UAV path searching problem is based on the case of task points and prior maps.Therefore, the mission, the surrounding environment, and the UAV's physical constraints should be clarified first.On this basis, the task requirements, environmental states, and constraints related to UAVs are expressed through a mathematical model and applied to the path-planning problem.It has been proven that finding the optimal path is Symmetry 2023, 15, 1432 3 of 26 Previous work has deeply studied the defects of intelligent algorithms and improved the convergence ability of algorithms.In this paper, we improved the optimization ability of the DBO and the solving efficiency of the UAV path-planning problem.The following work was conducted to improve the search performance of the DBO:

•
Adding a reflective learning strategy and using Beta distribution function mapping to generate reflective solutions, improving the algorithm's search ability;

•
For particles that exceeded the search space range, Levy distribution mapping was used to handle particle boundaries, enhancing the probability of global search reaching the optimal position; • Individual crossover mechanism and dimension crossover mechanism were used to update the position of individual thief beetles, increasing the population diversity and avoiding falling into local optima; • Applying the improved MDBO to solve the three-dimensional UAV path-planning problem, and design sets of scene experiments to verify the efficiency of the MDBO.
The rest of this paper is organized as follows.Section 2 illustrates the basic DBO.In Section 3, the proposed MDBO is described in detail.In Section 4, the experimental results of the proposed MDBO are analyzed.Section 5 describes the UAV path-planning model.Section 6 conducts the UAV planning simulation experiments and discusses the comparison results between the MDBO and other metaheuristic algorithms.Finally, Section 7 provides a summary of the paper.

Dung Beetle Optimizer (DBO)
The basic DBO is based on population, mainly inspired by the ball-rolling, dancing, foraging, stealing, and reproduction behaviors of dung beetles.The DBO divides the population into four search agents: ball-rolling dung beetle, brood ball, small dung beetle, and thief.Specifically, each search agent has its own unique updating rules.Note that specific details will be described as follows.
(1) Ball-rolling dung beetle During the rolling process, dung beetles must navigate through celestial cues to keep the dung ball rolling in a straight line.Thus, the position of the ball-rolling dung beetle is updated and can be expressed as: where t represents the current number of iterations; x i (t) represents the position information of the ith dung beetle during the tth iteration; k ∈ (0, 0.2] is a constant value representing the deflection coefficient; b is a constant value belonging to (0,1); α is a natural coefficient assigned to 1 or −1; X w is the global worst position; ∆x simulates changes in light intensity.When a dung beetle encounters obstacles that prevent it from progressing, it will redirect itself through dancing to obtain a new route.A tangent function simulates the dancing behavior to obtain a new rolling direction.Therefore, the location of the ball-rolling dung beetle is updated as follows: where θ ∈ [0, π] is the deflection angle.
(2) Brood ball Choosing a suitable spawning site is crucial for dung beetles to provide a safe environment for their offspring.Hence, in DBO, a boundary selection strategy is proposed to simulate the spawning area of female dung beetles, which is defined as follows: where X * represents the current local optimal position; Lb * and Ub * represent the lower and upper bounds of the spawning area; R = 1 − t/T max ; T max denotes the maximum number of iterations; Lb and Ub are the lower and upper bounds of the search space, respectively.It is assumed that each female dung beetle will only lay one egg in each iteration.The boundary range of the spawning area changes dynamically with values, so the position of the egg ball also changes dynamically during the iteration process expressed as follows: where B i (t) is the position of the ith sphere at the tth iteration; b 1 and b 2 are two independent random vectors with a size of 1 × D; D is the dimension.
(3) Small dung beetle Some adult dung beetles will burrow out of the ground in search of food, and this type of dung beetle is called the small dung beetle.The boundaries of the optimal foraging area for small dung beetles are defined as follows: where X b represents the global optimal position; Lb b and Ub b are the lower and upper bounds of the optimal foraging area, respectively.Therefore, the location of the small dung beetle is updated as follows: where x i (t) represents the position of the ith dung beetle at the tth iteration; C 1 is the random number subject to normal distribution; C 2 is the random vector within the range of (0,1).
(4) Thief Some dung beetles, known as thieves, steal dung balls from other beetles.From Equation (5), it can be observed that X b is the optimal food source.Assume that the area around X b is the optimal location for competing food.During the iteration process, the location information of the thief is updated as follows: where x i (t) represents the location information of the ith thief at the tth iteration; g is a random vector subject to normal distribution with the size of 1 × D; S is a constant value.

The Proposed Method
The MDBO proposed in this section mainly includes three strategies: generating reflective solutions, handling position boundary violations, and improving thief dung beetle position updates.

Dynamic Reflective Learning Strategy Based on Beta Distribution
The dynamic region selection strategy proposed by DBO strictly limits the search scope to this region, which is not conducive to searching other regions.The search scope can be expanded by dynamically calculating the solution in the opposite direction, helping the original algorithm break away from the local optimal region.The traditional method of randomly generating initial positions according to uniform distribution is simple and feasible.It is adverse to forming an "encircling" to the optimal solution.This paper proposes generating reflective solutions using Beta distribution to effectively surround the optimal solution with the initial position.
The Beta distribution function is defined as: where B(α, β) is the Beta function, defined as: Figure 1 shows the probability density function of the Beta distribution.From the figure, it can be seen that when α = β = 0.5, the shape of the density function is symmetric in a U-shape.The candidate solution generated is most likely located near the boundary of the search space, so the global optimal solution is better "surrounded" within the initial particle swarm.

Dynamic Reflective Learning Strategy Based on Beta Distribution
The dynamic region selection strategy proposed by DBO strictly limits the search scope to this region, which is not conducive to searching other regions.The search scope can be expanded by dynamically calculating the solution in the opposite direction, helping the original algorithm break away from the local optimal region.The traditional method of randomly generating initial positions according to uniform distribution is simple and feasible.It is adverse to forming an "encircling" to the optimal solution.This paper proposes generating reflective solutions using Beta distribution to effectively surround the optimal solution with the initial position.
The Beta distribution function is defined as: where ( , ) B α β is the Beta function, defined as: Figure 1 shows the probability density function of the Beta distribution.From the figure, it can be seen that when = =0.5 α β , the shape of the density function is symmetric in a U-shape.The candidate solution generated is most likely located near the boundary of the search space, so the global optimal solution is better "surrounded" within the initial particle swarm.Assume that the number of particles is N, the dimension is D, the maximum number of iterations is T, the upper and lower bounds of the jth dimension are [ j Lb , j Ub ], and the reverse solution is u , generated according to the following formulas: ( ( 1) ( ( 1) ) Assume that the number of particles is N, the dimension is D, the maximum number of iterations is T, the upper and lower bounds of the jth dimension are [Lb j ,Ub j ], and the reverse solution is u, generated according to the following formulas: where x i,j (t + 1) is the jth value of the ith solution at the t + 1th iteration; u i,j (t + 1) is the jth value of the ith reflective solution at the t + 1th iteration; s j is the domain center of the upper and lower boundaries; Φ(a, b) generated a random number within (a, b) that follows the Beta distribution; betarnd is a function to randomly generate a number that obeys the Beta distribution.In this article, α = β = 0.5.

Cross Boundary Limits Method Based on Levy Distribution
The simple method of "if the particle exceeds the boundary, it is equal to the boundary" is used to deal with the individual position.The advantage of this method is that it is simple to implement.However, because the boundary point is not the global optimal solution, this method is unfavorable to the optimization process.In this paper, a new boundary processing method based on Levy distribution mapping was adopted.The specific operations are as follows: where x ij is the particle position after boundary processing; λ is a constant number; Levy is a random search path, and its random step size is a Levy distribution.The notation ⊗ is entry-wise multiplications.Figure 2 visually shows the method for handling particle boundaries.When the particle x ij jumps out of the upper and lower boundaries, it re-enters the search region using Levy steps with random jumps.
1 ( ) 2 where , ( 1) that follows the Beta distribution; betarnd is a function to randomly generate a number that obeys the Beta distribution.In this article, α = β = 0.5.

Cross Boundary Limits Method Based on Levy Distribution
The simple method of "if the particle exceeds the boundary, it is equal to the boundary" is used to deal with the individual position.The advantage of this method is that it is simple to implement.However, because the boundary point is not the global optimal solution, this method is unfavorable to the optimization process.In this paper, a new boundary processing method based on Levy distribution mapping was adopted.The specific operations are as follows: ' min( ( ), ), max( , ( )), where ' ij x is the particle position after boundary processing; λ is a constant number; Levy is a random search path, and its random step size is a Levy distribution.The notation ⊗ is entry-wise multiplications.Figure 2 visually shows the method for handling particle boundaries.When the particle ij x jumps out of the upper and lower boundaries, it re- enters the search region using Levy steps with random jumps.

Cross Operators for Updating The Location of Thieves
As can be seen from Equation (8), the thief's position is affected by the global optimal solution.This mechanism enables the optimal solution to be generated by the thieves.However, once the optimal individual falls into the local optimal solution, the solving efficiency of the algorithm will be greatly reduced.Inspired by the crisscross optimizer [28], this paper introduced horizontal and vertical crossover operators to perform crosstalk operations on thieves to improve the convergence ability of the algorithm.Note that specific details are described as follows.
(1) Horizontal crossover search (HCS) HCS is similar to the crossover operation in genetic algorithms, which involves performing crossover operated on all dimensions between two individuals.Assuming that the dth dimension of the parent individual i x and j x are used to perform HCS, their kids can be reproduced as:

Cross Operators for Updating the Location of Thieves
As can be seen from Equation (8), the thief's position is affected by the global optimal solution.This mechanism enables the optimal solution to be generated by the thieves.However, once the optimal individual falls into the local optimal solution, the solving efficiency of the algorithm will be greatly reduced.Inspired by the crisscross optimizer [28], this paper introduced horizontal and vertical crossover operators to perform crosstalk operations on thieves to improve the convergence ability of the algorithm.Note that specific details are described as follows.
(1) Horizontal crossover search (HCS) HCS is similar to the crossover operation in genetic algorithms, which involves performing crossover operated on all dimensions between two individuals.Assuming that the dth dimension of the parent individual x i and x j are used to perform HCS, their kids can be reproduced as: where ε 1 and ε 2 are random numbers uniformly distributed in the range of (0,1); c 1 and c 2 are random numbers uniformly distributed in the range of (−1,1).MS i,d and MS j,d are the kids generated by x i,d and x j,d , respectively.
(2) Vertical crossover search (VCS) VCS is a crossover operation performed between two dimensions of the corresponding individuals, which has a lower probability of occurrence than HCS.Assume that the d1th Symmetry 2023, 15, 1432 7 of 26 and d2th dimensions of the individual i are used to perform VCS, which is calculated as follows: where ε is random number uniformly distributed in the range of (0,1), and MS i,d 1 is the offspring of x i,d 1 and x i,d 2 .
3.4.The Detailed Process of the MDBO By introducing the above three strategies into the MDBO, the convergence speed and convergence accuracy of the algorithm can be effectively improved to balance the global exploration and local exploitation while enhancing the performance of the original DBO.
Figure 3 shows the process of MDBO implementation.
and 2 c are random numbers uniformly distributed in the range of (−1,1).

MS
are the kids generated by , i d x and , j d x , respectively.
(2) Vertical crossover search (VCS) VCS is a crossover operation performed between two dimensions of the corresp ing individuals, which has a lower probability of occurrence than HCS.Assume tha d1th and d2th dimensions of the individual i are used to perform VCS, which is calcu as follows: where ε is random number uniformly distributed in the range of (0,1), and

The Detailed Process of the MDBO
By introducing the above three strategies into the MDBO, the convergence speed convergence accuracy of the algorithm can be effectively improved to balance the g exploration and local exploitation while enhancing the performance of the original D Figure 3 shows the process of MDBO implementation.The pseudo-code of MDBO is shown in Algorithm 1.

Computational Complexity Analysis
The pseudo-code of the proposed algorithm is shown in Algorithm 1.The complexity of the optimizer is one of the key indicators that can reflect the algorithm's efficiency.According to the pseudo-code in Algorithm 1, it can be seen that the complexity of MDBO mainly includes these several processes: initialization; calculating the reflective solutions by Beta distribution; HCS and VCS; updating the dung beetles' position with new boundary handling method.For convenience, it was assumed that N solutions and T iterations are involved in the optimization process of a D-variable problem.First, the complexity in the initialization phase is O(N).Then, the complexity level of calculating In MDBO, the total number of evaluations in updating the particles' position is 4 * T * N because N group solutions are evaluated per cycle.Thus, the time complexity of the dung beetles to look for the best position is about O(4 * T * N), which can be abbreviated as O(T * N).Based on the above discussions, the overall time complexity of MDBO is Compared to DBO, although it increases the time overhead, the performance is optimized.17)-( 18) Perform VCS using Equation ( 19) end while end if end for Update the best position and its fitness t = t + 1 end while Return the optimal solution X b and its fitness f b .

Experimental Design
In this section, a series of numerical experiments on MDBO were conducted to validate the effectiveness of MDBO.The statistical analysis and convergence analysis were performed on 12 basic benchmark functions [29][30][31] and CEC2021 competition functions [32].Four well-established optimization techniques (the POA [33], SCSO [34], HBA [35], and DBO [18]), and three improved metaheuristics in recent years (the ISSA [36], MCFOA [22], GCHHO [23]) were compared with our proposed MDBO.Table 1 shows the parameter settings of all algorithms.For fairness, the population size N = 30 for all algorithms, and the maximum iterations T = 500.Mean (Mean) and standard deviation (Std) are used as statistical indicators to assess the optimization performance.All experiments were achieved on MatlabR2019a version.

Algorithm
Parameters

Sensitivity Analysis of MDBO's Parameters
This section analyzes the sensitivity of the control parameters (k, b, α, β) employed in the MDBO.The parameters k and b are consistent with the values taken in the DBO.Xue [18] has demonstrated that the algorithm performance is the most robust when k = 0.1, b = 0.3.In this subsection, we focused on analyzing the effect of the added parameters α and β on the search performance of the algorithm.Four CEC test functions (including the unimodal function CEC-1, the basic function CEC-3, the hybrid function CEC-7, and the composition function CEC-10) were used to test the design of these control parameters.Five parameter combinations, {α = 0.5, β = 0.5}, {α = 5, β = 1}, {α = 1, β = 3}, {α = 2, β = 2}, and {α = 2, β = 5}, were set according to different distributions.
The sensitivity analysis is shown in Figure 4, where the horizontal coordinates indicate the five parameter combinations, and the vertical coordinates indicate the mean values.It can be seen from Figure 4a,c that the algorithm performed optimally when α = 0.5 and β = 0.5.For CEC1, α and β showed a high sensitivity to different inputs.Noting that a = 0.5 and b = 0.5 had the best performance.Moreover, we could see that α = 0.5 and β = 0.5 could obtain the best search performance in CEC7.It is observable in Figure 4b,d that α = 0.5 and β = 0.5 demonstrated the robust behavior of different inputs.For CEC3, from the values displayed in the vertical coordinates, the optimized objective function values obtained for various combinations of a and b were relatively close.Note that α = 0.5 and β = 0.5 obtained second place after α = 2 and β = 2.In CEC10, the performance of α = 2 and β = 5 was better than that of α = 2 and β = 2.However, α = 0.5 and β = 0.5 still achieved second place, showing their robust performance.Therefore, α = 0.5 and β = 0.5 were selected as the recommended parameter values for MDBO.

Comparison of Performance on 12 Benchmark Functions
The 12 basic benchmark functions included seven unimodal functions and six multimodal functions (details in Appendix A, Table A1).It is worth noting that F1-F7 are typical unimodal test functions since they have one and only one global optimal value.The multimodal functions F8-F12 have features with multiple local optimums.Therefore, F1-F7 are widely used to estimate the convergence accuracy and speed, and F8-F12 are more suitable for testing the global exploration ability.Moreover, to fairly compare the comprehensive search ability of each metaheuristic, all algorithms were independently run 30 times in each experiment.We also tested the scalability and compared the performance of MDBO on dimensions of 30, 50, and 100.Two indicators were used to measure their optimization performance: the mean value (Mean) and the standard deviation (Std).
Table 2 shows the mean and standard deviation data of all algorithms on the 12 benchmark test functions tested, and the table also provides the comparison results of the algorithms when the test functions were taken in 30, 50, and 100 dimensions, respectively.As can be seen from Table 2, MDBO achieved the best results in all of the test functions.From the perspective of vertical comparison, MDBO ranked first in the test of other functions, except for some algorithms that showed a comparable performance to MDBO in the F9, F10, and F11 functions.For functions F1-F6, MDBO converged to the theoretical optimal value of 0. For F7 and F8, although MDBO could not have the best value, it showed significant advantages compared with other algorithms.Next, from the results of the dimension comparison, the results of 100 dimensions, 30 dimensions, and 50 dimensions were similar, with little change in the order of optimal value.Based on the above analysis, it can be seen that MDBO has more significant competitive advantages in solving unimodal and multimodal functions.The results reflect the ability to jump out of the local optima by the reflective learning operator and crisscross optimizer.

Comparison of Performance on 12 Benchmark Functions
The 12 basic benchmark functions included seven unimodal functions and six m modal functions (details in Appendix A, Table A1).It is worth noting that F1-F7 are ty unimodal test functions since they have one and only one global optimal value.The timodal functions F8-F12 have features with multiple local optimums.Therefore, F are widely used to estimate the convergence accuracy and speed, and F8-F12 are suitable for testing the global exploration ability.Moreover, to fairly compare the com hensive search ability of each metaheuristic, all algorithms were independently ru times in each experiment.We also tested the scalability and compared the performan MDBO on dimensions of 30, 50, and 100.Two indicators were used to measure their mization performance: the mean value (Mean) and the standard deviation (Std).
Table 2 shows the mean and standard deviation data of all algorithms on th benchmark test functions tested, and the table also provides the comparison results o algorithms when the test functions were taken in 30, 50, and 100 dimensions, respecti As can be seen from Table 2, MDBO achieved the best results in all of the test funct From the perspective of vertical comparison, MDBO ranked first in the test of other tions, except for some algorithms that showed a comparable performance to MDBO i F9, F10, and F11 functions.For functions F1-F6, MDBO converged to the theoretical mal value of 0. For F7 and F8, although MDBO could not have the best value, it sho significant advantages compared with other algorithms.Next, from the results of th mension comparison, the results of 100 dimensions, 30 dimensions, and 50 dimen were similar, with little change in the order of optimal value.Based on the above ana it can be seen that MDBO has more significant competitive advantages in solving

Convergence Curve Analysis
Convergence analysis plays a vital role in evaluating the ability of the local exploitation and global exploration of the algorithm.Figure 5 shows the convergence curves of DBO, POA, HBA, SCSO, ISSA, GCHHO, MCFOA, and MDBO on functions F1-F12.As shown in Figure 5, MDBO's optimization ability was the best in 11 (F1-F6, F8-F12) out of 12 functions.For functions F1-F6, the MDBO's curves dropped rapidly in early iterations and kept a fast convergence rate to the optimal solution.Notably, F1-F5 are continuous unimodal test functions, and MDBO can quickly search for the optimal theoretical value of 0. Since the vertical coordinates of the convergence curve were generated by the logarithmic scale, the accuracy of the displayed magnitude was 10 −300 .For F4, the function curve of MDBO showed an inflection point because crossover operators can help MDBO re-exploit the optimization precision.For function F7, although the progress of convergence to 500 generations was not as good as that of ISSA, the average number of iterations of function curve convergence to the optimal value was the least and converged to the optimal value in about 100 generations.In F9 and F11, MDBO obtained the optimal global value of 0. The curve broke during iterations because the figure showed an average best value in logarithmic.For functions F8, F10, and F12, MDBO exhibited a more competitive performance than the other comparison algorithms.In summary, convergence analysis proved that MDBO had a higher success ratio than the other optimization algorithms.
gence to 500 generations was not as good as that of ISSA, the average number of iterations of function curve convergence to the optimal value was the least and converged to the optimal value in about 100 generations.In F9 and F11, MDBO obtained the optimal global value of 0. The curve broke during iterations because the figure showed an average best value in logarithmic.For functions F8, F10, and F12, MDBO exhibited a more competitive performance than the other comparison algorithms.In summary, convergence analysis proved that MDBO had a higher success ratio than the other optimization algorithms.

Wilcoxon Rank-Sum Test
To further test the effectiveness of the MDBO, the Wilcoxon rank sum test [37] was used to determine whether there was a statistical difference.Each algorithm was run 30 times independently, and the data volume met the requirement of statistical analysis.Table 3 shows the p-values of the Wilcoxon rank sum test at the α = 5% significance level.If p < 0.05, the original hypothesis is rejected, and the alternative hypothesis is accepted.In Table 3, "+/−/=" indicates the number of MDBO with better/worse/comparable performance compared with other algorithms, respectively, where the ''NaN'' markers had comparable performance.In general, most of the p-values of the rank sum test were less than 0.05.This indicates that the performance of MDBO was significantly different from other algorithms.Therefore, it was considered that the proposed MDBO had excellent convergence performance.

Wilcoxon Rank-Sum Test
To further test the effectiveness of the MDBO, the Wilcoxon rank sum test [37] was used to determine whether there was a statistical difference.Each algorithm was run 30 times independently, and the data volume met the requirement of statistical analysis.Table 3 shows the p-values of the Wilcoxon rank sum test at the α = 5% significance level.If p < 0.05, the original hypothesis is rejected, and the alternative hypothesis is accepted.In Table 3, "+/−/=" indicates the number of MDBO with better/worse/comparable performance compared with other algorithms, respectively, where the ''NaN" markers had comparable performance.In general, most of the p-values of the rank sum test were less than 0.05.This indicates that the performance of MDBO was significantly different from other algorithms.Therefore, it was considered that the proposed MDBO had excellent convergence performance.

MDBO's Performance on CEC2021 Suite
To further verify the performance of the MDBO, the challenging CEC 2021 test suite (details in Appendix A, Table A2) was used to test against the seven metaheuristics abovementioned.Similarly, for CEC2021, the population size was set to 30, along with 500 maximum iterations, and the dimension was set to 20.Each metaheuristic was run independently 30 times to keep fairness and objectivity.The Wilcoxon signed-rank test (signed-rank test) [37] was also carried out.The symbol "gm" is the score representing the difference between the number of symbols "+" and "−".
Table 4 shows the experimental results of the MDBO and other optimizers.In Table 4, the proposed MDBO ranked first in CEC-1, CEC-3, CEC-4, and CEC-6.For CEC-2 and CEC-9, MDBO achieved the best mean results compared with other algorithms.For CEC-10, the mean value of MDBO was second only to HBA, but the standard deviation was smaller and more stable than HBA.The "gm" score showed that the MDBO differed significantly from other algorithms in the vast majority of cases.Overall, the results of the CEC2021 test functions show that the MDBO is effective and suitable for some engineering problems.

Environment Model
In the route planning of an UAV inspection in oil and gas plants, it is vital to create an appropriate environment model as it will improve the efficiency of the optimization algorithm.Considering some objects as obstacles in oil and gas plants such as complex pipelines, oil wells, signal towers, and so on, this paper adopted the geometric description method to establish the three-dimensional environment model.In this model, the obstacles are described by cuboids of different sizes.The transformation process of the model is shown in Figure 6.In addition, compared with the military UAV, the inspection UAV does not need to consider threats such as missiles, radar, and anti-aircraft guns.After ensuring the limitations of the UAV, the final optimal path is generated according to the surrounding environment and the task requirements to complete the inspection task.In order to prevent the UAV from colliding with obstacles during the flight, the safety threshold R sa f e is added to the length, width, and height of different cuboids.

Environment Model
In the route planning of an UAV inspection in oil and gas plants, it is vital to create an appropriate environment model as it will improve the efficiency of the optimization algorithm.Considering some objects as obstacles in oil and gas plants such as complex pipelines, oil wells, signal towers, and so on, this paper adopted the geometric description method to establish the three-dimensional environment model.In this model, the obstacles are described by cuboids of different sizes.The transformation process of the model is shown in Figure 6.In addition, compared with the military UAV, the inspection UAV does not need to consider threats such as missiles, radar, and anti-aircraft guns.After ensuring the limitations of the UAV, the final optimal path is generated according to the surrounding environment and the task requirements to complete the inspection task.In order to prevent the UAV from colliding with obstacles during the flight, the safety threshold safe R is added to the length, width, and height of different cuboids.

Path Representation
In this paper, it was assumed that the planning path had a start point S and an end point E .During the inspection, the UAV needs to traverse some task points with no col- lisions.Assume that the path can be represented as a series of discrete points such as , , , , , ) , where the first and last waypoints are the given start and target point.The coordinates of k p are ( , , ) x y z .The generation of the initial path is introduced as follows: Step 1, confirm the direction of the next point to the starting point S .The direction

Path Representation
In this paper, it was assumed that the planning path had a start point S and an end point E.During the inspection, the UAV needs to traverse some task points with no collisions.Assume that the path can be represented as a series of discrete points such as , where the first and last waypoints are the given start and target point.The coordinates of p k are (x k , y k , z k ).The generation of the initial path is introduced as follows: Step 1, confirm the direction of the next point to the starting point S. The direction of the UAV in three-dimensional space can be generated as: where DIR represents the removable direction, and dir x , dir y , dir z are the direction on the x-axis, y-axis, and z-axis, respectively.Then, the next movable waypoint is expressed as: where (x i , y i , z i ) is the position of the ith discrete point.
Step 2, make sure that the generated waypoints stay within the map and do not collide with the obstacles.Therefore, it is necessary to penalize infeasible solutions.The penalty function h 1 is introduced as: where p InObstacles is the point of collision with the obstacles, and p OutMap denotes the point outside the map.
Step 3, find the optimal waypoint that satisfies the conditions and add it to the path, which can be described as follows: 24) where i is the index of discrete points from 0 to n; pri is a constant value that depends on the scale of the search space; D 1 and D 2 represent the Euclidean distance between the current path point and the next path point and the end point, respectively.
Step 4, repeat the above operation until the UAV flies to the first task point.
Step 5, finally, repeat the above steps until the UAV flies over all task points and generates a complete initial path.

Cost Function and Performance Constraints
The objective function that evaluates a candidate route should take account of the cost of the path and the performance, which is expressed as follows: where f (x) represents the overall cost function; w m is the weight coefficient; are respectively the costs associated with the path length, flight height, and smoothness.The decision variable is x = { x 1 , x 2 , • • • , x D } , and D is the dimension of the problem space.L i and U i are the lower and upper bounds of the search space.The cost function and constraints of the UAV path are described as follows: (1) Length cost In the inspection of UAVs, the shorter the path, the less the time and energy consumption.The cost function f 1 is the length of the UAV path, which can be calculated by the Euclidean operator as follows: where k is the index of discrete points from 0 to N.
(2) Flight altitude cost During the flight, maintaining a steady altitude can reduce the power consumption.In order to ensure the safety of the flight, the altitude of the UAV is usually limited between two given extrema, the minimum height h min and the maximum height h max , respectively.Therefore, the cost function f 2 is computed as: where z k denotes the flight height with respect to the ground, and k is the index of waypoints.It should be mentioned that h k maintains the average height and penalizes the values outside the range. (

3) Smooth cost
To ensure that the UAV can always maintain a good attitude during the working flight, this paper adopted a smooth cost, consisting of the climb turning angle and climbing rates.As shown in Figure 7, the turning angle φ k is the angle between two adjacent consecutive path segments.If → e 3 is the unit vector in the z-axis direction, the projected vector is calculated as: Symmetry 2023, 15, x FOR PEER REVIEW 18 of 27 (2) Flight altitude cost During the flight, maintaining a steady altitude can reduce the power consumption.In order to ensure the safety of the flight, the altitude of the UAV is usually limited between two given extrema, the minimum height min h and the maximum height max h , respectively.Therefore, the cost function 2 f is computed as: where k z denotes the flight height with respect to the ground, and k is the index of waypoints.It should be mentioned that k h maintains the average height and penalizes the values outside the range. (

3) Smooth cost
To ensure that the UAV can always maintain a good attitude during the working flight, this paper adopted a smooth cost, consisting of the climb turning angle and climbing rates.As shown in Figure 7, the turning angle k φ is the angle between two adjacent consecutive path segments.If 3 e  is the unit vector in the z-axis direction, the projected vector is calculated as: The turning angle is calculated as: where the notation  is a dot product, and × is a cross product.
' '     The turning angle is calculated as: where the notation • is a dot product, and × is a cross product.
The climbing angle ψ k is the angle between the → p k p k+1 and → p k p k+1 onto the horizontal plane, and the calculation formula is as follows: Then, the smooth cost function f 3 is composed of the turning angle and the climbing rate, which can be calculated as: where a 1 and a 2 are the constants.

Scenario Setup
The environment region was 1000 m long, 1000 m wide, and 12 m high, with several known obstacles (the coordinates and length, width, and height data of the obstacles are shown in Appendix A, Table A5).The start point and the destination point were [1,950,12], [950,1,1].Six representative state-of-the-art metaheuristics (the PSO [38], GWO [39], DBO [18], FOA [40], GBO [41], and HPO [42]) were chosen to draw comparisons.For fairness, the population number was set to 30 for all algorithms, and the maximum iteration was set to 100.Each metaheuristic was independently run 20 times.The best value (Best), mean (Mean), and standard deviation (Std) were used as statistical indicators to assess the optimization performance.

Effect of the Cost Function Parameters
The objective function weights depend on the importance assigned to its different parts.The purpose of the path cost is to ensure that it generates an effective drone flight path.In many scenarios, the turning of drones during the flight is inevitable.Therefore, the weight of the smooth cost is lower than the other costs.This section mainly verifies the performance of MDBO in solving the cost function with different weight combinations.The value of w 3 is 0.1 or 0.2.When w 3 is 0.1, the combination of w 1 and w 2 is {0.7,0.2} or {0.2,0.7}, and when w 3 is 0.2, the combination of w 1 and w 3 is {0.4,0.4} or {0.5,0.3} or {0.3,0.5}.Thus, there are a total of five combinations of design.
The results are given in Table 5.It can be seen that MDBO achieved first place in 11 out of 15 indices in all index tests.For the Std index, MDBO ranked first among the two test combinations.When w 1 = 0.4, w 2 = 0.4, w 3 = 0.2, and w 1 = 0.3, w 2 = 0.5, w 3 = 0.2, and w 1 = 0.5, w 2 = 0.3, w 3 = 0.2, the performance of MDBO was second only to DBO.Although DBO had better standard deviations than MDBO under these three weight combinations, its optimal convergence solution and mean value were not as good as MDBO.In the case of the shortest path length, we believe that the performance of MDBO was still better than DBO.It is worth noting that when w 1 = 0.7, w 2 = 0.2, and w 3 = 0.1, MDBO ranked second only to GBO in terms of the mean value.In particular, when w 1 = 0.5, w 2 = 0.3, and w 3 = 0.2, the performance of MDBO was optimal.Overall, MDBO had good searchability and robustness in all testing scenarios.During the flight of the UAV, the task requirements need to be considered.In other words, the UAV must pass through a series of task points from the starting point and fly to the destination after completing the corresponding task.The number of task points and complexity of the task will affect the execution efficiency of the algorithm.This section mainly compares the search performance of each algorithm with different numbers of task points and coordinates.The number of set targets and their coordinates in this experiment are given in Table 6.Three groups of experiments were set up, and the number of task points in each group was 2, 3, and 4. The constant values of the cost function were the optimal weight combination according to the above experiment.The experimental results are shown in Table 7. From Table 7, it can be intuitively observed that MDBO achieved the best results in all indices.The planned path length will also increase as the number of tasks increases.Compared with the other algorithms, it still showed a superior performance.The results indicate that MDBO can handle both simple and complex tasks.Figure 8 shows a top view of the optimal path generated by all algorithms.From Figure 8, it can be seen that all of the algorithms could successfully find secure paths.As the number of tasks increases and the complexity increases, the path will undergo significant changes.This indicates the complexity of multitasking.Meanwhile, it is evident from the comparison of paths that MDBO had smoother paths and fewer corners at task points, which means that it had a stronger optimization performance than the other algorithms.The generated paths when the number of tasks was 4.

Influence of the Number and Arrangement of Obstacles
The number and arrangement of obstacles in the map will affect the algorithm's efficiency in finding the optimal solution.Moreover, the number of iterations required may increase if there are many obstacles in the presence of a line of sight path between the start

Influence of the Number and Arrangement of Obstacles
The number and arrangement of obstacles in the map will affect the algorithm's efficiency in finding the optimal solution.Moreover, the number of iterations required may increase if there are many obstacles in the presence of a line of sight path between the start and the destination of the UAV.Based on the previous experiments, this section assessed the performance of seven algorithms in different scenarios.We mainly set up three groups of map scenes.The number of obstacles distributed in each group of map scenes was 6, 13, and 19, respectively.The specific information of obstacles in Maps 1-3 including the coordinates and length, width, and height of obstacles are shown in Tables A3-A5 in Appendix A.
The results of the average convergence curves for 100 iterations are plotted in Figures 9-11.It can be seen that in all cases, MDBO always obtained the optimal solution compared to the other algorithms.For Map 1, DBO, GBO, FOA, and MDBO converged rapidly in the early stage and converged to the optimal value of around 50 iterations.The comparison from the final results found that MDBO had the highest solution accuracy, followed by the GBO.It was also found that MDBO converged to the optimal value very quickly at the beginning of the iteration, and the performance improvement was obvious compared to the original DBO.This proves that the proposed search strategies can accelerate the convergence speed and improve the convergence accuracy.For Map 2, it can be seen from Figure 10 that the GBO and FOA outperformed the DBO and MDBO at the beginning of the iterations.However, as the iterations began, DBO and MDBO converged quickly to a minimal value.At the same time, the GBO algorithm fell into a local optimum at a later stage.For Map 3, with more obstacles, the FOA and the MDBO performed the best, with the MDBO converging late to obtain the best accuracy.The results of the average convergence curves for 100 iterations are plotted in Figures 9-11.It can be seen that in all cases, MDBO always obtained the optimal solution compared to the other algorithms.For Map 1, DBO, GBO, FOA, and MDBO converged rapidly in the early stage and converged to the optimal value of around 50 iterations.The comparison from the final results found that MDBO had the highest solution accuracy, followed by the GBO.It was also found that MDBO converged to the optimal value very quickly at the beginning of the iteration, and the performance improvement was obvious compared to the original DBO.This proves that the proposed search strategies can accelerate the convergence speed and improve the convergence accuracy.For Map 2, it can be seen from Figure 10 that the GBO and FOA outperformed the DBO and MDBO at the beginning of the iterations.However, as the iterations began, DBO and MDBO converged quickly to a minimal value.At the same time, the GBO algorithm fell into a local optimum at a later stage.For Map 3, with more obstacles, the FOA and the MDBO performed the best, with the MDBO converging late to obtain the best accuracy.The results of the average convergence curves for 100 iterations are plotted in Figures 9-11.It can be seen that in all cases, MDBO always obtained the optimal solution compared to the other algorithms.For Map 1, DBO, GBO, FOA, and MDBO converged rapidly in the early stage and converged to the optimal value of around 50 iterations.The comparison from the final results found that MDBO had the highest solution accuracy, followed by the GBO.It was also found that MDBO converged to the optimal value very quickly at the beginning of the iteration, and the performance improvement was obvious compared to the original DBO.This proves that the proposed search strategies can accelerate the convergence speed and improve the convergence accuracy.For Map 2, it can be seen from Figure 10 that the GBO and FOA outperformed the DBO and MDBO at the beginning of the iterations.However, as the iterations began, DBO and MDBO converged quickly to a minimal value.At the same time, the GBO algorithm fell into a local optimum at a later stage.For Map 3, with more obstacles, the FOA and the MDBO performed the best, with the MDBO converging late to obtain the best accuracy.On average, the number of iterations for MDBO to converge to the optimal value was 50.In general, MDBO still has a higher convergence accuracy and stronger robustness than the state-of-the-art metaheuristic methods.

Conclusions
In this paper, a multi-strategy enhanced dung beetle optimizer (MDBO) was proposed to improve the original algorithm's performance using a reflective learning method, Levy boundary mapping processing, and two different cross-search mechanisms.The proposed MDBO was then used to successfully handle the three-dimensional route planning problem of oil and gas plants.
Tests for MDBO were conducted on 12 benchmark test functions, the Wilcoxon rank sum test, and the CEC2021 suite.The results showed that the MDBO is capable of handling a wide range of optimization problems and is competitive with some advanced metaheuristic algorithms.Second, based on the comparative experiments of UAV path-planning scenarios, the proposed method significantly outperformed other algorithms and achieved satisfactory results in UAV path planning.Finally, the time complexity analysis showed that the proposed MDBO increased in time complexity, so future research will focus on reducing the complexity of the algorithm.In addition, when solving the UAV path-planning problem, the UAVs are required to respond promptly when the mission dynamics change, and the number of UAVs needs to be increased if necessary, which is a limitation of this study.
Future work will focus on multi-UAV cooperation path planning in complex environments.We will also work further on reducing the running time of MDBO and applying it to more complicated optimization problems.

Discussion
This study provides a solution for path planning with an improved dung beetle optimizer (MDBO).It was found that the three proposed strategies effectively improved the performance of the original DBO, enabling it to solve various optimization problems.Simulation experiments in the UAV path-planning scenario demonstrated the superiority of the MDBO for path searching.
This paper examined the performance of metaheuristic algorithms such as the dung beetle optimization algorithm in solving various types of optimization problems, with a focus on the MDBO's performance in addressing path-planning problems.First, tests were performed on 12 benchmark functions, the Wilcoxon rank sum test, and the CEC2021 suite.On average, the number of iterations for MDBO to converge to the optimal value was 50.In general, MDBO still has a higher convergence accuracy and stronger robustness than the state-of-the-art metaheuristic methods.

Conclusions
In this paper, a multi-strategy enhanced dung beetle optimizer (MDBO) was proposed to improve the original algorithm's performance using a reflective learning method, Levy boundary mapping processing, and two different cross-search mechanisms.The proposed MDBO was then used to successfully handle the three-dimensional route planning problem of oil and gas plants.
Tests for MDBO were conducted on 12 benchmark test functions, the Wilcoxon rank sum test, and the CEC2021 suite.The results showed that the MDBO is capable of handling a wide range of optimization problems and is competitive with some advanced metaheuristic algorithms.Second, based on the comparative experiments of UAV path-planning scenarios, the proposed method significantly outperformed other algorithms and achieved satisfactory results in UAV path planning.Finally, the time complexity analysis showed that the proposed MDBO increased in time complexity, so future research will focus on reducing the complexity of the algorithm.In addition, when solving the UAV path-planning problem, the UAVs are required to respond promptly when the mission dynamics change, and the number of UAVs needs to be increased if necessary, which is a limitation of this study.
Future work will focus on multi-UAV cooperation path planning in complex environments.We will also work further on reducing the running time of MDBO and applying it to more complicated optimization problems.

Discussion
This study provides a solution for path planning with an improved dung beetle optimizer (MDBO).It was found that the three proposed strategies effectively improved the performance of the original DBO, enabling it to solve various optimization problems.Simulation experiments in the UAV path-planning scenario demonstrated the superiority of the MDBO for path searching.
This paper examined the performance of metaheuristic algorithms such as the dung beetle optimization algorithm in solving various types of optimization problems, with a focus on the MDBO's performance in addressing path-planning problems.First, tests were performed on 12 benchmark functions, the Wilcoxon rank sum test, and the CEC2021 suite.The results show that the three enhancement strategies can improve the original DBO's performance and expand the algorithm's application capabilities.This helps to verify that different improvement strategies can improve the performance of the original algorithm [23,24] and help achieve satisfactory results for specific engineering issues [22,25,26].
Second, tests on trajectory planning scenarios indicate that the DBO and the MDBO outperformed other advanced comparison algorithms.The results demonstrate the efficiency of the intelligence algorithms in solving path-planning problems [15,20,21].In contrast to previous research, we focused on the flaws of the intelligent algorithm and aimed to develop a more reasonable search mechanism that is suitable for resolving path optimization problems.
While the findings are not surprising, it is important to understand the question of the performance gaps of the metaheuristic algorithm when applied to engineering problems.This study demonstrates the power of metaheuristic algorithms for a wide range of optimization problems and successful route planning in oil and gas plants provides theoretical support for practical navigation.However, considering the complex application environment of the real world, there will be many dynamic obstacles and changing tasks, which may require multiple UAVs to avoid dynamic obstacles.Therefore, further investigation will be considered with dynamic tasks.We will focus on designing a multi-objective beetle optimization algorithm to optimize the three-dimensional spatial navigation of several UAVs.

Figure 1 .
Figure 1.Probability density function image of Beta distribution.

Figure 1 .
Figure 1.Probability density function image of Beta distribution.

Figure 2 .
Figure 2. Cross boundary method based on Levy distribution.

Figure 2 .
Figure 2. Cross boundary method based on Levy distribution.

Figure 5 .
Figure 5.The convergence curves by MDBO on 12 benchmark test functions.

Figure 5 .
Figure 5.The convergence curves by MDBO on 12 benchmark test functions.

Figure 6 .
Figure 6.The environment model of oil and gas plants.

Figure 6 .
Figure 6.The environment model of oil and gas plants.

Figure 7 .
Figure 7. Turning angle and climbing angle calculation.

Figure 7 .
Figure 7. Turning angle and climbing angle calculation.

Figure 8 .
Figure 8.The UAV paths of all algorithms under a different number of targets.(a) The generated paths when the number of tasks was 2. (b) The generated paths when the number of tasks was 3. (c) The generated paths when the number of tasks was 4.

Figure 8 .
Figure 8.The UAV paths of all algorithms under a different number of targets.(a) The generated paths when the number of tasks was 2. (b) The generated paths when the number of tasks was 3. (c) The generated paths when the number of tasks was 4.

Symmetry 2023 ,
15,  x FOR PEER REVIEW 22 of 27 of map scenes.The number of obstacles distributed in each group of map scenes was 6, 13, and 19, respectively.The specific information of obstacles in Maps 1-3 including the coordinates and length, width, and height of obstacles are shown in Tables A3-A5 in Appendix A.

Algorithm 1 :
(15)pseudo code of MDBO Initialize the particle's population N; the maximum iterations T; the dimensions D.Initialize the positions of the dung beetles While t ≤ T doCalculate the current best position and its fitness Obtain N reflective solutions by Equations (11)-(15) Update the positions of N individuals For i = 1:N do if i == ball-rolling dung beetle then Generate a random number p ∈ (0, 1) if p < 0.9 then Update search position by Equation (1) Else Update search position by Equation (3) end if if i == brood ball then Update search position by Equation (5) end if if i == small dung beetle then Update search position by Equation (7) end if if i == thief then Update search position by Equation (8) while t ≤ T/4 do Perform HCS using Equations (

Table 1 .
Parameter settings of all algorithms.

Table 2 .
Twelve benchmark test function results in different dimensions.

Table 3 .
Wilcoxon rank sum test results.

Table 3 .
Wilcoxon rank sum test results.

Table 5 .
Comparison of the performance of the five algorithms under different weight combinations.

Table 6 .
Details of the coordinates of the tasks.

Table 7 .
Comparison of the performance of the five algorithms with different tasks.

Table A3 .
The data of obstacles on Map 1.

Table A4 .
The data of obstacles on Map 2.

Table A5 .
The data of obstacles on Map 3.