Skip to main content
. 2021 Jun 28;21(13):4414. doi: 10.3390/s21134414
Algorithm 1 Routine of the complete developed strategy
  • 1:

    Wo← Occupation matrix of the simulated environment

  • 2:

    W_array← Viscosity maps computed from Wo. Constraints: Distance to obstacles and flight levels.

  • 3:

    Define number of drones

  • 4:

    Define the position of the two depots

  • 5:

    Depot assignment: Half of drones to one depot and the other half to the other

  • 6:

    iteration_index← 0

  • 7:

    whileiiteration_index < 7000 do

  • 8:

        depot_queues← Queues of drones waiting to take off in depots

  • 9:

        for every drone do

  • 10:

            if drone ends its current mission or iteration_index == 0 then

  • 11:

               drone.pathGenerate_mission(drone.position,drone.depot_position,W_array)

  • 12:

               drone.velocity← 0

  • 13:

            end if

  • 14:

            if drone is waiting to start new mission then

  • 15:

               drone.velocityTake_off_distance_check(drone.ID,depot_queues)

  • 16:

            end if

  • 17:

            for every drone_of_higher_ID do

  • 18:

               (v1,v2) ←Check_conflicts(drone, drone_of_higher_ID)

  • 19:

               drone.velocityv1

  • 20:

               drone_of_higher_ID.velocityv2

  • 21:

            end for

  • 22:

            if drone without conflicts being the non_priority vehicle and not landed then

  • 23:

               drone.velocity← 1

  • 24:

            end if

  • 25:

        end for

  • 26:

        iteration_indexiteration_index + 1

  • 27:

    end while