Research Article

Resource Aware Sensor-to-Actor Allocation Framework for WSANs Based on Voronoi Cells Theory

Algorithm 1

Voronoi splitting.
Input: Senors, Actors, VoronoiType
Output: nodeassignment=MapActors:Sensors
for sensor in sensors do
  weighetddistance = 0
  min =
  distance =
  for actor in actors do
    currentdistance = Euclidean_Distance(sensor,actor)
    if VoronoiType == VoronoiType.Euclidean then
      weighteddistance = currentdistance
    end
    else if VoronoiType == VoronoiType.AWV then
      weighteddistance = currentdistance - actor.weight
    else if VoronoiType == VoronoiType.MWV then
      weighteddistance = currentdistance/actor.weight
    if weighetddistance min then
      min = weighteddistance
      distance = currentdistance
      parentactor = actor
    end
    assignedsensors.Add(parentactor, sensor)
  end
end