# Task Assignment of UAV Swarm Based on Wolf Pack Algorithm
## 4 Experiments of Task Assignment for UAV Swarm Using PSO-GA-DWPA
### Monte Carlo Simulation in Different Scenarios  
A Monte Carlo study, consisting of 50 runs, is used in this section to compare the performance of the PSO-GA-DWPA, WPA and PSO algorithms with respect to the cost function of Equation (6) where \(\omega_{1}=\omega_{2}=0.5\). Three scenarios are examined: 5 UAVs on 8 targets, 20 UAVs on 30 targets and 100 UAVs on 150 targets. The initial locations of the UAVs and targets were generated randomly as shown in Figure 8.  
The algorithms are coded in Python, and all simulations are run on a computer with a 2.50-GHz Intel Core i5 CPU and 4 GB of RAM. First, a small size scenario of 5 UAVs on 8 targets is analyzed. In Figures 9 and 10, the cost curve and the running time curve (the intersection of the solid line and dotted line indicates the convergence time) are plotted to compare the convergence performances of the three methods. Figure 9 shows that the optimization capabilities of the three algorithms are similar, but the convergence speed of the WPA and the PSO-GA-DWPA is better than that of PSO. Also, PSO is time-consuming and WPA and PSO-GA-DWPA is time-saving. Since the calculation process of the PSO-GA-DWPA is more complicated than that of the WPA, running time for each iteration of the PSO-GA-DWPA is slightly \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Scenario 1** & **Scenario 2** & **Scenario 3** \\ \hline iterations & 200 & 400 & 1000 \\ population size & 100 & 100 & 100 \\ \(step_{u}\) & 2 & 2 & 2 \\ \(step_{b}\) & 4 & 14 & 70 \\ \(step_{c}\) & 1 & 2 & 2 \\ \(step_{d}\) & 2 & 2 & 2 \\ \(T_{\text{max}}\) & 10 & 10 & 10 \\ \(d_{max}\) & 2 & 14 & 70 \\ \(\alpha\) & 4 & 4 & 4 \\ \(\beta\) & 5 & 5 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 7: Individual variation in the update stage. longer than that of the WPA. However, the PSO-GA-DWPA needs less number of iterations to converge, so the convergence time is shorter than that of the WPA. Compared with the recognized fast and accurate PSO algorithm, the advantage of the WPA and the proposed PSO-GA-WPA in a low-dimensional solution space (such as the 8-dimensional solution space in scenario 1), is not obvious. The experiments in Scenario 1 prove the availability of the WPA and the PSO-GA-WPA for task assignment problem. The higher the dimension of the solution space is,  
Figure 8: Initial positions of the UAV swarm and targets. (**a**) Scenario 1: 5 UAVs and 8 targets are randomly distributed in a space of \(100\times 100\) m. (**b**) Scenario 2: 20 UAVs and 30 targets are randomly distributed in a space of \(1000\times 1000\) m. (**c**) Scenario 3: 100 UAVs and 150 targets are randomly distributed in a space of 10,000 \(\times\) 10,000 m.  
Figure 10: Simulation results in Scenario 2: (**a**) mean cost of the Monte Carlo runs, and (**b**) the mean convergence time of the Monte Carlo runs. Figure 9: Simulation results in scenario 1: (**a**) the mean cost of the Monte Carlo runs, and (**b**) the mean convergence time of the Monte Carlo runs. the advantage of the proposed algorithm is more obvious. Compared with the WPA, the PSO-GA-WPA has the advantage of a faster convergence speed. Although their convergence costs are similar, the PSO-GA-WPA can obtain a convergent solution in a shorter time. Second, we set the size as 20 UAVs on 30 targets, in other words, the dimension of the optimization problem is 30. As shown in Figure 10, it is obvious that the optimization performances of the WPA and the PSO-GA-DWPA are much better than that of the PSO. It can be seen that the WPA and the PSO-GA-DWPA can obtain a better solution in a shorter time. PSO-GA-DWPA has the same optimization performance as WPA, however, its convergence speed is better than that of the WPA. Finally, the dimension of the optimization problem is set to be 150, that is, the scenario is 100 UAVs on 150 targets.