Skip to main content
. 2016 Sep 28;16(10):1487. doi: 10.3390/s16101487
Algorithm 2 CC-link establishment
1:  f: the failed node; Nf: the 1-hop neighbors of node f
2:  Mf: the node connectivity materiality
3:  u: the source node; d: the destination node
4:  A={N1,N2,,Nm} includes all the neighbor nodes of u; m: the total number of neighbors of u
5:  H(u): the helper set of source node u; φ: the cooperation set
6:  H(u)ϕ, φu, k0
7:  while iφPic(did)<τ and k<m do
8:   kk+1; H(u)H(u)Nk; φφH(u)
9:  end while
10: if k=m then
11:   if iφPic(did)τ then
12:    Return H(u), iφPi(d)
13:   else
14:     Announce the failure of CC-link establishment
15:   end if
16: else
17:   if iφPi(d)<iφNk+1Pi(d) then
18:    Return H(u), iφPi(d)
19:   else
20:    kk+1; H(u)H(u)Nk; φφH(u)
21:   end if
22: end if
23: the source and destination nodes will interchange and establish the CC-link again in reverse