# An Emergency Message Routing Protocol for Improved Congestion Management in Hybrid RF/VLC VANETs
## 4 Algorithm Description
### Congestion Management Algorithm  
In our proposed approach, in order to build a real-time traffic flow model, the RSU continuously monitors the beacon messages from the vehicles in its zone. When congestion is detected, the RSU utilizes this model to estimate the clearance times under different strategies, for instance, in the case of reduced speed vs. the case of rerouting. These strategies are assigned some scores based on their estimated impacts, using some parameters such as total travel time, emissions from idling plus stop-and-go traffic, road user satisfaction and stress levels, real-time traffic, calendar events, and weather. In fact, these strategies are divided into tiers based on the congestion severity. On the other hand, the messages sent to the vehicles include the congestion location and extent, the suggested strategy and potential alternate routes, the reasoning to gain the user trust and compliance, and the vehicles' vote on the preferred strategy using V2I. It is then up to the RSU to select the highest-scoring strategy if there is consensus. It should be noted that the adaptive signals at the intersections that border the congested area are controlled to prioritize a selected strategy, and the RSU continuously evaluates the effectiveness of this strategy and suggests some upgrades as needed, such as switching some strategies or extending the alternate routes based on the observed impacts. In such a process, a coordinated response across the adjacent zones for congestion spans multiple areas. Once either a collision or a congestion scenario is detected, an appropriate message is disseminated for the necessary actions to be taken. The proposed congestion detection scheme introduces two key innovations:  
* It leverages a hybrid RF/VLC system to collect real-time vehicular trajectory and traffic flow data. Specifically, RF signals are used to broadcast alerts and collect decentralized probe vehicle updates, while VLC is used for localized vehicle-to-infrastructure data sharing at intersections and congested spots. * By fusing data from both the RF and VLC systems, the scheme is able to detect congestion in a more accurate, robust, and timely manner compared to conventional methods. The RF data provides a macro view of traffic flows over a wide area, while the localized VLC data at intersections provides micro-level visibility into vehicle interactions and queue formations. The synergistic use of both communication technologies enables a level of traffic surveillance not possible with either system alone. By correlating anomalies or patterns observed in the RF and VLC datasets, the scheme can detect congestion even before queues fully form. It can also pinpoint the origins and spreading trends of congestion more precisely for effective response. The steps of our proposed congestion management algorithm are described as follows:  
**Real-time traffic flow model design:** As indicated earlier, to construct this model, the RSU continuously monitors the beacon messages from the vehicles in its zone. When congestion is identified, the traffic flow rate \(F\) is modeled using the Lighthill-Whitham \begin{table}
\begin{tabular}{l l l} \hline
**Parameter** & **Accident** & **Congestion** \\ \hline Mean Clearance Time & 16.54 min & 21.026 min \\ \hline Clearance Time Variance & 18,563.745 min & 7386.239 min \\ \hline Effect of the Number of Vehicles on Clearance Time & 33.5\% & 43.2\% \\ \hline Effect of the Number of Blocked Lanes on Clearance Time & 20.1\% & 27.5\% \\ \hline Effect of the Type of Blocked Lanes on Clearance Time & 12.3\% & 11.7\% \\ \hline Effect of the Traffic Flow Conditions on Clearance Time & 17.5\% & 9.3\% \\ \hline Effect of the Accident Location on Clearance Time & 16.6\% & 8.3\% \\ \hline \end{tabular}
\end{table} 
Table 1: Comparison between Accident and Congestion in a high-density area.