Skip to main content
. 2025 Apr 16;25(8):2502. doi: 10.3390/s25082502
Algorithm 9 Consensus-Based Bundle Algorithm (CBBA) for Distributed Task Assignment
Input:
  • T: Tasks information, including their start time (tsj), end time (tej), duration (Dj), and reward (Rj).

    U: UAVs information, including their assigned tasks lists (a), capacity load (L) and velocity (v).

Output:
  • U: Updated UAVs’ information.

  •  1:

    Initialization: For each UiU, initialize ai, bid list Wi0, and winning UAV list Bi1.

  •  2:

    while Tasks remain unassigned do

  •  3:

        for each UiU do             ▹ Bundle Construction (Task Bidding)

  •  4:

            Compute si,j given in Equation (1) for each TjT

  •  5:

            Select the task Tj maximizing si,j while satisfying constraints

  •  6:

            if Tj is feasible then

  •  7:

               Add Tj to ai, update Wi[j], and set Bi[j]i

  •  8:

            end if

  •  9:

        end for 

  • 10:

        for each UiU do             ▹ Consensus Phase (Conflict Resolution)

  • 11:

            Exchange Wi and Bi with neighbors

  • 12:

            for each Tjai do

  • 13:

               if another UAV Uk has Wk[j]>Wi[j] then

  • 14:

                   Remove Tj from ai, update Bi[j]k

  • 15:

               end if

  • 16:

            end for

  • 17:

        end for

  • 18:

    end while