Research Article

Quantitative Invulnerability Analysis of Artificial Spider-Web Topology Model Based on End-to-End Delay

ALGORITHM 1

Hierarchical clustering routing rule.
Input: the node Ni, the total number of nodes in one layer n, the total number of nodes in the artificial spider-web topology N, and the threshold Y
Output: routing path from the node Ni to the BS
(1)/ Communication between nodes located from the 2nd layer to the outermost layer and BS/
(2)while n < i ≤ N do
(3)for Ni, n<i ≤ N do
(4)  if no link failure exists between Ni and Nin, and link traffic does not exceed the threshold value Y
(5)  then Ni forwards data to Nin
(6)end for
(7)for i = (k + 1) n, 1 ≤ k ≤ N/n do
(8)  N(k+1)n transfers data to N(k+ 1)n − 1
(9)   if N(k+1)n−1 fails
(10)   then N(k+1)n transmits data to N(k+1)n+1
(11)end for
(12)for i = kn + 1, 1 ≤ k ≤ N/n do
(13)   Nkn+1 delivers data to Nkn+n
(14)   if Nkn+n undergoes a failure
(15)   then Nkn+1 passes data to Nkn+2
(16)end for
(17)for i ≠ (k + 1) ni ≠ kn + 1, 1 ≤ k ≤ N/n do
(18)  Ni sends data to Ni−1
(19)  if Ni−1 is out of order
(20)  then Ni conveys data to Ni+1
(21)end for
(22)end while
(23)break;
(24)/Communication between the first-layer nodes and BS/
(25)if 1 = < i ≤ n
(26)then Ni is a cluster head
(27)  if no link failure exists between Ni and BS, and link traffic does not exceed the threshold value Y
(28)  then Ni forwards data to BS
(29)  else judge the value of i
(30)   if i = 1
(31)   then N1 sends data to Nn and forwards them to the BS along Nn’s radial link further. In case of Nn failure, N1 transmits data to N2 and then passes them to the BS by the radial link through N2
(32)  else if i = n
(33)   then Nn transmits data to Nn−1 and forwards them to the BS by Nn − 1’s radial link. If Nn−1 fails, Nn transfers data to N1 and then delivers them to the BS along the radial link through N1
(34)  else Ni conveys data to Ni−1 and forwards them to the BS via Ni−1’s radial link. If Ni−1 malfunctions, Ni sends data to Ni+1 and then transfers them to the BS along the radial link through Ni+1
(35)  end if
(36)end if
(37)end if