Skip to main content
. 2020 Oct 29;20(21):6161. doi: 10.3390/s20216161
Algorithm 2. Transmission Mode and Relay Selection Optimization
1: Solving optimal power allocation subproblem
to obtain ηm* and ηm,k*, construct Table 1
2: for the mth PU
   if ηm*>ηm,k*, 1kK
   then
      set βm(p,d)=1
      delete the mth row in Table 1b
end
end
Table 1b is updated
3: repeat
4: Apply K-M algorithm on Table 1b to find
optimal relay node obtaining βm,k(c)
5: ifβm,k(c)ηm,k*<ηm*,1mM
      set βm(p,d)=1
      set βm,k(c)=0
Update Table 1b removing the mth row
end
6: untilβm,k(c)ηm,k*>ηm*,∀ PUm in Table 1b.