Machine Learning-Based Parameter Tuned Genetic Algorithm for Energy Minimizing Vehicle Routing Problem

During the last decade, tremendous focus has been given to sustainable logistics practices to overcome environmental concerns of business practices. Since transportation is a prominent area of logistics, a new area of literature known as Green Transportation and Green Vehicle Routing has emerged. Vehicle Routing Problem (VRP) has been a very active area of the literature with contribution from many researchers over the last three decades. With the computational constraints of solving VRP which is NPhard, metaheuristics have been applied successfully to solve VRPs in the recent past. This is a threefold study. First, it critically reviews the current literature on EMVRP and the use of metaheuristics as a solution approach. Second, the study implements a genetic algorithm (GA) to solve the EMVRP formulation using the benchmark instances listed on the repository of CVRPLib. Finally, the GA developed in Phase 2 was enhanced through machine learning techniques to tune its parameters. The study reveals that, by identifying the underlying characteristics of data, a particular GA can be tuned significantly to outperform any generic GA with competitive computational times.The scrutiny identifies several knowledge gaps where new methodologies can be developed to solve the EMVRPs and develops propositions for future research.


Introduction
Background of Research.Vehicle Routing Problem (VRP) can be described as the problem of finding optimal routes for delivery or collection from one to many depots to many customers who are geographically distributed.This problem has been the core for many operations research problems and has many variations.Later, with the focus on sustainable business practices, a novel category of VRP has emerged, known as Green VRP.In this category, the objectives are different from original VRP where it minimizes the travelled distance ultimately, thus reducing the cost.However, GVRP attempts to minimize the impact on environment of routing using different approaches [1].Energy Minimizing VRP (EMVRP) has been developed to minimize the energy consumption of a fleet while serving all the customers.It has been identified that energy consumption has a direct impact on carbon dioxide emission.
Metaheuristics are used for combinatorial optimization in which an optimal solution is sought over a discrete search space.VRP is one of the most known NP-hard problems; thus, metaheuristics have been widely used to find near-optimal solutions for VRP problems [2].
Machine learning is a subfield of computer science that evolved from the study of pattern recognition and computational learning theory in artificial intelligence.Machine learning explores the construction and study of algorithms that can learn from and make predictions on data.In this research, the intention is to use machine learning to tune the developed metaheuristics to solve the formulated routing problem [3].The overall objective of this study is to develop a set of genetic algorithms to solve the EMVRP and apply machine learning techniques to tune the developed algorithms to enhance the quality of the solutions.Energy Minimizing VRP has been formulated by Kara et al. [1] with the objective of minimizing energy consumption while serving a distributed set of customers.Though it minimizes the energy consumption, the calculated reduction of carbon dioxide emission has not been calculated; thus, the environmental sustainability of EMVRP has not been stated in the original paper.The study has used CPLEX5 for solving moderate sized problems and the computational times were not promising.It is therefore necessary to develop efficient solution procedures for the EMVRP and in this study the authors implement genetic algorithms (GAs) for the genetic EMVRP formulation.The aforementioned GA was enhanced through machine learning techniques to tune its parameters based on the underlying characteristics of the data being used.In the book Tuning Metaheuristics by Birattari [3], it has been mentioned that tuning is crucial to metaheuristic optimization both in academic viewpoint and for practical applications.Nevertheless, relatively less research has been devoted to the issue and shows that the problem of tuning a metaheuristic can be described and solved as a machine learning problem.To the authors' knowledge, this will be the first instance of machine learning being used as a mechanism to tune the domain of VRP.

Literature Review
2.1.Vehicle Routing Problem.Vehicle Routing Problem (VRP) can be described as the problem of finding optimal routes for delivery or collection from one to many depots to many customers who are geographically distributed.VRP is at the core of a huge number of practical applications in the area of transportation.It is one of the most studied classes of problems in operations research (OR) according to Gendreau et al. [4].The list of variants according to a recent survey by Lin et al. [5]

Green VRP.
Green Logistics has recently received a lot of interest from governments and business organizations.The main reason behind this is that the current logistics practices are not sustainable in the long term and sometimes in the literature there are instances where the improved performance in terms of economic performance has caused a decrease in environmental performance.A classic example can be found in the study done by Yazan et al. [6] where they reengineered the supply chain, but, however, their reengineering outcomes seem to have been unsuccessful with regard to CO 2 emission, since CO 2 emission has been increased after the study, and this shows reengineering failure in environmental sense, although the economic performance has been increased by reengineering the system.With these reasons, the focus is automatically given to sustainable transportation practice which is generally known as Green Transportation.Björklund [7] defines "Green Transportation" as "transportation service that has a lesser or reduced negative impact on health and natural environment when compared with competing transportation services that serve the same purpose."Under this category, a subcategory has been defined as "Green Vehicle Routing Problems" and they are characterized by the objective of harmonizing the environmental and economic costs by implementing effective routes to meet the environmental concerns and financial indexes [5].The importance of Green VRP is characterized mainly by CO 2 emission by vehicles since they are one of the prime consumers of petroleum products.The sector contributes to 15% of overall greenhouse gas (GHG) emissions and 23% of overall CO 2 emissions, which is the highest found GHG [8].The different variants of Green VRP have been introduced to the literature which have various objectives to support sustainable VRP.Those can be listed as Pollution Routing Problem (PRP), Green Vehicle Routing Problem (GVRP), and VRP in Reverse Logistics (VRPRL) [5].

Energy Minimizing Vehicle Routing Problem.
Under the GVRP aimed problems, one problem introduced in 2007 by Kara et al. [1] is Energy Minimizing VRP (EMVRP).EMVRP has been identified in the survey by Lin et al. [5] under the category of GVRP.The objective of EMVRP is to reduce the energy consumption and energy has been justified to be the product of distance travelled by the load of the vehicle.Concretely, EMVRP aims at minimizing the sum of the product of load and distance for each arc.However, in the original paper, the authors have not justified the CO 2 emission reduction of EMVRP.Furthermore, the problem has been solved using CPLEX 8.0 for small sized instances and it is mentioned that the CPU times over moderate sized problems have not been optimized.Thus, this raises the need for developing efficient heuristics for solving moderate and large instances.
EMVRP is mathematically formulated first by Kara at el. [1] as in the following: Constraints are as follows: The cost of traversing an arc (, ) is the product of the distance between the nodes  and  and weight on this arc.Constraints (2) and (3) ensure that  vehicles are used.Constraints (4) and ( 5) are the degree constraints for each node.Constraint (6) is the classical conservation of flow equation balancing inflow and outflow of each node, which also prohibits any illegal subtours.Constraint (7) initializes the flow on the first arc of each route; the cost structure of the problem necessitates such initialization.Capacity restrictions are considered and force   to zero when the arc (, ) is not on any route.Then, the constraint produces lower bounds for the flow on any arc.

Metaheuristics for Solving VRP.
Metaheuristics are categories of heuristics used for solving optimization problems, mostly NP-hard problems, which cannot be optimally solved within feasible time.Lenstra and Kan [9] have shown that all the Vehicle Routing Problems are NP-hard and cannot be solved in polynomial time.In the literature, there are many instances where metaheuristics have been applied to solve VRP.Among them, the most applied path-based and population-based metaheuristics can be selected using the categorized bibliography done by Gendreau et al. [4].

Genetic Algorithm (GA).
Genetic algorithms (GAs) are adaptive methods which may be used to solve a wide variety of optimization problems.They are based on the genetic processes of biological organisms.Over many generations, natural populations evolve according to the principles of natural selection and "survival of the fittest."By mimicking this process, genetic algorithms are able to "evolve" solutions to real world problems, if they have been suitably encoded.
The basic principles of GAs were first laid down rigorously by Holland [10].GA is more applicable for solving an optimization problem where the optimum result is derived from a large random dataset like the scenario in the research problem.

Machine Learning for Metaheuristics.
Machine learning is an area of computer science that evolved from the study of pattern recognition and computational learning theory in artificial intelligence.It explores the construction and study of algorithms that can learn from and make predictions on data.When metaheuristics are developed, the algorithms can be tuned for better performance (Birattari [3]).Each metaheuristic has already set parameters that have to be initialized before the execution of the algorithm.The metaheuristics adaptation requires the adjustment of these parameters according to the problem at hand.This is known as parameter tuning.An appropriate initial parameter setting has a noteworthy impact on the solving progress, such as the exploitation or exploration rate of the search space, and therefore the quality of the solution [11].Tuning metaheuristics using machine learning techniques is a novel approach and there is not much literature on the area.

Methodology
3.1.Research Approach.In the first phase of the study, Green VRP methodologies will be systematically reviewed to identify important characteristics of problem solving methodologies [12].In the second phase of the study, GA-based metaheuristics are developed to solve the routes which minimize the energy consumption of a vehicle fleet while serving a set of customers.In the third phase, the applicability of machine learning techniques for parameter tuning of metaheuristics will be tested (Figure 1).
Phase 1: Systematic Review of the Literature.During this phase, a thorough review of the literature on the Green VRP problem formulations and solving methodologies was carried out.The knowledge gathered from the systematic review is intended to be used for identifying and justifying the metaheuristics to be used in solving the EMVRP.
Phase 2: Development of the GA.With the knowledge gathered from Phase 1, a genetic algorithm will be developed to solve the EMVRP.Design of experiment (DOE) will be carried out to identify the parameters and the levels for each parameter to reduce the bias.The data for the algorithms will be obtained from CVRPLib [13], an online benchmark repository of VRP instances.CVRPLib contains data that is prominently used in VRP literature with number of cities or customers that request goods to be delivered to them and the location and the size of the demand.
Phase 3: Development of the Parameter Tuned GA Using Machine Learning Techniques.The GA's parameters will be tuned using clustering techniques based on the inherent characteristics of the data being used.The tuned GA will be compared with results from untuned GA from Phase 2.
Recommendations will be drawn for using machine learning as a mechanism for parameter tuning within the context of VRP.

Data Collection.
The data required for the execution of algorithms will be acquired from CVRPLib: a Vehicle Routing Problem library available online at http://vrp.atd-lab.inf.pucrio.br/index.php/en/.This is a prominently used library used in many research studies found in the literature.These data files include collection of cities to be served with  and  coordinates, required demand for each city, and the capacity of the vehicle.

Parameter Tuning Using Machine Learning.
Tuning is crucial for metaheuristic optimization from both academic and practitioners' standpoint.Nevertheless, relatively less research has been devoted to the issue.Using the machine learning perspective, it is possible to give a formal definition to tuning of an algorithm.

Implementation
4.1.Problem Definition.In this section, the problem formulation of EMVRP has been described.The idea of EMVRP is stated in the study by Kara et al. [1].Some important assumptions of this problem formulation are as follows: (1) A vehicle can only carry a load which is less than its capacity.
(2) When loading a vehicle, the cumulative demand required by the cities that the particular vehicle will serve needs to be considered.This is important because if not, a vehicle might bring back the left carriage in its return trip back to the depot.
(3) There is only one depot.
(4) The demands and capacities are measured using the same measurement.
(5) The weight of the vehicle is not considered since it will be the same over the fleet.
Figure 2 illustrates the above statements in a diagram.
A, B, C, and D are cities that need to be served with demands of 100, 100, 50, and 100, respectively.The maximum capacity of the vehicle is 200.In the first trip (or first vehicle) which will serve A and B, the vehicle will be loaded with 200 considering demands of A and B and after serving it will return back to the depot.And in the second trip (or second vehicle), it will be loaded with only 150 considering that it has to serve C and B where cumulative demand is 150 and after serving it will return back to the depot.

The Proposed GA.
The implementation of the GA uses a fully object oriented design as there are three models: city, tour, and population.The implementation of GA is shown in Algorithm 1.

Parameter Tuning of Metaheuristics Using Machine Learning.
GAs need to be parameter tuned for better performance [3].The main parameters considered in this study are mutation rate, size of the population, and number of generations.Larger sizes of the population and number of generations are deemed to yield better results as this will increase the scope   of the search paradigm.However, the optimum setting for the rate of mutation cannot be identified without a scientific approach.In this study, -means clustering algorithm from the machine learning literature has been used as a mechanism to tune the developed metaheuristics.-means is one of the widely used unsupervised learning algorithms which solves the well-known clustering problem.For this purpose, a customized -means clustering algorithm has been developed to read the data files from the CVRPLib and cluster them using the total accumulated demand of the cities and total number of cities to be served.Then, different mutation rates have been applied for different clusters of the data files and the energy minimization percentages are calculated.The hypothesis is as follows: different mutation rates work better on different clusters of CVRPLib.Detailed description of this experiment is elaborated in the next section along with the DOE.

Results
As mentioned in a previous section, the data for the experiment is taken from CVRPLib.In particular, the dataset used is from Uchoa et al. [13].This repository contains 100 data files with the number of cities and various demands required by each city.All the experiments are carried out using a single computer with the following features and configurations.

Pen and touch: No pen or touch input available for this display
To analyze the performance of GA, the experiment has been designed for the selected 100 data files (Table 1).
Note that these mutation rates, size of the population, and number of generations are the most widely used values found in the literature.The outcome of GA is energy reduction percentage compared to initial energy consumption of the tour.This is calculated as   2 using any mutation rate with number of generations = 100, the energy reduction percentage is greater than 20%.The best energy reduction is achieved when the mutation rate is at 0.0025.The average computational time taken for all the 100 files is shown in Table 2.

Analysis of Results of the Developed GA for EMVRP. As depicted in Table
As depicted in Table 2 using any mutation rate with number of generations of 1000, the energy reduction percentage is greater than 30%.The best energy reduction is achieved when the mutation rate is at 0.001 which is very promising being more than 50%.The computational time for all the 100 files is less than seven minutes.Therefore, it is around 4 seconds per file which is very much promising.To identify whether the differences between the averages with the changes in the mutation rates were significant, statistical analyses were carried out using the Freedman test.

Hypotheses
Null Hypothesis  0 .Means of minimized energy percentage for different mutation rates are the same Alternative Hypothesis  1 .Means of minimized energy percentage for different mutation rates are not the same.
The  value = 0.000 <0.05 and we reject the null hypothesis and post hoc analysis has been carried out on the detailed dataset (Table 3) to determine which mutation rate has the highest mean percentage of reduction in energy.
According to the box and whisker plot, mutation rate of 0.0025 is showing the highest mean value; hence, it can be concluded with 95% confidence interval that 0.0025 will generate better energy reductions for EMVRP when using population size of 50 and generations size of 100 (Figure 3).

Analysis of Performance of Parameter Tuned GA.
As mentioned in the previous section, before applying the developed genetic algorithm, data on the CVRPLib has been clustered using -means clustering algorithm into three clusters (Cluster 0, Cluster 1, and Cluster 2).The idea of clustering is to check the impact of characteristics of data on parameter tuning of the GA.The parameter considered for tuning is the rate of mutation.As for the experimental study, the 100 files used in the earlier experiment have been used.The clusters are created using number of cities to be served and total accumulated demand of a particular tour.To analyze the performance of GA on different clusters of data, the design of experiment has been utilized (Table 4).
The rationale behind the experiment in Table 4 is to assess whether there is a significant difference among the reductions of energy percentages when the mutation rate is changed.

Results of CVRPLib Data Cluster 0
Null Hypothesis  0 .Means of minimized energy percentage for different mutation rates are the same.Alternative Hypothesis  1 .Means of minimized energy percentage for different mutation rates are not the same.
The  value = 0.000 <0.05 and we reject the null hypothesis and post hoc analysis has been carried out on the detailed dataset (Table 5) to determine which mutation rate yields the highest percentage in reduction of energy.
According to the box and whisker plot, mutation rate of 0.05 is showing the highest mean in the percentage reduction in energy.Hence, it can be concluded with 95% confidence interval that 0.05 generates better energy reductions for Cluster 0 (Figure 4).

Results of CVRPLib Data Cluster 1
Null Hypothesis  0 .Means of minimized energy percentage for different mutation rates are the same.Alternative Hypothesis  1 .Means of minimized energy percentage for different mutation rates are not the same.
The  value = 0.000 <0.05 and we reject the null hypothesis and post hoc analysis has been carried out on the detailed dataset (Table 6) to determine which mutation rate has the highest mean.
According to the box and whisker plot, mutation rate of 0.0025 is showing the highest median value; hence, it can be concluded with 95% confidence interval that 0.0025 will generate better energy reductions for Cluster 1 (Figure 5).

Results of CVRPLib Data Cluster 2
Null Hypothesis  0 .Means of minimized energy percentage for different mutation rates are the same.
Alternative Hypothesis  1 .Means of minimized energy percentage for different mutation rates are not the same.The  value = 0.000 <0.05 and we reject the null hypothesis and post hoc analysis has been carried out on the detailed dataset (Table 7) to determine which mutation rate has the highest mean.
According to the box and whisker plot, mutation rate of 0.001 is showing the highest mean value; hence, it can be concluded with 95% confidence interval that 0.001 will generate better energy reductions for Cluster 1 (Figure 6).
From the results obtained for these three clusters, it has been significantly shown that mutation rates will work best for particular clusters shown in Table 8.
These results depict the importance of identifying and using different parameter settings when designing GAs to solve EMVRP instances which have different characteristics.
As it has been noted in first set of results obtained just using the GA, the best mutation rate has been 0.001 for any problem instance.However, when CVRPLib data was clustered into three distinctive clusters and extensive parameter tuning was carried out, the best mutation rates were different.Thus, it can be concluded that machine learning techniques such as clustering have improved the solution quality immensely compared with a generic untuned GA.

Conclusions
This study adds new knowledge to the VRP literature in several ways.Initially, the systematic review which was carried out on the problem solving methods of Green VRP can be seen as the first study to focus on that segment.Then, developing two classes of GAs to solve the EMVRP using the CVRPLib data repository can be seen as another.The EMVRP is the problem which looks at finding routes of vehicles which use the least amount of energy when serving a set of cities or customers.In EMVRP, the energy is generalized to be equal to a function of load and distance.As the first instance of using metaheuristics for EMVRP, untuned and tuned genetic algorithms have been developed and detailed analyses have been carried out through rigorous data analyses.The developed algorithms have been proven to generate competitive solutions within reasonable computational times as depicted in the analyses.Further, this study looked at the GA parameter tuning as a prominent design aspect in coming up with flexible and adaptive GAs which are highly dependent upon the inherent characteristics of problem instances.The authors have utilized different mutation rates to improve the performance of the GAs using a very novel approach of applying -means clustering, the machine learning technique.It has been proved that identifying different clusters within data has a significant impact on improving the performance of GA.
The following highlights the contributions made through this study: (1) A systematic review of the literature on the Green VRP solving methods (2) First instance of solving EMVRP using genetic algorithms (3) First instance of the applicability of machine learning techniques for parameter tuning of metaheuristics This study can be further worked on by relaxing the assumptions considered in EMVRP formulation with the use of heterogeneous vehicles, considering the actual weight of the vehicle and continuous loads.Furthermore, by developing a pathbased metaheuristic such as Tabu search to solve EMVRP and comparing its performance against the population-based GAs, this study can be easily extended by developing a more realistic cost function to reduce the energy.Finally, researching the applicability of other machine learning-based mechanisms to augment metaheuristics would be another interesting and important research area for future research.

Figure 1 :
Figure 1: Flow diagram of the research study.

Figure 2 :
Figure 2: Overview of a trivial problem instance.

Figure 3 :
Figure 3: Box and whisker plots of untuned GA.

Table 1 :
Design of experiment (DOE) for the genetic algorithm.

Table 2 :
Results of the genetic algorithm.
* Best energy reduction percentage.

Table 3 :
Detailed results of the GA.

Table 4 :
Design of experiment of tuned GA with CVRPLib data clusters.

Table 5 :
Average percentage of reduction of energy for Data Cluster 0.

Table 6 :
Average percentage of reduction of energy for Data Cluster 1.