Research Article

NECTAR-An Agent-Based Dynamic Task Allocation Algorithm in the UAV Swarm

Algorithm 1

The algorithm for the manager agent.
(1)Initialize and let UAV agent set UA ⟵ NULL;
(2)UA ⟵ existing UAV agents;
(3)Waiting( );
(4)if There is a new request fromthen
(5) Let  ⟵ NULL;
(6)foreachin UAdo
(7)  if Φ(ti) andstriking then
(8)   Add into ;
(9)  else if Φ(ti) and rsrj>0 then
(10)   Add into ;
(11) Send to
(12)else if There is a new report fromthen
(13)if is not in UAthen
(14)  Add into UA;
(15) Update related status of in UA;
(16)Return to Wainting( );