## 4 Simulation and Analysis
### Time Complexity Analysis  
In this paper, the nested GA-MMAS algorithm is used to solve the problem of logistics UAV parcel-receiving station location and public route planning. In general, it is considered that the time complexity of the genetic algorithm is O(NG \(\times\) n\({}^{2}\)), where NG is the maximum number of iterations of the genetic algorithm and n is the population size. The time complexity of the MMAS algorithm is O(NC \(\times\) m \(\times\) n\({}_{\text{s}}\)\({}^{2}\)), where NC is the maximum number of iterations of MMAS, m is the population size, n\({}_{\text{s}}\) is the number of cities, and, in this case, n\({}_{\text{s}}\) is the number of selected stations. The time complexity of the GA-MMAS algorithm is the combination of the two algorithms. However, for different genetic algorithm individuals (location schemes), the selected station count is different, and the number of iterations of MMAS meeting the early-stop condition is also different, which will lead to a certain degree of difference in the time for each location scheme to use the MMAS algorithm to solve the public air-route planning scheme.  
As shown in Figure 15, the station count in each generation of the genetic algorithm gradually decreases from 50 to about 25 with the algorithm iteration and fluctuates around 25. Therefore, taking five as the step length, the calculation time and iteration time of the MMAS algorithm when the selected station count is between 20 and 50 are analyzed. Each group was solved 100 times to obtain the average value, as shown in Table 11. It can be seen that when the selected station count in the location scheme is 20, the calculation time is only about 4.01 s, while when the station count is 50, the calculation time is as high as 24.21 s, which is consistent with the time complexity of the MMAS algorithm. When the  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Group**} & \multirow{2}{*}{
\begin{tabular}{c} **Upper-Layer** \\ **Weight** \\ \end{tabular} } & \multicolumn{2}{c}{**Lower-Layer**} & \multirow{2}{*}{**Count Cost**} & \multirow{2}{*}{**Distance Cost**} & \multirow{2}{*}{**Fairness Cost**} & **Route** \\  & & & & & & **Operating Cost** \\ \hline
1 & 0.1 & 0.9 & 17.4 & 101.21 & 58.42 & 2439.26 \\
2 & 0.2 & 0.8 & 17.7 & 97.89 & 57.09 & 2510.29 \\
3 & 0.3 & 0.7 & 17.9 & 98.67 & 57.93 & 2543.40 \\
4 & 0.4 & 0.6 & 18.1 & 95.48 & 56.12 & 2540.29 \\
5 & 0.5 & 0.5 & 17.4 & 95.78 & 53.50 & 2480.77 \\
6 & 0.6 & 0.4 & 17.9 & 93.66 & 54.82 & 2539.09 \\
7 & 0.7 & 0.3 & 17.5 & 101.96 & 57.12 & 2537.14 \\
8 & 0.8 & 0.2 & 17.7 & 97.81 & 56.08 & 2490.39 \\
9 & 0.9 & 0.1 & 17.5 & 90.91 & 57.20 & 2475.09 \\  & layered solution & & 17.0 & 100.78 & 61.32 & 2597.23 \\ \hline \hline \end{tabular}
\end{table}
Table 10: Weight combination results in upper and lower layers.  
average station count of the population is 50, it takes about 1800 s to calculate the public air-route operating cost of each individual in the population, and this kind of solution was not the optimal solution expected. If the method proposed in Section 3.2.3 is used, this part of the calculation can be avoided and the calculation time can be reduced.