Algorithm 1 Distributed Tree Based WET Schedule Algorithm |
Require:
List of Neighbour Nodes
Current node
Distance
Ensure:
Begin
-
1:
Neighbour-Node List of Current-Node(,,), (,,), ⋯, (,, ⋯, )
-
2:
Current-node-distance = 1
-
3:
if List-count-Neighbour-Node ≥ 1 then
-
4:
-
5:
-Status = Visited
-
6:
-Distance = Distance-1
-
7:
-Root = Left
-
8:
end if
-
9:
if List-count-Neighbour-Node ≥ 2 then
-
10:
-
11:
-Status = Visited
-
12:
-Distance = Distance-1
-
13:
-Root = Right
-
14:
end if
-
15:
while Distance is greater than zero do
-
16:
-
17:
Update Neighbour-Node-List of Currnet-Node
-
18:
Current-Node-Distance = 1
-
19:
temp = MD
-
20:
while temp ≠ 0 do
-
21:
if First-Node in Neighbour-Node-List = Visited then
-
22:
Pop First Neighbour from the List
-
23:
MD = MD -1
-
24:
else
-
25:
MD = MD-1
-
26:
end if
-
27:
end while
-
28:
end while
|