## 3 Methodology
### Dynamic Task Allocation
Both results show that the C-CBAA outperforms the CBAA algorithm against different numbers of agents. When the number of targets was increased randomly, C-CBAA converges 31% faster than the original CBAA on average. The advantage of using C-CBAA is more obvious in the case of decreasing targets. In Figure 9b, the red line shows C-CBAA converges 48.72% faster than CBAA. The reason is that the target reduction only needs to deal with the reduced target group. It merely re-allocates a target to each agent in the group again, as shown in Figure 9b. On the other hand, while the number of targets are increased, the groups responsible for other adjacent targets must be taken into consideration in order to re-allocate the new targets among them as shown in Figure 9b. It turns out that the performance of the C-CBAA algorithm takes less time to reach consensus than the CBAA when the number of targets is decreased. Furthermore, the difference of the average iterations is increased as the number of agents is increased. It implies that the C-CBAA is even more effective than the traditional CBAA algorithm in a highly complex mission scenario. \begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{**Conditions**} & \multicolumn{2}{c|}{**Average Iterations**} & \multirow{2}{*}{**Agents**} & \multirow{2}{*}{**3**} & \multirow{2}{*}{**6**} & \multirow{2}{*}{**9**} & \multirow{2}{*}{**12**} & \multirow{2}{*}{**15**} \\ \cline{3-3} \cline{5-8}  & **Algorithms** & & & & & \\ \hline \multirow{3}{*}{increasing} & CBAA & 2.55 & 4.7 & 6.2 & 6.9 & 8 \\ \cline{2-8}  & C-CBAA & 1.5 & 3.5 & 4.25 & 4.8 & 5.5 \\ \cline{2-8}  & average improvement(\%) & \multicolumn{4}{c|}{31\%} \\ \hline \multirow{3}{*}{decreasing} & CBAA & 2.6 & 5 & 7.3 & 10 & 12.1 \\ \cline{2-8}  & C-CBAA & 1.7 & 2.6 & 3.5 & 4.6 & 5.4 \\ \cline{1-1} \cline{2-8}  & average improvement(\%) & \multicolumn{4}{c|}{48.72\%} \\ \hline \end{tabular}
\end{table} 
Table 2: Efficiency comparison between CBAA and C-CBAA algorithms under different target change scenarios. Figure 8: Simulation of decreasing target. (**a**) Original toward to the target. (**b**) Finally stop at each the target. ## 5 Analysis and Discussion

The simulation results show that our algorithm can be applied to the operation of multi-agent systems for both single and multiple targets at either static or dynamic scenarios. The proposed C-CBAA algorithm has various advantages on path planning and task allocation in multi-agent mission operations:

1. Collision avoidance between agents and obstacles: The C-CBAA use a lead-trail formation as the preferred configuration formation to avoid collisions among agents. As we can see from Figure 5, all agents in a group maintains a linear separation to avoid a collision before arriving at the target positions. Trail formation is also easier to go around the obstacles without interference by the other agents. 2. Reach the targets simultaneously with a minimum cost: agents are grouped based on the initial target requirements such as the number of agents needed and the distance of each agent to its target. This ensures agents in the same group reach the assigned target at the same time to execute the mission. The same conditions are applied to the task re-allocation when the target number changes. Figure 7 shows an example of a new purple color target added into the operation. It turns out that C-CBAA assigns the task to the nearest UAVs for the yellow and blue groups. The algorithm selects enough number of UAVs to minimize the mission time with the minimum distance to the new target. 3. Collision avoidance after reaching the targets: The formation changes to a line formation as agents approaching the target. The followers re-route to the sides of the leader agent so they can increase the surveillance area and execute the mission at the same time. The path planning algorithm in C-CABB will consider collision avoidance during the change of formation. This can be seen from the simulation result of Figure 6b. There is a path crossing between the purple and yellow groups.