International Journal of Interactive Mobile Technologies (iJIM) – eISSN: 1865-7923 – Vol. 15, No. 14, 2021 Paper—Adaptive Smart Traffic Accidents Management System Adaptive Smart Traffic Accidents Management System https://doi.org/10.3991/ijim.v15i14.19099 Faisal Yousef Alzyoud, (*), Abdallah Altahan Alnuaimi, Faiz Al Shrouf Isra University Amman, Jordan faisal.alzyoud@iu.edu.jo Abstract—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 acci- dents have many undesirable effects relating to increase number of death, infra- structure 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 infor- mation 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. Keywords—Clustering, Cup-carbon, IoT, WSN, 5G 1 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 present- ed by human deaths, increase number of injuries, and reduction in human productivi- ty. 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. 72 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System Fig. 1. Main reasons for traffic fatalities 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 re- searches 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 en- hance navigation systems for ambulances by addressing the problem of ascertaining the shortest path to the destination, and avoiding unexpected congestions, by imple- menting 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. Cup- carbon 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 inter- net 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, unfortu- nately, 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 Speeding 34% Drunk Driving 36% Cell Phone 18% Weather 12% Speeding Drunk Driving Cell Phone Weather iJIM ‒ Vol. 15, No. 14, 2021 73 Paper—Adaptive Smart Traffic Accidents Management System 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 sec- ondary nodes. Primary nodes are responsible of data aggregation and data processing function, while secondary nodes perform data forwarding functions. The main ad- vantage 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 implement- ed, 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]. 2 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 sys- tems are classified into two types: traffic accident management based on warning messages, and traffic accident management based on routing scheme [12]. The com- plete description of traffic accident management is explained in Figure 2. 74 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System Fig. 2. Traffic accident management solutions 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 gath- ered 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 re- search they proposed method which showed that Cophenetic correlation can be im- plemented 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 pre- accident treatment. In this paper, we propose a clustering accidents information mes- sage. 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 promis- ing and attractive solution to satisfy VANET applications and services, but unfortu- nately, 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]. iJIM ‒ Vol. 15, No. 14, 2021 75 Paper—Adaptive Smart Traffic Accidents Management System As routing protocols concern with finding the shortest path, the base algorithm for determining the shortest path queries is Dijkstra’s algorithm. But, unfortunately Dijks- tra’s algorithm suffers from it scalability when the network is large, so different pre- processing methods were proposed to achieve better performance than Dijkstra’s algorithm. These algorithms are based on developing distance queries, and state-of- the-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. Hier- archical 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 hu- manitarian 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 manage- ment, 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 follow- ing aspects: probability of accidents prevention, minimizing the effects of occurred accidents, rescue operations enhancement, traffic jams minimization, and congestion reduction. 3 Traffic Accident Management Proposed Method The main objectives for the proposed adaptive Smart Traffic Accidents Manage- ment Systems (STAMS) are focused on the following points: 1. Minimize number of exchange information packets between sensors, and thus en- hance 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 traf- fic jams prevention on the road; since traffic jams are the main reasons for acci- dents 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. 76 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System 3.1 Traffic management clustering based proposed method The first traffic management proposed method is based on clustering through as- signing 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 re- liability, and battery life. As nodes in a clustered wireless sensor network can be clas- sified 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. Fig. 3. Architecture of clustering in wireless sensor networks 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 rap- idly 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 mo- biles 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 sig- nal 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 iJIM ‒ Vol. 15, No. 14, 2021 77 Paper—Adaptive Smart Traffic Accidents Management System 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 sta- tions. 2) Network Controlled Handoff (NCHO), which is responsible for serving base station and neighboring base station keeps on monitoring the signal strength of mov- ing 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. Horizon- tal 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 through- put, 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. Average end-to-end delay time d(t) = (1) Where λi= instant arrival packet rate (packet/s); λ= λi n = number of communicated nodes; L = packet payload length (bits); W = traffic load (bits/s); αj = arrival rate (packet/s) at node j; and αj = α. Here, αj= λi 78 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System ρ = (2) so α = λi (ρ) is the utilization factor of a node 4 n ( (3) Where: Square coefficient of service time (4) Where: is the expected utilization factor Maximum Throughput ( )= (5) c= (6) where: c is the constant ( c > 0) c= (7) where: is the expectation of the back off timer. 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 interac- tive nodes will be reduced this leads to minimize the average delay time, and enhanc- ing the throughput. Power consumption is another important factors in the effective- ness of wireless sensors networks, but it is difficult to calculate using theoretical equa- ) log4 (1 ) log4 )1( (* )log4( L w nn n L w nn Õ - Õ +Õ l al =CBi 2 Õ 2l 2 2 w L ) log4 )1( log42 1)1(4 2 n n r aa rr a Õ + +Õ++- + =CBi 2 ^r lmax )log(4 1 log4 w Ln c nLn w Õ + Õ x 1 + w L w L a x = 1 x 1 iJIM ‒ Vol. 15, No. 14, 2021 79 Paper—Adaptive Smart Traffic Accidents Management System 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 con- sumption 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 con- sumption 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. Fig. 4. Energy consumption with respect to number of cluster heads The next subsection will describe how we can reduce the traffic jam using IoT de- vices; the proof of the proposed method is investigated using simulation tools as ex- plained below. 3.2 Traffic jam reduction based proposed method Traffic jam is a complex problem that faces most of world countries. Many re- searches 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 translat- ed 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 80 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System 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 Cupcar- bon 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 Algo- rithms, 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 as- suming 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) (8) 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 fol- lowing equation: Tf = s × d (9) 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 elimina- tion. Green Shield Equations are used to measure traffic flow, as these equations are considering the dimension of vehicles and their unit [25] as explained: Tfg = sg × dg (10) iJIM ‒ Vol. 15, No. 14, 2021 81 Paper—Adaptive Smart Traffic Accidents Management System Where Tfg: represents number of vehicles/ hrs, sg: number of vehicles/unit length (speed), dg: length/unit time(density). 𝒔𝒈 𝒔𝒈𝒇 + 𝒅𝒈 𝒅𝒈𝒇 = 1 (11) So 𝑠𝑔 = ({1 − 𝒅𝒈 𝒅𝒈𝒇 , sgf: free flow speed, and dgf : Jam density When we substitute equation 10 in 9 we will get: Tfg = sgfdg- 𝒔𝒈𝒇 𝒅𝒈𝒇 dg 2 (12) 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: 𝒅𝑻𝒇𝒈 𝒅𝒅𝒈 = sgf -2 𝒔𝒈𝒇 𝒅𝒈𝒇 dg = 0 (13) dg = 𝒅𝒈𝒇 𝟐 (14) 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 im- plementing 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 dimen- sion reflects the vehicle type which has a direct influence on the traffic flow as ex- plained 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. 82 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System 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 algo- rithms 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 optimali- ty of RRG [30], this algorithm is called RRT*, since RRG algorithm incrementally forms a graph instead of a tree. Fig. 5. A case study of Amman streets in Jordan using Cupcarbon simulator Fig. 6. Results obtained by implementing A* using Cup-carbon simulated data 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. Algorithm 1: RRTs pseudocode 1 i=0; vi = x0; E0 = 0; 2 while I < N do 3 G = [ Xi, Ei] 4 xrand =sample (i); i= i+1; 5 [vi, Ei] = Extend [G, Xrand]; iJIM ‒ Vol. 15, No. 14, 2021 83 Paper—Adaptive Smart Traffic Accidents Management System Algorithm 2: RRT* extend pseudocode 1 V´ = V´; E´ = E; 2 xnearest = Nearest [ G, x]; 3 xnew=Steer [ G, x]; 4 if Obstacle free [xnearest, xnew] then 5 V´ = V´ + [xnew]; 6 xmin = xnearest; 7 xnear = Near [ G, xnew, Absolute (v)] ; 8 for all xnear = xnear do 9 if Obstacle free [xnearest, xnew] then 10 C´ = Cost [xnew] + C [Line [xnear, xnew]; 11 If C´ = Cost [xnew] then 12 xmin = xnear; 13 E´ = E´ + [xmin,xnew]; 14 For all xnear = xnear\ [xmin] do 15 if Obstacle free [xnew, xnear] and Cost [xnear] > (Cost [xnew] + C [Line [xnew, xnear] then 16 xparent = Parent [xnear]; 17 E´ = E´ \ [xparent, xnear]; 18 E´ = E´ + [xnew,xnear ] ; 19 return G´ = [V´ + E´]; We implement RRT* algorithm on different vehicles size to check the effect of ve- hicle’ 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. Table 1. Thw effect of Vehicle dimension and Weight on traffic Vehicle Category Vehicle Type Average Dimension Simulation Time(s) Length (m) Width (m) Car Car.jeep 3.72 1.44 0.6983 Bus Bus 10.1 2.43 0.9392 Truck Truck 7.5 2.35 0.8292 LCV Mini bus, Van 6.1 2.1 0.7406 Tractor Tractor Trailor 7.4 2.2 0.7846 Three-Wheeler ThreeWheeler 3.2 1.4 0.6579 Two-Wheeler Scooter, Motorbike 1.875 0.64 0.5021 Cycle Bicycles 1.9 0.45 0.4874 Rickshaw Pedal Rickshaw,Cart 2.7 0.95 0.5551 84 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System Fig. 7. Optimal route for the car with length =3. 7 and width= 1.44 Fig. 8. Optimal route for the bus with length= 10.1 and width = 2.43 3.3 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 acci- dents 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 semi- automatic 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 pro- poses 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 Position- ing 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 iJIM ‒ Vol. 15, No. 14, 2021 85 Paper—Adaptive Smart Traffic Accidents Management System 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 algo- rithm 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 corre- sponds to the radius of the turning circle at the maximum steering angle. Larger val- ues 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. 4 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 de- veloping 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 obsta- cle for certain paths. As a future direction, we recommend to implement artificial intelligence techniques (to explore benefits from applying different sensors on roads). Alternative optimal path Obstacle on the path 86 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System 5 References [1] Global status report on road safety 2018: summary. Geneva: World Health Organization; 2018 (WHO/NMH/NVI/18.20). Licence: CC BY-NC-SA 3.0 IGO). [2] Li, R., & Pickrell, T. M. (2019, January). Seat belt use in 2018—Overall results. (Traffic Safety Facts Research Note. Report No. DOT HS 812 662). Washington, DC: National Highway Traffic Safety Administration. [3] Akinboro, Solomon, et al. "Mobile Road traffic management system using weighted sen- sors." International Journal of Interactive Mobile Technologies (iJIM) 11.5 (2017): 147- 160. https://doi.org/10.3991/ijim.v11i5.6745 [4] Adam, Abubakar, Adamu Abubakar, and Murni Mahmud. "Sensor enhanced health infor- mation systems: issues and challenges." (2019): 99-114. [5] Si, Pengbo, et al. "DaVe: Offloading delay-tolerant data traffic to connected vehicle net- works." IEEE Transactions on Vehicular Technology 65.6 (2016): 3941-3953. https://doi.org/10.1109/tvt.2016.2550105 [6] Fu, Shu, et al. "UAV based relay for wireless sensor networks in 5G systems." Sensors 18.8 (2018): 2413. https://doi.org/10.3390/s18082413 [7] Nayak, Padmalaya, and Bhavani Vathasavai. "Energy efficient clustering algorithm for multi-hop wireless sensor network using type-2 fuzzy logic." IEEE Sensors Journal 17.14 (2017): 4492-4499. https://doi.org/10.1109/jsen.2017.2711432 [8] Wa’el Jum’ahAl_Zyadat, Faisal Y.Al-Zyoud ,and Aysh M. Alhroob, "Smooth Handoff Process Cluster_Based In Vehicular Ad Hoc Networks, " International Journal of Compu- ting Academic Research (IJCAR),ISSN 2305-9184, Volume 6,Number 3 (June2017), pp.101-109. [9] Bentaleb A., Boubetra A, Harous S., "Survey of Clustering Schemes in Mobile Ad hoc Networks, " SciRes.2013, Communications and Network, 2013, Vol. 5, pp.8-14. https://doi.org/10.4236/cn.2013.52b002 [10] Aqib M., Mehmood R., Albeshri A., Alzahrani A. (2018) Disaster Management in Smart Cities by Forecasting Traffic Plan Using Deep Learning and GPUs. In: Mehmood R., Bha- duri B., Katib I., Chlamtac I. (eds) Smart Societies, Infrastructure, Technologies and Ap- plications. SCITA 2017. Lecture Notes of the Institute for Computer Sciences, Social In- formatics and Telecommunications Engineering, vol. 224. Springer, Cham. https://doi.org/10.1007/978-3-319-94180-6_15 [11] Alzyoud F., Alsharman N., Alrusan T., and AlsalahY,"Smart Accident Management in Jordan using Cup Carbon Simulation". European Journal of Scientific Reseach, (2019), 152(2):128-135. [12] Abdulaziz Aldegheishem, Humera Yasmeen, Hafsa Maryam Munam Ali Shah, Amjad Mehmood, Nabil Alrajeh, and Houbing Song,. Smart Road Traffic Accidents Reduction Strategy Based on Intelligent Transportation Systems (TARS). Sensors, 2018. https://doi.org/10.3390/s18071983 [13] Apeksha V. Sakhare, Prajakta S. Kasbe, "A review on road accident data analysis using da- ta mining techniques", Innovations in Information Embedded and Communication Systems (ICIIECS) 2017 International Conference on, pp. 1-5, 2017. https://doi.org/10.1109/ iciiecs.2017.8275920 [14] Brincat, Alberto Attilio, et al. "The internet of things for intelligent transportation systems in real smart cities scenarios." 2019 IEEE 5th World Forum on Internet of Things (WF- IoT). IEEE, 2019. https://doi.org/10.1109/wf-iot.2019.8767247 [15] Kumar, Rakesh, and Mayank Dave. "A comparative study of various routing protocols in VANET." arXiv preprint arXiv:1108.2094 (2011). iJIM ‒ Vol. 15, No. 14, 2021 87 Paper—Adaptive Smart Traffic Accidents Management System [16] Mekki, Tesnim, et al. "Vehicular cloud networks: Challenges, architectures, and future di- rections." Vehicular Communications9 (2017): 268-280. https://doi.org/10.1016 /j.vehcom.2016.11.009 [17] Abraham, Ittai, et al. "Highway dimension and provably efficient shortest path algo- rithms." Journal of the ACM (JACM) 63.5 (2016): 1-26. https://doi.org/10.1145/2985473 [18] Alsharman, Nesreen, et al. "Machine Learning and Answer Set Program Rules towards Traffic Light Management." International Journal 9.3 (2020). [19] Sumi, L., and V. Ranga. "Intelligent traffic management system for prioritizing emergency vehicles in a smart city." International Journal of Engineering 31.2 (2018): 278-283. [20] Zhu, Huamin, and Kyung-sup Kwak. "Performance analysis of an adaptive handoff algo- rithm based on distance information." Computer communications 30.6 (2007): 1278-1288. https://doi.org/10.1016/j.comcom.2006.12.019 [21] Praveen Varshney, PK Mishra, A Mishra, and VP Singh. Tunneling-based vertical handoff in wireless heterogeneous networks. In Devices, Circuits and Communications (ICDCCom), 2014 International Conference on, pages 1–5. IEEE, 2014. https://doi.org/10.1109/icdccom.2014.7024747 [22] Likhachev, Maxim et al. “Anytime Dynamic A*: An Anytime, Replanning Algorithm.” ICAPS (2005). [23] Faisal Y. Alzyoud, Enhanced Cognitive Radio Network Approach with an Effective Au- thentication Algorithm, ICIC Express Letters, An International Journal of Research and Surveys, ISSN: 1881-803X), Volume 15, Number 2, February 2021, pp.125-134 [24] Idrissa, Kayijuka. "Mathematical Study for Traffic Flow and Traffic Density in Kigali Roads." International Journal of Mathematical and Computational Sciences 11.3 (2017): 104-108 [25] Kim, Chang Kyu, et al. "Path Planning for Automatic Guided Vehicle with Multiple Target Points in Known Environment." International Conference on Advanced Engineering Theo- ry and Applications. Springer, Cham, 2017. [26] Devaurs, Didier, Thierry Siméon, and Juan Cortés. "Optimal path planning in complex cost spaces with sampling-based algorithms." IEEE Transactions on Automation Science and Engineering 13.2 (2015): 415-424. https://doi.org/10.1109/tase.2015.2487881 [27] Elbanhawi, Mohamed, Milan Simic, and Reza Jazar. "In the passenger seat: investigating ride comfort measures in autonomous cars." IEEE Intelligent Transportation Systems Magazine 7.3 (2015): 4-17. https://doi.org/10.1109/mits.2015.2405571 [28] Karaman, Sertac, et al. "Anytime motion planning using the RRT." 2011 IEEE Interna- tional Conference on Robotics and Automation. IEEE, 2011. https://doi.org/10.1109/icra. 2011.5980479 [29] Y. Kuwata, J. Teo, G. Fiore, S. Karaman, E. Frazzoli, and J.P. How. “Realtime motion planning with applications to autonomous urban driving”. IEEE Transactions on Control Systems, 17(5):1105–1118, 2009. https://doi.org/10.1109/tcst.2008. 2012116 [30] Adiyatov, Olzhas, and Huseyin Atakan Varol. "A novel RRT*-based algorithm for motion planning in Dynamic environments." 2017 IEEE International Conference on Mechatron- ics and Automation (ICMA). IEEE, 2017. https://doi.org/10.1109/icma. 2017.8016024 [31] Kumar, Sachin and Durga Toshniwal. “Analysis of hourly road accident counts using hier- archical clustering and cophenetic correlation coefficient (CPCC).” Journal of Big Data 3 (2016): 1-11. https://doi.org/10.1186/s40537-016-0046-3 [32] P. Parida, S. Dhurua, and S. Priya, "An intelligent ambulance with some advance features of telecommunication", International journal of emerging technology and advanced engi- neering, Vol.4, Issue 10, Ocbert.2014. 88 http://www.i-jim.org Paper—Adaptive Smart Traffic Accidents Management System [33] Nguyen, Khai Tuan, et al. "Development of a smartphone application for safe car driving using Google API and built-in sensor." (2020): 178-195. https://doi.org/10. 3991/ijim.v14i02.11118 6 Authors Faisal Yousef Alzyoud is an associated professor in computer science depart- ment, Faculty of Information Technology, Isra University, Amman-Jordan. Email: faisal.alzyoud@iu.edu.jo Abdallah Altahan Alnuaimi is an associate professor in computer science de- partment, Faculty of Information Technology, Isra University, Amman-Jordan. Faiz Al Shrouf is an associate professor and a head of computer science depart- ment, Faculty of Information Technology, Isra University, Amman-Jordan. Article submitted 2020-10-08. Resubmitted 2021-05-11. Final acceptance 2021-05-14. Final version published as submitted by the authors. iJIM ‒ Vol. 15, No. 14, 2021 89