|
Algorithm 1: Pseudo Code for the RA Algorithm. |
= the set of resources
= the set of cellular users
= the set of D2D transmitters
= the set of D2D receivers
= the set of multicast D2D groups
Generate all randomly distributed cellular and D2D users’ locations within the cell of radius y
eNB transmits pilot signals to cellular and D2D users
for all ,
do
Calculate distance between cellular users and D2D users and between D2D transmitter and nearly receivers
Calculate the probability that the D2D receiver can detect the signal transmitted from the D2D transmitter
if
,
then
Select the spectrum resource i which can share between cellular user and multicast D2D group
Calculate , , , and
Calculate and
Calculate and
Calculate and
Formulate data rate maximization problem for resource as
-
if
, , , and
then
S1.
, ,
Calculate
else
end if
else
Select the spectrum band i’,
Calculate , , , , ,
, , , and
end if
end for
Check for all available resources that fulfill the reuse criteria
|