vrp q path

23
Annals of Operations Research 61(1995)21-43 21 A new exact algorithm for the vehicle muting problem based on q-paths and k-shortest paths relaxations Eleni Hadjiconstantinou and Nicos Christofides The Management School, Imperial College, 53 Prince's Gate, Exhibition Road, London SW7 2PG, UK Aristide Mingozzi Department of Mathematics, University of Bologna, Bologna, Italy We consider the basic Vehicle Routing Problem (VRP) in which a fleet of M identical vehicles stationed at a central depot is to be optimally routed to supply customers with known demands subject only to vehicle capacity constraints. In this paper, we present an exact algorithm for solving the VRP that uses lower bounds obtained from a combination of two relaxations of the original problem which are based on the computation of q-paths and k-shortest paths. A set of reduction tests derived from the computation of these bounds is applied to reduce the size of the problem and to improve the quality of the bounds. The resulting lower bounds are then embedded into a tree-search procedure to solve the problem optimally. Computational results are presented for a number of problems taken from the literature. The results demonstrate the effectiveness of the proposed method in solving problems involving up to about 50 customers and in providing tight lower bounds for problems up to about 150 customers. Keywords: Vehicle routing, Lagrangian relaxation, shortest path relaxation, dynamic programming relaxation. 1. Introduction The Vehicle Routing Problem (VRP) can be described as the problem of designing optimal delivery routes from one depot to a set of geographically scattered customers, see Clarke and Wright [7], Gillet and Miller [13], Balinski and Quandt [1], Christofides and Eilon [6], Christofides et al. [4], Fisher and Jaikumar [11], Gendreau et al. [12]. The basic VRP considered in this paper is defined as follows: © J.C. Baltzer AG, Science Publishers

Upload: shrikrishna-kotkar

Post on 07-Mar-2015

40 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: vrp q path

Annals of Operations Research 61(1995)21-43 21

A new exact algorithm for the vehicle muting problem based on

q-paths and k-shortest paths relaxations

Eleni Had j i cons tan t inou and Nicos Chr i s to f ides

The Management School, Imperial College, 53 Prince's Gate, Exhibition Road, London SW7 2PG, UK

Arist ide Mingozz i

Department of Mathematics, University of Bologna, Bologna, Italy

We consider the basic Vehicle Routing Problem (VRP) in which a fleet of M identical vehicles stationed at a central depot is to be optimally routed to supply customers with known demands subject only to vehicle capacity constraints. In this paper, we present an exact algorithm for solving the VRP that uses lower bounds obtained from a combination of two relaxations of the original problem which are based on the computation of q-paths and k-shortest paths. A set of reduction tests derived from the computation of these bounds is applied to reduce the size of the problem and to improve the quality of the bounds. The resulting lower bounds are then embedded into a tree-search procedure to solve the problem optimally. Computational results are presented for a number of problems taken from the literature. The results demonstrate the effectiveness of the proposed method in solving problems involving up to about 50 customers and in providing tight lower bounds for problems up to about 150 customers.

Keywords: Vehicle routing, Lagrangian relaxation, shortest path relaxation, dynamic programming relaxation.

1. Introduction

T h e Vehicle Rou t ing P r o b l e m (VRP) can be desc r ibed as the p r o b l e m o f

des ign ing op t ima l de l ive ry routes f r o m one depo t to a set o f geog raph ica l l y sca t te red

cus tomers , see C la rke and Wrigh t [7], Gil le t and Mi l le r [13], Ba l insk i and Quand t

[1], Chr i s to f ides and Ei lon [6], Chr is tof ides et al. [4], F isher and J a i k u m a r [11],

G e n d r e a u et al. [12]. T h e bas ic V R P cons ide red in this pape r is de f ined as fo l lows:

© J.C. Baltzer AG, Science Publishers

Page 2: vrp q path

22 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

(i) A symmetrical graph G = (X, A) is given, where X = {xl, x2 ..... xjv} is a set of vertices (cities, customers) and A is a set of undirected arcs. We assume that the "cost" of the least cost travel from vertex xi to vertex xj is given by cij, and C = [cq] is the cost matrix. The vertex set X includes the depot located at vertex xl. Each customer xi has a requirement qi > 0 (qi integer) that must be supplied from the depot. (We assume ql = 0.)

(ii) M identical vehicles are given. Each vehicle has capacity Q and is based at the depot. (We assume Q > max[qi lx iEX].) The number of vehicles is as- sumed to be large enough for a feasible solution to exist. Each vehicle starts and ends its journey at the depot.

(iii) Each customer must be visited exactly once and supplied with its full require- ment.

(iv) The sum of the requirements supplied on a vehicle route must not exceed Q.

(v) The objective is to minimize the total route cost (computed as the sum of travel costs of the arcs forming the routes) while satisfying all constraints.

The basic VRP ignores a large number and variety of additional constraints that are often found in real-world problems. The most common side conditions include:

(a) Total time restrictions: the duration of any route must not exceed a prescribed time limit.

(b) Time windows: a customer must be visited within a prescribed time interval.

(c) Precedence relations between pairs of customers.

(d) Mixed deliveries or collections on the same route.

Few exact algorithms exist for the solution of the basic VRP; see Christofides et al. [4,5], Laporte et al. [18], Lucena [20], Comu6jols and Harche [8] and Fisher [10]. Some of the best known exact algorithms are surveyed in Christofides [3] and in Laporte and Nobert [17]. To this day, only relatively small VRP instances can be solved to optimality and larger size problems can be solved only for special VRP instances. Optimization of VRPs is increasingly considered to be a more practical approach for real problems than it used to be in the past. This change of viewpoint is the result of the fact that rapidly decreasing computation costs are making higher quality solutions more desirable, even at the expense of more computation. Even if exact algorithms are not run to full optimality, the solutions obtained are likely to be better than what existing heuristics can provide, with an increasing robustness since a bound on the amount by which a particular solution differs from optimality can also be guaranteed.

This paper describes an exact algorithm for the basic VRP based on the use of lower bounds that are derived from a combination of two different relaxations

Page 3: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 23

of the original problem. It extends and improves the work initiated in Christofides et al. [4] which derives bounds from q-paths (that is, chains of vertices whose weight is equal to q) and Christofides and Mingozzi [2] which derives bounds from k-shortest paths. In this paper, we present a method for computing higher lower bounds based on an iterative combination of q-paths and k-shortest paths. A set of reduction tests derived from the computation of these bounds is applied to reduce the size of the problem and to improve the quality of the bounds. The resulting lower bounds are then embedded into a tree search procedure, based on a new branching strategy, to solve the problem optimally. The algorithm is tested on a number of problems taken from the literature, as well as some random uniformly distributed new problems. The results show that basic VRPs involving up to 50 customers can be solved exactly and tight lower bounds for VRPs involving up to 150 customers can be obtained.

2. Problem formulation and relaxation

We give below a set-partitioning formulation for the basic VRP that was initially introduced by Balinski and Quandt [1].

Let R = { 1, 2 ..... ~ } be the family of all possible feasible routes in the VRP. Let the index set of the customers in route r be Nr, the cost of the route be dr and the total load of the route be Qr = ~,i~Nrqi" Let M/be the index set of routes visiting customer xi and Yr, a 0 -1 binary variable whose value is equal to 1 if and only if route r is used in the optimal solution. The problem can then be formulated as follows:

(VRP) Minimize ~ dr Yr (1) r E R

subject to ~ , Yr = 1, i = 2 . . . . . N , (2) r E M i

~_~ Yr = M, (3) r ~ R

Yr E {0, 1}, r E R. (4)

Constraints (2) express the fact that every customer must be served by exactly one route. Constraint (3) expresses the fact that the number of vehicles used is fixed a priori and is equal to M. There are two main difficulties associated with this formulation:

(i) the large number of binary variables Yr, which can run into millions even for small size problems, and

Page 4: vrp q path

24 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

(ii) the high cost involved in computing the dr values (by solving a TSP on each set of customers Nr).

A lower bound to the VRP can be obtained by solving the dual of the linear relaxation of problem VRP, that we denote by DVRP, as follows:

N

(DVRP) Maximize ~ ui + Mu! (5) i = 2

subject to ~., U i + U 1 <-- dr, r ~ R , (6) i E N r

u i unrestricted, i = 1 . . . . . N, (7)

where ui, i = 2 ..... N, are the dual variables of constraints (2) and ul is the dual variable of constraint (3). It is obvious from linear duality that any heuristic solution to problem DVRP provides a valid lower bound to the cost of the optimal solution of problem VRP. A heuristic solution to problem DVRP is provided by the following theorem.

THEOREM

A feasible solution u* = (u~, u~ ..... u~,) to problem DVRP is given by:

Ui = q i Min -~r l r E M i , i = 2 . . . . . N and u~ = O,

where d r is a lower bound to the cost of the route r, that is, d r < dr, r E R.

(8)

P r o o f

It is sufficient to prove that

From (8) we have

E u i < d r , r E R .

i~ N r

u T = E q iMin - ~ - T l r ~ M i , i ~ N r i ~ N r

Since dr < dr, for each r E R, we have:

M i n [ ~ r l r E M i ] < d r - Q r ' r E M i.

Therefore, from (10) and (11), we obtain

(9)

r E R. (10)

(11)

Page 5: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 25

o r

~N * dr ui < Z q i -~r , i • iEN r

r E R (12)

Z u~ < dr Z qi = dr, r E R (13 ) iENr -- Or iENr

due to the fact that ~'i~ Nrqi = Or. This proves the theorem. []

The se t M i, i = 2 ..... N, can be decomposed into:

where Mi = Mi (qi) U M i (qi + 1) U ... U M i (q) U ... U M i (Q),

Mi(q) = {rlr ~ M i and Qr = q}.

(14)

(15)

As far as the computation of u~* is concerned, it is not necessary to know the entire subset Mi(q), but it is sufficient only to identify the route in Mi(q) of minimum cost, that is,

* [dr~r ] Min [ I ] ] M i n ui = q i M i n - A - I r E M i =qi d r ] r E M i ( q ) • (16) qi<q~O q

If we denote diq = Min[dr[ r E Mi(q)], then

U~ = qi M i n I qi < q < Q l " (17)

(We assume that diq = ~ if Mi(q) = Q~.) It follows immediately from the theorem that N

LB = ~.~ u; (18) i=2

is a lower bound to the VRP.

3. The computation of lower bounds to the VRP: LB1 and LB2

Christofides et al. [4, 5] give a dynamic programming procedure based on state-space relaxation for computing lower bounds on diq. In this paper, we describe a new method for producing improved lower bounds on d/q that is based on the computation of k-shortest paths and q-paths.

3.1. LOWER BOUND LB 1

3.1.1. q-paths with no loops

Let • = { 1, il, i2 ..... ik} denote the index set of customers forming a not necessarily simple path • from the depot to customer xik and q = y k = 1 qih the total

Page 6: vrp q path

26 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

load on this path. • will be referred to as a q-path. It is not easy to impose the condition that no vertex on the path is visited more than once, but it is simple to impose the less stringent restriction that the path should not contain loops formed by three consecutive vertices (for example, loops of the form ih_l, ih, ih_l).

Let f ( q , xi) be the cost of the least cost path from the depot to customer xi with total load q and without loops, and let p(q, xi) be the vertex just prior to xi on the path corresponding to f (q , xi). Let ~?(q, xi) be the cost of the least cost path, without loops, from xl to x i with load q and with vertex Xk # p(q, xi) jUSt prior to x i on the path corresponding to #(q, xi). Functions f and ~ can now be computed, for a given customer xi and a given value of q, as follows:

f ( q , xi ) =

~(q, xi ) =

Vf (q - qi, xj ) + Cfi, Min /

xieX\lxl.x~} Ldp(q q i , x j ) + cji, q - q i > q j

r f ( q - qi, Xk ) + Cki, Min /

x, ~ X\{xl.x~ } L~b(q - qi, Xk ) + Cki, xk # p( q,xi )

q -q l > qk

if p ( q - q i , x j ) # x i l (19)

otherwise

if p(q - qi, xk ) 4: x i 1. (20)

otherwise J

Functions f, ~ and p are initialised as follows:

f ( q , xi ) = ~(q, xi ) =

f ( q , xi ) = cli; P(q, xi ) = Xl

J ~ ( q , x i ) = oo

for q # qi,

for q = qi. (21)

3.1.2. Minimum cost through q-routes

Let V(q, Xi) be the cost of the least cost route without loops, starting from the depot, passing through customer xi and finishing back at the depot, with a total load q. Such a route will be referred to as a through q-route. ~/(q, xi) must be composed of either the two best q-paths to xi, whose total loads add up to q + qi, or a best path and a second best path to xi whose total loads add up to q + qi. ill(q, xi) can then be computed as follows:

II/( q, xi )

[ f ( q ' , x i ) + f ( q + q i - q ' , x i ) , ,

=qi<q,M~i~+q,)| [ f ( q , X i ) + ~ ( q + q i - q ,xi))] " / M i n i

L L~p(q ' , x i )+f (q+qi - q ' , x i

q if p(q' , x i ) ~ p(q + qi - q', xi ) ]

J otherwise

(22)

Page 7: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 27

3.1.3. Computation of bound LB1

It is quite clear that the cost ~(q, xi) can be used as the lower b o u n d diq in (17) to derive the values of u~ which can then be substituted into expression (18) to produce the lower bound LB1.

3.1.4. Improving bound LB1 by Lagrangian ascent

In this section we give a procedure for improving bound LB (here referred to as LB1). The solution corresponding to LB can be obtained by backtracking using recursions (19) and (20). For every value u 7 we can find the q-route Gi of load qT, where q~' is the value of q producing the minimum in the expression

Min r~(q- 'x i ) l qi~q<QL q J"

The union of routes G i, i = 2 ..... N, represents graph G I. Since some of these routes are not simple and not necessarily pairwise vertex disjoint, the resulting graph G j may contain vertices with degrees with respect to G l greater than 2 and some vertices with degrees less than 2. Let t~j / be the degree of customer xj with respect to Gi. Then, dj, the "total weighted degree" of customer xj with respect to G l, is given by: N

dj = • t~j q---~-~. (23) i=2 qi

If the degree dj is equal to 2 for a l l j = 2 ..... N, then the solution represented by G 1 is a feasible solution to the VRP; otherwise, we apply the following penalty procedure to improve bound LB1. Let us place Lagrangian penalties hi, i = 2 ... . . N, on each vertex xi depending on the degree di of vertex x i which produce the modified cost matrix [c b] given by

C~ ---- C/j "k- h i q" ~l,j. (24)

The functions f, ~ and ~ can now be computed for the new matrix [c•] resulting in a new lower bound to the VRP. Let this bound be denoted by LB 1 (~). We must note that the optimal solution of VRP is invariant under expression (24) since this cost transformation simply adds a constant t e rm 2]~ i it, i to the value of the objective function in the VRP formulation. Hence, the best possible lower bound LB 1 to the VRP is given by:

Max [LBI(;t)]. ;t

The computation of the X's can be performed iteratively using subgradient optimisation (see Held et al. [15]) by noting which degree constraints in graph G 1 are violated by the solution corresponding to bound LBI(~). The procedure performed to maximize the lower bound LB 1(/1,) is now described.

Page 8: vrp q path

28 E, Hadjiconstantinou et al., A new exact algorithm for the VRP

Step 1. (Init ial isation). Set the best lower bound z ~ = 0. Let z~s be the value of the best known feasible solution to the VRP so far.

Step 2. Set iteration h = 1; gi = 0, i = 1 ..... N.

Step 3. Compute functions f, ~ and p using expressions (19)-(21) and function using (22).

Step 4. Let LBI(~) = ~ Min [ V(q-' x i ) ] q, ~N

i=2 qi<q<Qk q - 2i=2'~i

provide a lower bound on the value of the solution to the VRP. If z ~ * L B 1 (~.). < LBI(~), set ZLB =

If Z~ > Zbn or if h = maximum number of iterations allowed, stop. Else, h = h + l and go to step 5.

Step 5. If the degree di of vertex xi with respect to graph G l is 2 for all i = 2 ..... N, stop ( z ~ is the best lower bound that can be obtained by this procedure). Otherwise, compute penalties:

(zbB - LBl(;t)) )~i = 2i + fl ~ . . . . ~,2 (di - 2), (25)

E j = 2 ( d j - 2)

where fl is a constant step size.

Step 6. Modify the cost matrix [c/j] using cij = c/j + ~,i + ;Lj. Go to step 3.

At the end of the ascent procedure, _~* denotes the value of the penalties which produce the best lower bound:

N N

LB1 = • u; - 2 X '~'" (26) i = 2 i = 2

In our computational work, we used the fact that the costs are non-negative. If some of the c b given by (24) are negative, then we adjust the corresponding multipliers by ,~,i = ~,i + 0.5£, where

e = M a x [ [ c / j +~,i + 2 j j : ( x i , x j ) E A and c o +Zi +~,j <0] .

3.1.5. Arc exclusion tests based on bound LB1

Let us consider two customers xi and xj and suppose that arc (x i, xj) is in the optimal solution. Let ~ ( q , x i, x j ) denote the cost of the least cost through q-route with load q that includes arc (xi, xj). This route is composed of two q-paths: a path p1 from xl to xi of load q' and a path p2 from xj to xt of load q - q'. Then the cost ~ ( q , x i , x j ) of this q-route is given by

Page 9: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 29

~(q, xi, x) )

= Min qi~q'<q-qj

f(q' , xi ) + f (q - q', xj ) + c b ,

f(q,, xi) + O(q - ] [ M i n [ t ~ ( q , x i , + f ( q _ q " x j ' + c b

q , , x j ) + c b '

7 if p(q', xi ) ~ p(q - q', xj )1,

J otherwise

(27)

where functions f and 0 are computed using the modified cost matrix [cO] as described in section 3.1.4.

Hence, if arc (xi, x)) is in the solution,

u ~ + Min f - ~ , . ' l / . ~ ( q , z s ~ , x j ) | ( q i + q j ) _ 2 ~ / ] , k I:1= (28) k~i,j q>qi+qJ L q ] k

is a lower bound on the optimal solution. Thus, if Vl > Z~m, it follows that arc (xi, xj) cannot be in the optimal solution and can be removed from the set of arcs of graph G.

3.2. LOWER BOUND LB2

The costs c/j = c o + 2i + 2j, obtained at the end of the computation of bound LB1, expression (26), are used as the initial costs for the computation of bound LB2.

3.2.1. k-shortest simple paths

Let ~Pik = {p/l, pi 2 ..... p/k} be the ordered family of the k-shortest (i.e. k least cost) paths from xl to xi, for a given xi and a given value of k. We write P[ to refer to both the path itself and the index set of customers forming the path, including the depot; the meaning will be obvious from the context. We assume that the paths in Pik are numbered 1 .... ,k, where k = IP kl, and ordered in non-decreasing value of cost. Let g(P[) and h(P[) be the cost and load of a path P[ ~ Pik, respectively. We assume that each path P[ satisfies the vehicle capacity constraint, i.e.

h(Pi r) = Z qJ < Q" jE~"

It is implicit in the above definition of k-shortest paths that, for a given customer xi, it is not necessary to generate the entire subset of paths in Pu, passing through the same set of vertices S = {xij, xi 2 ..... xi,}, but it is sufficient to know only one path in Pik passing through S, that is, the path of minimum cost.

Page 10: vrp q path

30 E. Hadficonstantinou et al., A new exact algorithm for the VRP

The algorithm described in Katoh et al. [16] is used for computing :Pik for a given customer xi and a given value of k. Details of the computation of :Pik and suitable implementational aspects can be found in Hadjiconstantinou et al. [14].

3.2.2. Minimum cost elementary through k-routes

Let gt'(q, xi) be the cost of the least cost elementary r o u t e Riq starting from the depot, passing through xi and finishing back at the depot with a total load q. Such a route will be called a through k-route. It can be decomposed into two internally disjoint simple paths going from x~ to x i whose total loads add up to q + qi. These two paths are not necessarily in Pik, since, for a chosen value of k, the cost of either one or both can be greater than the cost of the kth shortest path Pi k E Pik. We can identify two possible situations:

Case A. Let PF and pb denote the two simple paths comprising r o u t e giq. Assume that at least one of these two paths is not in Pik- Without loss of generality, let us assume that g(P[') < g(Pib). Then,

g( Pi '~ ) + g( Pi b ) > g( Pi 1 ) + g( Pi k )

since g(P2) > g(Pli) and g(Pi b) > g(Pik). Hence,

gl ( giq ) = g(p/1 ) + g( pi k ) (29)

provides a valid lower bound on the cost of the elementary r o u t e Riq. An additional lower bound g2(Riq) on the cost of r o u t e Riq, which is expected

to be better than gl(Riq), is derived by considering the load of each path p/a and pb. This lower bound is obtained from the minimum cost combination of q-paths and k-shortest paths in the way explained below.

Since, for any customer xi, the paths in Y'ik are ordered in non-decreasing value of cost, the first path P{ E ~Pik with load q', if it exists, represents the minimum cost simple path from xl to xi having load q'. If Pir does not exist in :Pik, then a lower bound on the minimum cost of such paths is given by g(pik).

Using the above result, a route through xi of load q must be composed of either

(i) the two best q-paths to xi, without loops, whose total loads add up to q + qi, o r

(ii) a q-path to xi without loops and a simple path in 7;'ik such that their total loads add up to q + qi.

Let Pig (q) C_ Tik be the subset of all paths in Pik with load q, i.e.

Pik(q) = { P t P E Tik and h(P) = q}.

Page 11: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 31

Thus, we have:

g2 (Riq) =

Min qt~q'<l(q+q~)

Max

Max

f (q ' , x i ) , l P~'a(q') + Lg(P/), otherwise

[ . Min [g(P)], i fPik(q+qi 0" " f ( q + qi - q', xi ), t e ~1,~ <q + qt-q') - q') ~

Lg(Pi k ), otherwise

(3O) Case B. If both simple paths comprising r o u t e Riq are in Pik, then

g3 ( Riq ) = Min [g(p/s) + g (P / ) l h( PZ ) + h( P/ ) = q + qi ] eZ, e/'~ik

el he /= {i,il

is the cost of this route. Thus, in all cases, for given values of i and q

(31)

I/r'(q, X i ) = M i n [Max [gl (Riq), g2 (Riq)], g3 (Riq)] (32)

is a valid value o f diq. Using expressions (22) and (32), a better valid value of diq is:

diq ----- Max [~(q, xi ), ltt '(q, Xi )]. (33)

These values o f diq can be used to compute values for u~. which in turn can be used to compute the lower bound LB of section 2.

3.2.3. The computat ion o f LB2

A bound LB2 on the VRP can be computed as the bound LB, expresssion (18), using values u~ obtained from expressions (17) and (33).

3.2.4. Improving lower bound LB2 by Lagrangian ascent

For every value u~, i = 2 ..... N used to compute LB2, we can find - by backtracking - the route G[ of load q~, where q~ is the value of q producing the min imum in the expression

qi<q<Q

Page 12: vrp q path

32 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

Let G 2 denote the graph obtained from the union of all routes G: for i = 2 ..... N, in a similar way that graph G I was obtained after the derivation of bound LB1 and let dj be the "weighted" degree of vertex xj computed with respect to graph G 2 using expression (23). In a similar way to that of section 3.1.4, we can improve LB2 by Lagrangian iterations involving (for each value of ~) a recomputation of both k- shortest paths and q-paths, based on a new cost matrix [c~)], in order to recompute the correct values of d/q in expression (33) and hence u~ and LB2 from equations (17) and (18), respectively.

3.2.5. Arc exclusion test based on bound LB2

Reduction tests, similar to those based on bound LB1, can also be derived from the computation of bound LB2. We assume that the original graph G has been reduced by applying the reduction of section 3.1.5 and let us again consider two customers xi and xj. Let Cl/(q, x i , x j ) denote the cost of the least cost elementary route, say Rijq, with load q that includes arc (x i, xj). This route can be decomposed into two vertex-disjoint elementary paths: path P/~ going from xl to xi and path pjb going from xj to xl, such that h(P[ ~) + h(Pj b) = q and pa fq pyb = { 1 }. For a given value of k, paths p/a and pjb may not be in Pik or Pjk, respectively, since the cost of either P/~ or pjb or both can be greater than the cost of paths p/k or pjk, respectively.

Considering the load of each path pa and pjb, we can compute a lower bound gl (Rijq) on the cost of rou te Rij q by deriving the minimum cost combination of a path going fro m xl to xi (with load q') and a path going from xl to xj (with load q - q'). Let ~'i~ (q) C Tik be the subset of all paths in Pik with load q that do not pass through a specific customer xj, i.e.

Pi~ (q) = {PIP E Tik, j ~ P,h(P) = q}. Then,

gl(Rijq) = Min [Max[Diq,,Fiq,]+Max[Gjq,,Hjq,]]+c:~, (34) qi<q'<q-qj

where

Diq' = f ( q ' , xi ),

= ¢ ( q ' , x i ),

if p(q ' , x i ) ~ xj or

p(q ' , x i ) ~ P* such that P*~ Pjk(q - q') ~ f~ and

g(e* ) = Min [g(P)], P ~'~jk (q-q')

otherwise;

Gjq, = f ( q - q', x j ) ,

= ¢(q - q', x j ),

i f p ( q - q ' , x j ) ~ x i or

p(q - q', x j ) ~ P* such that P* ~ P/~ (q') ~ O and

g ( e * ) = Min [g(P)], PcPiJk(q ')

otherwise;

Page 13: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 33

~j , F/q, = Min. [g(P)], if ~ ( q ) g O,

e ~i~ ( q')

= g(p/k ), otherwise;

Hjq, = P~1"jkMin(q- q,)[g(P)], if Pi t (q - q ' ) ~ O,

= g(P~ ), otherwise.

I f P~ ~ 7:'ik and pjb ~. Tjk, then

g2(eijq) = Min [g(p/s) + g(p])lh(PiS) + h(P]) = q] + c[~

~'np] -- I l l

(35)

is the cost of route Rqq. Thus, in all cases, for given values of i, j and q:

Cg( q, Xi, X j ) = Min[gl ( Rijq ), g2 ( Rijq )]. (36)

If arc (xi, xj) is in the optimal solution, then

F0(q, x;, xj)] . V2 = LB2 - u/* - u~ + Min -2 I tqi + qj)

q>qi+qj q J (37)

is a lower bound on the optimal VRP solution. Note that in (37) one is replacing the contribution to bound LB2, derived from customers xi and xj, by a lower bound on their contribution, given that a vehicle goes directly f rom xi or xj (or vice-versa) on a least cost route.

Thus, if 1/2 > zvB, it follows that arc (xi, xj) must not be in the optimal solution and can be removed from graph G.

4. The branch and bound

Let ~ be the best lower bound on the value of the optimal VRP solution, computed from LB 1 and LB2 as described in section 3, and z~8 the cost of the best known upper bound, corresponding to a feasible solution, which is either obtained f rom the literature or computed using a heuristic algorithm. If these two values do not coincide, a branch and bound procedure is required for solving the VRP. The computat ional results shown in section 5 were derived by using the branching strategy described in the next section.

Page 14: vrp q path

34 E. H a d j i c o n s t a n t i n o u et aL, A n e w exac t a lgor i t hm f o r the V R P

4.1. DESCRIPTION OF THE TREE SEARCH PROCEDURE

The state at each node a in the tree search is represented by a set F(tx) of fixed routes starting and finishing at the depot, a partial route T(tx) starting at the depot and finishing at some customer xi and a set S (a ) of arcs that are forbidden to be in T ( a ) . In this section, we will use the word "route" in exactly the same way that it was used throughout the paper, that is, to imply the ordered set of customers forming the route. In a branching step from node a, an elementary route {xl, xi~, xi~

. . . . . x i , , x l } is chosen for branching that produces disjoint subproblems as follows:

For problem Pa~ set C l i t = 0 %

For problem Pa~ set cl i i = - M and ciji2 = 00,

For problem Pa3 set cli~ = c i l i 2 -~ - M and Ci2i3 : o o ,

For problem Pa, set Cli~ = ci~i2 . . . . = Cik_2ik_l = - M and Cik_~ik = ~ ,

For problem Pa,.2 set cl i l = ciji~ = . . . = ci, l = - M ,

where - M is a large negative number to ensure that the arc whose cost is equal to - M is in the VRP solution. With this branching rule the subproblems are certainly disjoint since for any two subproblems there is at least one arc excluded from the solution in one, and which is definitely included in the solution in the other subproblem.

At a given node ak, k = 1 ..... n + 2 descending from node a, the partial route T(Otk) represented by the set of customers {xl, Xil, X i 2 . . . . , xi~_~} in the corresponding subproblem Pak such that C l i ! = Ci, i2 = . . . . Cik_2ik_, = -- M and the set of arcs S ( a k )

is given by S ( a k ) = S ( a ) U {xik_l, xi~}, where Cik-~ik = ~ in the same subproblem. The state at node tzn÷2, corresponding to subproblem Pa~÷2, is represented by T(ct n ÷2) which, in this case, is a complete route that can be added to the set of fixed routes so that F ( a , + 2 ) = F ( a ) (.J T ( a , + 2 ) .

At each node a of the tree, we calculate a lower bound LB1 (LB2 is too expensive to compute at every tree node so it is only computed at the root node) on a feasible extension of the partial solution characterized by F ( a ) , T ( c t ) and S ( c t ) ,

performing a fixed number of iterations of the ascent procedure described in section 3.1. The initial set of penalties used at node a is given by the values ~.* of the penalties associated with the best lower bound found at its parent node. The branching rule we employ at node a is to select for branching a route obtained during the lower bound calculation which, if it is not elementary, is modified accordingly using a heuristic. The route chosen is the one through an "isolated" customer far from the depot or through a customer that has a large demand.

Page 15: vrp q path

E. Hadjiconstantinou et aL, A new exact algorithm for the VRP 35

It is quite apparent that the smaller the number of branching possibilities in the tree, the more efficient the tree search. It is, therefore, computationally desirable to incorporate various reduction tests at each tree node which are derived either from the branching procedure or the computation of the lower bound. For example, the arc exclusion test described in section 3.1.5 and derived from the computation of LB 1 at node tt is applied in order to reduce further the size of the subproblem solved at this node. Additional tests are described in the next section.

The tree search described above is implemented using a breadth-first strategy in which the next branching occurs from the tree node whose lower bound LB 1 is smallest.

4.2. REDUCTION AND DOMINANCE TESTS

There are some simple dominance fathoming tests that could be used to eliminate nodes of the branch and bound tree.

(i) At some node a where a partial route T(a) is completed, if it could be shown that the remaining free vehicles are not capable (because of insufficient capacity) of supplying the unrouted customers, the node can be fathomed.

(ii) At some node a if a partial route T(a) can be improved by a 3-optimal local optimization procedure (Lin and Kernighan [19]), the corresponding node can be fathomed.

(iii) The Lagrangian problem that has to be solved at a tree node a can be somewhat tightened by adding the following restriction:

if qj + 2 qi > O for some xj ~ T(a), then set cij = oo for all xi ~ T(a). x~ e T(a)

(iv) The tree search can be made more efficient by applying the following: By removing all vertices in the set of fixed routes F(a) from the subproblem corresponding to node a and all other subproblems obtained at the nodes emanating from a, the size of the subproblems solved can be reduced, thus resulting in higher lower bounds.

5. Computational results

The algorithm described in this paper has been coded in FORTRAN and experi- mentally evaluated on 25 test problems which contain between 15 and 150 customers in addition to the depot. All computations were performed on a Silicon Graphics Workstation Indigo R4000 and the results are displayed in tables 2(a) and 2(b).

All problems are planar, that is, customers are located at points in the plane and cij is the Euclidian distance between vertices x i and xj. The cq were computed as single precision real values by first multiplying the distances by a factor of 10000

Page 16: vrp q path

36 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

Table l(a)

Test problems taken from the literature.

Problem N M Q U = ~,~=2q~l(Q. M) Details

1 15 5 55 0.93

2 20 6 58 0.95

3 25 8 48 0.96

4 30 9 68 0.96

5 35 I1 67 0.95

6 40 14 60 0.05

7* 50 5 160 0.97

8" 75 10 140 0.97

9" 100 8 200 0.91

10 150 12 200 0.93

Customers I to 15 of problem 7

Customers 11 to 30 of problem 7

Customers 16 to 40 of problem 7

Customers I to 30 of problem 8

Customers t to 35 of problem 8

Customers 1 to 40 of problem 8

The 50-customer problem

The 75-customer problem

The 100-customer problem

Adding all customers of problems 7 and 9 with the depot location as in problem 9

"Source for test problems: Eilon et al. [9].

Table l(b)

Randomly generated problems.

Problem N M Q U = ~,#i=2qil(Q. M)

11 20 6 55 0.93 12 20 5 75 0.83 13 20 5 72 0.90 14 20 5 73 0.97 15 20 6 59 0.97 16 25 6 73 0.96 17 25 8 56 0.99 18 25 8 58 0.96 19 25 8 56 0.93 20 25 7 73 0.93 21 30 6 92 0.96 22 30 7 89 0.95 23 30 8 66 0.93 24 30 7 69 0.95 25 30 I0 54 0.90

and then rounding them to the nearest integer. Our problems omit t ime constra ints

and have capaci ty restrictions only. To obtain t ightly constra ined problems, the fleet

size for each p rob lem was reduced to the min imum number o f vehicles that could

feasibly del iver the cus tomer orders.

Page 17: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 37

Table 2(a)

Computational results for test problems of table 1 (a).

Prob. N ZuB (a) Zt~ Gapl Gap2 AE Timel Zor r Nodes Time2 (%) (%) (%) SG SG

Indigo Indigo R4000 R4000 minutes minutes

1 15 334.96 o) 326.92 2.40 2.67 40.8 0.40 334.96 37 0.49

2 20 430.880) 430.88 (b) 0.00 0.02 90.5 0.66 430.88 1 0.66

3 25 630.76 (2) 621.73 (b) 0.00 0.00 100 .0 0.02 621.73 1 0.02

4 30 0~ 597.18 2.10 2.40 32.9 0.63 610.0 1414 7.88

5 35 ~ 694.89 0.53 0.85 74.0 2.42 698.60 155 3.35

6 40 -0 852.24 1.10 1.32 58.2 3.38 861.79 3438 19.99

7 50 524.61 (3) 516.61 1.52 1.87 48.8 1.89 524 .61 3 0 3 1 129.98

8 (c) 75 835.26 °) 815.31 2.38 2.70 22.0 7.40 - - -

9 (c) 100 826.14 (3) 792.42 4.08 4.55 0.0 33.70 - - -

10 (c) 150 1028.42 (3) 1000.07 2.75 3.34 0.0 92.80 - - -

Ca) Sources for upper bounds:

It)The difference between the values shown in this table and the optimal values published in Christofides et al. [4] for these problems is due to the fact that in the 1981 paper, the costs cl/ were computed as real values with an accuracy of one decimal point compared to four decimal points used in our paper.

(2)The Tabu Search Heuristic described in Gendreau et al. [12] was used to compute this upper bound.

(3)Taillard [21]. (b)Optimal solution obtained at the root node. (e) Only the bound computation at the root node was performed for these problems. Hence, the

Gap 1 (%) is computed between Z~ and the value of the best known feasible solution Zva.

The data for the first ten problems are given in Eilon et al. [9]. P rob lems 11

to 25 are r andom uni formly distributed new problems generated as fo l lows: the x

and y coordina tes o f each cus tomer xi were generated by sampl ing two integers

f rom the un i fo rm distr ibutions [5, 60] and [10, 70], respectively. The in teger

cus tomer demands qi were generated f rom the un i form distr ibution [5, 30]. All these

r andomly generated problems used the same depot locat ion as in p roblem 7.

Tables l (a) and l (b) provide information on the test data for all problems.

U measures the t ightness o f the vehicle capaci ty constraints , U = Y.~=2qil(Q • M) .

All problems are t ightly constrained. Problem demand is 94% of vehicle capaci ty

on average. Tables 2(a) and 2(b) show the fo l lowing co lumns:

ZuB Cos t o f the best known feasible V R P solut ion ei ther obta ined f rom the

li terature or using a heuristic algori thm.

Page 18: vrp q path

38 E. Hadjiconstantinou et al., A new exact algorithm for the VRP

Table 2(b)

Computational results for test problems of table l(b).

Prob. N Zun ~°~ ZLB Gapl Gap2 Timel Zoe r Nodes Time2 (%) (%) SG Indigo SG Indigo

R4000 R4000 minutes minutes

I1 20 377.69 355.75 5.80 6.20 0.10 377.69 1141 2.72

12 20 379.62 356.66 6.04 6.35 0.16 379.62 2411 8.16

13 20 300.53 294.19 2.10 2.18 0.12 300.53 I76 0.46

14 20 468.17 432.76 1.73 2.23 0.11 440.38 64 0.66

15 20 491 .61 414.03 7.48 8.77 0.09 447.54 314 1.46

16 25 468.69 433.22 4.12 4.58 0.20 451.86 1246 10.08

17 25 484.59 470.23 2.69 2.95 0.28 483.25 113 0.84

18 25 552.06 546.47 1.01 1.83 0.46 552.06 141 0.90

19 25 440.49 427.50 2.22 2.53 0.27 437.25 804 3.39

20 25 428.12 405.86 2.54 2.88 0.18 416.44 1559 9.26

21 30 445.15 427.93 3.86 4.10 0.39 445.15 1798 24.40

22 30 490.05 482.70 1.49 1.78 0.53 490.05 397 5.06

23 30 481.09 452.04 5.35 6.49 0.88 477.63 32918 250.11

24 30 500.13 467.03 4.83 5.t3 0.31 490.77 8460 88.17

25 30 608.93 583.64 1.70 2.79 0.85 593.75 683 5.79

c*) Upper bounds for these problems were obtained using the Tabu Search Heuristic described in Gendreau et al. [12].

Zt~ The best lower bound obtained at the root node using LB1 and LB2 as

descr ibed in section 3.

G a p l (%) The gap between Zt~ and Zopr, that is, (Zoer-Zt~)/Zoer.

Gap2 (%) The gap between the lower bound Zq, obtained f rom the computa t ion

o f q-routes as described in Chris tof ides et al. [4], and Zoe r, that is,

( Z o e r - Zq)lZoer.

AE (%) The percentage of arcs eliminated from the optimal VRP solution using Z ~ (computed at the root node).

Timel Time for computing Z ~ in minutes on a Silicon Graphics Indigo R4000.

Zoer Cost of the optimal VRP solution.

Nodes Number of nodes in the tree search.

Time2 Time for finding Zoer (incl. Timel) in minutes on a Silicon Graphics Indigo R4000.

Page 19: vrp q path

E. Hadjiconstantinou et al., A new exact algorithm for the VRP 39

Tables 2(a) and 2(b) show that the new algorithm solved 22 out of the 25 test problems optimally within a reasonable time (the set of optimal routes obtained for problems I to 7 are reported in the appendix). We must note that the values of the optimal solutions found for 9 out of the 15 new randomly generated problems, shown in table 2(b), were different from the costs of the upper bounds obtained for these problems using the Tabu Search Heuristic described in Gendreau et al. [12]. Our algorithm was not able to prove that the solutions of problems 8, 9 and 10 are optimal and this is due to the time limitation imposed on the tree search procedure (the time limit was set equal to 12 hours on an SG Indigo R4000). However, the lower bounds obtained for these three problems are very tight, especially considering that we are comparing to the heuristic costs that may be higher than the optimal values ( the lower bounds are within 2.38%, 4.08% and 2.75% of Zun, respectively).

From the results shown in tables 2(a) and 2(b), it can be seen that, for all problems, the quality of the bound Z ~ is always higher than that of the bound Zq obtained from the computation of q-routes, Christofides et al. [4]. In fact, the bounds ZLB and Zq are on average 2.79% and 3.22%, respectively, of the best known feasible solution value for all problems. Note that, although on average the value of LB2 is only marginally better than LB1, it was found that the extra computational time for computing LB2 is more than compensated by the decrease in the tree search time caused by the computation of the improved bound. The tightness of the lower bound Z ~ would suggest that on many practical occasions, a currently available solution to the VRP may be guaranteed (by using the bound) to be close enough to optimality without the need to continue the search for an improved solution.

Appendix: Optimal solutions obtained (real distances)

Problem 1: N = 15, Q = 55, Z* = 334.96.

Routes

1. 1 8 9 1

2. 1 2 4 3 1

3. 1 7 12 6 1

4. 1 10 11 16 13 1

5. I 15 14 5 1

Page 20: vrp q path

40 E. Hadjiconstantinou et at., A new exact algorithm for the VRP

Problem 2: N = 20, Q = 58, Z* = 430.88.

Routes

1. 1 17 19 11 13

2. 1 7 20 12 21

3. 1 2 3 1

4. 1 8 10 4 5

5. 1 9 18 1

6. 1 16 15 14 1

1

6

Problem 3: N = 25, Q = 48, Z" = 621.73.

Routes

1. 1 4 3 I

2. I 13 12 9 10 1

3. 1 18 6 8 1

4. 1 20 16 1

5. 1 21 22 14 17 1

6. 1 24 2 7 15 1

7. 1 25 19 23 1

8. 1 5 26 l l 1

Problem 4: N = 30, Q = 68, Z* = 610.00.

Routes

1. 1 11 12 1

2. 1 15 20 9 1

3. 1 8 14 30 22

4. 1 28 16 21 6

5. 1 31 3 7 1

6. 1 29 23 2 1

7. 1 17 24 25 13

8. 1 4 19 26 10

9. 1 5 27 18 1

Page 21: vrp q path

E. Hadjiconstantinou et aL, A new exact algorithm for the VRP 41

Problem 5: N = 35, Q = 67, Z" = 698.60.

Routes

1. 1 9 20 15 1

2. 1 26 19 25 4

3. I 28 14 16 21

4. 1 29 23 2 24

5. 1 30 6 22 1

6. 1 31 3 7 1

7. 1 13 32 11 1

8. 1 33 10 1

9. 1 34 17 18 1

I0. 1 27 35 5 1

11. 1 36 12 8 1

Problem 6: N = 40, Q = 60, Z* = 861.79.

Routes

1. 1 5 3 1

2. 1 12 8 1

3. 1 18 17 7 I

4. 1 26 19 25 24

5. 1 28 14 20 9

6. 1 29 22 1

7. 1 3I 6 30 1

8. 1 33 10 1

9. 1 34 2 23 1

10. 1 36 15 35 1

1I. I 37 38 21 16

12. 1 39 11 1

13. 1 40 32 27 1

14. 1 4 41 13 1

Page 22: vrp q path

42 E. Hadjiconstantinou et aL, A new exact algorithm for the VRP

Problem 7: N = 50, Q = 160, Z* = 524.61.

Routes

1. 1 33 2 23 21 36 37 4 29 32 27 9

2. 1 19 14 42 41 20 43 18 5 48 1

3. 1 13 38 45 16 46 34 40 11 50 6 47

4. 1 12 3 30 22 17 51 35 31 10 39 I

5. 1 7 15 26 25 44 8 24 49 28 1

Acknowledgements

The authors would like to acknowledge the programming assistance provided by Miss Rashida Khalid, who is a research student in the Operations Research Section of the Management School at Imperial College, London.

References

[1] M. Balinski and R. Quandt, On an integer program for a delivery problem, Operations Research 12(1964)300-304.

[2] N. Christofides and A. Mingozzi, Vehicle routing: practical and algorithmic aspects, in: Logistics: Where Ends Have to Meet, ed. C.F.H. van Rijn (Pergamon Press, 1989) pp. 30-48.

[3] N. Christofides, Vehicle routing, in: The Traveling Salesman Problem. A Guided Tour of Combinatorial Optimization, eds. E.L.Lawler, J.K.Lenstra, A.H.G.Rinnooy Kan and D.B.Shmoys (Wiley, Chichester, 1985) pp. 431-448.

[4] N. Christofides, A. Mingozzi and P. Toth, Exact algorithms for the vehicle routing problem, based on spanning tree and shortest path relaxations, Mathematical Programming 10(1981)255- 280.

[5] N. Christofides, A. Mingozzi and P. Toth, State space relaxation procedures for the computation of bounds to routing problems, Networks 11(1981)145-164.

[6] N. Christofides and S. Eilon, An algorithm for the vehicle dispatching problem, Operational Research Quarterly 20(1969)309- 318.

[7] C. Clarke and J.Q. Wright, Scheduling of vehicles from a central depot to a number of delivery points, Operations Research 12(1964)568-581.

[8] G. Cornu6jols and F. Harche, Polyhedral study of the capacitated vehicle routing problem, Management Science Research Report No. 553, Carnegie Mellon University (1989).

[9] S. Eilon, C.D.T. Watson-Gandy and N. Christofides, Distribution Management, Mathematical Modelling and Practical Analysis (Griffin, London, 1971).

[10] M.L. Fisher, Optimal solution of vehicle routing problems using minimum K-trees, Operations Research 42(1994)626-642.

[11] M.L. Fisher and R. Jaikumar, A Generalized Assignment heuristic for vehicle routing, Networks 11 (1981).

[12] M. Gendreau, A. Hertz and G. Laporte, A tabu search heuristic for the vehicle routing problem, Report CRT No. 777, University of Montreal (1992), Management Science, to appear.

Page 23: vrp q path

E. Hadjiconstantinou et aL, A new exact algorithm for the VRP 43

[13] E. Gillet and L.R. Miller, A heuristic algorithm for the vehicle dispatch problem, Operations Research 22(1974)340-349.

[14] E. Hadjiconstantinou, C.P.A. Weston and N. Christofides, An efficient implementation of an algorithm for k-shortest simple paths, Management School Research Paper, Imperial College (1995).

[15] M. Held, P. Wolfe and H.P. Crowder, Validation of subgradient optimization, Mathematical Programming 6(1974)62-88.

[16] N. Katoh, T. Ibaraki and H. Mine, An Efficient Algorithm for k-shortest simple paths, Networks 12(I 982)411 - 427.

[17] G. Laporte and Y. Nobert, Exact algorithms for the vehicle routing problem, Annals of Discrete Mathematics 31 (1987) 147-184.

[18] G. Laporte, Y. Nobert and M. Desrochers, Optimal routing under capacity and distance restrictions, Operations Research 33(1985)1050-1073.

[19] S. Lin and L. Kernighan, An effective heuristic algorithm for the travelling salesman problem, Operations Research 21(1973)498-516.

[20] A.P. Lucena, Exact solution approaches for the vehicle routing problem, Ph.D Thesis, Department of Management Science, Imperial College, University of London (1986).

[21] E. Taillard, Parallel iterative search methods for vehicle routing problems, Networks 23(1993) 661-673.