7
Genetic Algorithm Optimization in Vehicle Routing Problem Zhang Liangzhi 1,2,a , Chen Songyan 1,b ,Cui Yongyue 1,c 1 College of Traffic and Logistics Engineering, Shandong Jiaotong University, Jinan, China 2 College of Control Science and Engineering, Shandong University, Jinan, China a [email protected], b [email protected], c [email protected] Keywords: Improved genetic algorithm, Vehicle routing problem, Initial group optimization, Optimization speed Abstract. Numerous strategies for optimizing vehicle route based on genetic algorithm (GA) have been put forward. However there is still much room for improvement despite the existing experiment results. In this paper, significant improvement of traditional genetic algorithm is achieved, dealing with discrete vehicle route optimization. In view of multi-client points equally distributing around logistics centre, initial group optimization being performed, crossover probability being decreased, mutation probability being improved, chromosome calculation being simplified, optimization being accelerated and genetic performance quantity is reduced. All this offers powerful support to genetic algorithm for multi client points. Introduction Vehicle routing problem has been one focus of research for logistics practitioners and planning and managing scholars and related methodology and research results have been developed. Various intelligent searching methods are widely utilized in existing researches because optimal solution cannot be attained within short time and even it is unnecessary [1,2,3,4,5]. In solving this problem with GA, several measures are taken such as introducing reverse factor with an aim of speeding convergence and shortening search[6]; Some research adopts bi-gene group to break gene group balance[7]. All the improvements conduct an analysis of genetic algorithm, exerting positive influence on vehicle routing problem in some degree. In these solutions, small-scale client points are utilized as the typical example and study object. But for large-scale client points, lengthy computation and irresolvable problems will arise. Directing at this practical problem, a variety of improvement ideas are proposed, with which a solution can be attained in large-scale client points which is significant for project appliance. Introduction to GA Genetic algorithm (GA) simulates population evolution including genetic selection and natural selection proposed by Darwin. In it population optimization in natural evolution is adopted such as copy, crossover, mutation, etc that is likely to happen on species chromosome. Then optimal individual is generated and perfected [8]. GA is a global search optimization algorithm. In this algorithm local optimization is unlikely to occur in searching process and global optimal solution can be obtained with the largest probability even when defined fitness function is discontinuous or irregular or under noise. Vehicle routing problem Vehicle Routing Problem(VRPis a focus in current logistics management research. It determines vehicle travel route among clients with client demand position known in order to shorten transport route or reduce transport cost. Applied Mechanics and Materials Vols. 361-363 (2013) pp 2249-2254 Online available since 2013/Aug/08 at www.scientific.net © (2013) Trans Tech Publications, Switzerland doi:10.4028/www.scientific.net/AMM.361-363.2249 All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP, www.ttp.net. (ID: 130.126.162.126, University of Illinois, Urbana, USA-06/10/14,13:53:32)

Genetic Algorithm Optimization in Vehicle Routing Problem

Embed Size (px)

Citation preview

Page 1: Genetic Algorithm Optimization in Vehicle Routing Problem

Genetic Algorithm Optimization in Vehicle Routing Problem

Zhang Liangzhi1,2,a, Chen Songyan1,b,Cui Yongyue1,c

1 College of Traffic and Logistics Engineering, Shandong Jiaotong University, Jinan, China 2 College of Control Science and Engineering, Shandong University, Jinan, China

[email protected], [email protected], [email protected]

Keywords: Improved genetic algorithm, Vehicle routing problem, Initial group optimization, Optimization speed

Abstract. Numerous strategies for optimizing vehicle route based on genetic algorithm (GA) have been put forward. However there is still much room for improvement despite the existing experiment results. In this paper, significant improvement of traditional genetic algorithm is achieved, dealing with discrete vehicle route optimization. In view of multi-client points equally distributing around logistics centre, initial group optimization being performed, crossover probability being decreased, mutation probability being improved, chromosome calculation being simplified, optimization being accelerated and genetic performance quantity is reduced. All this offers powerful support to genetic algorithm for multi client points.

Introduction

Vehicle routing problem has been one focus of research for logistics practitioners and planning and managing scholars and related methodology and research results have been developed. Various intelligent searching methods are widely utilized in existing researches because optimal solution cannot be attained within short time and even it is unnecessary [1,2,3,4,5]. In solving this problem with GA, several measures are taken such as introducing reverse factor with an aim of speeding convergence and shortening search[6]; Some research adopts bi-gene group to break gene group balance[7]. All the improvements conduct an analysis of genetic algorithm, exerting positive influence on vehicle routing problem in some degree. In these solutions, small-scale client points are utilized as the typical example and study object. But for large-scale client points, lengthy computation and irresolvable problems will arise. Directing at this practical problem, a variety of improvement ideas are proposed, with which a solution can be attained in large-scale client points which is significant for project appliance.

Introduction to GA

Genetic algorithm (GA) simulates population evolution including genetic selection and natural selection proposed by Darwin. In it population optimization in natural evolution is adopted such as copy, crossover, mutation, etc that is likely to happen on species chromosome. Then optimal individual is generated and perfected [8].

GA is a global search optimization algorithm. In this algorithm local optimization is unlikely to occur in searching process and global optimal solution can be obtained with the largest probability even when defined fitness function is discontinuous or irregular or under noise.

Vehicle routing problem

Vehicle Routing Problem(VRP)is a focus in current logistics management research. It determines vehicle travel route among clients with client demand position known in order to shorten transport route or reduce transport cost.

Applied Mechanics and Materials Vols. 361-363 (2013) pp 2249-2254Online available since 2013/Aug/08 at www.scientific.net© (2013) Trans Tech Publications, Switzerlanddoi:10.4028/www.scientific.net/AMM.361-363.2249

All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP,www.ttp.net. (ID: 130.126.162.126, University of Illinois, Urbana, USA-06/10/14,13:53:32)

Page 2: Genetic Algorithm Optimization in Vehicle Routing Problem

VRP was firstly proposed by G. Dantzig and remains a very common and widely studied NP hard problem,which is depicted usually through fig G=(V,E). In fig G=(V,E),V={0,1,2……n},E={(i,j),i≠j, i,j∈V}. q i is each client demand, Cij is (i,j) distance or travel time or cost. Q is transport capacity of all vehicles, L is the largest travel distance. Vehicles set off from logistics centre then back after successful transport. And each client is served by a sole vehicle. Objective function of this problem optimizes delivery cost.

Delivery vehicle scheduling and routing arrangement in delivery centre can be described as follows:With distribution centre, client position and route known, determine vehicle assignment (clients within each vehicle’s responsibility) and each vehicle route, minimize cost under the following constraints:

(1) All vehicle routes start from and end in distribution centre and each client is served by a sole vehicle (one vehicle can serve more than one client);

(2) Each client has its goods demand which is a positive number but overall client goods demand couldn’t exceed the vehicle’s maximal load;

Mathematical model for VRP

Min ∑∪∈ Ji 1

∑∪∈ Jj 1∑∈Kk

ijkijXC (1)

S.T. ∑∈Kk

∑∪∈ Ji

ijkX1

=1 Jj ∈∀ (2)

0=ijkX KkJiji ∈∀∪∈=∀ ,1)(, (3)

kJi

jk

Jjj QXid ≤∑∑

∪∈∈ 1

Kk ∈∀ (4)

∑∪∈ Jj

ijkX1

= ∑∪∈ Jj

jikX1

Kk ∈∀ , Ji ∪∈∀ 1 (5)

1−≤+− NNXUU ijkjkik KkSji ∈∀∈∀ ,, (6)

}{ 1,0=ijkX KkJjJi ∈∀∪∈∀∪∈∀ ,1,1 (7)

J : set of clients; K : set of vehicles; S : partial set of J ; KQ : vehicle’s maximal capacity;

ijC : distribution cost from I to j;

jd : demand of client j;

jkU : sequential number of interviewed clients;

N : number of clients; ijkX : if vehicle k traveling from client i to client j, 1; otherwise, 0;

Formula (1) is objective function aiming to minimize overall distribution cost. Formula (2) is constraint that each client can be served only once. Formula (3) is constraint that prevents circuit within the same place. Formula (4) is constraint of vehicle capacity. Formula (5) is constraint that guarantees circuit route is closed. That is, vehicle starts from logistics centre and end in it. Formula (6) is constraint that prevents sub-circuit route excluding logistics centre.

2250 Sustainable Cities Development and Environment Protection

Page 3: Genetic Algorithm Optimization in Vehicle Routing Problem

Basic genetic algorithm solving vehicle routing problem

Determine coding formula.VRP aims to determine an optimal route. When each client is represented by a number, a solution to a number sequence follows. Therefore, real numbers are adopted in coding. Real number coding is characterized by improved system accuracy, intuitive coding, simple genetic performance and available programming. In this paper, real numbers are utilized in coding.

Derive initial groups.After each client and distribution centre is marked with specific numbers, irrepeated number sequence can be used to represent some route. For example, 0 represents distribution centre and the other numbers represent clients. Then number sequence 0158023470690 represents a distribution formula that consists of three routes. This sequence makes an algorithm chromosome. And numerous chromosomes of irrepeated numbers are randomly generated which compose initial groups.

Determine fitness function.Each VPR has its own specific objective function. Therefore fitness function of genetic algorithm can be easily determined, most of which are directly related to objective functions.

Assume

F=1 1

ij ijk

i J j J k K

C X∈ ∪ ∈ ∪ ∈∑ ∑ ∑ (8)

Then fitness functions is defined as:

Q= 1

F (9)

Selection operation.The essence of genetic algorithm lies in survival of the fittest, which is fully reflected in roulette. Assume one group scale R, selection probability of each chromosome is:

fP =

1

f

R

ii

Q

Q=∑

(10)

Crossover operation.Hybrid algorithm works on the principle of sharing information in nature. Hence crossover operation probability should be large enough to explore potential information. Fig. 1 displays the crossover operation of chromosomes A, B, in which A’s second route crossovers with B’s third route.

Fig.1 Solving VRP crossover operation

Although crossover operation is easy, a chromosome cannot signal a distribution formula after the operation. Therefore chromosomes should be modified. Mutation operation.Set a comparatively small probability value g and get individuals with probability g mutate in a random place.

Operation aiming at genetic algorithm improvement

Massive computation and slow searching are disadvantages of genetic algorithm which becomes more apparent in larger calculation points. Thus genetic algorithm is improved as follows.

Applied Mechanics and Materials Vols. 361-363 2251

Page 4: Genetic Algorithm Optimization in Vehicle Routing Problem

Optimize initial group.Initial groups are usually derived randomly and client points on each route in each chromosome are generated randomly. They are not related and far from optimal route demanding long searching and large-volume computation. An improvement is put forward hereby. Client points on the same route are close to each other and this idea is introduced to initial group derivation. Each chromosome is not completely randomly generated, instead partially randomly. That is, randomly determine serial number of starting client points on chromosome and the total routes of this chromosome with client points on each route being arranged in natural number order. Fig. 2, Fig. 3 display one typical chromosome in initial group derived within two routes. It can be seen clearly that Fig.3 chromosome has shorter route and higher fitness value, very close to optimal solution. If descendants are produced in this optimal initial group, the optimal solution or sub-optimal solution will be obtained promptly.

Fig. 2 Chromosome in randomly generating route Fig.3 Chromosome in optimizingly generating route

Optimal individual being inherited directly.Previous better individuals may be abandoned in selection, crossover or mutation,which is not what we expect. Thus we copy optimal N individuals to the next generation to ensure that the next generation is better than the previous and reduce overall algorithm operations with enhanced optimization.

LowerDecrease crossover probability.Crossover probability is limited within 0.6~0.9. In chromosomes in initial group have been optimized. Probability of obtaining a better individual is very low and crossover operation is a waste of computer resource when crossover is operated on chromosome with crossover principle. Thus lowering crossover probability is unlikely to affect optimizing efficiency but computation volume is decreased and optimization is accelerated in another level. Numerous experiments are carried with client points12, group scale100 and mutation probability 25%,and Fig. 4 is obtained subsequently. From this fig it can be found that optimization can be obtained more promptly with lower crossover probability.

2252 Sustainable Cities Development and Environment Protection

Page 5: Genetic Algorithm Optimization in Vehicle Routing Problem

Fig.4 Cycle numbers in obtaining final results with different crossover probability

Improve mutation probability.Since individuals have been optimized and client points are adjacent to each other on most routes, the previous advantages are likely to be taken away if random position is chosen. Thus adjacent exchange principle is adopted which means adjacent client points in one randomly generating route are exchanged and this operation is performed on one chromosome more than once. It is rather small in usual genetic algorithm, most within 0.01~0.1, whereas in our improved algorithm, it is raised to 0.1~0.3 and default value being 0.15 because crossover operation is a very important factor in optimization speed.

Overlook complex algorithm.Long computation time is needed if the above operations are performed completely. Thus some unimportant steps in evolution can be deleted. In this way more computer resources can be poured into more effective operations. For example, we can simplify or even delete modification after crossover operation and only perform operations guaranteeing normal inheritance.

Result test

Experiments are done on basic genetic algorithm and improved algorithm in VC. For convenient comparison, program for traditional optimization solution-branch and bound method is designed in LINGO8.0 and data are derived simultaneously. However it can be seen that with increasing client points longer time is needed in utilizing branch and bound method or even the optimal solution cannot be obtained. And improved algorithm is of practical significance for multi client points. In table 2 the same data are processed in three methods with determined overall client points. From it, it can be found that final results are close for basic and improved algorithms, with larger result than that of branch and bound method. But the gap is within 5% which is acceptable.

Table 1 Comparison of time needed in obtaining final result with different methods

Client points Branch and bound

method Basic genetic

algorithm Improved genetic

algorithm 10 1-3s 1-2s 1-2s 12 About 15s 2-8s 2-8s 15 3-4min 4-15s 4-12s 20 About 27h 20-60s 10-30s 50 N years 400-1000s 150-300s 100 Uncomputatable 60-200min 15-25min

Applied Mechanics and Materials Vols. 361-363 2253

Page 6: Genetic Algorithm Optimization in Vehicle Routing Problem

Table 2 Comparison of final results in different client points with different approaches

Client points Branch and bound

method Basic genetic

algorithm Improved genetic

algorithm 10 310 317 317 12 426 437 440 15 435 453 453 20 616 630 631 50 Uncomputatable 1320 1325 100 Uncomputatable 2754 2768

Conclusions

In conclusion, genetic algorithm is an advanced parameter optimization in which optimal solution can be obtained only with fitness information known. But longer time is needed in VRP, especially with more client points. Hence improvement is made according to VRP and genetic algorithm to solve specific problems. Moreover operations are decreased and optimization is accelerated. Thus it is significant for solving similar problems with genetic algorithm.

Acknowledgements

This work was financially supported by the Ministry of Transport Applied Basic Research Projects (2011319817490), Natural Science Foundation of Shandong Province (ZR2012FL02) and Shandong Higher Education Science and Technology Projects (J10LG52).

References

[1] W. Guan, W. Wang and X. l. Yu: Journal of Transportation Systems Engineering and Information Technology,Vol.5(2002),p.19-23. (In Chinese)

[2] L.Z. Zhang and H. P. Jiang: Journal of Shandong Jiaotong University, Vol.6(2005),p.76-79. (In Chinese)

[3] K. Tang: Journal of Donghua University, Vol.2(2002),p.66-70. (In Chinese)

[4] B.M. Baker and M.A. Ayechew: Computers & Operations Research,Vol.30(2003),p.787-800.

[5] D.L. Jiang, X.L. Yang and W. Du: Theory and Research of Systems Engineering, Vol.6(1999),p.40-45. (In Chinese)

[6] R. Li and J.J. Yuan: Journal of Wuhan University of Technology,Vol.26(2004),p.99-101. (In Chinese)

[7] Y.W. Zhao, B. Wu and J. Li and H.Z. Dong: Computer Integration Manufacture System-CIMS,Vol.3(2004),p.303-306. (In Chinese)

[8] Q.X. Yun, G.Q. Huang and Z.Q. Wang Zhan-quan:Genetic Algorithm and genetic programming (Metallurgical Industry Press, China1997). (In Chinese)

2254 Sustainable Cities Development and Environment Protection

Page 7: Genetic Algorithm Optimization in Vehicle Routing Problem

Sustainable Cities Development and Environment Protection 10.4028/www.scientific.net/AMM.361-363 Genetic Algorithm Optimization in Vehicle Routing Problem 10.4028/www.scientific.net/AMM.361-363.2249