A Novel Efficient Data Gathering Algorithm for Disconnected Sensor Networks Based on Mobile Edge Computing
Algorithm 3
Path organization.
Input: , set of sensor nodes in segments
, set of representative node
MAX_LAYER, the max layer of disconnected segments
, a set represent the visit order of nodes in
, the -th element in the set
Size (·), get the size of set
Dis (,), calculate the distance from the point p to the line segment l
Segment(·), find the segment in which the node distributed
TSP(·), run TSP algorithm to determine the path length
, line segment whose ends are node a and node b, respectively
Output: , set of RPs
procedure PATH_ESTABLISHMENT
begin
find segments of the first layer, add corresponding to
currentLayer ← 2
while currentLayer < MAX_LAYER
run TSP algorithm to determine the visit order of nodes in
connect adjacent visits to form path lines
check all segments whose layer are currentLayer+1, add the node to , the node should has the minimum sum of distances from itself to the two endpoints of the path lines in its segments