# Efficient Dissemination of Safety Messages in Vehicle Ad Hoc Network Environments
## 3 The Proposed Safety Message Dissemination Scheme
### V2I Communication
#### 3.4.2 RSU Scheduling  
RSUs have a wider communication range than vehicles. Therefore, they can disseminate the necessary messages to many vehicles at once [3; 5; 6; 7]. However, since RSUs have limited communication bandwidth, they cannot send all messages at once. Thus, an RSU scheduling technique is needed to determine the priority of messages and disseminate them. RSUs determine which messages to disseminate based on the CRD received from the CH of each cluster. The proposed scheme considers the holding rate and request rate of messages to determine their priority. RSUs store and manage the following information for scheduling. First is the broadcast candidate table (BCT), which sorts and stores the priority of each safety message. The BCT consists of the message ID, holding rate, request rate, lifetime, urgency index, and score. The BCT updates the priorities every time the RSU makes a broadcast. Second is the vehicle information table (VIT), which stores information about vehicles and clusters. The VIT consists of the vehicle ID, cluster ID, cluster information, travel direction, cluster request messages, cluster holding messages, destination, latitude, and longitude. Third is the formula table (FT), which stores the formulas needed for BCT priority. The FT is calculated by joining the BCT and VIT, and consists  
Figure 5: V2I communication. of the requested cluster ID, requested message ID, and holding status. The FT is used to calculate the holding rate and request rate of each message in the BCT. **Algorithm 4. ** Cluster-based V2I communication algorithm. **Cluster-based V2I communication algorithm**  
**Notation**  
1. CRD: Cluster request message table  
2. CRD i: Cluster request message i  
3. ER: Emergency safety message  
4. RM: Request message for required general safety message  
5. N: Current vehicle  
6. _Input_: RM, EM  
7. _Output_: CRD message request  
8. _def_: R_SU(CRD)  
9. send CRD to RSU and nearby CHs  
10. _if_ CRD_i within CRD is received from RSU:  
11. _CRD_total_\(-\)CRD_i  
12. _while_ if within the RSU's communication range:  
14. _if_ N = CM:  
15. _if_ holding the EM:  
16. _if_ sent emergency safety message to the RSU  
17. _if_ there is a required general safety message:  
18. _if_ N = IN:  
19. _if_ sent RM to RSU  
20. _if_ N = CM:  
21. _send RM to CH_  
22. _if_ N = CH:  
23. _if_ there is no message of RM in the cluster:  
24. _call_**intacluster communication algorithm**  
25. _else_: // if there is no requested message in the cluster  
26. _insert_ for all CRD  
27. _if_ len(CRD) I = 0:  
28. _in_R_SU(CRD)  
29. _if_ the vehicle that requested CRD_i has departed:  
30. _CRD_total_\(-\)CRD_i  
31. _if_ outside the RSU's communication range:  
33. _call_**intacluster communication algorithm**  
**Algorithm 4. ** Cluster-based V2I communication algorithm. Equation (6) calculates the holding rate (\(HR\)), which refers to the proportion of clusters within the RSU's communication range that have the corresponding message. The holding rate is calculated by dividing the number of clusters holding the data (\(NCH\)) by the number of clusters requesting the data (\(NCR\)). A high holding rate indicates a high probability of sharing the message through V2V communication. Therefore, the proposed scheme considers messages with high holding rates as lower priority. \[HR\Big{(}D_{(a)}\Big{)}=\frac{NCH_{D_{(a)}}}{NCR_{D_{(a)}}} \tag{6}\]  
Equation (7) calculates the request rate (\(RR\)), which refers to the proportion of vehicles within the RSU's communication range requesting the corresponding message. The RR is calculated by dividing the number of vehicles requesting the message by the total number of messages requested by the vehicles. The proposed scheme considers messages with high request rates as higher priority. \[RR\Big{(}D_{(a)}\Big{)}=\frac{\sum_{i=1}^{n}D_{(a)}}{\sum_{i=1}^{n}D_{(a)}+\sum _{i=1}^{n}D_{(b)}+\ldots+\sum_{i=1}^{n}D_{(z)}} \tag{7}\]  
Equation (8) calculates the priority score of the \(BCT\).