Skip to main content
. 2020 Nov 20;20(22):6642. doi: 10.3390/s20226642
Algorithm 1 User association matching scheme.
  • 1:

    Initialize the power for all users using (14)

  • 2:

    Initialize the associated users AU, unassociated users UU=hm,iM×N, and UB lists to record the associated users with the BSs, the unassociated users, and the preferable BS, respectively.

  • 3:

    while UUϕ do

  • 4:

    for i=1:N do

  • 5:

      if iUU then

  • 6:
       Find the maximum value hm,i in UU according to:
    hm,i=argmaxUUM×N (15)
  • 7:

       Assign the user to the BS m from the list UB, and remove him/her from UU.

  • 8:

       if all BSs have more than one user, calculate the EE EEπm,m=1,,M for all possible πm=AUm,i sets. then

  • 9:
        Select the set that has maximal EE:
    π=argmaxπmEEπm (16)
  • 10:

        Update AU by adding the new set π. Update UUby removing the elements of the set π.

  • 11:

        Update UB by removing the preference m of the unmatched user.

  • 12:

       end if

  • 13:

      end if

  • 14:

     end for

  • 15:

    end while