Research Article

A Hybrid Reliable Routing Algorithm Based on LQI and PRR in Industrial Wireless Networks

Algorithm 5

HLQEBRR algorithm based on link quality estimation.
Require: Routing information packets from neighbor nodes
Ensure: Success rate of sending packets to the gateway, address and path length of the next hop node
1: 
2: optimal_nexthopnexthop
3: optimal_hopmydepth
4: ifrepair=trueandsourceoptimal_nexthoporsourcesuboptimal_nexthopthen
5:  return
6: end if
7: fori=0,1,2...neighbor_numdo
8:  ifaddress_info[i]=addressthen
9:   suc←1−(1−PRR[i])maxtranssuccess_ratio
10:   According to the source field of the routing packet, find the corresponding record in the routing result and update it. If not found, record the source, suc, nexthop, pathlength value of the routing packet
11:   ifoptimalsourcethen
12:    suboptimal_nexthopoptimal nexthop;
13:    suboptimal_successoptimal success;
14:    suboptimal_hopoptimal_hop
15:    suboptimal_thresholdoptimal_threshold
16:   end if
17:   optimal_nexthoopsource
18:   optimal_successsuc
19:   optimal_hoppath_length+1
20:   
21:   optimal_threshold⟵1
22:   whiledo
23:    
24:    optimal_thresholdoptimal_threshold+1
25:   end while
26:   generate routing packets according to Algorithm 3 and inform neighbor nodes
27:  end if
28: end for