Skip to main content
. 2023 Jan 11;23(2):863. doi: 10.3390/s23020863
Algorithm 1 Foraging-based group selection
  • 1:

    Input: User positions xi,yi, user requests Di, group locations mj,nj, and charging power PjC

  • 2:

    Init: UAV position, group selection o=0

  • 3:

    Optimize the power allocation PijT and bandwidth allocation coefficient ρij for each group and each user

  • 4:

    Calculate the profitability pj=Mj/Nj for each group

  • 5:

    Rank the profitability from large to small

  • 6:

    repeat

  • 7:

       Select the next potential served group j from the remaining set with the largest profitability

  • 8:

       oj1

  • 9:

       Delete group j from the group set G

  • 10:

    until Satisfy (28)

  • 11:

    o*o

  • 12:

    Output: Optimal group selection o* with maximal deployment profitability