Solving Traffic Routing System using VANet Strategy Combined with a Distributed Swarm Intelligence Optimization

: Proposing an efficient strategy to reduce traffic congestion is an essential step towards improvement as we take into consideration the unpredictable and dynamic infrastructure of the road network. With the advances in computing technologies and communications protocols, we can retrieve any type of data and receive in real-time the state of traffic congestion at each road using Electronic Toll Collection System (ETCS), Vehicle Traffic Routing System (VTRS), Intelligent Transportation System (ITS) and Traffic Light Signals (TLS). This study introduces a new distributed strategy that aims to optimize traffic road congestion in real-time based on the Vehicular Ad-Hoc Network (VANET) communication system and the techniques of the Ant Colony Optimization (ACO). The VANET is used as a communication technology that will help us create a channel of communication between several vehicles and routes. The techniques of the ACO is used to compute the shortest path that can be followed by the driver to avoid congested routes. The proposed system is based on a multi-agent architecture, in which all agents work together to monitor the road traffic congestion and help drivers quickly arrive at their destinations by following the best routes with less congestion. Simulation results show that the proposed method can reduce the total distance traveled and time taken in order to reach a destination, as compared to the classic “shortest path method” (based only on the distance).


Introduction
Recently, the number of vehicles in big cities have increased at a significantly large rate despite modernization and constant construction of road infrastructure. As a result, several problems have been produced, such as traffic congestion and air pollution. In an attempt to lessen the consequences, several innovative technologies and strategies have been designed and produced. Such strategies include collecting various real-time information about the state of traffic on a road network, which will be used to measure the traffic flow on each segment of the road. The traffic data is characterized by three attributes: The number of movements on the road (which includes the average speed), the number of vehicles in lanes and the total waiting-time on each intersection. Another variable would include the quality of the road, including the state of traffic flow and the average rate of Congestion on the road network. These parameters are used to control and manage the traffic on each road by predicting the flow for the next hours.
Traffic congestion is a serious issue, which has not shown any signs of improvement. Recently, various solutions have been offered to reduce the traffic problem. Those strategies are based on several technologies and some of them are based on GPS coordinates, satellites, cellular data and Global System for Mobile Communications (GSM). Another strategy uses image processing and Closed-Circuit TeleVision (CCTV) cameras while others are based on Radio Frequency Identification (RFID). However, some works have been done based on vehicular network infrastructure (Al Najada and Mahgoub, 2016;Li and Boukhatem, 2014;Goswami et al., 2017), which aims to create a network of communication between the different entities that collaborate in the traffic network such as vehicles, light signs, intersections, etc. This new concept is based on the vehicular ad-hoc network (Majumdar et al., 2016;Kimura et al., 2013), which is one of the famous technologies implemented in the intelligent transportation system concepts.
In this work, we introduce a new Distributed Vehicle Traffic Routing System (DVTRS) based on a multiagent architecture. The system is based on a collective group of agents and they cooperate together by collecting traffic data and generating the best routes with less traffic to the driver of the vehicle. They work in parallel to solve complex problems using optimal solutions. The system is based on two main components: (i) The VANET technology, for preparing the infrastructure of the road network (which uses several entities that guarantee the best exchange of information between vehicles and road controller agents) and (ii) The Ant Colony Optimization (ACO) (Tomera, 2014;Cheong et al., 2017), which is used to compute the shortest path based on the traffic data collected from the road network. The aforementioned traffic information is collected from several sensors implemented at each intersection, which are able to define the traffic flow on those particular routes.
The aim of this work is to find the best path by proposing a new distributed system based on the Ant System (AS) algorithm (Elgarej et al., 2017;Mahalingam and Agrawal, 2016). This helps compute the shortest path based on the traffic density retrieved from the process of the VANET communication technology. The ACO is viewed as a distributed algorithm inspired by the behavior of real ants (real agents) and is used to solve combinatorial optimization problems. ACO techniques have shown excellent performance and robustness with the problem of vehicle routing (Mohammed et al., 2017;Vasic and Rancic, 2016;Li et al., 2015;Neto and Cardoso, 2017). It was applied to the issues of supply chain managements (which includes the traveling salesman problem, vehicle routing problem, networking and telecommunication problems, etc).
Our solution will be implemented based on a distributed environment (Kromer et al., 2015;Kaplar et al., 2017) in which several intelligent agents will work in parallel to guide drivers toward their destination and to help them avoid routes with a higher level of Traffic. The proposed system will allow us to generate a dynamic path for vehicles by using the state of the traffic density and other factors, such as the total distance of the trip and the total time spent on the route. Simulation results show that the proposed solution benefits the results by reducing the total traveling time for each trip and guarantee a better strategy to control the traffic flow on the road network. The remainder of this work is classified as follows.
The next section reviews related work. In section III, a literature and a background review are described. An overview of the ACO is presented in section IV, then in section V, the concept of combining the technique of the ACO with the technology of VANET. In section VI, the proposed distributed strategy is described in detail. Simulation results are presented in section VII. Finally, the conclusion is given in section VIII. Li and Boukhatem (2014) propose a novel routing protocol titled Intersection-based Delay sensitive Routing using Ant colony optimization (IDRA). In this strategy, they determine a mathematical delay pattern for a road section. Then, using the intersection concept, the proposed system will use the ACO technique to find the optimal route with the least travel time. Each deployed ant will try to explore the road network by visiting a set of intersections (each route will be selected according to a local delay or a global delay from the current location toward the final intersection). Other ants take charge of updating the amount of pheromone along the visited routes. Another method has been combined with IDRA called the "Greedy carry-and-forward" mechanism. It is used to transmit data packets between two directly connected intersections. This method allows the system to optimize the communication process between all running agents. Majumdar et al. (2016) presents a bio-inspired method based on the Ant Colony Optimization techniques in order to find the optimal path in a given road network. This method is based on two constraints, such as the delay time and the availability of the route. The proposed solution is applied to a dynamic environment and all the new changes are taken into consideration during the process of the optimization, which is done by the ACO. Each ant on the given method will try to move in a random way. This allows the presented solution to deliver packets of information to the majority of vehicles (nodes) on the road network.

Related Work
A new clustering method has been introduced by Goswami et al. (2017) that combines ACO with the genetic algorithm (GA) for the VANET road network in order to increase the flexibility and lifetime of road networks. The ACO is implemented to search for the best solution that aims to reduce the total number of clusters in the road network. Then, the GA is employed to search for the best cluster centers. The proposed solution is compared with several methods, including Learning Particle Swarm Optimization (CLPSO), Multi-Objective Particle Swarm Optimization (MOPSO) and ACO Based Clustering Algorithm (CACONET). It has given beneficial results including a reduction of the number of clusters to 30%, as compared with other methods. Dutta et al. (2012) proposes a new distributed and collaborative method for controlling the traffic congestion based on the VANET technology. We suppose that each driver will be equipped with a mobile application that allows us to receive in real-time the position of the driver based on the GPS. This data will be sent to a remote server to see if there is a traffic congestion next to this GPS position. In the case of traffic congestion, the server will inform the nearest Road Sensor Unit (RSU) to the location of the driver and help him change his path by taking an alternative route with the least traffic and the best flow. If the server detects that several drivers are in the same position, the system will inform the RSU about a traffic congestion in this area. Once the traffic jam is confirmed, the vehicles approaching this area will be informed by the state of the route so they can avoid the traffic and take another route. The proposed mobile application is easy to use and helps the driver to be informed by the state of the route periodically (at each minute). Khodadadi et al. (2016) presents a new method that combines the fuzzy logic with the ACO algorithm to improve traffic control in the VANET network. The proposed method prepares a map segmentation and dynamically calculates the state of traffic at each intersection based on the fuzzy logic combined with distributed traffic, as it aims to reduce the traffic as much as possible (calculating by duration rather than the shortest routes). To calculate the traffic density, it uses the data collected from the road network such as vehicles and streets. The results proposed by this method are important compared to other existing methods in terms of travel time and speed by an average of 29% to 38%.
In this work, Al-Kharasani et al. (2018) introduces a new framework model to optimize the process of communication between Vehicle to Vehicle (V2V) in a Vanet architecture, which they based on a new concept of sharing information. This is based on the network resources combined with the basic Quality of Services (QoS) provided by the network provider to help vehicles communicate without losing important packets. This mechanism can be useful in reducing the network perturbation and increasing the data rate transfer between vehicles, but is still not enough to the Vanet architecture because we need not only handle the process of communication between vehicles. We also need to control the communication flow with the Road Sensors Unit, which is used as the main system that manages and proposes various scenarios and routes based on the data received from the vehicles on the road.

Literature and Background Review
With the revolution of technologies, modern cars are now equipped with various intelligent components such as On-Board Diagnostics II (OBD-II) system that helps us to see The level of fuel and speed to help control the system of the vehicle (GPS device, emergency services and self-driven system are included). Despite the technological advancements, we are still unable to propose an efficient method for traffic monitoring. Essentially, we need to find an optimal approach that helps us to assign certain routes to specific vehicles and drivers and to relay information about the congested routes in the road network. The object of this study is to construct an intelligent traffic monitoring system using VANET combined with ant colony optimization to detect traffic in real-time (Kimura et al., 2013;Raut and Devane, 2017) and to guide the vehicle to follow specific routes with less congestion. However, to design this system we need to define the following properties: Traffic congestion, VANET architecture, ACO algorithm.

Vehicle Traffic Congestion
Several investigations have taken place in order to define an ideal way to accumulate traffic data in realtime so as to control and provide alternative scenarios to reduce traffic. The majority of the strategies is based on RFID, intelligent remote sensing and GPS technology (Kimura et al., 2013;Dutta et al., 2012). However, most of the GPS and RFID technologies are limited in terms of space of propagation. Other solutions available involve using cameras and image processing to capture road network activity, as well as to analyze the different objects (vehicles, intersections, etc.). Many technologies have been presented for controlling and detecting traffic congestion and each one of them tries to implement the latest technologies that can be useful for reducing traffic congestion and guiding drivers using the best routes. These methods need a specific infrastructure to be implemented and their maintenance cost is very expensive. So, the main challenge is to find a suitable method that can use the existing infrastructure, be able to interconnect the different road network components with each other and produce a widely distributed system for monitoring and controlling the traffic density using a smart system for vehicle routing. The need for this intelligent system requires the implementation of several advanced traffic techniques and statistical procedures. Using this statistical data will help us to predict and define some future scenarios for vehicle traffic in specific areas of a city. Therefore, the application of smart methods for traffic monitoring is expected to yield great feedback and useful data for avoiding traffic congestion in the city.

Intelligent Transportation System Technologies
Intelligent Transportation System is an extra emerged technology which combines road network based data (such as wireless sensor networks and vehicular networks) and smart electronic technologies (e.g., CCTV, cameras, sensors) with the transportation system technologies. ITS handles an important variety of technologies and techniques, such as Vehicle Traffic Routing Systems (VTRS) (Nayyar and Singh, 2016;Yadav et al., 2016), Intelligent Traffic Light Signals (TLS) and Electronic Toll Collection System (ETCS). These methods are used to reduce the fuel consumption of vehicles and control the CO 2 emission in the air.
The Vehicular ad-hoc network (Li and Boukhatem, 2014) is a particular form of Mobile Ad-hoc Network (MANET) which allows us to build a communication network distributed from vehicle to vehicle or from a roadside unit to vehicles. VANET is characterized by its self-organizing and autonomous activities, where the entities in VANET can work as clients and/or servers for exchanging and sharing traffic road information. Figure 1 shows in detail the architecture of the VANET technology. The technology of VANET has been given attention due to academic research, the government and various industries. It has been implemented in strategies such as the Security distance warning, Vehicle collision warning, Driver assistance, Internet access, Cooperative driving, Automatic parking and Dissemination of road information.
The topology of VANET is characterized with a dynamic topology that changes according to the movement of vehicles at a specific speed. We can define the mobility architecture of vehicles according to a set of properties including road structure, traffic environment, the speed of vehicles and driving behavior. The routing protocol of VANET technology can be divided into two main tags: Topology-based routing protocols and Position-based routing protocols.
Topology-based routing protocols is based on a link's information within the network to send the data packets from source to destination. Topology-based routing approach can be further categorized into proactive (tabledriven) algorithms that are based on the shortest path. They keep information of all connected nodes in prepared tables to store information about the state of the route. All created tables will be shared with the other entities to guarantee the quality of information collected from the route. Geographic routing is a routing strategy applied to inform each node with its neighbor's based on its geographic coordinates (latitude, longitude). It doesn't maintain any routing table or exchange any link state information with neighbor nodes. The information from the GPS device is used in the routing decision to assist vehicles and road sensor units in the road network.

Vehicular Ad-hoc Network (VANET) Infrastructure
The main objective is to build a dynamic road traffic system that aims to decrease traffic in big cities. Our work will concentrate on two points: Vehicular ad-hoc network and traffic road optimization. The first feature is done using a set of sensors and intelligent strategies to control vehicles on the road. To find the ideal path that helps the vehicle to Avoid traffic, we are basing the method on the Ant Colony Optimization techniques (Deshmukh and Dorle, 2015;Byrski et al., 2017), which will help us compute and find the best route in terms of distance and traveling time. To build the VANET system infrastructure, seen in Fig. 1, we are basing it off of intelligent components called roadside units (RSU), which are pre-installed on roads at specific locations. The RSUs will be equipped with communicating devices such as a Wi-Fi router or switch, storage device and an electronic device that helps them count each vehicle that uses the route. Alongside this feature, they can share and collect information from and with several vehicles and RSUs using 4G internet connection, a storage disk to save different information about the state of the route and a counter device that computes the number of the vehicles that have passed through the RSU area.
The VANET architecture is based on three entities, including a Monitoring Center (MC), an RSU and an On-Board vehicle Unit (OBU). The MC installed in each section (which contains a local database used for storing and analyzing data received from both RSU and the OBU). The MC can interact directly with each RSU to fetch information about the state of the road and get the number of vehicles using this route in real-time. On the other hand, the MC will help the vehicle to arrive at its destination by giving it the best path according to the information collected from the set of the RSUs in the area. The RSU is defined to collect information from routes such as the number of vehicles and the traffic flow. The collected data will be sent periodically to the MC to assist in the process of finding the shortest path for the vehicles. Regarding OBU, this entity will control the state Of the vehicle and will communicate with the MC and the RSU using the internet to send a request and handle the responses. Thankfully, the majority of existing vehicles are equipped with several smart devices: GPS, video/audio, General Packet Radio Service (GPRS) and OBD-II, which allows for consultation of the state of the vehicle. It also allows the retrieval of information about the current speed of the vehicle, the level of the fuel, its current GPS position, etc.
The Fig. 1 illustrates the interaction model between the MC, RSU and the OBU in VANET. At the beginning, the OBU will inform the MC with its current location and its destination, then the MC will search in its local database for possible routes to guide the vehicle to its destination. For each meter, the MC will communicate with the RSU to get the state of the route and if there is traffic on this route. The MC will then compute and generate alternative routes for the OBU vehicle. The communication between the RSU and the MC is done automatically, at each second the RSU will inform the MC with the number of vehicles in its area. We estimate that the distance between two adjacent RSU is defined as 500 m and the set surface that a vehicle can take on the road is 5 m, so the maximum number of vehicles that can support the area of each RSU is 100 vehicles.

The Principle of Basic Ant Colony Optimization
In the real world, ants are able to find the shortest path between their nest and food sources (Tomera, 2014;Wei et al., 2014;Tirkolaee et al., 2018) by exploring the environment based on a chemical substance called pheromone, which is released by ants on the routes they travel. The proposed Ant System (AS) algorithm (Graf et al., 2017) is a procedure used to simulate the behavior of real ants by producing a new mechanism for artificial ants that produces the same behavior of real ants, with the addition of several attributes that helps the system to converge toward optimal solutions in minimum time. The different ACO algorithms depend on the nature of the problem and the solution for the problem, so the parameters of each algorithm is based on what the user needs to search for and how the nature of the environment will be used by applying the technique of the ACO. The AS is based on a set of predefined steps defined as follows (Algorithm 1):

Graph Description
Artificial entities will move between a set of discrete nodes in a discrete space. Since the problem solved by the AS algorithm is viewed as a discrete problem, they can be modeled by a graph built from nodes and edges.

Artificial Ants Preparation
A set of ants are distributed on the declared nodes in the proposed graph, the number of ants increases the collection of the generated solution since each ant is viewed as a candidate for the given problem.

Ants Probability Transition
Ants are based on a probabilistic transition to move between vertex which is based on two main parameters, which includes the pheromone and a heuristic approach that defines the nature of the optimized problem.

Algorithm 1: AS pseudocode algorithme
Input: N nodes , R routes , A ants Result: best route 1 for each A i in A ants do 2 for each N i in N nodes do // Apply a probabilistic transition based on pheromone and heuristic parameter to select best next move and add this node to CR: collection of node 3 n = select_next_node() ; 4 C n = n ; 5 end // Apply a local update of pheromone to the path visited by this ant 6 update_pheromone(C n ) ; // Add constructed path to list of proposed routes 7 best route = C n ; 8 end The AS pseudocode paremeter desrciption: • N nodes : List of available nodes on the map • R routes : List of available routes on the map • A ants : Number of ants used to find the bests solutions • best rout e: Contain the best solution computed after all ants finished their jobs. • select_next_node(): This function implement the equation 1 to find the next node to visited (j) when the ant is on node i • C n : Represents the set of already visited nodes by the given ant • Update_pheromone(C n ): Apply the function 2 for updating the value of pheromone on the set of visited nodes and routes.
At the beginning of the search process, a consistent amount of pheromone is assigned to all arcs and the cost assigned to each arc can be defined according to the nature of the problem. For each ant in the colony, it will start its own trip by visiting the set of available nodes in this graph. Node selection will be based on a probabilistic transition by using the amount of pheromone and heuristic data according to the function selec_next_node(). The visited nodes will be appended to the trip followed by the ant. When the current ant visits all existing nodes in the graph, it will then apply a local update of pheromone update_pheromone() by adding more pheromone on the set of routes visited during its search process. The current behavior will be repeated until all ants complete the existing nodes on the given graph. The system will allow us to select the best routes between the proposed solutions by ranking those solutions according to the length of each trip.

Combine the ACO Technique with the VANET Architecture
As shown in the previous section, the AS algorithm is based on the amount of pheromone to define the best routes visited by the majority of ants. Regarding the method, we will take the number of vehicles between two adjacent RSUs and correlate it with the amount of pheromone. This means if the number of vehicles is high, then the amount of pheromone on this route will be the same. The number of vehicles traveled between RSUs is automatically synchronized with the MC. This information will help the MC to select the next RSU and calculate the flow of traffic between those intersections. In this strategy, we are mainly utilizing the length of the route between two adjacent RSUs and the vehicle surface to calculate the number of vehicles on this route. Based on the main principle of the AS algorithm, the MC will consider the number of stopping vehicles as the amount of pheromone on this route. This means that the pheromone density level is related to the number of the non-moving vehicles on this route, so that when we have more nonmoving vehicles on this route, the amount of pheromone on this route will be higher. The main objective of the MC is to implement the behavior of the AS to search for all the best routes which have less number of vehicles (less traffic flow) and recommend the driver to go towards the route with a small traffic flow.
To better understand how we can implement the technique of the AS with the VANET technology, Fig. 2 describes in detail this process of communication between those elements. To define the amount of the pheromone taken with the number of stopping cars in the lane we will need to view the inverse of the original behavior of the AS algorithm by avoiding edges with higher amounts of pheromone and following only routes with less number of vehicles (less amount of pheromone). Based on the different number of vehicles between two adjacent RSUs, the MC can decide which route will be taken by the driver and if we see that the number of vehicles (in-out) is >70% then the route is known to have the least traffic flow. The driver will be notified that this route will have a higher possibility of heavy traffic and the MC will avoid this route during the process of selecting the best routes.
The road network will be viewed as a graph made from a set of intersections (nodes) and Routes (edges). This graph will be represented as follows: G = (I, R) Where I = (I 1 , I 2 ,..., I n ) is the set of intersections and R is the set of routes. The main objective of this layout is to guide vehicles to their destination in the fastest time while avoiding traffic on the road network. Avoiding traffic is done by skipping routes with a higher number of non-moving vehicles and traffic flow delays (in this instance) are based only on the congestion. Each R ij is identified by the distance d ij and traffic flow T ij . The time consumed to traverse R ij is not dependent on the time consumed to traverse other routes because each route has its individual number of non-moving vehicles controlled by the RSU. Therefore, the total traveling time for crossing a route will be the sum of all time taken to visit each intersection.
The final goal is to find the optimal solution that minimizes two constraints, such as the distance and time traveled. So, in this problem, we will try to use two parameters (distance, traffic flow) to find the best solution. The vehicle will apply a probabilistic transition to move from an intersection I i towards I j according to the rule below: This is where the parameter (α, β) controls the influence of the traffic flow (pheromone) and the distance on the prepared solution. The parameter ω is the set of the non-visited intersections. The level of the traffic flow (pheromone) will evaporate (ρ rate of evaporation) depending on the information received from the RSU (the rate of the non-moving vehicles on this route). The traffic flow update is done according to this equation: The argument ∆ ij is related to the driver to see whether the vehicle has already visited this route R ij . The new amount of traffic added on this route can be computed as follows: tm (k) represents the time needed to cross the distance d ij of the route R ij by the vehicle k based on the speed (ω k ) allowed on the route and the number of the available Non-moving cars: So, at each intersection, the vehicle will try to select the next intersection based on (Equation 1) and will then select this route based on two parameters: The distance and the traffic flow. The system will repeat the cycle until the destination is reached or the stop condition is met. In the end, the system will show the best routes that exists between the two locations. For each route, they will give us the total travel time consumed to cross this route with the total length (km) of this trip. Equation 1 can be transformed into:

A Distributed Strategy for Solving the Vehicle Traffic System
In this section, we will introduce the distributed strategy followed by the solution to find the optimal path that avoids traffic. This strategy is based on a set of artificial agents dedicated to this job which will cooperate and collect data, as well as propose the best path for drivers. Our architecture will be based on three main agents: MA (Monitoring Agent), VA (Vehicle Agent) and (RA) Routing agent. The system will work in a decentralized environment by using these agents together to quickly find solutions, Figure 2.

Monitoring Agent (MA)
The MA will control the workflow of our architecture by handling the request of the vehicle (VA) and by giving the driver the best path that will be followed to avoid traffic. Additionally, it will work with the set of existing RSUs in the area to collect data about the state of the route at each intersection. When a driver needs a specific destination, the MA will create a graph made from a set of intersections by calling the Google Maps Application Programming Interface (API) services. This open source API will help by drawing the map and generating a set of intersections between the two given locations (start, end). For the cost of each route, the MA will take the number of vehicles presented by the traffic flow on this route as the value of the link between two adjacent intersections and the linear distance between those positions. This value will be retrieved from the list of RSUs that control these routes. Based on that information, the MA will be able to define the road network that will be sent to the RA. In the next step, the RA will apply the AS algorithm to find the best path that exists between the start and the destination. These paths will not only be the shortest in terms of distance but also in terms of traffic. The RA will search for the best routes by creating a set of artificial ants called Worker Agents (WA) and each one will follow a route and try to visit a set of intersections based on the probabilistic transition defined in the AS algorithm. To select the next transition, we will use the traffic flow on the route to see the best routes that have less traffic (less number of non-moving vehicles). Figure 3 demonstrate in detail the main behavior of the MA in this architecture.

Vehicle Agent (VA)
In the proposed solution, we are using a road graph made from a set of locations defined by two attributes (latitude, longitude). To control our vehicle we need to know the current location and the destination of the vehicle based on the GPS coordinates. The VA is defined to control the state of the vehicle by sharing a set of information about the vehicle with the MA, including its current speed, GPS position, etc. When the optimal path is produced by the MC, this agent will help the driver to complete his journey by following the generated path.

Routing Agent
To compute the best route for the driver, this is based off of the RA in Fig. 4. This agent uses the techniques of the Ant System Algorithm to find the optimal trip that exists on the given map. In the beginning, it will handle the start node and the destination node of the driver and try to find the best trip that can exist by visiting a set of intersections. To make this job work, our architecture will use a set of artificial ants, called Worker Agents (WA) and each ant will try to visit the available intersections by applying the probabilistic transition rule as defined by the AS algorithm. It will then select the next intersection to visit based on the number of non-moving vehicles and the length of the route. So here, by using the traffic flow to prepare our trip, we shall find the shortest route in terms of the distance. Then, when the WA finishes his tour by arriving at the destination node, it will be able to apply a local update of information using the local pheromone rule on the list of the routes already visited. The created route will be sent to the RA to compare them with the list of the solutions calculated by the other WA. To select the best route, the RA will take the route with least traffic flow (routes with the least amount of non-moving vehicles). In the end, the optimal route will be sent to the MC and the driver can start the journey by following the proposed path.

Simulation Results Analysis
In this section, we present the implementation of details regarding our distributed strategy for finding the optimal route based on the VANET architecture. We are utilizing the Google Maps Data API to generate our map (graph) that will be used for finding the best route. The data recovered from this API will be used as an input data in our system, to which we extract the coordinate locations from the GPS that represents nodes and routes. This will define the paths between all the available nodes. Each node will be characterized by its latitude and longitude and the cost of each route is defined by the distance and the traffic flow, as seen in Fig. 5. To receive the traffic flow, we use the RSU, which has been pre-installed on the set of intersections. The road network of our problem will be viewed as a fully connected graph building from nodes and edges in Java Entity. We will implement our proposed solution by using a multi-agent framework called Java Agent Development Environment (JADE). In this framework, each agent will exude the behavior of real ants. The Java language will be used to develop our solution by applying the (AS) algorithm based on the Java entities as we use specification to run our solution in a suitable environment as follows: • Our solution is divided into two main sections: The Server-side and the Client-side. For the Server-side, we will implement our distributed algorithm by defining the behavior of our RA agent, which will calculate the optimal path for the vehicle based on the given input from the map, as well as the set of selected constraints. This container has the ability to exchange information with the MA and when the RA receives a request for finding the shortest path, it will use the input parameters such as the origin (location of the vehicle) and the destination. The map of data in Figure 6 contains a set of nodes and intersections with several routes. Based on this data, the RA will be able to generate the shortest paths for the given graph. For the Client-side, we create a web application using the HyperText Markup Language (HTML) and JavaScript tag languages to build our front-end platform.
As shown in this map, we are basing the graph on the Google Maps Traffic API to get real-time information about the state of the route between each intersection. We are also using the information retrieved from the different RSUs on the road to get the number of nonmoving vehicles and this information will be combined to set the cost of each route in term of distance and traffic flow. The user will use the website application to draw or select his current location and his destination by clicking on the map as shown in Fig. 6. The MA will handle this request and prepare the set of input parameters to run the set of artificial agents that will work together to find the optimal route. At the end of this process, the MA will show on the map the best path that exists between these two positions. To determine the efficiency of the proposed strategy, we apply our system on a real case to see the total time consumed and the total distance needed to reach the final destination compared with a traditional approach (Dijkstra Algorithm).
The parameter set for running our proposed solution is generally based on solutions regarding the number of vehicle requests with the various intersection (Table 1). To evaluate the performance of the proposed solution, we perform a simulation on three scenarios, each of them representing a customer request (vehicle). For example, in the first scenario, we have 50 vehicles that asked our system to offer them the best ways to reach their destinations. The system will then start the search process according to the predefined criteria at the beginning. For each client request, a list of agents is made available to facilitate the process of finding shorter paths according to the number of intersections that will be visited. The strong point of the proposed solution is that the system is based on a distributed environment where each agent is able to process and look for the best paths in parallel with the other agents. According to this method, we gain ample amounts of data in the execution process to find beneficial solutions in a very short time.
With this solution, we aim to reduce the maximum distance for a trip and minimize the response time to provide the minimum trip for each car. Figure 8 show that our distributed solution offers efficient results in terms of distance, especially in the case of a path with a large number of intersections (> 300). This is because the proposed solution is based on a parallel environment in which all ants (agents) are prepared to search and find the best paths (compared with the results proposed by the Dijkstra algorithm). In this algorithm all operations are done in an iterative manner so we have more time to find a solution, especially in the case of a trip with several intersections.   Finally, we have come to offer drivers the best routes with the minimum distance to arrive at their destinations, but we must always think of reducing the execution time or the time needed to find these solutions. Figure 7 represents the evolution of execution time for the set of solutions proposed in Fig. 8. In the distributed solution, the execution time is reduced because of the behavior of our solution and the system executes it in a decentralized environment. The whole process is done in parallel to minimize the search-time and to be able to prepare the best solutions to drivers, especially with multitudes of intersections (> 300).

Conclusion
This work presents a new intelligent traffic routing and controlling system that can effectively reduce and avoid traffic congestion on the routes of drivers. The proposed strategy is based on the VANET architecture combined with a Distributed Ant System algorithm (DAS). The DAS is an example of swarm intelligence methods that shows better results in the domain of finding the shortest and optimal routes. The whole system is based on other technologies to make the process easy to handle with beneficial results that will be used by the driver to avoid or to skip routes with higher traffic congestion. The simulation feedback shows that the proposed method not only decreases traffic congestion by re-routing vehicles toward routes with less traffic, but also collaborates in reducing the total waiting time when traffic occurs on specific routes. As a future concept, we will implement our proposed solution for a mobile application to allow users to drive and navigate using the proposed solutions. We will implement the Contract Network Protocol (CNP) into the behavior of our multi-agent's framework to increase the efficiency of our solution. This way, we can support more data and work quickly to calculate and distribute solutions instantaneously to support the request from mobile phones.