Adaptive Smart Traffic Accidents Management System

—Traffic congestion and accidents have increased recently and reached critical limits, so these contribute in initiating big challenges for many researchers, governments and industries over the last few decades. Traffic accidents have many undesirable effects relating to increase number of death, infrastructure distribution, and health injuries, so there is a crucial need to develop and modify an approach that utilizes the new technology to limit and prevent the traffic accidents. In this research we developed a comprehensive approach to achieve the following three important goals in accident elimination by using smart solutions. The first goal is minimizing the number of exchange information packets between sensors to save the battery life through developing and adapting clustering schema to minimize the number of exchanges information packets. The second goal is calculating and determining the optimum route from accident location to the nearest rescue location by developing a dynamic routing schema used by the control station and depending on a cost heuristics function. The third goal is predicting the accident causes and minimizing the probability of accidents occur using a warning message schema and drawing some obstacles on some routing paths. Cupcarbon simulator and MATLAB software tool are developed to simulate different scenarios in order to proof the research goals.


Introduction
The traffic density is increasing rapidly around the world due to the population growth, so many researchers spent a lot of efforts to find and propose solutions for traffic problems; since traffic accidents have many undesired effects that are presented by human deaths, increase number of injuries, and reduction in human productivity. According to the World Health Organization (WHO) 2018 report, the number of road traffic deaths reached (1.35 million in 2016) and it is expected to rise, especially it is expected to have a person who will die in every 24 seconds by road accident [1] [2]. According to Insurance Institute for Highway Safety, there are many reasons for car accidents, such as: speeding, bad weather conditions, distractions and drunk driving as seen in figure 1. Speeding and drunk driving are occupying the highest percentage reason for car accidents especially to the low-income country as it is seen from WHO report and there is some reductions which are observed in middle and high-income countries; as these countries increase their planning and regulations to reduce car accidents by adapting several researches in accident prevention management. Most of these researches are done to enhance road safety laws, access to post crash care and adapting of intelligent system in roads traffic management. Vehicle AD-Hoc Networks (VANETs) schemes are utilized solutions to manage traffic congestion, and to enhance navigation systems for ambulances by addressing the problem of ascertaining the shortest path to the destination, and avoiding unexpected congestions, by implementing historical real time traffic information that is updated frequently [3].
The proliferation Internet of Things (IoT), and electronic smart devices with the availability of online mapping services such as Google Maps, Bing Maps and Open-StreetMap increase the researchers' motivation to handle various types of queries on spatial road networks, so many simulators are developed to help researchers using IoT devices such as Cupcarbon simulator, as it can support many types of maps using dynamic environment, and so enhance the chance for developing good routes. Cupcarbon simulator can be employed by users to simulate plans for emergency car trips, trips by foot, and public transportation [4].
The implementation of the fifth generation wireless network (5G) will support smart solution and intelligent systems to manage traffic load on streets, so this will develop new trends to handle accident management; since 5G will widely use the Wireless Sensor Networks (WSN); as the5G communication is characterized by internet availability which is exposed to be available anywhere for everybody with a zero cost, so WSNs will provide solutions to meet the increasing of demands for wireless communication, and support Real-time applications such as: road monitoring services, surveillance cameras, and augmented reality devices [5]. 5G networks facilitates the implementation of IoT devices and intelligent systems in smart cities. But, unfortunately, most types of sensor nodes suffer from low transmitting signal to the base station with respect long distance, and low receiving signals' power that expecting overcome signal interference and increase of noise-to-noise ratio [6]. In addition to that WSN nodes suffer from low battery life and mobility management, so clustering is proposed to tackle these problems. According to these addressing problems, we suggested clustering technique for sending and receiving messages between sensors nodes, and so this will reduce the number of messages and overcome the possibility of low battery life. Clustering is the process of gathering a set of similar objects, which used to aggregate these similar objects to achieve efficient power consumptions and enhance system reliability [7]. Different researches are done to utilize the benefits of clustering in wireless sensor network by classifying nodes to primary nodes and secondary nodes. Primary nodes are responsible of data aggregation and data processing function, while secondary nodes perform data forwarding functions. The main advantage for clustering is to increase the network scalability and battery life time; as it enhances the diversity of control distribution over the network, the energy saving is achieved through load distribution and intelligent decision implementation. Nodes which have high energy are allocated more loads thus increasing the lifetime of the network. In clustering only cluster heads perform messages interchange, thus the data messages interchange will be minimum; as only cluster heads will communicate with each other's, thus reducing the data redundancy that occurs when each node performs its own data aggregation and transmission function separately [8].One of the proposed clustering algorithms is to adapt the rapid changes in VANETs, so when the cluster head is changed as a result of battery energy consumption and moving out of the range of the cluster nodes, a new cluster is needed to be elected as a cluster head; since the old cluster head is not suitable for the new topology. Handoff is implemented, since handoff can be used to handle frequently changes in channel frequency, time slot, spreading code, and combination of them. Handoff is classified into two types: Vertical Handoff (VHO), and Horizontal Handoff (HHO). Horizontal Handoff (HHO) is responsible for communication between two base stations of the same system, while Vertical Handoff (VHO)is responsible for switching process between some of base stations points, and the attachment points that belong to the different network technologies [9].Global Positioning System (GPS) is proposed solution that is used by traffic light controllers to alert ambulances and rescue vehicles through distributing alert signals which equipped with both RF and GSM module, these alert signals are used to communicate with traffic light, and inform the hospital doctors about the patient's status, so they implemented to receive solution messages relating to the kind of the injury, and the first aid recovery operations that should be done to treat the injured patient [10] [ 11].

Traffic Accident Management Literature Review
Several researches are studied on traffic accident management that conducted on road accidents prevention and road accidents avoidance with particular focus on the vehicular environment to reduce human loss. The traffic accident management systems are classified into two types: traffic accident management based on warning messages, and traffic accident management based on routing scheme [12]. The complete description of traffic accident management is explained in Figure 2. Traffic accident management solutions are mainly based on developing warning messages, and reducing time for rescue operations by adapting optimum path for ambulance routing, while traffic accidents analysis concern with accidents' reasons and results, so many researches implement data mining algorithms and association rule techniques to allocate accidents causes, since these techniques are based on data gathered by Emergency Management Research Institute (EMRI), and some of these researches use K-modes clustering algorithm, and association rules which are gathered to infer the circumstances for an accident that may occur for each cluster [13]. A variety of studies were done to study the effects of road accidents on different sectors, and what are the causes of these accidents, so some of these studies concern with data analysis of accidents' factors associated with accidents using statistical methods such as data mining techniques which predict the future factors for accident. Cophenetic correlation is used to study the hourly accidents at Gujarat state in India, in this research they proposed method which showed that Cophenetic correlation can be implemented in different places with similar roads accidents pattern, and can be used to track similar trend tasks [14].Unfortunately, most of the accident research studies are related to post accident treatment using optimum ambulance routing based in VANET routing protocols [15], so there is a lack of pre-accident researches, to tackle preaccident treatment. In this paper, we propose a clustering accidents information message. The idea behind cluster-based approach to reduce battery energy consumption in VANETs, thus the battery life time will be maximized, and the response time used in developing rescue operations will be minimized. As the increase in delay rescue time will result in human death, most of VANETs researches are interesting in studying routing algorithms, since routing algorithms concerned with finding the best route path from the sender node to the desired destination. VANETs routing protocols are classified into: topology-based routing and positioned based routing protocols. In clustering, cluster head is assigned to the node with the highest resources such as least ID and the maximum battery life time, and is responsible in broadcasting the message to all the nodes under its coverage area. Vehicular cloud computing is another promising and attractive solution to satisfy VANET applications and services, but unfortunately, it faces some obstacles and challenges, as Vehicular cloud computing can be a good solution for the future directions and architectures such as the vehicular cloud paradigm vehicle to vehicle (V2V) [16].
As routing protocols concern with finding the shortest path, the base algorithm for determining the shortest path queries is Dijkstra's algorithm. But, unfortunately Dijkstra's algorithm suffers from it scalability when the network is large, so different preprocessing methods were proposed to achieve better performance than Dijkstra's algorithm. These algorithms are based on developing distance queries, and state-ofthe-art methods that use bounded-hop methods; so, this will lead in reduction of the processing distance queries in several look ups on pre-computed distance tables. Hierarchical Methods are efficient tools that used to give shortest path queries. But these algorithms are calculated theoretically, so when they are implemented in real-world scenarios, it raises some problems. In most commercial route planning applications and navigation systems, we determine alternative paths that result longer path. These alternatives require: less congestion, lower fuel consumption and less travel time, so these applications will leave the selection for the decision to the user. Some of the proposed routing alternatives are to use a fleet of vehicles, i.e., transportation of humanitarian aid through unsafe regions as they are very useful and consume little time [17]. Intelligent traffic management system is used as new solution for traffic management, as the proliferation of IoT devices, and VANETs are good platform for traffic accident management in smart cities. Several researches concerned with intelligent traffic management using vehicles prioritization to minimize traffic congestion and enhance rescue operations [18]. They find the optimum path and address a counter measure for traffic light system problems and (report) drawbacks by implemented simulated environment using (CupCarbon simulator) [19].
In this research, the proposed approach for accidents management highlight following aspects: probability of accidents prevention, minimizing the effects of occurred accidents, rescue operations enhancement, traffic jams minimization, and congestion reduction.

Traffic Accident Management Proposed Method
The main objectives for the proposed adaptive Smart Traffic Accidents Management Systems (STAMS) are focused on the following points: 1. Minimize number of exchange information packets between sensors, and thus enhance the battery life for WSNs nodes which are used in intelligent systems for smart cities. 2. Select the best route for vehicle, and thus eliminate congestion time leading in traffic jams prevention on the road; since traffic jams are the main reasons for accidents occur, so this will keep the efficiency of traffic flow and assist drivers to reach their destinations on time especially the emergency vehicles and ambulances. 3. Reduce the probability of accident occur, and thus prevent their bad effects through guessing the probability of the occurrence of accidents before they occur using prediction models.

Traffic management clustering based proposed method
The first traffic management proposed method is based on clustering through assigning a cluster head between sensors node. The purpose of clustering is to minimize the number of exchange information packets between sensors nodes.
Clustering is a significant research topic for mobile ad hoc networks (MANETs); since clustering guarantees basic levels of system performance, such as delay and throughput, in the presence of both mobility and large number of mobile terminals. A large variety of approaches for ad hoc clustering have been presented, while different approaches typically focus on different performance metrics.
In wireless sensor network, Clustering increases the network scalability, system reliability, and battery life. As nodes in a clustered wireless sensor network can be classified as primary nodes and secondary nodes. Clustering saves energy by distributing load and making intelligent decision to eliminate centralization. Nodes having high energy are allocated as a cluster head. The clustering is done in such a way that data must travel minimum. Only cluster heads communicate another cluster head thus, reducing the data redundancy which usually happens when each node perform its own data aggregation and transmission function separately as it explained in Figure 3. Mobile wireless sensors networks are characterized by their mobility, so the cluster head will be changed frequently, so a new cluster is needed; as the old cluster head may be unsuitable for the new topology, and sometimes the old cluster head may die or move out of the range of the clusters' region. One possible solution to handle rapidly cluster head changing is Handoff process which is defined as a changing the channel (frequency, time slot, spreading code, or combination of them) associated with the current connection and inter-cluster communication.
Handoff is a very important aspect, since communication between connected mobiles must not be disturbed while crossing the boundary of serving base station. Handoffs are broadly divided into two categories: hard and soft handoff [20]. Soft Handoff where the connection between mobile and target base station is established before terminating the existing connection. Moving node keeps on observing the signal strength from neighbor base station and when receiving signal strength higher than the threshold, it hands over to that base station. Hard Handoff where the link between mode and base station is terminated before making a connection with the target base station, so the mobile can have maximum one connection at any time.
Another classification is based on who will take the decision of handoff. There are three different types of hand off as described below: 1) Mobile Controlled Handoff (MCHO), which is responsible for moving nodes monitor the signal strength of neighboring base stations and moving node itself decides to take the decision for Handoff based on the measurement which received from the neighboring base stations. 2) Network Controlled Handoff (NCHO), which is responsible for serving base station and neighboring base station keeps on monitoring the signal strength of moving nodes. Handoff decision is made by the network base stations which is based on the received signal strength, and in case of rapidly changing environment. This way is not preferred, because it has a high delay associated with it. 3) Mobile Assisted Handoff (MSHO), which is responsible for moving nodes and observe the signal strength of neighboring base stations and the serving base station decides the decision for Handoff based on the measurement received from the moving nodes.
Another type of classification of handoff: horizontal and vertical handoff. Horizontal Handoff (HHO), defines as handoff communication between two base stations of the same system. Vertical Handoff (VHO), defines as the switching between points of base stations or attachment that belong to the different network technologies [21]. In Horizontal Handoff, a mobile node moves from one cell to another under same radio access technology. For example, a mobile node currently connected to base station (BS) having LTE network hands over to different base station which also belongs to LTE netd(work [22]. In the vertical handoff, a mobile node moves from one cell belonging to one cell and to other cell that uses different radio access technology. In this research, we depend on soft, vertical, and Mobile Controlled Handoff (MCHO), as they are more proper and suitable for the tested environments, and can be used with cognitive radio networks to address the enormous growth of networks users [23] Clustering contributes in minimizing the average delay time and network throughput, so we used the queuing network models described in [24], for calculating the simplicity of static network model, assuming the transmit power to be large enough to cover the whole tested area scenario in order to reach the desired destination. The equations used to calculate average end-to-end delay and maximum link throughput are described below.
From the above equations, the average delay time is increased with the increase in the number of nodes, so when clustering nodes are used, then the number of interactive nodes will be reduced this leads to minimize the average delay time, and enhancing the throughput. Power consumption is another important factors in the effectiveness of wireless sensors networks, but it is difficult to calculate using theoretical equa- x 1 tions' models, so we developed MATLAB code to investigate the effect of clustering on the energy consumption as shown in Figure 4, which describes three snapshots (left, middle, right) of the results for the energy consumption. The left snapshot shows the energy consumption for one cluster (as broadcasting). The energy consumption is stable before starting broadcasting until the broadcasting is starting; the energy consumption starts to increase because of increasing in the number of packets exchange, then the power consumption is decreasing when the broadcasting is stopped. In the second snapshot, there are three cluster heads, thus the energy consumption improved and decreased; since the use of clustering decreases the number of packets exchange in broadcasting. In the third snapshot, there are four cluster heads, so the power consumption is getting more improved for the same reasons explained before. To determine the optimum number of group head size, we can extend our experiments to handle several scenarios according to the size of cluster head, and then the gathered data can be interpolated to find the approximated function which will be differentiated to determine the optimum size of cluster head. The next subsection will describe how we can reduce the traffic jam using IoT devices; the proof of the proposed method is investigated using simulation tools as explained below.

Traffic jam reduction based proposed method
Traffic jam is a complex problem that faces most of world countries. Many researches eliminate and reduce traffic jam, as traffic jam has many bad effects like: accidents, death, diseases and others. Traffic jam reduction can be achieved through re-routing vehicles' traffic, preventing traffic jams, and maintaining efficient traffic flow. Simple traffic flow will assist drivers (such as emergency vehicles) to reach their destination on time with minimum cost, so to achieve traffic jam reduction and elimination. Simulation tools are developed which are based on Cupcarbon simulator and MATLAB that are merged to test several scenarios.
Road networks are tested mathematically as follow: the road networks are translated to graphs that have vertices and links, these graphs are undirected and directed weighted graph. Let G = (N, E) represents a road weighted network with nodes N and edges , assuming that G is subset from N×N network set, where nodes represent road intersections and edges represent road segments. Each edge e = (ni, nj), e is a subset from E. e is assigned weight to represent the cost of moving from node ni to node nj. The cost is a heuristic function which has set of parameters like time and traffic load.
To find a path from a certain node to another one, we applied A* algorithm using MATLAB tools to investigate the data which is gathered from IoT sensors in Cupcarbon simulator which mimic real situation in Jordan streets as a case study. First of all assume a certain sensor node is searching for an optimal path to travel from a certain point to another for emergency vehicle, so first this sensor node will send a message for control station asking for optimal path. A* algorithm is used to find the optimal path between two points; since A* is considered one of the most used algorithm in a wide ranges of networks. A* is based on a heuristics to control its path and, it is an effective algorithm in path searching similar to Greedy Best-First-Search algorithm.
A* is a combination between Greedy Best-First-Search and Dijkstra's Algorithms, as it uses the vertices which are closing to the nearest starting points like Dijkstra's Algorithm, and depends on heuristics function to facilitate its search like Greedy Best-First-Search algorithm. To understand how A* work, let us start by assuming a standard network topology, so we use the following terminologies: g(n)is representing the exact cost of a path from a certain point to any vertex n, and h(n)is representing the heuristic estimated cost from vertex n to the desired points. The total cost for path selection in A* is presented by f(n) as explained below. f(n) = g(n) + h(n) The function h(n), represents the cost of traffic flow and traffic congestion cost. Traffic flow for vehicles is affected by two main parameters as explained by the following equation: Where

Tf: represents Traffic flow (vehicles / hrs), s: vehicle speed (kms/hr or miles / hrs) and d: density (vehicles / kms or vehicles / miles)
It is clear that the traffic flow proportional to both the speed of vehicles and their densities, so when the traffic flow is equal to zero then either the vehicles are stopped, or there are no vehicles on the roads, and when the traffic flow is high then either vehicles speed is high or density is high (i.e. there is no congestion), our goal is to select the best path that has the minimum cost as explained in equation 8, so to achieve this goal the traffic flow should be enhanced with traffic congestion elimination.
Green Shield Equations are used to measure traffic flow, as these equations are considering the dimension of vehicles and their unit [25] as explained: Where Tfg: represents number of vehicles/ hrs, sg: number of vehicles/unit length (speed), dg: length/unit time(density).
sgf: free flow speed, and dgf : Jam density When we substitute equation 10 in 9 we will get: Equation 11 represents the traffic flow, so when we want to maximize the flow size, then we have to derive this equation with respect to density and equal it to zero as shown below: So if we substitute equation 13 in 11, we will get Tfg max = sg (15) It is clear from the derivative green shield formula that, the maximum flow will be achieved when it is equaled to quarter jam density times of free flow speed.
In this research, we added simulation tools to test the total cost f(n) through implementing two scenarios. The first scenario is implemented, when there is no traffic jam and the traffic flow is maximum by assuming h(n) is zero, so f(n) =g(n). Figure  5 and Figure 6 show the results for implementing A* routing algorithm without traffic jam, this case may exist during midnight interval time.
While in the second scenario, we assume a value for the heuristics function h(n) by assuming there is traffic jam, and a weight for the route path. One of the main factors that effects on the traffic jam is vehicle dimension (vehicle type). The vehicle dimension reflects the vehicle type which has a direct influence on the traffic flow as explained by Green Shield equations. But, unfortunately, A* is a graph search algorithm that offers optimal path, and it is built over a grid partitions, but it suffers from time complexity [26], [27]. In addition, A* does not consider the vehicle dimension, and vehicle speed to handle traffic flow problems. Many solutions were proposed, one of these solutions is path planning algorithms for each type of vehicle such as the large vehicle, which should be going in specific route that is different for the route for the small car. The main goal from this classification is to group the vehicles with similar characteristics, as this will contribute in reducing the extra burden of considering each vehicle type and thus reducing the significant traffic.
Path planning algorithms are used to find near optimum cost, and free collision path from a certain point to a desired target point through using sampled based algorithms by randomized in search space [28]. However, the optimum case is achieved with cost of execution time and convergence rate. These algorithms were used for planned mobile robots in which all the nodes are smart WSN.
Rapidly-exploring Random Trees (RRTs) is one of the incremental sampling-based motion planning algorithms that does not guarantee the optimal value path as it was proven by [29], but another algorithm was considered to have optimal value path, which is called Rapidly exploring Random Graph (RRG). A tree modification to RRG was introduced with a structure same as RRT while maintaining asymptotic optimality of RRG [30], this algorithm is called RRT*, since RRG algorithm incrementally forms a graph instead of a tree.  Vehicles type and size has a direct influence on traffic flow, and the heuristic cost function h(n). In this research we implement RRT* algorithm to tackle the heuristic function h(n). RRT* algorithm has the same body as RRTs, while RRT* extend RRTs as it is explained in Algorithms 1 and 2 respectively. We implement RRT* algorithm on different vehicles size to check the effect of vehicle' size on the traffic flow. Results showed that the size of vehicle has a reverse effect on the traffic flow by having a larger simulation time as explained in Table1. Figure 7 shows the optimum planning path according to the minimum total cost for the car with length = 3.72 and width = 1.44, while, Figure 8 shows optimum route for the bus with length= 10.1 and width = 2.43 to reach the same destination from the same starting point.

Traffic accident prevention and reduction proposed based method
The main factors and reason for car accident are: speeding, drinking, cell phones and weathers, we study the effects of the following factors on the probability of accidents occur: 1) speed of car factor, 2) disasters factor, and 3) and turning radius of the vehicle [31].
Nowadays over speeding is one of the most common traffic violations. Generally, over speeding is the result of restless and bad behavior of drivers. As the accident rates are increasing, it is important to develop and implement a system which can automatically detect and report over speeding to the traffic control authorities as early as possible. Nearly all the roads are marked with speed limits depending upon the size of moving vehicles and heaviness of traffic, but some drivers habitually ignore this speed limit. The advancement in technology has replaced most of the manual or semiautomatic systems with an automated system. The value of this research uses Internet of Things (IoT) to detect and report over speeding of the vehicle on which the device has been preinstalled. IoT is a technique to integrate various devices to exchange data among themselves to enhance the safety in car driving [32], [33]. This research proposes the design, development and functioning of a smart device that helps detect automatically and report to competitive authority, when so ever the subject vehicle exceeds the speed limit. The device has been developed based on the Global Positioning System (GPS) Technology.
One possible proposed solution to solve disasters problem is to add an obstacle on the map blocking the path, but adding these obstacles depend on information gathered by the sensors. If the sensor detects a disaster or abnormal conditions problem in specific path, then the sensors send a warning message to control station. After that the control station: 1) adds obstacle on path to cancel this path from the planner algorithm or shortest path routing algorithms calculations to find optimal route, 2) and sends a warning message for the nearest cars from disaster path and notify them with the optimal and safe alternative path. Figure 9 shows an example of disaster path that representing as obstacle on the map blocking the path. Fig. 9. Example of disaster path that represents as obstacle on the map blocking the path Turning radius of the vehicle value specified as a positive scalar. This value corresponds to the radius of the turning circle at the maximum steering angle. Larger values limit the maximum steering angle for the planner and smaller values result in sharper turns. Turning radius has influence with the car size, as the width and length of the vehicle increase than these will be directly affected with the turning radius as noted from simulation results.

Conclusions and Future Work
Traffic accident management is one of the most problems that face governments and the humanity as if it is not managed carefully, it leads to several problems on human life, economic, health, financial, and environmental domains. In this paper, we proposed and applied smart accident management system based on mobile ad hoc networks, and a vertical cluster hand-off algorithm which is used to minimize the battery consumption that wireless mobile ad-hoc network suffer from, the results showed that battery consumption can be alleviated using clustering. This research also reports the optimal route from accident position to the nearest available rescue place or hospital by investigating different scenarios and algorithms to minimize rescue response time and avoid accidents happen properties through implementing and developing a mathematical dynamic cost heuristic function , the results showed that the proposed dynamic routing schemas give optimistic results and can be used to reduce accidents probabilities through adapting vehicle classification using sensors and IoT. Finally, accident prevention and reduction methods are adapted to eliminate the main factors that lead to accident depending on warning message schema and adding obstacle for certain paths. As a future direction, we recommend to implement artificial intelligence techniques (to explore benefits from applying different sensors on roads).

Authors
Faisal Yousef Alzyoud is an associated professor in computer science department, Faculty of Information Technology, Isra University, Amman-Jordan. Email: faisal.alzyoud@iu.edu.jo Abdallah Altahan Alnuaimi is an associate professor in computer science department, Faculty of Information Technology, Isra University, Amman-Jordan.
Faiz Al Shrouf is an associate professor and a head of computer science department, Faculty of Information Technology, Isra University, Amman-Jordan.