Research Article

A Joint Channel Allocation and Power Control Scheme for D2D Communication in UAV-Based Networks

Algorithm 1

UAV deployment scheme based on the PSO-Kmeans algorithm in D2D-abled UAV-based system.
read, ;
Initialize positions of UAVs by using Kmeans;
whiledo
Initialize positions of UAVs by Kmeans;
whiledo
  fordo
   
  ifthen
    
    
  end if
end do
  ifthen
   
   
  end if
end while
end while
print;