Skip to main content
. 2020 Feb 19;20(4):1128. doi: 10.3390/s20041128
Algorithm 3: Pseudo Code for the Auction-based Matching Algorithm.
  1. whileβ1(c)0, β1(m)0do

  2. for eachδc,m=1do

  3. ifSeNBsm, then

  4. Calculate the weights of each multicast D2D groups

  5. ifi=1Ic=1Cm=1MG>0then

  6. Calculate Gw

  7. Formulate the weighted performance gain optimization problem S3. maxi=1Ic=1Cm=1MGw

  8. Calculate Seff

  9. else

  10. i=1Ic=1Cm=1MG0

  11. end if

  12. else

  13. SeNB<sm

  14. end if

  15. δc,m=0

  16. end for

  17. end while