The genetic algorithm method for multiple depot ... - IEEE Xplore

7 downloads 0 Views 623KB Size Report
The Genetic Algorithm Method for Multiple Depot Capacitated Vehicle. Routing Problem Solving. Nlinea Skok. Davor Skrlec. Slavko Krajcar. University of Zagreb.
Fourth Intpnrational Conference on knowledge-Based Intelligent Enginem'ng Systms & Allied Tech&@,

Aug-l* Sept 2000, Brighton,UK

The Genetic Algorithm Method for Multiple Depot Capacitated Vehicle Routing Problem Solving Nlinea Skok

Davor Skrlec

Slavko Krajcar

University of Zagreb Faculty of Electrical Engineering and Computing Department of Power Systems Unska 3, 10000 Zagreb, Croatia e-mail: caddin @zvne.fer.hr method described in [7] is in limitation of number of depots to two. The method initially partitions the customers into number of vehicles clusters based on their coordinates. Once the clusters are formed routes connecting depots are formed by an algorithm that is a reminiscent of Lin and Kemighan method for solving the TSP [IO]. Afterwards the heuristic switch procedure improves the produced routes by moving one or two customers between clusters. In the method described in [8,9] the number of depots is not restricted. The method involves three phases. In the first phase, named clustering, procedure based on Ford and Fulkerson's algorithm for solving the transportation problem [ 111 is used to divide set of customers into regionally bounded clusters based on depots' capacities and travelling costs between depots and customers. Then, in the radial routing phase, to the supply area of each depot separately GA is applied to optimize radial routes leaving the depot. Afterwards, in the third phase, the GA is applied again to connect the radial routes into the link network structure. The lack of these two approaches is in limitation of solution searching process to the subdomains represented by groups of customers (i.e. clusters) while other subdomains are remained intact. As evidenced by the quality of MDCVRP ,solutions, due to the use of decomposition to relatively independent subsets that are separately investigated these methods are much less likely to reach the high quality local optimums that are hopefully also the global optimums. Thus the need for more appropriate algorithm that enables simultaneous routing of all vehicles in non-fixed destination MDCVRP arose.

Abstract Many organizations face the problem of delivering goods from a certain number of warehouses to a number of retail sites using a Jleet of vehicles. The Multiple Depot Capacitated Vehicle Routing Problem is mathematical model that closely approximates [he problem faced by many of these organizations. In regard that the problem is NP-hard. requiring excessive time to be exactly solved, in this article we develop heuristic based on genetic algorithm that finds high quality solutions in a reasonable amount of computer time. Basic CA procedures adapted to a given problem are presented and six versions of crossover operators are compared. The test results reveal that the method is able to produce results of a kind not easily obtained before namely in terms of an amount of information about the solutions and the solution space.

Keywords: non-jixed destination Multiple Depot Capacitated Vehicle Routing Problem, genetic algorithm

1. Introduction Applications of routing models arise in a wide range of decision-making problems (e.g. retail distribution, mail and newspaper delivery, fuel oil delivery, school bus routing, airline and railway routing, electrical network routing,..). Therefore there have been thousands of papers written about these problems which, in literature, are known as sequencing problems. The vast majority of papers have been published on classical Single Depot Capacitated Vehicle Routing Problem (SDCVRP) and there has been only few dealing with problems known as fixed and non-fixed destination Multiple Depot Capacitated Vehicle Routing Problems (MDCVRP). We are aware of only six previously published papers that develop solution procedures for the fixed destination variant of MDCVRP [ 1,2,3,4.5,6], all using adaptations of standard SDCVRP procedures.

2. Problem formulation The non-fixed destination MDCVRP is an extension of a well-known VRP. It can be stated as follows:

This paper presents and describes some interesting results on genetic algorithm (GA) approach to the relatively unexamined non-fixed destination MDCVRP. To our knowledge only two researchers have devised methods suitable for the problem at hand: [7] and [8,9]. The main drawback of the

0-7803-6400-7/OO/S10.00 02000 IEEE

Consider the case where NC customers each demand certain quantity of goods Di from ND depots ( N D z l ) . The goods are to be delivered by a fleet of homogeneous vehicles. Quanti? of goods QGi and the number of vehicles NVi available at the depot characterize each depot. The route that each vehicle is

520

Fourth International Conference on knowledge-Based lntelligent Enginem’ng Systems 6 Allied Technologiff,3@ Aug-l* Siyt 2000, Brighton,UK

that Syswerda has termed steady state” genetic algorithm. The implementation is outlined in Fig. 1.

assigned must satisb a number of constraints: the quantity of goods delivered must not exceed the capacity of the vehicle CAC, and there is a limitation on the length of each route RC and maritnum number of customers per vehicles route CUC. The MDCVRP solving consists of deciding which vehicles should deliver to which cicstomers, and in what order such that all customer demands are met. each customer is rPrvirPd e.mctlv once. no constraints are violated and . - r n r t ~ and vehicles a combination OJ .I acquisition costs is minimal.

besin *initialize population ~ ( 0 ) *decode and evaluate population P ( 0 ) rank population P(0)repeat *select two chromoson?es in the population P(generation) *crossover - > offsprir~g *mutate offspring *decode and evaluate c)ffspring if offspring better then the worst member in the population P(generation) then ereplace the worst member with of fspring * r a n k population P(generation) end if *generation=generation.+l until (termination condition) end

.

_...._ - 8 ’

U

-

The formulation of the problem is as follows: r

1

subject to:

-

The initial population is created randomly. The most effective population size is dependent on the problem being solved, the representation used and the operators manipulating; the representation. Testing with different instances of the MDCVPR indicates that the populatio:n sizes from interval [300,500] were the most effective for the CX and FRX crossover operators.

inax [ D ~ } < c A c ;=l,..ND j = l ...N D : j t i k=l,..NV,, lnar

i=l...ND

!,.).RC

(4)

j = l ...ND:j+i

k=1 ...NV,,

. -

j=1 ...ND:j+i k = l NV,,

... where NVQdenotes number of vehicles originating at depot i and terminating at depot

In one iteration (i.e. evolution cycle, generation) of the genetic algorithm run two population members are selected for reproduction and then altered using the crossover and mutation operators. The produced offspring is then decoded and evaluated to obtain the quality criteriai value. The selection function (6) introduced by Whitley [12] is used when selecting two parents for reproduction (i.e. theirs indexes in the population) where pop-size denotes population size and rand() returns random fraction between 0 and 1.

ND ND

j , NV =

NVu denotes total number of vehicles 1=1 j = l jti

used to supply goods to the customers, VAC denotes vehicle acquisition cost, lfi,Dfi, NCfi denote total route lenght, goods delivered and number of customers supplied by kth vehicle that originates at depot i and terminates at depot j , and cI denotes unit travelling cost.

.

Figure I Genetic algorii.hm pseudocode

It appears that the most researches have chosen to minimize the distance traveled, ignoring the number of vehicles required. However, there are problems where the best solution produced by an algorithm requires one or two less vehicles than the best solution found, but the total distance traveled is greater. Obviously, solutions should be preferred if they require fewer vehicles and less total distances. To deal effectively with this we decided to minimize a combination of distance and vehicle acquisition costs (1) and hence to give user an opportunity to investigate trade-offs between routing and vehicle acquisition costs by changing the value of vehicle acquisition cost VAC.

If the offspring is better then the worst member in the current population, the offspring replaces it and the ranking is applied again. This process continuous until convergence (i.e. until 95% of population members represent the same solution) or until arbitrarily prefixed number of iterations is reached. Ranking coupled with “one-a.t-a-time”reproduction gives the search greater focus. Once the algorithm finds a good genotype it stays in the population until displaced by better individual.

3.1. Data requirements

3. Solution method

To define the problem, besides specifying Di (i=l,..NC), CI. VAC, NVi and QGi (i=l,..ND), CAC, RC and CUC, also the number of vehicles NV,,

The genetic implementation used in the current study is based on the variant of genetic algorithm

521

Fourth International Conftrolce on knowledge-Based Intelligent Engineering Systems 6 Allied Technologies,3@ Aug-f Sept ZOOO,Brighton,UK

representation to improve the performance remarkably as it enables simultaneous routing of all vehicles in non-fixed destination MDCVRP.

originating at depot i and terminating at depotj for all pairs of depots ij must be specified by the user. With regard of specified problem’s constraints (NVi, QCi, CAC, RC, CUC) there is a limited number of feasible combinations of NVi values. Therefore before any genetic action can take place, a certain preprocessing has to be done that examines the feasibility of the specified NV,, values with respect to the following inequalities:

Priory to the population initialization procedure for all vehicles’ routes certain preprocessing has to be done. Since the number of vehicles originating at depot i and terminating at depotj, NV, is specified by the user for all pairs of depots ij, in the preprocessing phase for each depot i set of [$Nv,j

determined. Then every customer from the set of closest to the depot i is assigned to the one of the vehicles’ routes originating or terminating at depot i. In a case of vehicle’s route originating at depot i this customer represents the first customer being serviced by the vehicle, else the customer represents the last customer in the vehicle’s route.

ND

NV, 2

1 NV,,

i = I,..ND

/=I

j+i

ND

QGi2

1 NV,, ‘CUC

I = I...ND

J=1

+ N V , ~ customers ] closest to the depot i is

(9)

Jff

This may be grasped by means of a simple example with 3 depots and 14 customers. Suppose that numbers of vehicles originating and terminating at different pairs of depots were specified by the user as follows: NVol=I, NVOZ=O,N V 1 4 , NVI2=I, NVz,-I and NVZI=I. This means that for this instance of MDCVRP total number of vehicles used will be 4. As presented in Fig.2 customers representing first and the last customer being serviced by the vehicles are 3,4,5,6,7,10,11, and 16.

where konst equals 2 for MDCVRPs with up to 100 customers, else 1. First inequality (7) ensures that the number of vehicles used in every possible solution is sufficient to service all customers with respect to the customer demands, and vehicle capacity and number of customers per route constraints. The second inequality (8) ensures that the number of vehicles originating at depot i does not exceed the number of vehicles available at this depot NVi. Similarly, the third inequality limits the number of vehicles originating at some depot with respect to the quantity of goods available at depot on the assumption that all vehicles will deliver exactly vehicle’s capacity quantity of goods. This is due to the fact that exact configuration of vehicles’ routes (i.e. for all vehicles order of customers being serviced by the vehicle) is not known in the preprocessing phase.

OS

0 customer depot

3.2. Solution representation and decoding procedure

Figure 2 Preprocessing of vehicle’s routes

The development of the representation of the problem and an associated crossover operator require careful consideration. Without an appropriate representation and an effective crossover operator, genetic search can be slow and produce mediocre results. For constrained problems such as the non-fixed destination MDCVRP there appears to be no simple binary encoding that allows simple crossover to simultaneously produce feasible vehicles’ routes. An alternative is to use a simple representation and a specially designed crossover. This is an approach taken by many genetic algorithm researchers working on complex optimization problems. In accordance with studies presented in [8,9] we decided to use a representation that approaches the MDCVRP as sequencing problem. We found such

All other customers that were not in the preprocessing phase assigned to some of the vehicles’ routes (8,9,12,13,14 and I S ) become members of chromosomes. Therefore each chromosome in the population consists of ordered list of (NC-2*NV) customers (i.e. path representation) which is the natural representation for solutions to sequencing problems. For a given example of MDCVRP one possible chromosome is the following ordered list of customers:

I412815913

(10)

Having made our choice concerning the representation, the challenge of converting these orders into vehicles routes of MDCVRP solutions emerged. This is accomplished by the decoding procedure of our optimizer. We have had some

522

Fourth International Conference on knowledge-&sed Intelligent Engineering System &Allied Technologies, @ Aug-1’ Stpt 2000, Brighton.UK

all the vehicles’ routes are formed, i.e. each vehicle’s route’s half gets it:; pair. Fig.4 illustrates the result of this procedure for the examined example of the MDCVRP presented in Fig2 and the chromosome (IO).

doubts should the decoding procedure be simple and “stupid” or complex and “smart”. The answer to that question depends on how much faith someone places in the genetic algorithm portion of the system. If the decoding procedure is not very clever it will seldom construct very good vehicles routes. However, that a particular path representation is not very good is crucial information for genetic algorithm, since it uses relative ranking of the chromosomes in deciding what to do next. The results attained for the vast majority of MDCVRP instances demonstrate that it is possible to achieve balanced optimization in a situation where the genetic algorithm is only generating partial solutions, but being evaluated according to the performance of the fully expanded solutions. Therefore, in our system the decoding procedure is fairly simple. It involves two steps:

I5

0depot

Figure 4 The resulting vehicles’ routes for the instance of iMDCVRP presented in Fig.2 and chromosome (10)

1. step

3.3. Solution quality evaluation

Starting from the first customer in the chromosome one after another customers are connected to the currently closest half of the vehicles’ routes. For example, let us consider the given instance of the MDCVRP (Fig.2) and chromosome representation (IO). First customer in the chromosome is the customer number Z4. The vehicles’ routes’ half closest to the customer number 14 is the one that ends with the customer number IO. Therefore customer number 14 is connected to the customer number 10. In the same manner the customer number 12 is connected to the customer number 4, then 15 to 16, 8 to 15, 9 to 10 and 13 to 5 . At the end of this step the vehicles’ routes’ halves are achieved as presented in Fig.3.

d

0 customer

6

The population initialization, crossover and mutation procedures used in our approach produce valid vehicles’ routes in a sense that every customer is serviced exactly once but some infeasible solutions with resipect to the MDCVRP constraints (2-5) are still likely to appear in the population. The tendency of creating infeasible solutions was effectively auppressed so as to increase the solution’s objective C(x) by using the penalty function when evaluating the quality of infeasible solution x . Initially we have considered four possible strategies for assigning the penalty values where the growth of the penalty function is logarithmic, linear, quadratic and exponen.tial with respect to the degree of constraints’ violations [ 131. Beside previously mentioned methods we have also tested four other method: method proposed by Hofmaifair [ 141, then the method pro.posed by Joines and Houck [ 151, the method developed by Powell and Skolnick [ 161, and the method developed by Bean and Hajd-Alouane [ 171. We have subsequently discarded all other tested methods in a favor of the method developed by Powell1 and Skolnick [16]as it gave significantly better results than the other methods when applied on highly constrained instances of the MDCVRF’. Each individual is evaluated by the formula:

4

0 customer

0depot

Figure 3 The result of the first step of the decoding procedure for the instance of MDCVRP presented in Fig.2 and chromosome ( I O ) 2. step

4

After all customers are assigned to some of the vehicles’ routes’ halves, the pairs of vehicles’ routes’ halves’ endings are found and connected into the vehicles’ routes’ arrangement. One of the vehicles’ routes’ halves is randomly selected out of remaining ones and gets connected to the closest vehicles’ routes’ half from the set of still not connected with regard to the prespecified limit of vehicles operating between different pairs of depots, NVq. The same procedure continues until

@ x ) = C(x) + r X 4 ( x ) + 4 p , x ) i= 1

(1 1)

where r denotes objective ass.ociated with the worst individual in the initial population, p denotes the current population of the genetic algorithm and F(p) denotes feasible part of the current population. &(x) denotes constraint violation with respect to the quantity of goods available at depots, and ddx), Aj(x) and &(x) denote vehicle’s capacity, route

523

Fourth International Conference on knowledge-Based Intelligent E n g i m ’ n g Systems 6 Allied Technologies,30” Aug-I” Segt 2000, Brighton,UK

length and number of customers per constraints’ violations, respectively.

route

of new offspring. The relative efficiency of each operator was estimated as

E=%.

100%

where

md

C is the objective associated with the solution obtained by the genetic algorithm using the crossover operator and Cmd is the objective associated with the solution obtained by the genetic algorithm with random generation of new offspring. The average E value over 15 test problems was calculated for each crossover operator. Fig.5 summarizes the results of this test.

jfl

increased penalties (i.e. their quality values cannot be better than the auality . - value of the worst feasible individual).

max. no. of

generations 500000

population size 300

bias

1.05

Figure 5 Comparison of crossover operators There was no statistically significant difference in performance of genetic algorithm with FRX and CX operator. Although the FRX operator produced better results for 12 of 15 problems, the CX operator was found to outperform FRX operator being more adept at finding feasible solutions when the fleet size NV was relatively small, and the total customer demand was relatively high causing most, if not all, of the routes to be near the capacity. It is somewhat not surprising that the ER operator did so poorly. This makes sense given the way the decoding procedure constructs vehicles’ routes: it always looks for the closest route and as a result customers that are next to each other in the chromosome do not necessarily end up next to each other in the vehicle’s route. In our point of view, two things that are clearly important in ordering the customers that allow the decoding procedure to build good vehicles’ routes are the position and relative order of customers in the chromosome. This is the reason why FRX and CX operators did so well, quickly climbing to a good performance.

3.5. Mutation procedure

mutation probability 20%

Mutation typically works with a single chromosome, and in our case, it is applied to the offspring formed from crossover with certain probability pm.We have considered three mutation operators that work directly with path representation [ 181: PBM (position based mutation), OBM (order based mutation), SM (scramble mutation). We have run a series of experiments in order to compare the performance of mutation operators and to see how they cope with differently structured problems. Comparing the three mutation operators resulted in clear winner. The OBM

524

Fourth InternationalConference on knowledge-Based Intelligent Engineering Systems 6 Allied Technologies,

Aug-1" Stpt 2000, Brighton,UK

higher value of parameter bias and low value of mutation probability pm sholild be used. This will cause the quick spreading of a couple of good solutions on the entire population. The best solution represents an exhaustive search with larger population, very low bias rate and relatively high mutation probability pm that enable the prolonged convergence. However, the most effective values of population size is dependent on the characteristics of the instance of MDCVRP being solved even when the other ]parameters' values are properly adjusted to that value. Therefore, an experienced user should guide the process of finding good solutions because some tuning of parameters is required for [:he best performance. The best solution found for a given instance of MDCVRP is presented in Fig,.6.

operator has shown as more effective that PBM and SM operators producing the best results for all tested instances of IMDCVRP. In addition, for OBM operator the mutation probability pm values were investigated. Four values 108, 20%, 50% and 80% were examined. The results have shown that as mutation probability is increased to relatively large values @,,,E [20%,50%]) the genetic algorithm searches more effectively taking longer to converge but finding better quality solutions. For lower values of pm genetic algorithm on average converges to local optima while for higher values it drifts aimlessly.

4. Genetic algorithm efficinecy and computational effort

eneraiwns ~~~

I50000

110%

300

1.05

450000

100%

500

1.05

So0000

106%

Table 3 Results of examined ;instanceof MDCVRP

I

QG;(Id' N Vi

I

2

3

4

5

80

100

IS0

IS0

100

4

S

8

IO

4

The problem is defined by following data: ND=5,

NC=424, CUC=25, RC=lOkm, CAC=20000, q=200$/m, VAC=lOOOO$, total demand of all customers 270270. In Table 2 quantity of goods and number of vehicles available at each depot are given. Number of vehicles originating and terminating at different pairs of depots are specified as follows: NI',,= 1, NVIS=2, NVzl=2, NV,,= I , NVj2=3, N V 3 ~ = 2 , NV3i=2, NVJ3=4, NVdS=2, NVs3=2, and NVi,=2. The genetic algorithm was run many times under different genetic parameters. The results shown in Table 3 are the best of many investigated under different values of parameters: bias and pm, for some fixed value of population size. Solution quality is expressed relatively to the quality of the best solution found by the genetic algorithm while the computational time is expressed in number of generations till convergence.

Figure 6 The best solution found for the examined instance of the MDCVRP All the tests were run on Pentiurn 133 (Windows NT, 96MB RAM) with coding written in C language.

Conclusion

One can observe that there is compromise in finding a good solution. If the user wants a quick suggestion of what the desirable configuration should look like, a small population with relatively

The non-fixed destination Multiple Depot Capacitated Vehicle Routing Problem has been addressed which in authors knowledge has not yet been successfully solved. In a step-by-step manner

5 25

Fourth International Conference a knowledge-Based Intelligent Engineming Systems 0Allied Technologies,30” Aug-I* Sept 2000, Brighton,UK

the genetic algorithm based method was constructed which, as the examined example shows, is very effective in producing high quality solutions in a reasonable amount of computational time. The flexibility of the algorithm allows the set of criteria to be changed or extended with minimal effort. Therefore the model of the problem with more adherence to reality was proposed. Along the way, issues concerning chromosome representation that enables simultaneous routing of all vehicles in the problem, decoding and evaluation procedures were discussed and comparison of various crossover and mutation operators for constructing new chromosomes were presented.

References [ I ] G.Laporte. Y.Nobert, D.Arpin, “Optimal solutions of capacitated multi-depot vehicle routing problem ’: Congressus Numeratium 44.pp. 283-292, 1984. [2] F.A.Tillman, R.W.Henng, “A study of look-ahead procedure for solving the multi-terminal delivery problem“, Transportation Research 5 , pp. 225-229, 1971. [3] A.Wren, A.Holliday, “Computer scheduling of vehicles from one or more delivery points“, Operational

Research Quarterly 23, pp.333-334, 1972. [4] B.Golden, T.L.Magnanti, H.Q.Nguyen, “implementing vehicle routing algorithms ”, Networks: 7. pp. 113-148, 1977. [5] I.M.Chao, B.L.Golden, E.A.Wasil, “A new heuristic for multiple-depot vehicle routing problem that improves upon best-known solutions”, American Joumal o f

Mathematical and Management Sciences 13, pp. 371406. 1993. [6] J.Renaud, F.F.Boctor, G.Laporte, ”An improved petal heuristic for the vehicle routing problem”. Journal of the Operational Research Society 47, pp. 329-336.1996. [7] S.Krajcar, “Algorithms for interactive Optimal Planing of Distribution Networks ”, Doctoral thesis, Faculty of Electrical Engineering and Computing, University of Zagreb, 1988. [8] M.Filipec, D.Skrlec, S.Krajcar, “Darwin meets computers: New approach to multiple depot capacitated vehicle routing problem”, Proceedings o f Intemational

Conference on Systems, Man and Cybernetics, Orlando, USA, 12-15 October, 1997, pp. 421-426. [9] M.Filipec, D.Skrlec, S.Krajcar, “Genetic Algorithm Approach For Multiple Depot Capacitated Vehicle Routing Problem Solving With Heuristic improvements Built-in“, Intemational Joumal of Modeling and Simulation, Vol. 20, No. 4, 2000. [IO] S.Lin, B.W.Kemighan, “An effective heuristic algorithm for the travelling salesman problem ”,

Operations Research, 21, pp. 498-516, 1973. [ 1 I ] L.R.Ford, D.Fulkerson, ”Solving the Transportation Problem’: Management Science 3, pp. 24-32, 1956. [ 121 D.Whitley, “The Genitor Algorithm and Selection Pressure: Why Rank-Based Allocation of Reproductive Trials is Best“, Proceedings of ICGA ‘89, pp. 1 16-121. [ 131 ZMichalewicz. “Genetic Algorithms + Data Structures = Evolution Programs ”, Springer-Verlag,

1992.

526

[ 141

A.Hofmaifair, S.H.-Y.Lai. X.Qi, ’ * C o / ~ s ~ r\ I~ / i c ~

Optimization via Genetic Algorithms”. Simulation,

62. 1994, pp. 242-254. [I51 J.A.Joines, C.R.Houck, “On the Use of

‘,‘I

.I

Nou-

Stationary Penalty Functions to Solve Nonlinear Constrained Optimization Problems With GAS”, Proceedings of the First Intemational Conference on

Evolutionary Computation, IEEE Service Center, Piscataway. NJ, Vol. 1, Orlando, 27-29 June. 1994. pp. 579-584. [ 161 M.J.D.Powel1, “Variable Metric Methods for Constrained Optimization ”, Mathematical Programming: The State of the Art, Springer-Verlag, 1983, pp. 28831 1. [ 171 J.C.Bean, A.B.Hajd-Alouane, ”A Dual Genetic Algorithm for Bounded Integer Programs “, Department of Industrial and Operations Engineering, The University of Michigan. TR 92-53. 1992. [ I S] G.Syswerda, “Schedule Optimization Using Genetic Algorithms”, in L.Davis (Editor), Handbook of Genetic Algorithms, Van Nostrand Reinhold. 1991, pp. 332-349.

Suggest Documents