| Routing establishment: Relay Selection based Distance |
---|---|
1: | Initialization: |
2: | TotalELs = m |
3: | UEL = E0/m |
4: | α = 0.5 |
5: | SelectRelayNode: |
6: | SourceID = i |
7: | NeighborID = j |
8: | M is the number of neighbors |
9: | for j=1:M do |
10: | d(i, j)=di, j |
11: | d(j, s)=dj, s |
12: | Nj = α|di, j−Ot| + αdj, s |
13: | if Nj=<Nj−1 then |
14: | min(Nj)=Nj |
15: | RelayID=j |
16: | end if |
17: | end for |