Research Article

Cluster-Based Cooperative Cache Deployment and Coded Delivery Strategy in C-V2X Networks

Algorithm 1

Cluster method.
Input: Velocity , position , and vehicle transmission radius .
Output: Cluster Head and Cluster Member.
// CH Selection and Cluster Formation
for each vehicle with do
  Vehicle calculate the score for itself and its neighbor according to (8)
  Vehicle with announce it as CH and broadcast and set ;
  whiledo
   if vehicle receives or beacon from then
    Vehicle unicasts to and set
    whiledo
     if vehicle receives then
       vehicle
      // change status to
     else
      
      // keep the status
     end
    end
   end
   if receives && then
     will unicasts to vehicle and add to
   end
  end
end
// Cluster Merging
for any two and do
  if && then
   The with smaller score will change its to and add all its member to
  end
end