Skip to main content
. 2025 Apr 16;25(8):2502. doi: 10.3390/s25082502
Algorithm 3 Fully . Distributed Dynamic Task Execution
Input:
  • Ui: UAV information, including assigned task list (ai), capacity load (Li), and velocity (vi).

Output:
  • Ui: Updated UAV information after task execution.

  •  1:

    for j=1Toai do

  •  2:

        if tsjcurrentTimeandtejcurrentTime then

  •  3:

            Move Ui to Tj location.

  •  4:

            Set xi,j=1.

  •  5:

            Compute τi,j based on Equation (4).

  •  6:

        else if tej<currentTime then

  •  7:

            Set xi,j=0.

  •  8:

        end if 

  •  9:

        Read Ui lidar sensor.

         lidarReading read(lidari)

  • 10:

        if Ui detects a dynamic event then

  • 11:

            Notify the central controller of the event occurrence by calling Algorithm 7.

              (UAlgorithm7(i,U,lidarReading))

  • 12:

        end if

  • 13:

    end for 

  • 14:

    Notify the central controller of the idleness state by calling Algorithm 7.

    (UAlgorithm7(i,U,UAVidleness))