RETRACTED CHAPTER: Optimization of Driving Efficiency for Pre-determined Routes: Proactive Vehicle Traffic Control

With the excessive growth of modern cities, great problems are generated in citizen administration. One of these problems is the control of vehicle flow during peak hours. This paper proposes a solution to the problem of vehicle control through a proactive approach based on Machine Learning. Through this solution, a traffic control system learns about traffic flow in order to prevent future problems of long queues at traffic lights. The architecture of the traffic system is based on the principles of Autonomous Computing with the aim of changing the traffic light timers automatically. A simulation of the roads in an intelligent city and a Weka-based tool were created to validate this approach.


Introduction
The potential benefits of IoT are becoming increasingly apparent, including apps that are changing lifestyle current. The IoT paradigm proposes a scheme where many objects that surround us will be in the same network in one way or another using sensors to monitor physical or environmental conditions [1]. With the increasing presence of new technologies with internet access, the evolution towards ubiquitous information networks is evident. However, for this to be possible, the informatics paradigm must go beyond the traditional mobile network scenarios, which use smartphones and laptops; evolving into an environment surrounded by smart objects interconnected with each other.
IoT is a vital instrument in which the interconnection of devices; which will have great potential to optimize all kinds of mobile systems. IoT will allow the vehicle networks of the future to replace their current traffic control systems, thus evolving into a system that will use the available information from the medium provided by the sensors; which will The original version of this chapter was retracted: The retraction note to this chapter is available at https://doi.org/10.1007/978-981-15-6648-6_28 be interconnected with each other. IoV (Vehicle Internet), is the inevitable convergence between the mobile Internet for vehicles and IoT. When in a vehicular network human control is removed by autonomous vehicles; they cooperate efficiently thus controlling the flow of traffic on the roads [2]. Visionaries predict that autonomous vehicles behave much better than human drivers, which will allow controlling more traffic in less time, producing less pollution and generating greater comfort for passengers [3]. However, the complexity of communicating hundreds of cars and their need to communicate with each other brings multiple challenges for communication networks.
There is an exponential growth in the population of cities turning them into mega cities. This phenomenon generates many problems, one of which is traffic congestion [4]. This problem negatively affects the quality of life of citizens by the increasing of travel time, generating stress and economic losses, and producing an increase in environmental pollution.
Currently, fixed time strategies and traffic sensitive strategies have been implemented to manage vehicle flow. These strategies are presented below.
Fixed time strategies are adjusted for long periods of time where these parameters are constant. This may therefore be different in contexts with demands of high variability or with the usual presence of unconventional conditions (e.g. accidents, disturbances, or unexpected events) [5].
Within this category is SIGSET, which calculates the time of the traffic light in each cycle, based on the vehicle flow patterns at a crossing. This system is a well-known by traffic engineers [6]. SIGSET works in isolation at each crossing and assigns fixed times to the traffic lights.
Traffic-sensitive control strategies execute their logic based on real-time traffic measurements taken at intersection entrances. To carry out these measurements, it is necessary to have some kind of traffic detectors.
Within the traffic-sensitive methods there are two reactive methods that solve problems when they are already evident. On the one hand, there are approaches that detect the presence of a lot of traffic at an intersection and modify the times of the traffic lights to give preference to the direction with the most traffic. On the other hand, other solutions are adaptive. In these solutions, traffic light networks are implemented with action plans for the optimization of vehicle flow [7].
This approach depends on a central control module. This study proposes that a more decentralized approach could be used to distribute the calculations where the traffic passes by [8][9][10]. In this way, the costs and complexity related to the communication infrastructure could be reduced.

Underlying Concepts
The solution proposed in this research is intelligent, autonomous, and proactive. These underlying concepts are described below.

1) Machine Learning
Machine Learning is a term used to encompass a wide variety of techniques applied to discover patterns and relationships in data sets. The primary objective of any Machine Learning algorithm is to discover significant relationships in training data sets and to produce a generalization of these relationships that can be used to interpret new unknown data [11].
Within the Machine Learning methods are forecasts. Forecasting is the process of making statements about events whose results have not yet been observed [12].
On the one hand, reactive adaptations are made in response to an incident. On the other hand, proactive adaptations are carried out beforehand (i.e. before an incident negatively affects the system) [14]. Reactive adapting mechanisms can cause increased run time and financial loss, which can lead to user dissatisfaction [15]. Proactive approaches seek to address these problems by identifying the need for adaptation before the problem becomes apparent.

The Problem
This section presents the problem statement and justification.

1) Statement of the problem
The common denominator of the solutions currently implemented for traffic control in intelligent cities is that they wait for an event to happen (e.g. a long queue at a traffic light) to generate a solution to that event.

2) Justification
This section presents a simulation of the roads in a city that justifies the traffic problem. This simulation consists of a unidirectional two-way vehicular crossing. In order to simplify the simulation, the traffic lights only change between green and red lights.
On a road, the speed of vehicle flow is determined both by the regulations in force and by the existing intersections. Congestion at a traffic light occurs when the traffic light allows fewer vehicles to pass than the number of vehicles that reach the queue. In the simulation, each traffic light was assigned a time value "x" for each stage (red or green). It was also determined the average time it takes for vehicles to cross the intersection ("y"). Based on this data, the number of cars that cross the traffic light when it is green was calculated. A random value for the incoming flow was also assigned to the queue at the "i" traffic light.
As shown in Fig. 1, the number of vehicles tends to increase linearly over time. In this simulation, this trend was generated when "x" takes a value equal to 15 s, "i" has values between 0 and 9, and "y" is equal to 3 s.

Objective
This paper presents a proactive solution for vehicle traffic control using Machine Learning and Autonomous Computing. Firstly, the proposal analyses traffic level data using Machine Learning. Using this artificial intelligence technique, the system makes proactive decisions regarding historical traffic data. In order to make autonomous adjustments to traffic lights, the system adapts itself using IBM's autonomous computing principles [16]. The efficiency of this solution is demonstrated by a traffic simulation in a smart city. To predict the problems that may occur, the tool relies on the Weka API [17].

Questions and Hypotheses
Can Machine Learning help make proactive decisions to avoid traffic flow problems?
Can a system based on the principles of Autonomous Computing be used to automatically change the timers of the traffic lights?
Is it possible to test an automatic and proactive traffic management approach using a computer simulation?
The following hypothesis arises: The use of Machine Learning and Autonomous computing can proactively solve problems in vehicle traffic control.

The Method
The solution is based on the ASM-K cycle (see Fig. 2). In the Monitor component, a training period is considered for collecting the traffic data by means of sensors. The task of traffic observation is carried out by the Traffic Observer. The Traffic Watcher is also in charge of detecting times when there is a violation of any expected Service Level Agreement (SLA) of traffic in queue. Then, after the training is completed, Weka's prediction plug-in analyzes the data collected in the Analysis component and predicts possible traffic problems [18]. The Adaptive Planner in the Planning component then calculates the necessary changes to traffic light timers in order to proactively prevent traffic problems. After planning, in the Execution component, the Timer Modifier makes the necessary changes to the traffic light timers using actuators. This solution is described below, based on the components of the ASM-K cycle and the traffic simulation described above.

The Monitor
Monitoring involves capturing properties of the environment that are important to the system's self-properties. In this case, it is interested in traffic observation. For this purpose, the Traffic Observer is proposed, which is a tool that observes the traffic through sensors.
When the simulation starts, two traffic lights are created, and each of them is assigned a status (Green or Red) and a random number of vehicles. The preventive stage (yellow) of a traffic light was included in the crossing phase (green). This is for simplifying the simulation.
Files with the .arff extension have the format necessary to be able to run forecasts on this data according to the Weka libraries. Specifically, the .arff file format requires the data to have a special header, as in the following example [19]: @relation A @attribute seconds numeric @attribute cars numeric @data 85,14 First, there is a data relationship (@relation A), and this relationship has two attributes, both of a numerical type: seconds (@attribute seconds numeric) and cars (@attribute cars numeric). After this, the data of the problem event (i.e., an SLA violation) is recorded (@data). In the example above, there is a violation of the SLA in the second 60th execution of the simulation where there are 7 cars in the queue, when the SLA indicates that no more than 3 cars should be in the queue.

Analysis
From the methods to make predictions [20], the Multilayer Perceptron was chosen in this study due to the lower percentage of error shown after testing with the different methods present in Weka (Gaussian Process, Kernel Regression, Linear Regression, Multilayer Perceptron, and SMOreg).
For the Forecaster to work, the following parameters are provided: type of data to predict, time measurement of training data, and the number of times to predict. In this case, the Forecaster predicts the number of cars that will arrive at the traffic light after training by following the time measurement of the training data. The data that the Forecaster generates is stored in a text file.
For example, a possible training (i.e., observing the traffic in the simulation for a certain time) was completed in the 1,800th second of the execution. During this time, 25 SLA violations were found. This data is used to make the prediction. Specifically, Forecaster predicts that if the current timer value of any traffic light continues, a greater number of cars than specified in the SLA will arrive at the 1,800th second. By means of the forecasting, it is possible to predict a problem that has not yet happened, based on historical data.

Planning
During this phase, after the previous training, the planning of automatic solution of traffic problems predicted in the previous phase is carried out. Specifically, in this phase, the times that traffic lights must take to prevent the predicted problems are calculated.
During the planning phase, the file created in the Analysis component is read. Every entry in this file is a problem to be solved (e.g. any SLA violation). In this phase, the Adapting Planner is proposed as a tool that executes the following steps to plan a change in the traffic light timer: 1) The Adapting Planner saves, in a variable, the text retrieved from the previous phase file.
2) The Adapting Planner performs the following operation [21][22][23][24][25]: "d" is the value read in step 1. "tCross" is the average time a vehicle takes to pass the crossing. "timeR" is the new traffic light time. The result of the operation is transformed into integer data type. 3) The value of "timeR" corresponding to the solution to a problem (i.e., any SLA violation) is saved. For example, when applying the previous formula, if a vehicle takes 3 s to pass the intersection (tCross) and 35 cars are expected to reach the traffic light (d), then 105 s (timeR) are needed for the 35 cars to pass the intersection. Each of the values calculated in this phase corresponds to the solution of each of the problems foreseen in the Analysis phase [26][27][28][29].

Execution
In it, the purpose is to ensure that the predicted problems do not occur. In order to make these changes, the operation of actuators was simulated, whose objective is to take the new traffic light time from the data generated in the previous stage, and modify the traffic light timer. For example, in the Planning phase it was obtained that 105 s are needed for 35 cars to pass the intersection. Therefore, at this stage our Timer Modifier assigns a time of 105 s to the traffic light timer. This way, when 35 cars reach the traffic light, it gives enough time to allow all of them to pass.

Results
This section describes the prototype that was created to demonstrate the approach. The prototype was created in Java and the Weka API can be used via Java [30]. The source code is presented in the Appendix at the end of this document.
The prototype GUI is divided into three areas (see Fig. 3). Area 1 shows the conditions under which traffic control is performed. Specifically, the time of the red lights, the time of the traffic simulation, the time of the crossing, and the expected SLA are determined. The text fields in Area 2 show the events where the SLA was violated at each of the traffic lights. The first column is the time in seconds that the event occurred (i.e., the SLA violation) and the second column is the number of cars with which the SLA was violated. Area 3 shows the number of times the SLA was exceeded at each traffic light before and after the implementation of Machine Learning.
The prototype is trained with the values set out in Sect. 1 of Fig. 3. In the execution, it was noted that, during the data capture for training, the number of times the SLA was violated is quite high at each traffic light (e.g. 59 violations for traffic light A and 57 for B). Then, by implementing Machine Learning with forecasts, the number of SLA violations drops dramatically (17 violations in A and 26 in B). Figure 4 shows that, with the implementation of Machine Learning, the trend of increasing number of vehicles waiting at a traffic light decreases abruptly. The implementation of Machine Learning

A P T E R
occurs at the 1,800th s. From this moment on, it is possible to see that the number of incidents in the SLA keeps at a quite low level [31].

Conclusions
Quite promising results were obtained by using Machine Learning and Autonomous Computing through the MAPE-K cycle in a tool for vehicle traffic control. The use of these approaches could alleviate congestion in cities in a proactive way, i.e. even before the problem becomes apparent. A proactive solution to traffic control was proposed in this study through the use of Machine Learning and the principles of Autonomous Computing. Since this solution is completely autonomous, it can minimize the factor of human error when controlling events on the traffic. So, the objectives proposed in the research were fully covered.
The proposal offers the following benefits for the development of mega-cities: 1) avoid economic losses by allowing a shipment or a worker to arrive in the shortest possible time at its destination. In a traffic jam, vehicles must move very slowly and be braking continuously. This means an increase in the change of worn parts and a greater expenditure of gasoline; 2) reach a more constant vehicle flow thus decreasing the time a vehicle is on the road; 3) increase the work performance of the citizen by improving punctuality in their daily commitments by moving faster; 4) decrease the

A P T E R
emission of environmental pollutants (CO2) by keeping a vehicle running for less time; and 5) decrease the number of vehicle accidents at peak hours. These accidents can be caused by the stress caused by traffic jams [32][33][34][35].
The solution proposed must be extended to control more than one crossing. At the moment, it only works at one crossing. In addition, in order to validate the solution, it is necessary to have real environments for testing purposes. This aspect will lead to seeking partnerships with the government to test the real-world approach. In order to extend this research, links should be built with European projects focused on smart cities.
Future studies will include the implementation of computer vision module for live traffic control through traffic cameras. It will also seek to develop a mobile application through which the user can make queries about the traffic status and find the most optimal route between the starting point and the destination point obtaining real-time data directly from the central vehicle control system.