Skip to main content
. 2020 Oct 16;20(20):5865. doi: 10.3390/s20205865
Algorithm 2 Genetic Algorithm with Minimum Energy for Data Forwarding (GAMEDF).
  • Initialization: Battery capacity of the UAV is insufficient for visiting all CH robots, i.e., B<BTSP.

  • Algorithm:

  • forK=(M1):1do

  •    # Comment: Choose K of M CH robots and desist from visiting remaining CH robots.

  •    find all MK combinations of the CH robots.

  •    # Comment: For each of the MK combinations of CH robots.

  •    for a=1:MK do

  •       # Comment: Check whether the UAV can find a route to visit all CH robots in the combination SaK.

  •       if minπEUAVπB for SaK then

  •          # Comment: SaK is a feasible K-element combination, i.e., SaKSK(B). find the minimum energy consumption of the CH robots in SSaK.

  •          Use Algorithm 1 for each CH robot iSSaK. find iSSaKγiπ

  •      end if

  •   end for

  •   # Comment: If there exists at least a feasible K-element combination, find the K-element combination SaK by which energy consumption of CH robots in SSaK will be minimum.

  •   if SK(B) then

  •       find minSaKSK(B)iSSaKγiπ

  •   end if

  • end for

  •     # Comment: find the combination SaK by which the minimum energy consumption of the CH robots in SSaK will be minimum (In this step, all K values are considered so this is the step to find the minimum of minimum).

  •     find minKminSaKSK(B)iSSaKγiπ.

  •     # Comment: As output, provide the result of K and the combination SaK as the solution.

  • Output:(K,SaK)=argminiSSaKγiπ