Skip to main content
. 2022 Sep 9;22(18):6839. doi: 10.3390/s22186839
Algorithm6: Optimal Path Discovery.
Input: DS, and NGs
Output: Of the optimal path towards the destination node
  •   1.

    Begin:

  •   2.

      for i = 0 to NGs -1

  •   3.

        Δi(NGs, D)

  •   4.

        Hi(NGs, S)

  •   5.

         if H(S,D) = 1 then

  •   6.

          if S = Rear and D = Front node then

  •   7.

             δi  Δi/Hi

  •   8.

          else

  •   9.

             δi Δi Hi

  •   10.

           end if

  •   11.

          else

  •   12.

            if S and D move toward each other then

  •   13.

             δiΔi/Hi

  •   14.

            else

  •   15.

             δi Δi Hi

  •   16.

            end if

  •   17.

          end if

  •   18.

        end for

  •   19.

     OfMin (δ)

  •   20.

    return Of

  •   21.

    end