Research Article
Directional Itinerary Planning for Multiple Mobile Agents in Wireless Sensor Networks
Algorithm 2
Calculate the distances between the neighbor node and its source nodes.
Begin | for i :=1 to k do / k: number of neighboring nodes at the Sink / | for j :=1 to N do / N: number of SNs of a neighboring node / | / let Ni(xi, yi) neighbor node of Sink and Sj(xj , yj) source node of D[i] / | ; / Calculate the distance between Ni(xi , yi) and Sj(xj , yj) / | T[i,j]@dis := ; | T[i,j]@id := Sj ; | end for; | end for; | End. |
|