Skip to main content
. 2023 Mar 20;23(6):3254. doi: 10.3390/s23063254
Algorithm 1 Energy-Aware and Secure Task Offloading Algorithm
  • 1:

    Initialization: Each task j at UAV i is initialized with the offloading and compression decision as αij0=1 and γij=0

  • 2:

    for all each UAV i and at given time slot t do

  • 3:

    for all each task j do

  • 4:

      Send requirements for each task and UAV’s capabilities to control the manager through the connected edge servers which includes {aij,cij,dij,ψi,coij,decoij,piT,fiL}.

  • 5:

    end for

  • 6:

    end for

  • 7:

    Send the available computational capabilities for each edge server and cloud to control manager.

  • 8:

    Calculate the rate Rik for each UAV regarding Equation (3).

  • 9:

    Derive the values for offloading and compression decisions regarding the formulation in Equation (21).

  • 10:

    Transmit these values to UAVs.