Skip to main content
. 2020 Mar 13;20(6):1606. doi: 10.3390/s20061606
Algorithm 1: The SRPB search strategy
initialize population with random positions and velocities
generate and initialize virtual match point set to each robot
do for each time in given time
  do for each robot in swarm
    Generate decision set ψdi(t), neighbor set ψni(t), repulsion set ψri(t)
    If the robots number of ψni(t) is greater than 0
      Calculate probabilities of moving to neighbors
      Select one robot and update pk(t)
    end
    If the robots number of ψdi(t) is equal to 0
      Choose the nearest point in robot’s virtual match point set
      update pk(t)
    end
    Calculate repulsive effect according to Equations (20)–(22)
    Calculate the history coefficient, the priority coefficient and the attractive coefficient
    Update repulsion radius and decision radius
    If repulsion radius is greater than decision radius
      Exclude points where the distance to the robot is less than 2Rc
      Choose the nearest point in the robot’s virtual match point set
      update pk(t)
    end
    Calculate the history effect and the attractive effect
    Update velocity Equation (29)
  end
  
  do for each robot in swarm
    Update position Equation (30)
    Update robot’s received signal strength at its position
    Update lmaxi and lmini
    If robot reach to the chosen point
      Exclude the chosen point
    end
  end
end