# Intersection-Based Routing with Fuzzy Multi-Factor Decision for VANETs
## 3 Protocol Design
### Speed-Based Limited Greedy Forwarding  
In order to prevent the failure of data transmission due to link breaks during data transmission, and to make the link maintain a longer lifetime, we impose a restriction on greedy forwarding. This restriction is determined by the contact time between the current vehicle and its neighbor's vehicle. According to the distance between the heads of the vehicles and the corresponding speed, the contact time between the vehicles is calculated to select the optimal vehicle.  
The relationship between time headway and vehicle speed is shown in the following formula [27]:  
\[\mathrm{D}=vt+kv^{2}+l_{0}+l \tag{1}\]  
where \(D\) is the distance between two vehicles; \(v\) is the vehicle speed; \(k\) is the braking coefficient, \(k=1/(2g\varphi)\) (g is gravitational acceleration, \(\varphi\) is adhesion coefficient); \(l_{0}\) is the safety distance; \(l\) is the length of the vehicle; \(t\) (takes 0.3 s) is the driver's response time.  
In this paper, we assumed that the minimum space headway distance threshold is \(D_{min}=6\) m, and the maximum space headway distance threshold is \(D_{max}=30\) m. This means that if the space headway distance measured is greater than 30 m, the current vehicle can be considered to be in a free running state; if the space headway distance is less than 6 m, the traffic is in a severely blocked state (we assume that the length of the vehicle is 5 m).  
The contact time between the current vehicle and candidate vehicles can be divided into two categories, and they can be presented as the following formulas.  
The first case, when the current vehicle is in the same direction as the candidate vehicle:  
\[v_{0}>v_{i},\ T_{i}=\frac{D_{i}}{|v_{0}-v_{i}|},\ i=1,2\ldots n \tag{2}\]  
\[v_{0}>v_{i},\ T_{i}=\frac{R-D_{i}}{|v_{0}-v_{i}|},\ i=1,2\ldots n. \tag{3}\]  
The second case, when the current vehicle is in the opposite direction to the candidate vehicle:  
\[T_{i}=\frac{D}{v_{0}+v_{i}},\ i=1,2\ldots n \tag{4}\]  
where \(T_{i}\) is the contact time between the current vehicle and the \(i\)th candidate vehicle; \(D_{i}\) is the distance between the current vehicle and the \(i\)th candidate vehicle, R = 250 m is the signal transmission radius, \(v_{0}\) is the speed of the current vehicles, and \(v_{i}\) is the speed of the \(i\)th candidate vehicle.  
The mean of the contact time of the candidate vehicles is shown as the following formula:  
\[\widetilde{T}=\frac{1}{n}*\sum_{i=1}^{n}T_{i},i=1,2\ldots n. \tag{5}\]  
Here, it is clear that the longer the contact time, the more hops in the final link. However, the longer the contact time, the longer the lifetime of the final link. Considering the high mobility of the vehicles and to reduce the number of hops of the link, the averagecontact time of the candidate vehicles is calculated, and the candidate vehicle closest to the average is selected as the next hop.  
Every vehicle maintains a table of information about itself including road ID, lane ID, and speed; if the vehicle is in a link, this information table also records the link information, such as link lifetime, hop count, and the completed link. The format of the beacon message is shown in Table 2. Based on the information of the beacon message, the current vehicle can select the optimum next vehicle from the candidate vehicles. Moreover, the RSU can also know the status of links between it and its neighbors.