|
Algorithm 1 Dynamic Group Matching Algorithm. |
-
1:
Initialization: Initialize the matched pairing set of the UEs and relays , the unmatched set of the UEs and relays , , and initialize the matching priority sets of the UEs and relays , through the Equations (20) and (21)
-
2:
while do
-
3:
Each UE in requests to match its highest matching priority relay from according to the matching priority set
-
4:
for relay m = 1, 2,…, M do
-
5:
Each relay matches the UE with the highest priority according to the matching priority set of relays and rejects the other UEs
-
6:
The rejected UEs remove the mth relay from its matching priority set
-
7:
Add the matched paring to the set and remove the mth relay and nth UE from and , respectively
-
8:
end for
-
9:
end while
-
10:
while or do
-
11:
Each UE requests to match its highest matching priority relay from according to the updated set
-
12:
for relay m = 1, 2,…, M do
-
13:
The mth relay makes the following judgment for its highest matching priority UE according to its matching priority set
-
14:
if then
-
15:
Add the matched paring to the set and remove the mth relay and nth UE from and , respectively
-
16:
else
-
17:
The relay matches with the nth UE when there exists a relay that satisfies and ; then, it updates and removes the lth relay into
-
18:
Otherwise, reject the matching request of the nth UE and remove the mth relay from its matching priority set
-
19:
end if
-
20:
end for
-
21:
end while
|