# A Method for the Rapid Propagation of Emergency Event Notifications in a Long Vehicle Convoy
## 3 Simulation Environment and the Convoy VANET System
### Convoy VANET System
#### 3.4.3 Routing Protocol  
The routing protocol is the main contributor of the Convoy VANET system's behavior. The routing protocol's major components are reliability mapping, preferred retransmitter updating, delayed SM scheduling, output routing, and input routing. Reliability mapping is simply the periodic check of how many VS messages have been received compared to how many should have been received. As VS messages are received, they are added to a map that is keyed off of the remote node ID. In this way, every vehicle is tracking the reception reliability between itself and every other vehicle. Outdated data are periodically pruned to prevent memory leaks. While this assumes symmetric channel reliability, it could be cumbersome in a real system to include reliability metrics in the state message (see Future Work, Section 7). These reliability metrics are used in the preferred retransmitter update. Preferred retransmitters (PRTXs) are a part of the message propagation system. In short, a PRTX is a node that is designated by the original (re)transmitter to be the one that retransmits an SM as soon as they receive it. Every other node that hears an SM will set their retransmission delay according to various metrics outlined below. This idea is meant to be a hybrid between the retransmission delay systems of Koubek and Sasaki and the single-retransmitter systems used in most ad hoc routing protocols. The PRTX is chosen based on two metrics: distance and reliability. The PRTX is simply the node that is furthest rearward that maintains some minimum level of reception reliability. If no nodes meet the reliability requirement, the PRTX is set to null, meaning every node that hears the transmission will fall back onto the retransmission delay system, as outlined later. The PRTX is periodically updated based on the current reliability map. The choice of retransmission delay is given by one of two equations. If the SM includes a PRTX and the node knows its location, then the delay is given by Equation (1):  
\[d=(D*t_{D})+r_{D,min}+(R_{1}*r_{D,range})+(R_{2}*r_{S,range}) \tag{1}\]  
where \(d\) is the total delay, \(D\) is the distance to the PRTX, \(t_{D}\) is the time per unit distance, \(r_{D,min}\) is the random component minimum where distance is known, \(r_{D,range}\) is the random component range where distance is known, \(r_{S,range}\) is the random component range for adding an extra \"small\" amount of randomness, and \(R_{1}\) and \(R_{2}\) are uniform random variables between 0 and 1. Note, while the \"small randomness\" component could just as well be added to the other range components, it is possible in the code to disable its inclusion, and while this functionality is never used, it is included here for accuracy and completeness. Otherwise, the delay is purely random and given by Equation (2):  
\[d=r_{R,min}+(R_{1}*r_{R,range})+(R_{2}*r_{S,range}) \tag{2}\]  
where \(r_{R,min}\) is the random component minimum when the distance is unknown, and \(r_{R,range}\) is the random component range when the distance is unknown. All other variables are the same as in Equation (1). After the delay is determined, the node checks its currently scheduled transmissions to ensure that no two occur within a certain amount of time of each other. This time amount is called the \"transmission keep-out\" time (see Section 4). Any SM transmissions that fall within the keep-out time of another will simply be dropped. Every packet created by a node passes through the output routing function. In the case of the leader sending an SM, it checks whether this SM has been confirmed as having propagated rearward. If it has not propagated rearward, then the function adds the current choice of PRTX to the packet and allows it to be sent. If the SM is confirmed as having propagated rearward, then the function does not allow the packet to be sent (see Section 3.4.1). If the message is a VS, then it attaches a list of the most recently received SMs and allows the packet to be sent.