Skip to main content
. 2022 Nov 28;22(23):9265. doi: 10.3390/s22239265
Algorithm 1 Calculate
Initialize all parameters: Pc,Pr,γth,  γth2,  N0
For i = 1:L
Compute: Si,j for each RUE, wi
If Si,jwi
 Then Enter set Q
   According to Formula (18), get Pout, Select the node with small Pout to enter the set H
 End if
 For i = 1:H
BringCi into Cmax=CsCi
  If Cmax is the largest, i is the optimal relay node
 End if
 End for
End for