Skip to main content
. 2022 Feb 20;24(2):300. doi: 10.3390/e24020300
Algorithm 1 Coalition-game-based beamwidth selection algorithm for D2D pairs during each iteration
  • 1:

    Initialize(ϕ,p,τe) with the output of the last iteration, and initialize Fini={F1,F2,} as indicated by ϕ.

  • 2:

    Set current coalition structure Fcur=Fini.

Require:
  • 3:

    Randomly select a player DnN, and denote its current coalition as Fc.

  • 4:

    Dn randomly chooses another coalition FcFcur, and denote the temporary structure after Dn leaves Fc and switches to Fc as:

  • 5:

    Ftemp=Fcur(Fc,Fc)(FcDn)(Fc+Dn).

  • 6:

    Calculate U(Fcur) and U(Ftemp).

  • 7:

    ifU(Ftemp)>U(Fcur)then

  • 8:

        Dn leaves Fc and joins Fc.

  • 9:

        Update the coalition structure as: Fcur=Ftemp.

  • 10:

    else

  • 11:

        Dn remains in its current coalition Fc.

Ensure: The final Nash-stable coalition structure is reached.
  • 12:

    Output The optimal beamwidths ϕ and (p,τe) to the next block.