## 3 Methodology
### Dynamic Task Allocation
The agent \(i\) will determine if there is a conflict between the target \(T_{i}\) selected from the previous phase and other agents conduct the re-bidding process. Finally, if the agent and its neighbor(s) are assigned to the same target, it will add as the neighbor(s) to its teammate. ```
1: Update the previous iteration data of agent \(i\) to the current data
2:procedure DETECT TARGET
3:if Discover new targets then
4: re-allocate \(z_{it}\)
5:endif
6:if target disappeared then
7: Remove disappeared target info from agent \(i\)
8: re-allocate \(z_{it}\)
9:endif
10:procedure AUCTION
11:if UAV \(i\) does not allocate any target then
12:\(h_{it}=\Pi\ (c_{it}<\mathit{Cost}\ \&\ z_{it}>0),\ \forall\ t\in T\)
13:if\(h_{it}\) is True then
14: Unallocated targets assigned to agent \(i\) with the minimize cost. 15: update \(z_{it}\)
16:endif
17:endif
18:if UAV \(i\) needs to re-bid a new target then
19: Compare the quantity difference between agent \(i\)'s teammates _and_\(z_{it}\)
20: Decide whether the agent \(i\) will re-bidding
21:endif

Figure 2: Simulation of scenario when number of targets exceeds the number of agents: (**a**) Initial state: 5 targets and 3 agents, (**b**) Midway state: agents search target and (**c**) Final state: agents arrive at their assigned targets and abandon the farthest targets away from the center of the global gravity. ```
1:EXCHANGE info between neighbors
2:procedure CONSENSUS and CONFLICT RESOLUTION
3:Update information from neighbors
4:Calculate \(c_{it}\) with updated information
5:if UAV \(i\) did not award the target then
6: UAV \(i\) clear all the information, update \(z_{it}\) and re-bidding
7:endif
8:procedureUPDATE COMMITTEE
9:agent \(i\) exchange information with neighbors. 10:if agent \(i\) and its neighbor(s) are assigned to the _same target_then
11: Add the neighbour(s) to its teammate
12:endif
```
**Algorithm 2** C-CBAA _Phase 2_ for agent \(i\) at iteration \(\tau\)

### Distributed Dynamic Path Planning Algorithm

Our proposed C-CDTP algorithm is illustrated in Algorithm 3. Firstly, each agent predicts trajectories based on a time window, rejecting the ones which may collide into obstacles or teammates. After this step, we can assure that obstacles and inter-collision will not occur at any time (lines 4-20). However, we should identify the difference between the two circumstances by using a flag _interCollision_ which may affect the agent's decision to change its state at the end of the algorithm. Secondly, the agent finds the minimum-cost trajectory by using the scoring system. Lastly, the agent decides its behavior among the three states: moving, waiting and maneuvering. In the _maneuvering_ state, the agent starts rotating in search of feasible moving direction to reach the target. ```
1:\(cost_{min}=\infty\), \(traj*=[\ ]\)
2:\(interCollision=false\)
3:Calculate dynamic windows
4:for\(v\) in time window do
5:for\(\omega\) in time window do
6: predict a possible trajectory \(traj\)
7:if\(traj\) may collide into obstacles then
8: continue
9:endif
10:if\(traj\) may collide into teammates then
11:\(interCollision=true\)
12: continue
13:endif
14: calculate \(cost\) by using the scoring system
15:if\(cost_{min}>cost\)then
16:\(cost_{min}=cost\)
17:\(traj*=traj\)
18:endif
19:endfor
20:endfor
21:if\(traj*\) exists then
22:return\(traj*\)
23:if\(interCollision\) is \(true\)then
24:return\(state=waiting\)
25:endif
26:endif
27:return\(state=maneuvering\)
```

**Algorithm 3** Dynamic trajectory planning

## 4 Simulation Results

### Scenarios

Supposed we have a mission of using agents to detect the enemy command center and attack potential ground targets in combat. Agents need to maintain at low altitude movement to avoid obstacles, search targets and avoid radar detection. We can have the following three possible scenarios:

1. Single target scenario: A single task is assigned to a group of agents, for example, to survey the enemy command center. Agents must plan the path to the target and conduct comprehensive surveillance. 2.