Research Article
A Center-Based Secure and Stable Clustering Algorithm for VANETs on Highways
Algorithm 2
Cluster head selection algorithm.
Input: Vehicles in one cluster | Output: Cluster head o of the corresponding cluster | 1 Set ; | 2 foreach vehicle do | 3 Calculate the relative mobility metric ; | 4 if then | 5 ; | 6 ; | 7 end | 8 end | 9 return o; |
|