| Algorithm 1: The ABRCD scheme |
|
Input: A set of nodes, , with their coordinates. And AT(v), ∀v∊ 1. for each node from to do 2. Calculate using its coordinates 3. Calculate using Equation (11) 4. Calculate using Equation (12) 5. end for 6. Construct graph G = ( ℰ) based on coordinates and radius of each node 7. Conduct BFS on G starting from , obtain the level of each node (v), and take the order of BFS as id for each node 8. Find the Minimum Covering Node Sets , i∊T 9. Build Covering Sub-tree, and obtain the set of root and parent of each node, Root and Pr 10. Finalize Backbone: //Backbone is denoted as B 11. for l in [max({L(x)}) .. 1] do 12. for each node v, L(v) = l do 13. if L(Root(CovNode(v))) < L(v) then //Case 1 14. Pr(v) ← CovNode(v) 15. else 16. Find a forwarderu, satisfying //Case 2 17. (1) vN(u) 18. (2) [uB and L(Root(u)) < L(v)] or [L(Root(CovNode(u))) < L(v)] 19. if such a forwarder u exists then 20. Pr(v) ← u 21. AddToBackbone(u, CovNode(u), AT(v)) 22. else //Case 3 23. Find two forwarders u and f, satisfying 24. (1) vN(u) and uN(f) 25. (2) [fB and L(Root(f)) < L(v)] or [L(Root(CovNode(f))) < L(v)] 26. Pr(v) ← u 27. Pr(u) ← f 28. AddToBackbone (f, CovNode(f), AT(u)) 29. AddToBackbone (u, f, AT(v)) 30. end if 31. end if 32. Root(v) ← Root(Pr(v)) 33. end for 34. end for 35. procedureAddToBackbone(x, p, t) 36. if x∊B then 37. B ← B∪{x} 38. Pr(x) ← p 39. Root(x) ← Root(p) 40. end if 41. ST(x) ← ST(x)∪{t} 42. end procedure Output: B, ST and Pr |