Research Article
A Multiconstrained QoS-Compliant Routing Scheme for Highway-Based Vehicular Networks
Algorithm 3
Cluster Head Election Algorithm.
1: : Current time; | 2: ; | 3: ; | 4: QoS () QoS (); | 5: Foreach vehicle Do | 6: if ((Last neighbor arrival time + WaitTime ) Then | 7: Broadcast (, ); | 8: Flag vehicle as having best QoS value; | 9: end If | 10: endDo | 11: Upon receiving at ( (, )) where ( and WaitTime not expired ) Do | 12: Broadcast (); | 13: Flag vehicle as having best QoS value; | 14: endDo | 15: Upon receiving at ( (, )) Do | 16: .Voted++; | 17: endDo | 18: If (.Voted ) Then | 19: .role Cluster Head; | 20: Broadcast to ; | 21: endIf | 22: Upon receiving at from Do | 23: .role Cluster Member; | 24: endDo |
|