Skip to main content
. 2018 Feb 19;18(2):624. doi: 10.3390/s18020624
Algorithm 3 Path-planning algorithm in the actuator network.
  • 1:

    PSL= runSmartDataProcessing( D)                ▹ Get PSL with smart data processing

  • 2:

    VL= List(empty)                             ▹ Initialize visited list VL

  • 3:

    ACL = List(empty)                   ▹ Initialize actuator correlation value list ACL

  • 4:

    for j = 1 to Ado                           ▹ Calculate acj for all actuators

  • 5:

         acj=i=1PSLcorrsi,aj

  • 6:

         ACL.insert(acj)

  • 7:

    end for

  • 8:

    if data ferry then

  • 9:

         while VLAdo                     ▹ Run until DaaG visits every actuator

  • 10:

             aj = getActuatorToCommunicate(A\VL,ACL)       ▹ Get aj with highest acj in A\VL

  • 11:

             posax,posay= getPos(aj)

  • 12:

             VL.insert(aj)                                ▹ Put aj into VL

  • 13:

             moveDaaGToposax,posay

  • 14:

         end while

  • 15:

    else if multi-hop then

  • 16:

         aj = getActuatorToCommunicate(A,ACL)

  • 17:

         posax,posay= getPosition(aj)

  • 18:

         si = getNearestSensorFrom(aj)

  • 19:

         possx,possy= getPosition(si)

  • 20:

         for k = 1 to nd do

  • 21:

             moveDaaGTok·posax+(nd+1k)·possxnd+1,k·posay+(nd+1k)·possynd+1

  • 22:

         end for

  • 23:

    end if