| Algorithm 2. Cluster Head Help (CH-HELP) |
| When CH node n detects a disconnection in its path to BS Record the current state of n as “Disconnected” Set Sup(n) = 0 If a direct BS connection is feasible under the Rc2 based local confirmation condition Set the BS as the upstream of n Set n.Hop = 1 Set Sup(n) = 1 Update the state of n to “Reconnected” Else CH n broadcasts a CH-HELP Request packet with radius Rc2 For each alive CH node m within communication range If Sup(m) = 1 has been confirmed in the current BS-outward validation order AND the bounded validation in Section 4.3 confirms that the upstream chain of m does not contain n Calculate Score(n,m) using Equation (7) Reply with a control packet containing the score to node n End if End for If node n receives one or more reply packets Select bestm with the highest score as the new upstream Update upstream ID of n to bestm Update hop level: n.Hop = bestm.Hop + 1 Set Sup(n) = 1 Propagate the route-recovery update to direct downstream child CHs Update the state of n to “Reconnected” Else Maintain the state of n as “Disconnected” Keep Sup(n) = 0 End if End if End Algorithm |