Smart Route: Internet-of-Vehicles (IoV)-Based Congestion Detection and Avoidance (IoV-Based CDA) Using Rerouting Planning

: Massive traffic jam is the top concern of multiple disciplines (Civil Engineering, Intelligent Transportation Systems (ITS), and Government Policy) presently. Although literature constitutes several IoT-based congestion detection schemes, the existing schemes are costly (money and time) and, as well as challenging to deploy due to its complex structure. In the same context, this paper proposes a smart route Internet-of-Vehicles (IoV)-based congestion detection and avoidance (IoV-based CDA) scheme for a particular area of interest (AOI), i.e., road intersection point. The proposed scheme has two broad parts: (1) IoV-based congestion detection (IoV-based CD); and (2) IoV-based congestion avoidance (IoV-based CA). In the given area of interest, the congestion detection phase sets a parametric approach to calculate the capacity of each entry point for real-time traffic congestion detection. On each road segment, the installed roadside unit (RSU) assesses the traffic status concerning two factors: (a) occupancy rate and (b) occupancy time. If the values of these factors (either a or b) exceed the threshold limits, then congestion will be detected in real time. Next, IoV-based congestion avoidance triggers rerouting using modified Evolving Graph (EG)-Dijkstra, if the number of arriving vehicles or the occupancy time of an individual vehicle exceeds the thresholds. Moreover, the rerouting scheme in IoV-based congestion avoidance also considers the capacity of the alternate routes to avoid the possibility of moving congestion from one place to another. From the experimental results, we determine that proposed IoV-based congestion detection and avoidance significantly improves (i.e., 80%) the performance metrics (i.e., path cost, travel time, travelling speed) in low segment size scenarios than the previous microscopic congestion detection protocol (MCDP). Although in the case of simulation time, the performance increase depends on traffic congestion status (low, medium, high, massive), the performance increase varies from 0 to 100%.


Introduction
The exponential increase in traffic volume has brought many potential challenges to the traffic engineers and transportation department in the form of a massive traffic jam [1]. Traffic congestion has become a severe issue for transport and logistics departments all over the world [2]. It causes a wide range of social, economic, and environmental problems. First, drivers face a higher chance of late arrival at their destination because of massive traffic jams, which creates a high level of anxiety. The driver stress can also turn to impatience, carelessness, and thus increase the possibility of traffic accidents and other social issues such as road rage. Secondly, there is also an enormous economic infrastructure framework to integrate macroscopic parameters to estimate traffic congestion and vehicle safety speed. The primary responsibilities of RSS in IVCD were to preserve privacy, aggregate data, store information, broadcast routing table, estimate safety speed, detect traffic jams, and generate session ID (S-ID) for vehicles. The V2V and V2I communications in VANETs are used for ad-hoc wireless connectivity of vehicles. While IoV expands VANETs to turn every vehicle into a smart node by adding its computation, storage, and networking capability.
Most of the traffic congestion research is based on the conventional transportation rules [4,9,18,[24][25][26] or either depends on consistent mobile connectivity to GPS map [10,12]. Presently, ordinary cities are migrating towards "smart cities" by using information and communication technologies (ICT). The Internet of Thing (IoT) paradigm plays a vital role in the realization of smart cities [27][28][29][30]. Different IoT-based traffic management schemes (congestion detection) are available in the literature [31][32][33][34]. The IoT-based congestion detection schemes are costly in terms of money and time, as well as challenging to deploy due to its complex structure. MCDP [20] and IVCD [22] are inexpensive and easy deployable schemes for congestion detection. The MCDP and IVCD are network layer protocols, where the congestion detection functions are added to the periodic packet structure without interrupting the physical layer. That is why these protocols are inexpensive and easily deployable. However, these schemes were unable to avoid congestion in real time. Thus, in this context, we propose an infrastructure for a real-time traffic management scheme called the Internet-of-Vehicles (IoV)-based congestion detection and avoidance (IoV-based CDA). The proposed IoV-based CDA uses a parametric approach for congestion detection, while rerouting (using modified EG-Dijkstra [35,36]) for congestion avoidance in a given area of interest (AOI). In our study, we considered Alwaha district intersection in Riyadh, Saudi Arabia. The proposed scheme is divided into two broad categories, i.e., (1) IoV-based congestion detection (IoV-based CD) used for real-time congestion detection, (2) IoV-based congestion avoidance (IoV-based CA) for proactive rerouting to avoid congestion. The roadside unit (RSU) on every junction computes the capacity C of the entrance segment. The capacity is defined as the maximum number of vehicles in a given road's segment without producing traffic jam [37]. If the number of vehicles exceeds a specific threshold, then congestion will be detected, and rerouting using EG-Dijkstra [35,36] will be started to resolve the congestion. The contributions of this paper are given below:

•
We proposed IoV-based CDA for a particular road intersection highly vulnerable to massive traffic jams using two prominent parameters, i.e., the occupancy rate and occupancy time. We assessed our proposed scheme through simulation and noted that it reduced path cost and travel time as compared to the no-rerouting scheme (i.e., MCDP) significantly. • Secondly, our proposed IoV-based CDA employed rerouting to assess the traffic load of any alternate route before selection. Thus, it prevents traffic jams migration from one place to another. Lastly, we measured the robustness of our proposed IoV-based CDA by investigating under different levels of congestion (i.e., low, medium, high, and massive) scenarios.
The rest of the paper is structured as follows. Section 2 describes the IoV-based CDA scheme system model. Section 3 presents the proposed IoV-based CDA algorithm. Section 4 discusses the experimental results, and Section 5 concludes the paper and outlines future works.

System Model
In this paper, a road intersection with segments S 1 , S 2 , S 3 , and S 4 , is considered for route planning, as shown in Figure 1, where each segment is covered by RSU located at the beginning of each segment. The length of each segment is large enough so that to predict early congestion from frequent arrivals to the segment. It is also considered that each segment has alternate routes to a particular destination.
The arrival and departure of the vehicles to the segment follow a Poison distribution [38], while the speed of vehicles follows a Gaussian distribution [39]. Each vehicle is embedded with an onboard unit (OBU) equipment, which has the same transmission power and Received Signal Strength (RSS) for all vehicles. A Global Positioning System (GPS) unit and IEEE 802.11p radio equipment are embedded inside the OBU. Every vehicle disseminates beacons messages with each other as well as with RSU. The capacity C of each road segment refers to the maximum number of vehicles on a specific road segment, which is calculated as: where S length and V length are the lengths of the road segment and vehicle, respectively, the min gap represents the safety distance between the two vehicles. To predict the status of a given road segment S i , the RSU calculates the occupancy rate of the segment as: In Equation (2), O i represents the occupancy rate of segment i, while K i and C i are the current numbers of vehicles and capacity of segment i, respectively. For congestion detection, RSU computes that if O i > δ where δ ∈ [0, 1], then segment i is classified as congested, and K vehicles such that (O i − K < δ) will be rerouted using EG-Dijkstra [35,36] to other routes.

Proposed Smart Route: IoV-Based Congestion Detection and Avoidance (CDA) Using Rerouting
The proposed IoV-based CDA is designed for a particular area of interest (AOI), i.e., road intersection point. The main goal is to develop a smart transportation system that detects and avoids the congestion in real time using rerouting. At each entry point to AOI, the base station, i.e., RSU, estimates the traffic status by assessing the occupancy of the road segment taking into account the vehicle arrival rate. In any instance, if the arrival rate exceeds the average occupancy level, a congestion state is detected. Once the congestion is identified, the RSU discovers an alternate route using EG-Dijkstra, provided that the placement of those vehicles will not exceed the occupancy level of the alternative routes. The complete design of IoV-based CDA is divided into three parts, i.e., (1) conversion of the road intersection to an abstract routing graph; (2) the IoV-based Congestion Detection (IoV-CD) phase; (3) the IoV-based Congestion Avoidance (IoV-based CA) phase.

Conversion of Area of Interest (AOI) or Road Intersection to Routing Graph
The intersection points are more susceptible to traffic congestion; for this reason, this paper considers the traffic congestion detection and avoidance in intersection points (i.e., AOI). From the real road intersection point, as shown in Figure 2, a routing graph G(V, E, O) is constructed, where V and E represent the set of junction points (i.e., vertices) and the collection of edges (i.e., roads). The parameter O indicates the occupancy rate of each road segment (i.e., edge) connecting the junction points. The occupancy rate of a particular road segment refers to the ratio of the current number of vehicles to the total capacity of the road segment. The extracted graph from the real scenario in Figure 2 is shown in Figure 3.  In this example, the number of junctions and edges in the extracted graph is 11. The symbol J 1 to J 11 represents the junction points, while E i,j represents the road connecting junction I and J. The value of I and J ranges from 1 to 11. In the extracted graph, J 1 is the entrance junction, while J 5 is the proposed destination junction. The direct route to the destination is {J 1 , J 2 , J 3 , J 4 , J 5 }, while {J 1 , J 2 , J 8 , J 9 , J 11 , J 5 } is the indirect route to the destination. The adjacency matrix of the extracted graph is formed by merely putting one for connected intersections and zero for disconnected, as given below in Equation (3).
where v i and v j are the two junction points and A represents the graph of the road intersection. The adjacency matrix for our selected road intersection is given below: If O is the occupancy rate of a given edge, then the graph G will be where O i,j , represents the occupancy rate of the road segment connecting junction v i and v j .

IoV-Based Congestion Detection (IoV-Based CD)
Vehicular mobility is an essential factor that influences the structure of vehicles' dynamics. Despite the high speed and randomness of the vehicles' speed, road topology, speed limits, traffic rules, and nearby vehicle speed restrict the vehicle movement. To design a feasible traffic congestion detection scheme, it is essential to consider the relationship between speed and inter-vehicle spacing [40]. In this paper, we used the essential mobility factors for traffic jam detection and prevention. In the given scenario (as shown in Figure 2), four junction points are highly susceptible to the massive traffic jam. Thus, to avoid unwanted enormous traffic jam, it is necessary to predict real-time congestion on each vulnerable junction point. For this purpose, it is assumed that each arrival point has an RSU located significantly away (i.e., 1 km) from the AOI so that to detect early congestion. The installed RSU acts as a traffic controller and aims to monitor the specified road segment for real-time congestion detection. Considering the basic transportation rules [41] and basic microscopic parameters [20], we derived two parameters for congestion detection, i.e., (1) road segment occupancy rate and (2) single-vehicle occupancy time. The definition of the occupancy rate is given in the above section. However, occupancy time can be defined as below: Definition 1. The single-vehicle occupancy time is the amount of time required by a vehicle to cover a particular distance (equal to the vehicle's length) with its current speed [42]. Mathematically, it can be written as below: where O t is the occupied time of a particular vehicle. The parameters L v and V v represent the length of the vehicle and the speed of the vehicle, respectively. The congestion can be detected with the help of the road segment occupancy rate (i.e., if O i > 0.7 , then segment i is considered to be congested) or vehicle occupied time (i.e., if O t > 0.6s, then the given zone will be congested). The values of both metrics, i.e., occupancy time and occupancy rate, are derived from the safety transportation time limit, i.e., time headway [20]. The complete procedure of the IoV-based CD is given below in Algorithm 1.
In Algorithm 1, it is shown that initially all vehicles register with RSU. The registration of a particular vehicle is done by the periodic Hello messages/Beacons disseminated by every vehicle on the road. Later, the total capacity of each road segment, the current number of vehicles, the occupation rate, and the occupation time are calculated. The occupation rate and occupation time are the primary factors for congestion detection. If the values of these factors exceed the given threshold, the congestion will be detected, as shown at the end of Algorithm 1.

IoV-Based Congestion Avoidance (IoV-Based CA)
In this section, we present the real-time congestion avoidance at the earliest stage protocol. First, an RSU detects congestion as shown in Algorithm 1, i.e., occupancy rate and occupation time on any road segment. Rerouting is an effective method of mitigating traffic congestion by redirecting vehicles' flows to sufficiently bandwidth paths. To balance the uneven traffic distribution, this paper uses EG-Dijkstra [35,36], to reroute the traffic evenly. In the rerouting, the occupancy level of the alternate routes is taken into account to avoid the possibility of transferring congestion from one place to another place. In the proposed IoV-based Collision Avoidance, if the transfer of n vehicles to a particular route exceeds the threshold of occupancy rate or occupancy time of that route, then the full transfer (i.e., n vehicles) is converted to a partial transfer. The complete procedure of IoV-based CA is given in Algorithm 2. if Available_space < n then 11: Sort(RoutRequest) 12: Send(s.next(Available_space)) 13: EG_Dijkstra(G, s(n − Available_space), de) 14: else 15: Send(s.next(Available_space)) 16: end if 17: else 18: EG_Dijkstra(G, s, next.hop(de)) 19: end if 20: On next hop to the destination, Go back to step 13 The proposed algorithm calculates the capacity and the occupancy rate of each road's segment, as well as the occupancy time of each vehicle, which is also measured for further evaluation. Secondly, each segment is assessed; if the limit exceeds the given threshold (see line 3), then the segment is marked as a block. In Algorithm 2, the available capacity of each segment is also calculated (see line 5(a)) to support the optimum route planning. If n vehicles request the RSU for a particular road segment, the RSU first checks the available capacity of the requested segment. If the capacity is enough for n vehicles, then the route is planned over that segment (see line 9 to 13). In the opposite case, the vehicles are divided into groups, where part of the vehicles is planned to the requested road segment, while the route of other vehicles is set by the EG-Dijkstra algorithm [35,36].

Experimental Results and Discussions
This section assesses the proposed IoV-based congestion detection and avoidance scheme under various traffic densities (low, medium, high, and massive (very high) congested scenarios) and AOI's (Alwaha, Riyadh intersection point) segment lengths. The performance of the proposed scheme is compared with the existing IoV-based congestion detection scheme, i.e., MCDP [20]. This section is further divided into three sub-sections: (a) Simulation environment; (b) Impact of AOI's size on IoV-based CDA scheme performance; (c) Impact of congestion levels on IoV-based CDA scheme performance.

Simulation Environment
The primary goal of the proposed scheme is to monitor and control a given area of interest in an urban city road. For this purpose, we used a well-known traffic simulator SUMO (Simulator for Urban Mobility) [43], version 0.24.0, to assess the performance of IoV-based CDA. SUMO is an open-source traffic simulator developed under the collaboration of the ZAIK and ITS departments. The realistic street map of Alwaha, Riyadh intersection point was taken from the OpenStreetMap [44], and later various traffic conditions were generated through SUMO. Our experiments in this paper are closely related to the real road traffic. We extracted the real road intersection point (see Figure 2) from OpenStreetMap and deployed random traffic using SUMO. The literature has enormous examples of SUMO-based traffic simulations [35]. Next, the generated traffic traces were imported to MATLAB (R2015b) for different performance metrics measurements. The detail of all parameters is given in Table 1. Two different simulation experiments are performed to evaluate the performance of the proposed IoV-based CDA scheme, as given below:

1.
Experiment A: The first experiment is about the impact of various segment sizes (i.e., from 300 m to 1500 m) over the performance of IoV-based CDA. The number of vehicles for each road segment is kept constant for all segmental sizes. To assess the performance of the proposed IoV-based CDA over the experiments, as mentioned earlier, we used three prominent performance metrics for evaluation, i.e., path cost/occupancy level, travel time, and travelling speed. The definition of each metrics is given below:

1.
Definition of Path cost/Occupancy level: It is the ratio of the current number of vehicles to the total capacity of the road's segment. This metric represents the level of congestion of a given segment. The higher the value of path cost, the greater will be the congestion level. This metric can also be used to measure throughput. Throughput refers to the number of vehicles reached successfully to their destination.

2.
Definition of Travel time: This metric represents the time during which the source vehicle reaches the destination. The mathematical definition of travel time is The travel time T depends on segment length L seg , number of segments N seg as well as the speed limit V limit . The appropriate speed on each segment is also depended on the congestion level.

3.
Definition of Travelling speed: It is the speed in which the vehicles can travel without collision.
In safety travelling, speed can be calculated as below: Where Space_Gateway and τ represent the inter-vehicle spacing and safety time to cover the inter-distance, respectively. The performance metrics, as mentioned earlier, are calculated under different specifications.

Impact of AOI's Size on IoV-Based CDA Scheme Performance
The capacity or occupancy of AOI's increases with the increase of an individual segment's size (Based on Equation (7)). In this section, the impact of AOI's segment's size on IoV-based CDA performance is evaluated in terms of path cost, travel time, and travelling speed. It is shown in Figure 4 that the increase of segment size has a positive effect on path cost. The path cost significantly reduces in IoV-based CDA as well as in the MCDP [20] scheme with the increase of AOA's size. However, the performance of the proposed scheme is better than the previous MCDP [20] scheme due to the real-time route planning. The influence of different segment sizes on travel time is also shown in Figure 5. Here, it can be seen that proposed scheme performs very well in moderate segment length (i.e., 1000 m), but the performance of MCDP [20] scheme improves as compared to the proposed scheme at 1200 m segment size and onward. The proposed IoV-based CDA scheme selects route by vehicle density without considering the travelling time. However, at long segments (1200 m and onward) under given specification, the chosen path is less dense as compared to the MCDP's [20] selected route. However, due to the speed limit constraint, the travel time of IoV-based CDA is longer than the travel time of the MCDP scheme. Lastly, this section also presents the influence of travelling speed concerning various AOI's segments sizes. It is determined from the result in Figure 6 that the travelling speed gradually increases with the increase of segment size. However, the travel speeds in the IoV-based CDA case remained constant (i.e., 33 m/s) at 1000 m size. It is because of the speed limit of the AOI's segment.

Impact of Congestion Level on IoV-Based CDA Scheme Performance
In this section, the proposed scheme is assessed under four different congestion levels (i.e., low, medium, high, massive (very high)). Here, the selected performance metrics (i.e., path cost, travel time, and travel speed) are assessed and compared with the MCDP [20] scheme under the aforementioned congestion levels.
The path cost is directly proportional to the congestion levels. By increasing the congestion level, the path cost also increases, as shown in Figure 7. It is also depicted that the proposed IoV-based CDA significantly outperforms than the previous MCDP [20] scheme in all congestion levels. The path cost substantially increases in the massively congested scenario in both schemes. In the highly congested scenario, the large number of vehicles increase the occupancy level of the road's segment significantly, which subsequently affects the path cost. The assessment of the second performance metric, i.e., travel time is also shown in Figure 8. In a low congested scenario, most of the vehicles use the direct short-route instead of the alternate best route, that is why the occupancy level of the direct route increases, which further affect the travel time.
Since the proposed IoV-based CDA selects an optimum route based on occupancy rate and occupancy time in real time, thus the travel time is significantly lower than the MCDP [20] scheme. Similarly, in all congestion levels, the proposed IoV-based CDA outperforms the MCDP [20] scheme in terms of travel time. However, in the congested scenarios, the difference between both schemes' performance is minor because of the long path cost on all routes.
Lastly, this section discusses the assessment of the travelling speed metric over the performance of the IoV-based CDA and MCDP [20] scheme. In Figure 9, the variation of travelling speed in both schemes (IoV-based CDA and MCDP [20]) is shown. The path cost has the same impact on travelling speed like travel time.
It can seen that the travelling speed in the low congested scenario is very high in both schemes due to the little path cost. However, in a highly congested scenario, the travelling speed is significantly low because of the high occupancy rate or path cost. Typically, the inter-vehicle spacing reduces in the highly congested scenario because of the high occupancy rate; which further reduces the subsequent time headway. In the case of short-time headway, the driver will reduce the speed significantly to maintain a safe journey.

Conclusions
In an urban city, road intersection points or crossroads are highly vulnerable regions for massive traffic congestion. Traffic jam is a serious issue presently to be addressed. This paper discusses an enormous traffic jam detection and avoidance on a particular AOI (i.e., Alawaha, Riyadh) using an IoV-based CDA scheme. The proposed scheme uses two essential parameters for congestion detection (i.e., occupancy rate and occupancy time) and modified EG-Dijkstra for alternate best route planning. From the temporal variations in the results, we determine that the RSU at each entrance point assesses the traffic periodically and assign the routes to the drivers dynamically. The time-lapse of alternate route discovery depends on the arrival of the vehicle to the route segment. Moreover, the rerouting algorithm in the IoV-based CDA scheme assesses the current occupancy rate of the alternative route before selection to prevent congestion migration. Our results also determine that the proposed IoV-based CDA outperforms the previous MCDP [20] scheme in terms of low-cost, less travel time, and high-speed route selection. Lastly, we also concluded that our proposed scheme performs very well under various congestion levels, i.e., low, medium, high, and massive, as compared to the previous MCDP scheme.
Author Contributions: The conceptualization, methodology, and original draft writing was done by Z.K. The supervision, validation, writing-review, and editing were done by the A.K. Formal analysis and proofread were performed by H.F. All authors have read and agreed to the published version of the manuscript.
Funding: The APC of this paper was funded by Prince Sultan University, Riyadh, Kingdom of Saudi Arabia.