A genetic algorithm for the vehicle routing problem

https://doi.org/10.1016/S0305-0548(02)00051-5Get rights and content

Abstract

This study considers the application of a genetic algorithm (GA) to the basic vehicle routing problem (VRP), in which customers of known demand are supplied from a single depot. Vehicles are subject to a weight limit and, in some cases, to a limit on the distance travelled. Only one vehicle is allowed to supply each customer.

The best known results for benchmark VRPs have been obtained using tabu search or simulated annealing. GAs have seen widespread application to various combinatorial optimisation problems, including certain types of vehicle routing problem, especially where time windows are included. However, they do not appear to have made a great impact so far on the VRP as described here. In this paper, computational results are given for the pure GA which is put forward. Further results are given using a hybrid of this GA with neighbourhood search methods, showing that this approach is competitive with tabu search and simulated annealing in terms of solution time and quality.

Scope and purpose

The basic vehicle routing problem (VRP) consists of a number of customers, each requiring a specified weight of goods to be delivered. Vehicles despatched from a single depot must deliver the goods required, then return to the depot. Each vehicle can carry a limited weight and may also be restricted in the total distance it can travel. Only one vehicle is allowed to visit each customer. The problem is to find a set of delivery routes satisfying these requirements and giving minimal total cost. In practice, this is often taken to be equivalent to minimising the total distance travelled, or to minimising the number of vehicles used and then minimising total distance for this number of vehicles.

Most published research for the VRP has focused on the development of heuristics. Although the development of modern heuristics has led to considerable progress, the quest for improved performance continues. Genetic algorithms (GAs) have been used to tackle many combinatorial problems, including certain types of vehicle routing problem. However, it appears that GAs have not yet made a great impact on the VRP as described here. This paper describes a GA that we have developed for the VRP, showing that this approach can be competitive with other modern heuristic techniques in terms of solution time and quality.

Introduction

The basic vehicle routing problem (VRP) consists of a large number of customers, each with a known demand level, which must be supplied from a single depot. Delivery routes for vehicles are required, starting and finishing at the depot, so that all customer demands are satisfied and each customer is visited by just one vehicle. Vehicle capacities are given and, frequently, there is a maximum distance that each vehicle can travel. In the latter case, a drop allowance may be associated with each customer, which is added to the total distance travelled by the vehicle to which the customer is assigned. Thus, a vehicle which visits many customers will not be able to travel as far as a vehicle that visits relatively few customers. Possible objectives may be to find a set of routes which minimises the total distance travelled, or which minimises the number of vehicles required and the total distance travelled with this number of vehicles. Various mathematical formulations of the VRP are given by, for example, Laporte [1].

Problems of realistic size are tackled using heuristics. There have been many contributions to the subject, including various extensions to the basic problem described above. Laporte [1] gives a survey, and an extensive bibliography has been compiled by Laporte and Osman [2].

The tabu search implementations of Taillard [3] and Rochat and Taillard [4] have obtained the best known results to benchmark VRPs. Various authors have reported similar results, obtained using tabu search [5], [6], [7], [8], or simulated annealing [5], [9]. However, it has been observed by Renaud et al. [10] that such heuristics require substantial computing times and several parameter settings.

Ant colony optimisation is another recent approach to difficult combinatorial problems with a number of successful applications reported, including the VRP [11], [12]. With a 2-optimal heuristic incorporated to improve individual routes produced by artificial ants, this approach also has given results which are only slightly inferior to those from tabu search.

Genetic algorithms (GAs) have seen widespread use amongst modern metaheuristics, and several applications to VRPs incorporating time windows have been reported [13], [14], [15], [16], [17], [18], [19], [20]. Applications of GAs have also been reported for the VRP with backhauls [21], for a multi-depot routing problem [22], and a school bus routing problem [23]. A hybrid approach to vehicle routing using neural networks and GAs has also been reported [24]. However, GAs do not appear to have made a great impact so far on the basic VRP. The aim of this study is to put forward a conceptually straightforward GA for the basic VRP, which is competitive with other modern heuristics in terms of computing time and solution quality. A hybrid heuristic which incorporates neighbourhood search into our GA is also considered. Computational results are given for benchmark problems, alongside some of the well-known results obtained using tabu search and simulated annealing.

Section snippets

Basis for a genetic algorithm

The principles of GAs are well known. A population of solutions is maintained and a reproductive process allows parent solutions to be selected from the population. Offspring solutions are produced which exhibit some of the characteristics of each parent. The fitness of each solution can be related to the objective function value, in this case the total distance travelled, and the level of any constraint violation. Analogous to biological processes, offspring with relatively good fitness levels

Generating the initial population

Experiments were carried out with the initial population generated randomly, with an initial population of structured solutions, and with a mixed population containing both random and structured solutions. The expectation is that an initial population of reasonably structured solutions will evolve to high-quality solutions in a relatively small number of generations of the GA. However, a possible drawback is that such a population will lack the diversity needed to obtain near-optimal solutions,

The reproductive process

Two parent solutions are selected from the population by the binary tournament method. Thus, two individuals are chosen from the population at random. The one with the better fitness value is chosen as the first parent. The process is repeated to obtain a second parent.

Offspring are produced from the two parent solutions using a standard crossover procedure. Best results were obtained using the 2-point crossover, in which two points in the chromosome are chosen randomly. One offspring consists

Replacement scheme

The GA which we have developed uses the steady-state approach, in which eligible offspring enter the population as soon as they are produced, with inferior individuals being removed at the same time, so that the size of the population remains constant. The ranking replacement method is used, as described by Beasley and Chu [30]. For each individual, the total travel distance and any constraint violation are recorded as separate values. The travel distance is referred to as the fitness of the

Accelerating the convergence of the GA

Convergence of the GA described above has been accelerated by incorporating strategies for moving to neighbouring solutions. The first is a simple reassignment procedure to improve the unfitness value of each population member as it is generated, either for the initial population or by the reproductive process. Whenever a solution is generated with non-zero unfitness value, for each vehicle with a constraint violation a customer is selected which, when re-assigned to its best position in the

Computational results

The heuristics described in the previous two sections were coded in C and, using a Pentium 266MHz, they were applied to the 14 vehicle routing problems which can be downloaded from the OR-library (see Beasley [31]), and which have been widely used as benchmarks. The first 10 problems have customers that are randomly distributed with the depot in an approximately central location. In the last four problems, the customers are grouped into clusters. Initial testing focused on the pure GA applied

Conclusion

The straightforward GA that has been described here performs well, although it does not equal tabu search in terms of solution quality. Incorporating simple types of neighbourhood search into the GA produces a significant improvement, giving distances that are only 0.5% above best known results on average, with solution times that are not excessive.

Thus, it has been demonstrated that GAs are an effective approach to solving the basic VRP. Although the pure GA that we have developed works

Barrie M. Baker holds a B.Sc. in Mathematics and an M.Sc. and Ph.D. in Operational Research, all from London University. He is a member of the academic staff at Coventry University, and his main interests are in network and distribution modelling and spreadsheet modelling.

References (33)

  • D.T. Hiquebran et al.

    A revised simulated annealing and cluster-first route-second algorithm applied to the vehicle routing problem

    Engineering Optimization

    (1994)
  • J. Renaud et al.

    An improved petal heuristic for the vehicle routing problem

    Journal of the Operational Research Society

    (1996)
  • B. Bullnheimer et al.

    An improved ant system algorithm for the vehicle routing problem

    Annals of Operations Research

    (1999)
  • Gambardella LM, Taillard É, Agazzi G. A multiple ant colony system for vehicle routing problems with time windows. In:...
  • Thangiah SR, Nygard PL, Juell PL. GIDEON: a genetic algorithm system for vehicle routing with time windows. In:...
  • Blanton JL, Wainwright RL. Multiple vehicle routing with time and capacity constraints using genetic algorithms....
  • Cited by (688)

    • A memetic algorithm for solving rich waste collection problems

      2023, European Journal of Operational Research
      Citation Excerpt :

      In a memetic algorithm, an individual is represented by a chromosome, i.e. a long sequence of genes in which the location of each gene in the sequence is key for evaluating the fitness of the individual. The genes often represent customers or, for waste collection problems, pick-up locations (see Baker & Ayechew, 2003, Prins, 2004 and Vidal et al., 2012). As partial pick-ups are allowed in the RWCP, a pick-up location can occur multiple times in the chromosome (Boudia et al., 2007).

    View all citing articles on Scopus

    Barrie M. Baker holds a B.Sc. in Mathematics and an M.Sc. and Ph.D. in Operational Research, all from London University. He is a member of the academic staff at Coventry University, and his main interests are in network and distribution modelling and spreadsheet modelling.

    Mossie Ayechew holds a B.A. in Accounting from Addis Ababa University, an M.Sc. in Computing from London University, and a Ph.D. from Coventry University for his research into genetic algorithms and Lagrangean-based heuristics for vehicle routing.

    View full text