Skip to main content
. 2020 Oct 16;20(20):5865. doi: 10.3390/s20205865
Algorithm 1 Multi Shortest Path Data Forwarding Strategy (MSPDFS).
  • Initialization: Assume that the UAV chose a K-element combination from M CH robots, SaK, to look for a trajectory to visit all CH robots in that combination. |SaK| is cardinality of the set SaK. Given the combination SaK, data forwarding strategy is formed as follows.

  • Algorithm:

  • fori=1:Mdo

  •       # Comment: If CH robot i is on the trajectory of the UAV

  •   if iSaK then

  •            # Comment: No need to forward data to another CH robot

  •            ui= and γiπ=0

  •   else

  •            # Comment: Calculate shortest paths for all CH robot on the trajectory of the UAV.

  •     for j=1:|SaK| do

  •            find shortest path (minimum energy path strategy for data forwarding) from the position of CH robot i to the position of CH robot SaK(j).

  •     end for

  •            Compare it with the shortest path to origin (initial position of the UAV) and choose the shorter one. find the optimal strategy ui*=argminuiEiπ(ui) by comparing the energy cost of the best strategy for each destination, SaK(j).

  •   end if

  • end for

  • Output: The optimal data forwarding strategy ui* for each CH robot i given SaK