Research Article

Joint Resource Allocation and Power Control Based on Vehicle’s Motion Characteristics in NOMA-Based V2V Systems

Algorithm 1

Vehicles grouping algorithm.
Input:
The sets of vehicles based on the moving features; ; denotes distance between i and j; N is the number of vehicles;
Output:
The group in which vehicles use the same RBG;
(1)
(2)for do
(3) randomly choose
(4) repeat
(5)  for do
(6)   if satisfies (3) then
(7)     
(8)   end if
(9)  end for
(10)  
(11)  for do
(12)   if then
(13)     
(14)   end if
(15)  end for
(16) until
(17)end for