Skip to main content
. 2023 Apr 11;23(8):3884. doi: 10.3390/s23083884
Algorithm 1 Channel selection algorithm based on matching
1. Initialize preference lists PLnE, PLkC for eMBB users and channels
2. Set the matching set MCE=, op=1;
3. while op==1 do
4. Set op=0;
5.  for each eMBB user n do
6.   if PLn,kE
7.    Select the optimal channel ck in the preference list PLnE as MCEun;
8.   if the number of participants of MCEun== maximum capacity of the channel
9.    Select the worst matching user un in MCEck;
10.          if un is better than PLnEun
11.    Swap matching un and un in MCEck;
12.          else
13.     PLnE=PLnE\ck;
14.          end if
15.          Set op=1
16.          end if
17.          MCE=MCEun,ck
18.          end if
19.   end for
20. end while
21. Repeat steps (1)–(20) to obtain the matching result MCU for the URLLC users.
22. Output matching results MCU and MCE.