Vehicle Routing Problem With Time Windows A Hybrid Particle Swarm Optimization Approach
Vehicle Routing Problem With Time Windows A Hybrid Particle Swarm Optimization Approach
warehouse, owned K vehicles, the capacity of each min z = ¦¦¦ cij xijk + pE ¦ max (ET − s , 0)
i i
LTi], in which ETi denotes the earliest start time for the ° ¦ yki = 1 i = 1, 2,",L (3)
task i and LTi denotes the latest start time for the task i.
° k
°
If vehicles arrive delivery point i earlier than ETi, ® ¦ xijk = ykj j = 0,1," ,L; ∀k (4)
waiting occurs; if later than LTi, the task i will be ° i
delayed. We should get a solution for vehicle running ° ¦ xijk = yki i = 0,1,",L; ∀k (5)
route with transport demands and minimal travel cost. ° j
VRPTW can be divided into two categories: hard ° x , y = 0or 1 i, j = 0,1," ,L; ∀k
time widow VRPTW and soft time window VRPTW. ¯ ijk ki
(6)
Hard time window VRP is that each task must be
completed within the specific time. However, soft time This model is widely used. It can be converted into a
window VRP is that if a task can not be completed mathematical model of different issues by different
within the specific time, given a punishment. setting of the parameters. When Eq. (1) PE=PLĺĞ,
In this paper, we use the mathematical model the above model is the hard time window VRP. If Eq.
presented by literature [8], giving 0 to the central (1) ETi=0, LTiĺĞ, VRPTW model become a common
warehouse and giving 1,2,…,L to delivery points. Both VRP. If only one car is used, the problem will become
tasks and central warehouse are denoted by node i (i=0, TSP problem. If removing constraint (2), it becomes
1,…, L). Variables are defined as follows: TSPTW problem.
503
499
vid (t + 1) = w × vid (t ) + c1 × rand () × [ pid (t ) − xid (t )] Vehicle 3: 0ė2ė6ė8ė0.
+ c2 × rand () × [ p gd (t ) − xid (t )] (7) 4.2. Crossover operation
xid (t + 1) = xid (t ) + vid (t + 1) (1 ≤ i ≤ n; 1 ≤ d ≤ D ) (8) This paper presents a crossover manner, which is
improved on the CX manner [12], in order to retain the
where c1, c2 are positive constants called accelerating
good gene fragments of parents. Suppose two parent
factor; rand() is a random number between 0 and 1; w
individuals are f1 and f2, through crossover operation
is called inertia factor; w, set a litter greater, is suited to
to be the offspring individuals new1 and new2.
a wide range of exploration to solution space while
Specific operation such as˖
smaller is suited to a small range. [Xmin, Xmax] is the
Step 1: Randomly select one cross region (a, b) in
changing range of particle location. [vmin, vmax] is the
the second string;
changing range of speed. If the location and speed
Step 2: Put the number in the cross region of f2 to
exceed boundary range in iteration, given boundary
the front of f1, delete the number of the cross region of
value. Based on analysis of the above parameters,
f2 in f1, get a sub-string new1. Put the number in the
Maurice Clerc provides the parameter conditioning of
cross region of f1 to the front of f2, delete the number
PSO algorithm convergence [9].
of the cross region of f1 in f2, get a sub-string new2;
Step 3: Judge whether the sub-string is a feasible
4. A hybrid particle swarm optimization solution, if not, redo Step 2, otherwise go to Step 4;
algorithm to solve VRPTW Step 4: Calculate the fitness by Eq. (1), retain the
offspring of the lower fitness recorded as new.
In the basic PSO algorithm, the speed of particles v For example, given two parent strings:
is restricted by a maximum speed vmax. It decides f1=1 2 3 4 5 6 7 8 9, f2=9 8 7 6 5 4 3 2 1,
searching precision in the solution space. If vmax is too and the cross region (3, 6), after crossing, two new
big, particles may miss the optimal solution; otherwise, strings are:
the particles may get into a local search space and can new1=7 6 5 4 1 2 3 8 9, new2=3 4 5 6 9 8 7 2 1.
not carry through a globe search [10]. Therefore, in this Calculate the fitness for new1 and new2 by Eq. (1).
paper, the idea of crossover operation of genetic Lastly, crossover operation of two parent strings is
algorithm is brought into PSO algorithm. Meanwhile, completed. Obviously, owing to crossover operation,
because PSO has the problem of low-speed the number of particles become twice as many as that
convergence, level set theory is also employed for of the original one, namely 2N new particles are
solving this deficiency. In a word, this paper applies obtained.
both technique of GA and level set theory to improve
standard PSO algorithm, thus proposing a combined 4.3. Selection operation
PSO algorithm that is suitable to VRPTW. We know that in PSO algorithm, each particle
moves towards the global optimal location and the
4.1. Particle coding
optimal location of individual history as a criteria to
This paper makes reference to the encoding manner find a better location for survival. However, this
of literature [11]. For the VRPTW problem with L movement in PSO makes some inferior particles
customer points and K vehicles, each particle has continue to reproduce to become inferior communities
L+K+1 dimensional vector, in which the order of each unable to be eliminated which affects the algorithm
element value denotes the delivery order of the convergence rate. At the same time the resource of
customer point in the total path. particle swam can not be fully utilized. So in selection
For example: Assume the number of customers is 8 operation, we need to judge which particles will be
and the number of vehicles is 3. If the location vector eliminated and which will be chosed to next generation.
of the particle is: This requires that all particles should be divided into
Warehouse No: 1 2 3 4 5 6 7 8 0 0 two parts: the superior ones and the inferior ones. Level
X=[6 8 4 1 2 9 5 10 3 7] set theory is introduced here.
Then the total path of corresponding solution of the For the tth-generation P(t) = (P1, P2, ..., Pn), n denots
particle is: 0ĺ4ĺ5ĺ0ĺ3ĺ7ĺ1ĺ0ĺ2ĺ6ĺ8ĺ0, the number of particles, the fitness function of particles
corresponding separate path is: n
f (Xi )
Vehicle 1: 0ė4ė5ė0; is set to fi(x), order ft = ¦ , where t denotes
Vehicle 2: 0ė3ė7ė1ė0; i =1 n
tth-generation.
504
500
We have H f = { xi ∈ P (t ) | f ( xi ) ≤ ft ,1, 2, " , n}
t
qi 2 1.5 4.5 3 1.5 4 2.5 3
H f is called the level set about f relative to P(t). After ti 1 2 1 3 2 2.5 3 0.8
t
that the population of each generation can be divided [ETi, LTi] [1,4] [4,6] [1,2] [4,7] [3,5.5] [2,5] [5,8] [1.5,4]
Searching Average
In this paper, we use the example in literature [8]. Average
successful rate searching time
There are eight cargo transportation tasks (No. 1, travel cost
(%) (s)
2,…,8). The cargo qi of each task, loading or unloading
GA[8] 993.6 24 11
time ti, executing time range [ETi, LTi] are showed in
Tab I, distance dij from yard 0 to each task point in Tab PSO [13]
940.5 46 6
II. These tasks are completed by eight tons of vehicles,
Parallel PSO[11] 923.8 72 4
in which the speed is 50, unit transportation cost is 1,
over time window unit cost for punishment is: Hybrid-PSO 914 97 4
PE=PL=50.
Experimental results show that the searching
TABLE I. CHARACTERS AND DEMAND OF TASK
successful rate 97% of the proposed Hybrid-PSO in
Task point 1 2 3 4 5 6 7 8 solving VRPTW problem is far greater than the basic
505
501
PSO 46%, the basic GA 24% and 72% of parallel PSO. [5] DING Hai-Li, WANG Fang, GAO Cheng-xiu.
At the same time in the aspect of the average result and “Crossover particle swarm optimization for traveling
evaluating successful searching time, the proposed salesman problem”. Journal of Mathematics, 2008(8): pp.
85-89.
method compared with other three methods is optimal.
[6] Niu, B., Zhu, Y.L. and He, X.X., et al. An Improved
6. Conclusion Particle Swarm Optimization Based on Bacterial Chemotaxis,
In Proc. IEEE Congress on Intelligent Control, Dalian,
This paper presents a HPSO algorithm, which CHINA, 2006, pp.3193-3197.
combines the PSO algorithm with genetic algorithm
[7] Jiang Wei-gang, Zhang Yuan-biao, Xie Jian-wen. “A
and level set. Through an example about window time Particle Swarm Optimization Algorithm Based on Diffusion-
VRP validated, the algorithm which has the characters Repulsion and Application to Portfolio Selection,” 2008
of less number of parameters, simple implementation, International Symposium on Information Science and
and relatively shorter time of average search, is proved Engineering, 2008(2): pp. 498-501
as an effective algorithm for solving discrete
[8] LI Jun,GUO Yao-huang. “Dispatch optimizes theory and
optimization problems.
methods for logistic distribution vehicle”. Beijing: Chinese
Commodity Publish House, 2001.
7. Acknowledgment
[9] Maurice Clerc, James Kennedy. “The particle swarm-
The authors thank the anonymous reviewers for explosion, stability, and convergence in a multidimensional
their valuable comments and suggestions that helped complex space”. IEEE Transaction on Evolutionary
us for improving our work. Computation, 2002, 6(1), pp. 58-73.
[3] Hoong C L, Melvyn S, Kwong M T. “Vehicle routing [12] ZHANG Li-ping, CHAI Yue-ting, CAO Rui. “Improved
problem with time windows and a limited number of genetic algorithm for vehicle routing problem with time
vehicles”. European Journal of Operational Research, 2003, windows”. Computer Integrated Manufacturing Systems,
148: pp.559-569. 2002, 8(6), pp. 451-454.
[4] R C Eberhart, J Kennedy. “A New Optimizer Using [13] LI Ning, ZOU Tong, SUN De-bao. “Particle swarm
Particles Swarm Theory”. In: Proc Sixth International optimization for vehicle routing problem with time windows”.
Symposium on Micro Machine and Human Science, Nagoya, Systems Engineering-Theory & Practices, 2004(4), pp. 130-
Japan, 1995. 135.
506
502