I partook as one of top 60 students (700 totally) in the Undergraduate Research Program founded by our college. Under my mentor’s guidance, I got involved in a cooperative project with electronic power company aiming at devising an efficient and low-cost scheduling proposal to maintain electricity metering devices. I found that Multi-depot Vehicle Routing Problem fits our requirement well. Thus, I conducted research on this topic.
Introduction
A company may have several depots from which it can serve its customers. If the customers are clustered around depots, then the distribution problem should be modeled as a set of independent VRPs. However, if the customers and the depots are intermingled then a Multi-Depot Vehicle Routing Problem should be solved.
A MDVRP requires the assignment of customers to depots. A fleet of vehicles is based at each depot. Each vehicle originate from one depot, service the customers assigned to that depot, and return to the same depot.
The objective of the problem is to service all customers while minimizing the number of vehicles and travel distance.
We can find below a formal description for the MDVRP:
- Objective
The objective is to minimize the vehicle fleet and the sum of travel time, and the total demand of commodities must be served from several depots.
- Feasibility
A solution is feasible if each route satisfies the standard VRP constraints and begins and ends at the same depot.
- Formulation
The VRP problem is extended to the case wherein we have multiple depots, so we will note the vertex set like , where are the vertex representing the depots. Now, a route is defined by , with . The cost of a route is calculated like in the case of the standard VRP.
Implementation
Having thumbed through substantial papers on VRP, I found that neither the traditional exact solution nor the ordinary heuristic algorithm could satisfy our requirements. Thus, I shifted my focus to metaheuristic like Tabu Search, Genetic Algorithm, Ant Colony Optimization, Neural Network, and so forth. Finally, I proposed a hybrid Genetic Algorithm.
Genetic Algorithm
In the field of artificial intelligence, a genetic algorithm (GA) is a search heuristic that mimics the process of natural selection. This heuristic (also sometimes called a metaheuristic) is routinely used to generate useful solutions to optimization and search problems. Genetic algorithms belong to the larger class of evolutionary algorithms (EA), which generate solutions to optimization problems using techniques inspired by natural evolution, such as inheritance, mutation, selection, and crossover.
To get familiar with this algorithm, I calculate out the maximum value of based on Genetic Algorithm, where . The program shown as below runs well and can get the result of 98
at most of time.
Hybrid Genetic Algorithm
However, simple genetic algorithm always converges to the local optimum too early and can not achieve the best result. Thus, I introduced Local Search into the genetic algorithm and proposed a new way of encoding to improve the solution. After adjusting the parameters in the algorithm for many times, the algorithm fits well to the dataset provided by the company.
- Genetic Encoding
I adopted a new encoding method to represent for each solution. A good encoding method has high efficiency in the calculation of fitness.
We represent the solution as following sequence : (0 depotY0 customerX0 customerX1 … depotY1 customerXk … depotY2 … depotYm-1 …)
. Thus, the visiting order is determined and some illegal orders will be excluded. We can calculate the fitness for each individual by Dynamic Programming based on the visiting order.
- Calculation of fitness
The calculation for the fitness of each individual is a complex process. I adopted a partition method, whose basic idea is based on Dynamic Programming, to achieve the optimal arrangement of the vehicles referring to this paper-Prins C. A simple and effective evolutionary algorithm for the vehicle routing problem[J]. Computers & Operations Research, 2004, 31(12): 1985-2002.. I determine the visiting order of all customers at first and then arrange vehicles for them.
- Crossover
I adopted the classic OX crossover. The procedure is shown as below. P1
and P2
represent for the parents while C1
and C2
represent for the children after crossover. i
and j
are the pointer to the spliting position.
- Population Selection
Roulette is one of the classical method. However, by experiments, I found that this method will create same individuals after several generations and it shrinks the scope of feasible solution. Thus, I abandon roulette and apply a new method. I sort the individuals according to their fitness and choose the individuals in the front part to crossover with each other. The offspring produced by those individuals will replace the individuals in the lower half. I found that this method performs well in the experiment.
- Local Search
I apply several methods to conduct neighborhood search, such as 2-opt, exchanging 2 nodes and removing part of the sequence then insering it into another position. These methods are applied to escape the local optimum. In order to balance the quality and efficiency, these operators should be considered carefully since more of them there are, the lower efficiency our algorithm has.
- Program Framework
Experiments
I compare my results with the international standard dataset provided by http://www.bernabe.dorronsoro.es/vrp/. Experiments show that my algorithm performs well and even release new optimum. The following figures are the results of two of the international dataset.