vehicle routing with full loads - Science Direct

79 downloads 0 Views 575KB Size Report
vehicles is based at depot s. With G is associated a demand matrix A = (Sij): 6, represents the number of fill vehicle loads which must be shipped from node i to ...
0305-0548/X8 $3.00+0.00

Comput.Opns Res.Vol.15,No. 3.pp. 219-226.1988

Copyright0 1988Pergamon Press plc

Printed in Great Britain. All rights reserved

VEHICLE

ROUTING

WITH FULL LOADS*

JACQUES DESROSIERS’~‘, GILBERT LAPORTE, ’ MICHEL SAUVE,~ FRANCOIS

SOUMIS~and

SERGE TAILLEFER’ ‘GERAD, I?cole des Hautes Etudes Commerciales de Montreal, 5255 avenue Decelles, Montreal H3T lV6, ‘GERAD and Centre de recherche sur les transports, C.P. 6128, Succursale A, Montreal H3C 357 and 3GERAD and l?cole Polytechnique de Montreal, C.P. 6079, Succursale A, Montreal, Canada H3C 3A7 (Receiued Februury 1987; revised July 1987)

Purpose-In some distribution problems, it is required to ship at minimal cost, goods between specified pairs of cities or customers. Recently, Skitt and Levary [Eur. J. Opl. Res. 21, 65-76 (1985)] have examined the case where these shipments constitute full vehicle loads; these authors have also proposed a mathematical programming formulation and a suboptimal algorithm for the problem. We have reexamined this problem and shown that it can be simply stated and solved optimally as a constrained travelling salesman problem. Our computational results confirm the efficiency of the proposed approach.

Scope and

Abstract-This paper considers a vehicle routing problem with full loads and time limit constraints. This problem can be formulated as an asymmetrical travelling salesman problem with two types of restrictions. When these restrictions are not too stringent, the problem can be solved optimally for relatively large sizes.

1. INTRODUCTION

The problem of routing vehicles with full loads occurs in a variety of situations where vehicles must make a number of trips between pairs of specified cities and where, on each of these trips, they are fully loaded. Side constraints may also be imposed on the vehicle routes. The most common are maximum route length or duration, time windows and vehicle capacities. Such a problem was described by Bodin et al. [l], Ball et al. [2] and Skitt and Levary [3]. In the last two papers, a time limit is imposed on the vehicle routes. Ball et al. proposed three heuristics, the best of which was a greedy insertion procedure. Skitt and Levary solved the problem by column generation. The purpose of this paper is to provide an alternative formulation and an exact solution procedure for the problem. When the time limit constraint is not too stringent, the problem is relatively easy to solve since it is then almost identical to the asymmetrical vehicle routing problem (VRP) under distance restrictions, recently solved to optimality for relatively large sizes [4]. Computational comparisons between our approach and those of Ball et al. and of Skitt and Levary are difficult to make since in the first case, a heuristic approach was used (whereas our algorithm is optimal) and because of inconsistencies in the Skitt and Levary data. The problem can be represented by a graph G = (M, A, C, C’) where A4= { 1,. . . , m> is a set of nodes or cities, A = {(i, j): i # j, i, j EM} is a set of arcs and C = (Cij)is the matrix of shortest distances and C’ = (cij) is the matrix of travel times between all pairs of nodes. In [3], C is symmetrical, but this need not always be the case. Nodes s E { 1,. . . , I: r < WI} are used as depots. A fleet of w, identical vehicles is based at depot s. With G is associated a demand matrix A = (Sij): 6, represents the number of fill vehicle loads which must be shipped from node i to node j. In general, A is asymmetrical and relatively sparse. The problem consists of designing distribution routes in such a way that (i) (ii) (iii) (iv)

all loads are moved from their origin to their destination; every vehicle starts and ends its journey at its depot; the duration of a route does not exceed a prespecified time limit T, the total distance travelled is minimized.

*The authors are grateful to the Quebec Government for its financjal support (FCAR grants 86CE130 and 86TMOOll). tJacques Desrosiers is Associate Professor at the Ecole des Hautes Etudes Commerciales de Montreal. Gilbert Laporte is Professor at the same institution and also heads the University of Montreal Centre de recherche sur les transports. Francois Soumis is Professor at the l?.cole Polytechnique de Montreal. Michel Sauve and Serge Taillefer work as analysts on various transportation projects. The authors’ main research interests lie in the fields of routing, scheduling and combinatorial optimization. 219

JACQUESDE~ROSIERS et al.

220

Since every arc (i, j) will have to be used for at least 6, trips in the optimal solution, the total distance associated with these compulsory trips can be considered as a constant. The problem really consists of minimizing the total distance travelled by empty vehicles. As in [SJ, we will therefore replace every arc (i, j) corresponding to a trip (Sij > 0) by 6, trip nodes and create intertrip arcs between these nodes. The problem now consists of minimizing the total distance travelled on intertrip arcs. 2. TRANSFORMED

The new formulation defined as follows.

GRAPH

is obtained by first replacing G by an extended graph H = (N, B, D, D’),

2.1. Nodes of H N is the union of Ni, a set of vehicle nodes and N2, a set of trip nodes where

Ni={h,,:s=l,...,

r;t=l,...,

w,+l}

N,={hij,:i,j~M;6ij>0;,u=l

,...,

(1)

S,}.

The cardinality of N is therefore equal to n=r+

i w,+ s=l

C

dij.

(2)

i,jeM

To every trip node K = hij,, is associated a distance d, = cij and a duration d; = c,fj, 2.2. Arcs of H B=((Z,J):I#J,Z,JEN)

(3)

2.3. Distance and time matrices of H

D = (4,)

and

D’ = (diJ)

(4)

where the d,J’s and the d;,‘s are associated with the arcs of B. The d,,‘s are defined in the following way. (i) Intertrip arcs: I, J E N2. Let I = h,, and J = hklv. Then d,, = Cjk and d;, (ii) Arcs associated with vehicles leaving a depot : Z EN, , J E N,. Let Z = h,, d,, = c,~ and d;J = CIi. (iii) Return arcs to a depot: Z E N2, J E NI. Let Z = h,, and J = h,,. Then d,J (iv) Arcs associated with the use of a vehicle: I, JEN,. Let Z = h,, and J =

= I$.

and J = hijr. Then = Cjs and diJ = c$. h,,. Then

ifs=uando=t+l ifs

4W

Consider only paths Pk for which /l(k) > a(k) + 1. Path Pk is illegal if (i) it connects two different depots:

4?(k) = 4” or,

and

s#u

(ii) its duration R(P,J exceeds T: c3w- L

b(k)- L

c

W’,) =

1

di,,+ 1 +

K = Lo,

4 > T.

K = ke,+ I

The first summation corresponds to the total intertrip travel time of Pk, while the second summation represents the total travel time associated with the compulsory trips of Pk. Any illegal path Pk can be eliminated by forcing at least one of its arcs to 0, i.e. by imposing that the number of its arcs be at most equal to j?(k) - a(k) - 2. The original problem can now be formulated as a constrained travelling salesman problem (TSP) on H. Let xIJ be a O-l variable indicating whether arc (I, J) enters the solution (x,, = 1) or not (x,~ = 0). The problem is then minimize subject to

1 d,,x,, I,J

1 xIJ = 1

(J=l,...,n)

(PI)

(6)

l#J ;,

XIJ

=

1

(I=

l,...,n)

(7)

222

JACQUES DESROSIERS et al.

1

(S = N,;

XIJ G ISI - 1

c

x/J

6

B(k)

-

4k)

Is/ 2

-

2)

(8) (9)

2

I,JEQ(k)

[where Pk = (la(k),. . . , Ip@.))is illegal and Q(k) is the node set of P,] X,J = 0,l

(I, JEN).

(10)

In (Pl), constraints (6), (7) and (10) are those of the assignment problem. Constraints (8) are the classical TSP subtour elimination constraints: they prohibit the formation of vehicle routes disconnected from a depot. Subtours including one or more vehicle nodes related with the same depot are legal and need not be eliminated. Subtours involving vehicle nodes from more than one depot are dealt with by constraints [9]. The justification and derivation of these constraints have already been provided.

4.

ALGORITHM

The problem defined by (Pl) is a direct extension of the asymmetrical TSP for which efficient algorithms have been developed [7] and of the distance constrained TSP (denoted by DVRP) recently treated by Laporte et al. [4]. The only constraints present in (Pl) but not in the DVRP are those forbidding routes between two different depots. But these constraints are structurally similar to those prohibiting the formation of routes of duration exceeding T and can therefore be treated in the same fashion. The algorithm developed for the DVRP is a direct extension of the Carpaneto and Toth algorithm for the asymmetrical TSP [7]. For the sake of brevity, we will not provide a full description of the Carpaneto and Toth algorithm, but only outline its structure. This algorithm solves the TSP by means of a branch and bound tree. Subtour elimination constraints [8] are initially relaxed and only introduced as they are found to be violated. The problem solved at every node g of the search tree is a modified assignment problem (assignments on the main diagonal are prohibited) constrained by a set E, of arcs fixed at 0 and a set F, of arcs fixed at 1. Branching is always done from the illegal subtour involving the least number of nodes not already fixed at 1. A breadth first branching procedure is used. The process ends when all branches of the search tree have been explored according to the usual branch and bound rules. Violated constraints (9) are treated in the same way as illegal subtours. Moreover, in order to benefit from the particular structure of the problem at hand, the following features have been incorporated into the algorithm.

(4 For s < r, let V,(i)and v,l(i) denote the durations of the quickest path from s to i and from j to s respectively. Then in G, any arc (i, j) for which V,(i) + cij + V,,(j) > T for all s 6 r can be eliminated by setting cij = x . (ii) Consider the optimal solution (XIJ)obtained at a given node of the search tree. The total distance travelled is equal to d* =

c

d,,?,, + c

Io~JEN*

d,

(11)

KEN,

A lower bound t on the time required to travel this distance, and hence on the time associated to the optimal solution to (Pl), is obtained by assuming the maximum speed: t=d*+max i.jcM

i

Cij 1.

(12)

Cij

The current node of the search tree has no feasible descendant, and the current branch can be fathomed, if t > T x ES= 1 w,.

223

Vehicle routing with full loads

(iii) At any node g of the search tree, consider all paths Pk = (Zatk),. . ,I,& where I a(kj+1) . . . , IPckl- 1~~~ and for which all arcs Uack,,latkj+ 11,. . . , Upckj- 1,IPckJ are elements of F, (i.e. they are currently fixed at 1). As in Section 3, let R(P,) be the length I,(,,) can be forced to 0. Also arc (K, L) can be forced to 0 if of Pk. Then arc (ZBckj, (*)

L = Zatk)E N2, K = h,, EN,, Zllck)= h,, E N, and s # u or,

(**)

L = Z*,k)ENZ, K = hijp EN,, IO(k)= hStEN, and V,(i)+ di + dkL + R(P,) > T or

(***I

L = Z3(k)ENZ,

E’(j’)>

Tforall

K = hijp E N,,

IO(k)= hi,j’ll’EN,

and

V,(i)+ dK + d;L + R(Pk) +

se{l,...,r}.

By symmetry, three additional cases can be obtained by first setting K = ZSckj EN, and by then considering all variations of L and lack). (iv) Similarly, consider two paths Pk = (Zatk),. . . , lack,) and PI = (II(,), . . . , ID,,,) defined as in (iii). Then arc (K, L) can be forced to 0 if (*)

K = Z,,,, EN*, L = Zx(,,EN*, Za(k,=~,,EN~,Z,,,,=~,,EN~

and s#u

(**)

K = Ill(k)E N2, L = la(l)E N2, Z*(k)= h,, EN,, Zp,,,= h,, EN, and R(P,) + dAL + R(P,) > T or

(***)

K = ZB(kj ENZ, L = la(l)ENZ, Zil,k)= h,, ENI , Zp,,,= hijBE N2 and R(P,) + dkL + R(P,) + v(j) > T or

(****)

K = Zptkj E N,, L = la(l)EN,, Zol(k) = hijp ENS, Ipcl,E hi,jsp,EN, dkL + R(Z’,) + V,‘(j’) > T for all s E (1,. . , r).

and

or

V,(i)+ R(Pk) +

(v) Consider a node g of the search tree and (I, J) E E, where ZEN 1 (I = h,,. say) and J E N,. Then all arcs (I’, J) for which I’ = h,,, can be included in E,. The same rule applies mutatis mutandis if Z EN, and J E N,

5. COMPUTATIONAL

RESULTS

The algorithm was tested on a number of randomly generated problems. In order to create the problems, three independent networks (Nl, N2 and N3) were first constructed by generating in each case 15 points in [O, 100]‘, according to a unique form distribution. The Euclidean distances between these points were then computed. Travel times were determined for every edge by multiplying its distance by a factor taken between 0.9 and 1.1, according to a uniform distribution. In a second step, between zero and four trips were randomly assigned to some of the edges of the network according to the distribution (E,, E,, E,, E4), where E, is equal to the number of edges to which u trips were assigned. The total number of trips was therefore equal to Nz = cz= 1 uE,. The following distributions were tested: (8,4,2, l), (16,8,4,2), (24, 12,6,3) and (32, 16,8,4). Problems were solved for 1,2 and 3 depots. The number of vehicles per depot was either bounded above or fixed at some value between 2 and 18. In order to generate the maximum allowed route duration T, we proceeded as follows. At the root of the search tree, the total distance travelled d * [computed as in equation (1 l)] was divided by the maximum (or fixed) number of vehicles (I:= 1 w, = IN11- r) and then multiplied by a factor 0 to yield T= Bd* + (IN,1 -r). Th e value of 0 was either x or a number between 1 and 1.8. The main computational results are presented in Tables 2,3 and 4. The meanings of the various column headings are : Trips (I%[) Distribution Network 8

emm

Depots Vehicles/depot

(E, 9E,, E,, &I network identification (Nl, N2 or N3) maximum route duration parameter smallest value of 8 for which the problem was solved number of depots fixed number of vehicles per depot

JACQUES DESROSIERS et al.

224 Table 2. Computational Network

e

Nl

results: (52,0,0,0),

2 depots, 6 vehicles per depot; e&t

of the maximum

Nodes

De%

Elim

Root

152 75

750 520 822 38310 42557

duration

constraint

Bat

Time

420

420 420 420 420 4378

10.9 5.2 6.7 158.1 182.5

1: 1.6 1.4 1.2

2028

55 27 31 642 620

52 280 404 1377

17 76 134 472

280 3955 6249 24391

537

78 1.6 1.4

537 537 527

3.4 20.1 35.5 136.7

1:8 1.6 1.4 1.2

36 85 31 1223

11 27 10 431

210 974 343 25934

555

565 565 565 B

2.5 5.6 2.3 160.0

N2

N3

‘Optimality not proven; insufficient memory. bN 0 feas*‘bl e so 1u t’Ion Ioun d; insufficient memory.

Table 3. Computational

Trips (INI 26

52

78

104

aNo feasible solution bNo feasible solution

Nodes Desc Elim

Root Best Time

results: 2 depots, 6 vehicles per depot; effect of the number

Distribution

Network

4lli”

(8,4,2.1)

Nl N2 N3

2

(16,8,4,2)

Nl N2 N3 Nl N2 N3

(24,123 693)

(32,16,8,4)

found; insufficient found; insufficient

Nl N2 N3

of trips Desc

Time

1.8

6395 4010 2427

2816 1469 957

33 1.oa 170.2 89.0

1.8 1.2 1.4

17 1379 79

6 438 27

1.3 112.5 5.6

F4 1.6

110 150 85

43 50 30

13.0 17.7 9.4

158 185 2045

44 62 911

17.5 27.0 600.0b

memory. time.

number of nodes in the search tree number of nodes in the search tree having at least one descendant total number of arcs in the transformed graph H eliminated through the criteria listed in Section 4. (The arc is counted as many times as it is eliminated throughout the whole branch and bound process.) value of the objective function at the root of the search tree value of the optimal solution CPU time in seconds on the University of Montreal CYBER 855 computer (the times are CYBER 173 equivalent).

Table 2 describes computational results for a 2 depot problem in which there were 6 vehicles per depot and where the trip distribution was (52,0,0,0). As a rule, problems become more difficult as 8 (and therefore T) decreases. Problems corresponding to the smallest value of 8 for each network could not be solved optimally. This table shows that the number of eliminated arcs (“Elim”) is, as expected, inversely related to the value of 8. The two columns “Root” and “Best” indicate that the lower bound on the value of the optimum, obtained at the root of the search tree, is in fact very good. Most of the branch and bound process consists of determining a feasible solution having the same optimal value, but satisfying the relaxed constraints. Various tests were also carried out to study the impact of the distribution (E,, E,, Es, Ed) on the algorithm, but no pattern emerged. Furthermore, we observed that the algorithm performs very badly when the number of vehicles is bounded above since then, the solution obtained at the root of the search tree differs significantly from the optimal solution. Similarly, the algorithm cannot be used efficiently to minimize fleet size since the relaxed problem then contains a long single tour at each depot. Table 3 shows that the algorithm is also quite

Vehicle routing

results: effect of the number of depots and of the number of vehicles per depot

Table 4. Computational

Trips (NJ 52

Distribution

Depots

(16,8,4,2)

1

Vehicles/depot 6

12

18

3

2

4

6

78

(24,12,6,3)

1

6

12

18

3

2

4

6

104

(32.16.8.4)

1

6

12

18

3

2

4

6

aNo feasible solution

225

with full loads

found; insullicient

Network

&in

Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3

1.4 1.4 1.1 1.1 1.2 1.6 1.4 1.6 1.4 1.4 1.6 1.6 1.8 1.4 1.6 x

Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3

1.2 1.8 1.02 1.8 1.1 1.2 1.6

Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3 Nl N2 N3

1x8

1; 1.4 * x 1: 1.8 1.6 x z 1.05 1.6 1.4 1.2 1.2 1.8 1.6 1.6 1.6 1.2 1.2 1.1 3 1; 1.8 Y.

Nodes

Desc

Time

9 37 117 1005 1257 8 14 51 61 21 44 70 64 1594 668 17 14 17 10 821

1 1 31 298 341 1 3 11 16 7 9 24 25 510 274 857 855 351

0.7 1.5 7.1 81.9 111.3 0.8 1.8 4.0 5.7 1.2 2.2 3.7 5.1 128.5 54.9 199.7a 156.9 79.4

56 70 5408 1 570 104 70 1 11 148 62 37 4806 155 836 162 2588 1713

7 6 1510 0 169 24 18 0 2 49 20 8 2076 47 280 59 1097 723

3.7 3.7 1130.3 1.4 46.2 11.3 8.0 2.0 2.6 11.0 4.2 2.9 416.2a 18.1 88.1 21.4 378.4 386.5a

105 25 3 128 94 2560 2774 97 72 2225 185 1011 1291 1329 1541 169 935 1313

12 3 1 21 13 874 838 17 14 700 47 342 513 429 670 62 427 544

9.4 3.2 2.3 14.1 10.7 425.8 320.5 10.7 8.7 236.7 21.5 93.6 334.5 198.9 287.7a 26.3 200.3 333.7

memory.

insensitive to the total number of trips. Finally, Table 4 shows that a larger number of depots has a negative impact on the algorithm since more illegal solutions including vehicle routes linking two different depots are then generated. The impact of the number of depots can be judged by comparing, for the same networks and the same distribution, the values of eminobtained for 1 and 3 depots. To a lesser extent, problems with a large number of vehicles per depot also seem to be more difficult. 6. CONCLUSION

We have described in this paper a model and an algorithm for the vehicle routing problem with full loads. Our results show that this algorithm is quite successful and can solve to optimality relatively large problems in very short computing times. The algorithm appears quite sensitive to the maximum time restrictions, to the number of depots and to the number of vehicles per depot. On the other hand, it does not seem to be affected by the number and distribution of trips.

226

JACQUESDE~ROSIERSet al. REFERENCES

1. L. D. Bodin, B. L. Golden, A. A. Assad and M. 0. Ball, Routing and scheduling of vehicles and crews. The state of the art. Comput. Opns Res. 10,63-211 (1983). 2. M. 0. Ball, B. L. Golden, A. A. Assad and L. D. Bodin, Planning for truck fleet size in the presence of a common-carrier option. Decisions Sci. 14, 103- 120 (1983). 3. R. A. Skitt and R. R. Levarv. Vehicle routine via column eeneration. Eur. J. 001 Rex 21. 65-76 (1985). 4. G. Laporte, Y. Nobert and S. Taillefer, A bra&h and boundalgorithm for the asymmetrical distance constrained vehicle routing problem. Math. Modelling 9, 857-868 (1987). 5. J. Desrosiers, F. Soumis and M. Desrochers, Routing with time windows by column generation. Networks 14,545-565 (1984). 6. J. K. Lenstra and A. H. G. Rinnooy Kan, Some simple applications of the travelling salesman problem. Opl Res. Q. 26, 717-134 (1975). 7. G. Carpaneto and P. Toth, Some new branching and bounding criteria for the asymmetric travelling salesman problem. Mgmt Sci. X,736-743

(1980).

Suggest Documents