## 5 Case Study and Algorithm Validation
### Effects of Swarm Sizes  
To explore the effects of the different swarm sizes on the proposed BSO method, the other two core parameters, including the dimension of each individual and the number of iterations, are set as 15 and 100, respectively. The normalized path risk, turning angle, path length, and total cost are selected as indicators to evaluate the algorithm's performance. The generated UAV paths in a given 2D environment are also provided. Comparisons are made with PSO, GA, FA, and standard BAS algorithms. Figure 8 shows the effects of the swarm sizes on the UAV path risk. The numbers of the individuals in a swarm are set as 10, 20, 80, and 90. Comparisons are made with the other four existing methods, including PSO, GA, FA, and standard BAS. It should be noted that there is only one beetle in standard BAS. As a result, it cannot be affected by the swarm size. As shown in Figure 8, GA fluctuates the most from the first iteration to the end, regardless of how many individuals exist. For GA, it is difficult to locate the global optimum solutions in the search space. However, for FA, it is a straight line from the beginning to the end. It means the risk of a generated UAV path is the same, which illustrates that FA falls into a local optimum in this scenario. Oppositely, standard BAS, PSO, and the proposed BSO method could find the optimum solutions as the iteration goes on. However, there are a lot of fluctuations for standard BAS at the beginning of a few \begin{table}
\begin{tabular}{c c} \hline
**Item** & **Values** \\ \hline Scenario size & 30 km \(\times\) 20 km \\ Starting point & (0.5, 0.5) km \\ Destination point & (28, 18) km \\ Effects of swarm sizes & 10, 20, 80, 90 \\ Effects of individual dimensions & 15, 20, 25, 30 \\ Effects of iterations & 50, 150, 250, 350 \\ \hline \end{tabular}
\end{table} 
Table 1: Scenario and parameter settings. iterations, and it stays stable after 80 iterations. The highest risk of these five algorithms is produced by standard BAS. The risk of a path generated by PSO keeps going down and becomes stable after 70 iterations. The convergence of the proposed BSO method is the quickest and could find the global optimum solution before the 40 th iteration. Also, the risk of the UAV path generated by the proposed BSO method is the lowest. Actually, the swarm size could generate quite limited effects on the proposed BSO method, which means that it could work well with the fastest convergence rate and the lowest path risk. Specifically, when there are 90 individuals in a swarm, the path risk of the proposed BSO method is 24.40%, 61.58%, 69.29%, and 43.08% lower than that of PSO, GA, FA, and standard BAS. Figure 9 shows the effects of the swarm sizes on the turning angles. It is known that the path should be as straight as possible for the UAVs to follow, and smaller turning angles on a UAV path are desired. In Figure 9, for GA and FA, the two algorithms cannot locate the global best solutions in the given iterations. GA fluctuates violently until the last iteration. FA falls into a local optimum and cannot get out. Thus, the sums of the turning angles of FA become the biggest. For standard BAS with different swarm sizes, there are many fluctuations before 45 iterations. It is because only one beetle exists to find the optimum solutions, which makes the swarm social information quite limited, and it cannot be shared. PSO works well and can find the global best solution successfully. However, its convergence rate is much slower than that of the proposed BSO method in all the circumstances. Usually, more than 50 iterations are needed for PSO to find the best solutions. Figure 8: Effects of swarm sizes on path risk. There is no doubt that the proposed BSO method could converge within 30 iterations. Especially when the swarm size is 80, only about 20 iterations are needed. Interestingly, the final optimum turning angles of a path generated by the proposed BSO method are larger than that of PSO.