Research Article

Predicting the Route of the Longest Lifetime and the Data Packet Delivery Time between Two Vehicles in VANET

Algorithm 1

MSRP: most stable route prediction.
(1)Notations;
(2)SV: source vehicle; DV: destination vehicle; FV: forwarder vehicle;
(3)RV: Receiver Vehicle on the side close to the destination of the forwarder’s coverage area;
(4)RRM: Route Request Message;
(5)RRMID: RRM id;
(6)RRT: Route Request Table;
(7)LLT(FV, RV): Link LifeTime between forwarder vehicle and receiver vehicle;
(8)RLT: Route LifeTime;
(9)d(FV, RV): distance between forwarder vehicle and receiver vehicle;
(10)Information: id, location, speed, direction, RLT, d(FV, DV);
(11)R: communication range;
(12)Initialization;
(13)RLT = 0; d(FV, DV) = d(SV, DV);
(14)SV adds its information in RRM;
(15)SV broadcasts RRM;
(16)RV calculates LLT(FV, RV) and d(FV, RV);
(17)d(RV, DV) = d(FV, DV) − d(FV, RV);
(18)if d(RV, DV) 0 andRV DV then
(19)RV deletes RRM;
(20)else
(21) if FV == SV then
(22)  newRLT = LLT(FV, RV);
(23) else
(24)  newRLT = min(LLT(FV, RV), RLT in RRM);
(25) end
(26) if RRMID is not in RRT of RV then
(27)  RV saves newRLT and RRMID in its RRT;
(28)  if RV == DV then
(29)   DV replies by RRP;
(30)  else
(31)   RV modifies FV information in RRM by its information;
(32)   RV broadcasts RRM;
(33)  end
(34) else
(35)  if newRLT RLT in RRT of RV then
(36)   RV deletes RRM;
(37)  else
(38)   RV modifies RLT in its RRT by newRLT;
(39)   if RV == DV then
(40)    DV replies by RRP;
(41)   else
(42)    RV modifies FV information in RRM by its information;
(43)    RV broadcasts RRM;
(44)   end
(45)  end
(46) end
(47)end