2012 International Conference on Computer & Information Science (ICCIS)
Using Genetic Algorithm in Implementing Capacitated Vehicle Routing Problem Mazin Abed Mohammed1, Mohd Sharifuddin Ahmad 2, Salama A. Mostafa2 1 College of Computer, University of Anbar, Anbar, Ramadi 2 College of Graduate Studies Universiti Tenaga Nasional, Kajang, Selangor
[email protected],
[email protected],
[email protected]
AbstractVehicle Routing Problem (VRP) has been considered as a significant segment in logistic handling. Thus, a proper selection of vehicle routes plays a very important part to ameliorate the economic benefits of logistic operations. In this paper, we consider the application of a Genetic Algorithm (GA) to a Capacitated Vehicle Routing Problem (CVRP) in which a set of vehicles with limits on capacity and travel time are available to service a set of customers and constrained by earliest and latest time for serving. The results of our test show that GA is able to determine the optimum route for the vehicles while maintaining their constraints of capacity and travel time. Keywords-Genetic Algorithm (GA); Vehicle Routing Problem (VRP); Capacitated Vehicle Routing Problem (CVRP); optimal route
I.
INTRODUCTION
Vehicle Routing Problem (VRP) [1, 2] has been considered as a significant segment in logistic handling. Thus, a proper selection of vehicle routes is extremely important to ameliorate the economic benefits of logistic operations. The VRP is wellknown for one of the difficult tasks in operation research. It is a NP-hard optimization problem, which means that no fast algorithm exists for its solution [3]. This problem has many applications in real life such as collection and delivery of goods, school bus routing, street cleaning, waste collection, dial a ride systems, transportation of handicap people, and routing of salespeople. The problem can be described as finding an optimum route for a set of vehicles, which have limited capacity and travel time and must serve a set of customers once in its expedition. There are many different types of vehicle routing problem according to variants of constraints, for instance the vehicle routing problem with time windows (VRPTW), the multi-depot vehicle routing problem (MDVRP), the capacitated vehicle routing problem (CVRP), the site dependent vehicle routing problem (SDVRP), the open vehicle routing problem (OVRP), pickup and delivery vehicle routing problem (PDVRP), timedependent VRP (TVRP), and periodic VRP (PVRP). While these problems have been studied extensively by many researchers, the best known problems are the VRPTW, PDVRP and CVRP [4].
978-1-4673-1938-6/12/$31.00 ©2012 IEEE
The Capacitated Vehicle Routing Problem (CVRP) was rst introduced by Dantzig and Wright in 1959 [5] but then it was originally proposed for modelling network problems with deterministic variable. However, in many situations of real world applications, additional parameters need to be considered, e.g. travel cost, customers demands, and customers locations [6]. Several methods have been developed to solve the problem of vehicle routing. Toth and Vigo [7] grouped these methods into three groups, namely exact method, heuristics method and meta-heuristic method. Exact method guarantees to give optimal solution but is not effective for large case of CVRP whereas heuristic and meta-heuristic methods cannot guarantee to obtain optimal solution but easier to be implemented in real-life [8]. Meta-heuristics provides solution procedures that often embed some standard route construction and improvement of heuristic methods in exploring the solution space to identify good solutions [9]. Researchers have developed many metaheuristic techniques to obtain a near-optimal solution for VRP. These include Genetic Algorithm (GA), Ant Colony Algorithm (ACA), and Particle Swarm Optimization (PSO). Some superior meta-heuristic methods have recently been developed and GA has been proven to be capable of solving the CVRP [8, 10]. Resolutions to the VRP and CVRP use the same approach and the only difference is that in CVRP the vehicle capacity is limited. The classic version of the CVRP requires that all information about customer demands is known in advance, the vehicle fleet is homogeneous originating only from one depot, and each order cannot be divided or served using two or more vehicles. The objective of both VRP and CVRP is to minimize the total travel cost. The CVRP is equivalent to the VRP only if the total of all customer demands for each route does not exceed the vehicles capacity. The VRP is dynamic if the capacity of each vehicle is not limited to take in new demands [11]. The VRP in general is one of the most challenging problems that attracted much attention and commanded a lot of studies. It has many applications in real life and finding an optimal solution to it is an on-going endeavour.
[ 257 ]
2012 International Conference on Computer & Information Science (ICCIS)
II.
OBJECTIVES
The aim of this research is to find an optimal solution for Capacitated Vehicle Routing Problem (CVRP) by using Genetic Algorithm (GA). We propose the following objectives to successfully achieve the aim of the research. 1.
To propose a solution for CVRP based on GA.
2.
To implement the proposed algorithm to be used in solving CVRP for optimizing shuttle vehicle services and similar problems.
3.
To minimize the distance and the time for all the assigned routes of the CVRP which lead to the speedy transportation to the target locations. As a result transportation costs such as fuel consumption as well as the vehicle maintenance expenses are reduced. III.
LITERATURE REVIEW
Since the introduction of VRP by Dantzig and Ramser, it has aroused the interest of many researchers to study this problem. Many methods and search algorithms have been developed for the VRP, from exact algorithms to heuristic search to meta-heuristic. In traditional heuristic search, the goal is basically to get an acceptable solution quickly, and subsequently develop the solution. Researchers have developed many algorithms to resolve this problem. The more significant ones include GA, Tabu Search, Saving Algorithm, Sweep Algorithm and Simulated Annealing which are based on two main principles: local search and population search. In local search, the algorithm moves from one solution to another within a set of candidate solutions until an optimal solution is found or the time for search expires. The bestknown algorithms of this type are Tabu Search and Simulated Annealing. In population search, a set of possible parent solutions are generated and recombined during several operations (crossover, mutation, selection) to get feasible and good solutions. The well-known algorithms of this type are GA and Adaptive Memory Procedures (AMPs) [12]. Because of the importance of the VRP, recently, researchers either developed new algorithms or experimented the discovered ones to solve it. Others try to improve the existing algorithms either by improving their operators or by proposing different combinations of them. Recent researches in intelligently solving VRP and CVRP are summarized in the following paragraphs. Wang et al. [13] used the GA to solve the VRP and improved the mutation operator and the coding scheme of the algorithm when using natural number. They used the natural numbers to represent the chromosome which represents the routes. Subsequently, they generated the populations by applying the crossover operations, as well as two operators of mutation. The first operator is an improved reversion mutation operator and the other is the gene exchange mutation operator. They used the optimization preservation strategy to avoid the loss of the optimized individual, where the best individual is used instead of the worst one. Subsequently, they showed that their improved genetic algorithm shortened the coding length and enhanced the solving efficiency.
[ 258 ]
Yueqin et al. [14] used GA to solve the VRP with different constraints. They presented a new method (i.e. Finite Automaton) to generate individual population and suggest a new way enlightened by hermaphrodites. Additionally, they defined the chromosome as a string of customers representing a vehicle route, and its fitness is determined by the individuals distance, the number of customers, and the total quantity dispatched by the vehicle. They considered the central depot as a customer, since all routes start and end on it. In the selection stage, they proposed a new strategy that selects pairs of chromosomes from the same individual to crossover, from which the poorest quality in the chromosome is picked out and removed at random from the chromosome and then destroyed. Tasan et al. [15] propose GA to solve VRP with simultaneous pick-up and deliveries. This type of VRP is an extension of the CVRP where fleet of vehicles is originated in a depot to serve customers with the consideration to reverse logistics activities. The proposed algorithm is applied to computational example with parameter settings for illustration purposes. The performance of the algorithm is tested in different VRPs and the results are evaluated. Niazy and Badr [16] studied the utilization of the Cellular Genetic Algorithm (CGA) in solving the complexity of CVRP with the goal of minimizing the total distances. CGA is a subclass of GA where the population range and exploration are enhanced. They compare the behaviour of the algorithm in contrast to the solution quality, implementation time and evaluations iteration. Their study shows that the CGA is capable of consistently finding reasonable solutions to the CVRP in an acceptable time. In addition, they conclude that, the CGA is more exploitative than GA and the latest is capable of finding the solution to most CVRP instances with lesser evaluations iteration but with lower hit rate. Some examples of researches that proposed Ant Colony Algorithm (ACA) in solving VRP and CVRP are [17], [18] and [19]. Lopes et al. [17] presented an ACA to solve the CVRP. They proposed two levels of optimization: the first level searches for desired routes and the second one optimizes each route as a travelling salesman problem. They showed that their research results are good for small instances. Kuske et al. [18] built an optimized model of ACA to solve the capacitated vehicle routing problem as a community of autonomous units. They modelled the autonomous behaviour of every ant as an autonomous unit which reacts independently in a general environment while searching for a goal. Their research results showed that the autonomous units enhance ant colony optimization algorithms. Finally, [19] try to overcome some of the disadvantages of ACA in CVRP domain. They modify ACA pheromone evaluation model in such a way that can avoid its premature convergence to improve its performance. Cordeau et al. [20] explored the Tabu Search heuristics which are used to solve the vehicle routing problem, and explained their features such as neighbourhood structures, short term, and long term memory. They applied different type of techniques such as self-adjusting parameters, ejection chains, continuous diversification and adaptive memory. The Tabu Search is adopted due its accuracy, speed, simplicity, and flexibility.
2012 International Conference on Computer & Information Science (ICCIS)
In many cases of VRP, hybridization of different algorithms provides better solutions regardless of the implementation cost. Lyamine et al. [21] proposed a hybrid heuristic approach to solve the problem by combining an ACA and Savings Algorithm. Their research results showed that this method is competitive with the other heuristics such as Tabu Search and Simulated Annealing. Moreover, [22] proposed a hybrid algorithm for the CVRP with three-dimensional loading constraints. The hybrid algorithm combines Tabu Search and Tree Search algorithms. The first algorithm is used for routing operation and the second algorithm is used for loading operation. Comparing with the previous results, this combination is able to produce better solutions with less computational effort. IV.
GA AND CVRP
In this paper, we present a genetic algorithm for resolving the capacitated vehicle routing problem. It is an adaptive heuristic search algorithm based on natural selection in the real world. In this algorithm, parents are selected to produce children for the new population [23]. Children with better attributes have a good chance to survive, while children with weak or imperfect attributes are removed. The concept of natural selection proposed by the British naturalist, Charles Darwin, in 1859 stimulated John Holland to innovate the GA in 1970s [24]. The GA is an evolutionary algorithm that is capable of performing optimal local search. It typically consists of a few basic steps which are shown in Figure 1. Initially, a population of feasible solutions is generated randomly to create all possible solutions. After the population initiation, evaluation of the tness for each individual is made.
Figure 1. The outline of GA
During the evaluation, checking the termination condition is required. The termination condition is satisfied if the generations are not improved (i.e. successive population number) or if the generations reach a specific threshold. The selection step involves choosing different chromosomes from the old population for crossover. The crossover operation performed on the selected chromosomes produces new offspring. Then, a process of elitism is implemented to produce the next generation by combining fractions from the best parents and children. Simultaneously, arbitrary modification to the populations genetic material is performed by random mutations. The mutations are utilized in diverting the search direction to unexamined places. The proposed genetic algorithm steps are algorithmically sequenced in the following steps:
Initial population selection
Population proportion fitness evaluation
Repeat
Pick the best pair to reproduce
Crossover operator process
Mutation operator process
Insert the pair of individuals in the new population
New population individuals evaluation
Continue if termination condition is false
A. VRP Model The VRP in this study is the Capacitated Vehicle Routing Problem (CVRP). The objective is to minimize travel distance while ensuring customers satisfaction. In addition, the capacity of the vehicle must not exceed the range of the total number of customers. Each vehicle comes from one and the same depot, serves the customers at known locations, and returns to the depot. The routing problem is described as follows [25].
The objective is to reduce the total travel distance.
A number of vehicles originates from only one depot.
Each vehicle serves a set of customers and returns to the same depot.
The total customers demand served by a vehicle must not exceed the vehicles capacity.
All customers are served by one vehicle once.
Since CVRP is an NP-hard problem, getting an optimal solution is very difficult and time consuming due to its computational complication. Consequently, evolutionary algorithms have been suggested to discover an acceptable solution in acceptable time. CVRP modelling can take the following form: Let G = (L, D) be a graph where L = {L0, L1,... , Ln} is the set of n + 1 locations and D = {(Li, Lj): Li, Lj L, i