Content uploaded by Jian Li
Author content
All content in this area was uploaded by Jian Li on Aug 22, 2015
Content may be subject to copyright.
J Comb Optim
DOI 10.1007/s10878-014-9767-4
Multi-depot vehicle routing problem with time windows
under shared depot resources
Jian Li ·Yang Li ·Panos M. Pardalos
© Springer Science+Business Media New York 2014
Abstract A new variant of multi-depot vehicle routing problem with time windows
is studied. In the new variant, the depot where the vehicle ends is flexible, namely, it is
not entirely the same as the depot that it starts from. An integer programming model
is formulated with the minimum total traveling cost under the constrains of time
window, capacity and route duration of the vehicle, the fleet size and the number of
parking spaces of each depot. As the problem is an NP-Hard problem, a hybrid genetic
algorithm with adaptive local search is proposed to solve it. Finally, the computational
results show that the proposed method is competitive in terms of solution quality.
Compared with the classic MDVRPTW, allowing flexible choice of the stop depot can
further reduce total traveling cost.
Keywords Multi-depot vehicle routing problem ·Time windows ·Hybrid genetic
algorithm ·Adaptive local search
J. Li (B)·Y. L i
College of Engineering, Nanjing Agricultural University, P.O. Box 64,
40 Dianjiangtai Road, Pukou district, Nanjing 210031, China
e-mail: telorance61@gmail.com
P. M. Pardalos (B)
Department of Industrial and Systems Engineering, Center for Applied Optimization,
University of Florida, 303 Weil Hall, Gainesville, FL 32611, USA
e-mail: pardalos@ise.ufl.edu
P. M. Pardalos
Laboratory of Algorithms and Technologies for Network Analysis,
National Research University Higher School of Economics, Moscow, Russia
123
J Comb Optim
List of symbols
Sets
DThe depot set
CThe customer set
VThe vertex set
AThe arc set
KThe vehicle set
KdThe set of vehicles at depot d
Parameters
qiThe demand of customer i
siThe service time of customer i
eiThe earliest start time at customer i
liThe latest start time at customer i
cij The distance between customer iand j
QkThe capacity of the vehicle k
TkThe maximum duration of vehicle k
LThe number of vehicles
|Pd|The number of parking spaces at the depot d
|Kd|The number of vehicles in Kdset
Variables
xkij Is the 0-1 decision variable, if vehicle ktravels directly from node ito
node j, then xki j =1, otherwise, xki j =0
aki The arrival time of vehicle kat node i
bki The start service time of vehicle kat node i
πkThe working duration of vehicle k
1 Introduction
Vehicle routing problem with time windows (VRPTW) has been a very important
issue in the field of operations research and combinatorial optimization because of
its complexity in computation and wide applications in logistics and transportation.
According to the number of depots, VRPTW is classified into two kinds: the single-
depot vehicle routing problem with time windows (simply denoted by SDVRPTW)
and the multi-depot vehicle routing problem with time windows (simply denoted by
MDVRPTW).
SDVRPTW has been studied widely, and it is reviewed in Hashimoto et al. (2013).
MDVRPTW extends the VRPTW, attracting increased attention recently. The focus of
the literature on MDVRPTW is mainly on the computational methods. These methods
123
J Comb Optim
include heuristics and metaheuristics. For example, Tansini and Viera (2006)pro-
posed new heuristics to assign customers to depots, which used time windows and
distances to evaluate proximity between customers and depots. The different versions
of tabu search were applied to MDVRPTW (Cordeau et al. 2001,2004;Moccia et al.
2012;Cordeau and Maischberger 2012). Polacek et al. (2004,2008) proposed variable
neighborhood search for MDVRPTW. Irnich (2008) presented a local search-based
metaheuristic. Vidal et al. (2013) designed a hybrid genetic algorithm with adaptive
diversity management for a large class of vehicle routing problems with time windows,
and apply it to MDVRPTW. Noori and Ghannadpour (2012) adopted a hybridization
of genetic algorithm and tabu search for MDVRPTW.
In MDVRPTW mentioned above, it is required that each vehicle must start and
end at the same depot. In this paper, we study a new variant of MDVRPTW, in which
a vehicle may not end at the depot that it starts from. As nowadays in the trucking
industry more and more carriers adopt a new transportation model called collaborative
transportation (CT) to improve logistics performance, reduce system-wide inefficien-
cies and cut down operational costs (Li et al. 2007). For example, some trucking
enterprises allow the vehicles of a distribution center to share parking spaces of other
distribution centers because they manage drivers and vehicles by a global position-
ing system and an advanced information system. After drivers get off work, they can
go home by the convenient and fast subway system. We refer to this problem as an
MDVRPTW under shared depot resources (simply denoted by MDVRPTWSDR). The
transportation model improves the flexibility of operation. The vehicles may end at
the depot nearest to the last customer.
When all vehicle routes start and end at different depots, MDVRPTWSDR is similar
to the open vehicle routing problem (Li et al. 2007;Repoussis et al. 2007). Their slight
difference is that the vehicle ends at a depot in MDVRPTWSDR; whereas, in the open
vehicle routing problem (OVRP), the vehicle ends at a customer.
Therefore, MDVRPTWSDR is considered as a combination of MDVRPTW and
OVRP. To the best of our knowledge, no work has been conducted to address this
problem. In MDVRPTWSDR, we take time windows of customers, numbers of vehi-
cles, working duration of vehicles, capacity of vehicles and limited parking spaces
into consideration. As MDVRPTWSDR includes the MDVRPTW which is an NP-
hard problem (Cordeau et al. 2001), MDVRPTWSDR is also an NP-hard problem. To
solve the problem within the reasonable time, a hybrid genetic algorithm with adaptive
local search (HGA_ALS) is proposed.
The remainder of this paper is structured as follows: the problem description and
formulation is in Sect. 2. The overall structure of our proposed approach is given
in Sect. 3and its details are also presented in the section. Computational results are
provided in Sect. 4. Finally, we present our conclusions and outline some suggestions
for future work.
2 Problem description and formulation
The MDVRPTWSDR is defined on a complete graph G=(V,A), where V=
{v1,...,v
N,v
N+1,...,v
N+M}is the vertex set and A={(vi,vj)|vi,vj∈V,i=
j}is the arc set. C={v1,v
2,...,v
N}represents the Ncustomers and D=
123
J Comb Optim
{vN+1,v
N+2,...,v
N+M}correspond to the Mdepots. Each vertex vi∈Chas several
nonnegative weights associated to it, namely, a demand qi, a service time si,aswell
as a time window [ei,li], where, eiis an earliest start time and liis a latest start time
for the service, Further, in the depot vertex vi∈D, there are no demand and service
times, i.e. qi=si=0. Associated to each arc (vi,vj)∈A, there is a nonnegative
travel cost cij, which represents the distance, travel time, or fee, etc. Finally, a fleet of
K={k1,k2,...,kL}is the vehicles set and all the vehicles are homogeneous, where
Lis the number of vehicles. Based on this graph, the MDVRPTWSDR constraints
must be satisfied as follows:
(1) each vehicle starts from a depot, and ends at the depot closest to the last customer
it serves;
(2) the number of the vehicles used at each depot cannot exceed the fleet size;
(3) the number of vehicles returning to a depot cannot exceed the number of parking
spaces at the depot d,|Pd|;
(4) each customer is required to be served exactly once by exactly one vehicle;
(5) the service at each customer imust begin within the time window [ei,li]. If a
vehicle arrives customer iearlier than time ei, it will wait.
(6) the total load and working duration (the sum of travel time, wait time and service
time) of vehicle kdoes not exceed Qkand Tk, respectively.
2.1 Mixed-integer linear programming formulation
The objective of the problem is to determine the optimal routes by minimizing the
total travel cost of all the vehicles. The formulation for the MDVRPTWSDR is given
as follows:
min
k∈K
i∈V
j∈V
cijxki j ,(1)
subject to
k∈K
j∈C
xkdj ≤|Kd|,∀d∈D,(2)
k∈K
j∈V
xkij =
k∈K
j∈V
xkji =1,∀i∈C,(3)
d∈D
j∈C
xkdj =
d∈D
i∈C
xkid ≤1,∀k∈K,(4)
i∈R
j∈R
xkij ≤|R|−1∀R⊆C,k∈K,(5)
i∈D
j∈D
xkij =0,∀k∈K,(6)
k∈K
i∈C
xkid ≤|Pd|,∀d∈D,(7)
xkij bki +si+cij −akj=0,∀i,j∈V,k∈K,(8)
123
J Comb Optim
bki ≥aki ≥0,∀i∈C,k∈K,(9)
ei≤bki ≤li,∀i∈C,k∈K,(10)
i∈V
j∈C
qjxkij ≤Qk,∀k∈K,(11)
πk=
i∈C
xkid (bki +si+cid)−
i∈C
xkdi(aki −cid)
≤Tk,∀k∈K,d,d∈D,(12)
xkij ∈{0,1},∀i,j∈V,k∈K.(13)
The objective function (1) is to minimize the total travel distances. Constraints (2)
require the number of vehicles departing from each depot is not more than the number
of available vehicles. Constraints (3) ensure that each customer must be visited exactly
once by exactly one vehicle. Constraints (4) represent that each vehicle starts from
a depot, and ends at a depot. Constraints (5) is the subtour elimination constraints
that ensure the solution is connected. Constraints (6) impose that the vehicle cannot
travel directly from depot ito depot j. Constraints (7) require the number of vehicles
returning to each depot is not more than the number of available parking places.
Constraints (8) imply the visit order of nodes. If vehicle ktravels directly from node
ito node j, then the arrival time akj at node jmust be equal to (bki +si+cij).
Constraints (9) ensure the start service time of vehicle kat node iis late or equal to its
arrival time. The next three inequalities (10), (11) and (12) represent the time window
of customers, and capacity, maximum duration of vehicles constraints, respectively.
Constraints (13) denote the range of decision variable.
3 Hybrid genetic algorithm with adaptive local search
As previous proposed methods show that genetic algorithms can obtain better solu-
tions for VRPTW (Nagata et al. 2010), we also use the genetic algorithm introduced
by Holland (1975) as the algorithm framework. The main feature of our approach is
that an adaptive local search is integrated into the genetic algorithm framework. The
adaptive local search adopts an adaptive mechanism to select a best neighborhood
method to improve the current solution. The adaptive mechanism uses a scoring rule
and roulette wheel selection procedure, which was ever applied to simulate annealing
by Ropke and Pisinger (2006) for pickup and delivery problem. Recently, Juan et al.
(2013) also proposed an adaptive local search based on multi-start metaheuristic, called
multi-start biased randomization of heuristics with adaptive local search (MIRHA),
for the capacitated vehicle routing problem. Although we use the same name the adap-
tive local search, our method is entirely different from their method. Their adaptive
local search consist of two parts: a fast memory-based improvement for individual
routes, namely, the best route of a given set of nodes are stored in cache, and a divide-
and-conquer strategy in which each randomized solution is partitioned into different
subsolutions or regions according to a set of policies, and then a new multi-start Clarke
and Wright savings heuristic (Clarke and Wright 1964) biased randomization process
is applied on each of these regions to try to improve the subsolutions. However, in our
123
J Comb Optim
Initialization of population
1. Assignment of customers
2. Routes plan of each depot
Start
Termination criteria
is satisfied ?
Crossover
Improved OX
Adaptive local search
Selection
Combination of parent
population and offspring
Population management
Delete same solutions
No
Yes
Output the best solution
Mutation
Adaptive local search
Fig. 1 The flow chart of HGA_ALS
adaptive local search, an adaptive mechanism is employed to select the best neigh-
borhood method to improve the current solution rather than partition the solution into
different subsolutions.
3.1 Overview of HGA_ALS
The basic flow of HGA_ALS can be described as Fig. 1. Firstly, the initial solu-
tion based on the combination of different parameters is generated, then mutation,
crossover, and selection operators are executed. Finally, the best solution is output
when the termination criteria are met.
The following sections describe several important components of HGA_ALS,
including chromosome encoding and decoding, evaluation function, the construction
of the initial solutions, crossover, selection and adaptive local search, etc.
3.2 Chromosome encoding and decoding
We propose a new indirect encoding method to make sure that all chromosomes have
the same length of genes. The method is based on customer and depot sequences,
123
J Comb Optim
Fig. 2 Chromosome encoding based on customer and depot sequences
namely, the customers of each depot constitute a giant tour following the depot. Figure
2illustrates this represent scheme of a small size of MDVRPTWSDR with two depots
and eight customers. The numbers from 1 to 8 correspond to the 8 customers, and
the numbers 9 and 10 represent the 2 depots. We use the split algorithm to extract the
routes from the tour of each depot, which is proposed by Prins (2004). The decoding
algorithm for the MDVRPTWSDR can be described as Algorithm 1:
Algorithm 1. The decoding algorithm
Step 1. Removing a single depot and the customers assigned to the depot and getting a sub-chromosome,
not changing the order of customer sequences;
Step 2. Meeting the constraints of capacity and time windows (without considering the constraints of
vehicle number, duration and parking spaces), the split algorithm (see Prins (2004)) is applied
to partition the sub-chromosome;
Step 3. Repeat the steps 1 and 2 until each depot sequence is partitioned.
For the given example in Fig. 2, assuming that depot 9 is the nearest depot to
customers 2 and 8, and depot 10 is the nearest depot to customers 4 and 7. The dotted
lines represent delimiter of best routes. Then the four routes in Fig. 2are (9,1,2,9),
(9,3,4,10), (10,5,6,7,10) and (10,8,9), where the first and third routes are closed, and
the second and fourth routes are open.
3.3 Evaluation function
As mentioned above, the partitioned routes meet the constraints of capacity and time
windows; hence we only check whether the routes satisfy the constraints of vehicle
number, duration and the number of parking spaces. If each route of the depot meets
all the constraints, then the depot is called feasible depot, otherwise infeasible depot.
We define ndkmin as ndkmin =min
k∈Kndk, where ndkdenotes the number of customers of
the route kat depot d, when the number of routes is more than the number of available
vehicles at the depot d, otherwise, ndkmin is equal to zero. Here, the evaluation function
of an individual is f(x)=α1cost (x)+(1−α1)w(x)+m(x)+α4n(x)+α5φ(x),
where f(x)represents the fitness of solution x;cost(x)is total transportation costs
(travel distance); w(x)denotes the total waiting times at all the customers; m(x)=
α2d∈Dmax 0,k∈Kj∈Cxkdj −|Kd|+α3d∈Dndkmin stands for constraint
violations of vehicle number; n(x)=k∈Kmax {0,π
k−Tk}indicates violations
of duration; φ(x)=max{0,k∈Ki∈Cxkij −|Pd|} denotes violations of parking
places; α1∈(0,1), and α2,α
3,α
4and α5>0 are penalty factors.
The working duration of a vehicle can be reduced by delaying its departure time
of the vehicle without causing any time window violation, therefore, a solution that
123
J Comb Optim
is infeasible for route duration constraints can, in fact, become feasible (or less infea-
sible) (Savelsbergh 1992). Based on this, we use a simple method based on forward
calculation and backward calculation to compute the duration of a given route. The
computational complexity of the method is O(n1), where n1represents the number of
customers of the route. To get a clearer picture about this method, assume that a route
of vehicle kis routek={ds,1,...,i−1,i,i+1,..., j,de},i,j∈C,ds,de∈D,
where dsand dedefine the starting and ending depots of route, respectively, and jis
the last customer it serves. The detailed steps are as Algorithm 2:
Algorithm 2. Calculation of route duration
Step 1. Forward calculation of the earliest arrival time EA
ito node i(let earliest starting time of vehicle
EA
ds =0):EA
i=max{EA
i−1,ei−1}+si−1+ci−1,i, then the earliest ending time of
route EA
de =max{EAj,ej}+sj+cj,de;
Step 2. Backward calculation of the latest arrival time LA
ito node i(let LA
de =EA
de):LA
i=
min{LA
i+1−ci,i+1−si,li}, then the latest starting time of vehicle LA
ds =LA
1−cds,1.
If the starting time of the vehicle kis between 0 and LA
ds, it does not affect the
earliest ending time of route. Therefore, the minimal route duration is πk=EA
de −
LAds.
To further illustrate the method above, an example is shown in Fig. 3. The route
is {ds,c1,c2,de}, and the number above “→” represents the travel time between two
vertexes, and the number in“[]” indicates time windows, and the number in“()” stands
for service time. Firstly, forward calculation of the earliest arrival time to nodes:
EA
ds =0, EA
1=EAds +1=1, EA
2=max{EA
1,2}+0.2+3=5.2, EA
de =
max{EA
2,6}+0.3+2=8.3;secondly, backward calculation of the latest arrival
time to nodes: LA
de =EA
de =8.3, LA
2=min{LA
de −2−0.3,7}=6, LA
1=
min{LA
2−3−0.2,2.5}=2.5, LA
ds =LA
1−1=1.5. Namely, when the starting
time of vehicle is between 0 and 1.5, it does not affect the earliest ending time (8.3)
of route. Therefore, the minimum route duration is EA
de −LA
ds =8.3−1.5=6.8,
when the starting time of vehicle is postponed until 1.5.
3.4 Construction of initial solutions
Constructing an initial solution for the MDVRPTWSDR consists of two steps: assign-
ing the customer to the depot and generating a tour permutation for the customers of
Fig. 3 Calculating of the
duration
d
s
d
e
c1 c2
13 2
[2,2.5] [6,7]
(0.2) (0.3)
EA
1
=1 EA
2
=5.2 EA
de
=8.3EA
ds
=0
LA
de
=8.3LA
2
=6LA
1
=2.5LA
ds
=1.5
123
J Comb Optim
each depot. Each customer is simply assigned to the nearest depot. Then the cheapest-
insertion-based heuristic (Bräysy 2003;Solomon 1987) is employed to construct the
tour permutation. The first customer is stochastically selected, the other customers are
examined one by one, and the customer that minimizes the weighted combination of
additional detour and waiting time is selected and inserted into the best place. The
cost function for customer ηis given by formulation (14).
Fη=β1Cη+(1−β1)Wη−β2Cdη,(14)
where
Cη=ciη+cηj−cij,
Wη=Wa
η−Wb
η,
β1∈(0.7,1), β2∈(0.5,1.5).
Notations ciη,cηj,and cij refer to the travel distance between the corresponding pair
of customers (i,η),(η, j), and (i,j), and cdηis the travel distance from depot dto cus-
tomer η.Wa
ηand Wb
ηcorrespond to the total waiting time before and after the insertion,
respectively. β1and β2are parameter values. To obtain diversified initial solutions, β1
and β2take different parameter values from their ranges for each individual.
3.5 Crossover operator
In the proposed HGA_ALS, two parent chromosomes P1and P2are selected by a
binary tournament selection method to generate a single individual Child. If individual
P1is the same as P2, then a new offspring is not generated. To avoid this case, the
crossover individuals are required to have diversity. Therefore, chromosomes P1and
P2are required to meet the condition that their Hamming distance is equal or greater
than a threshold value Th. In this paper, Hamming distance of two individuals is
defined as the number of different genes in the same position. For example, there
are two individuals X1and X2, denoted by X1={x11,x12 ,...,x1L}and X2=
{x21,x22 ,...,x2L}, where Lis the number of genes. The hamming distance between
X1and X2is L
i=1hmi, where hmi=1if (x1i= x2i)
0otherwise .
We propose improved order crossover (OX) based on the depot to adapt the multi-
depot VRPTW. The detailed steps are as Algorithm 3 for two parent chromosomes P1
and P2:
For example, the improved OX generating offspring Child is shown as Fig. 4, where
9 and 10 stand for the depot, and the rest numbers represent customers.
3.6 Selection and mutation operators
The next generation population is completed by using a simple method instead of the
roulette wheel selection. Firstly, a temporary population is constructed by combining
parent population and the subpopulation generated by the crossover. Then, we rank
123
J Comb Optim
Algorithm 3. Improved order crossover
Step 1. A gene substring is randomly selected from P1, which consists of a depot and all customers
assigned to it (called depot gene string); then it is copied to the same positions of offspring
Child. The depot gene string is required to be feasible. If there are no feasible depot gene strings
in P1, then give up their crossover.
Step 2. Deleting the depot gene string from the parent P2, then insert the rest of the genes in turn into
the vacant positions of offspring Child.
Step 3. Applying the adaptive local search introduced in Sect. 3.7 to the Child.
Fig. 4 Improved OX crossover
operator
9 1 2 3 4
10
5 6 7 8
9 1 4 2 3
10
5
6
7 8
9 1 4 5 8
10
2 6 3 7
P
1
P
2
Child
Depot gene string
the temporary population by the evaluation function in a non-decreasing way. The
first Popsize individuals are selected to add to the next generation population. The
characteristic of the selection method is to make the parent and offspring compete
together. It not only reserves the elite individual but also enhances the average fitness
of the population.
An individual is selected to be mutated with a mutation probability pm. If a random
value ¯ris less than pm, then the adaptive local search introduced in Sect. 3.7 is applied
to the individual.
3.7 Adaptive local search
As the performance of different neighborhood methods may vary significantly among
different problems and instances (Chakhlevitch and Cowling 2008), we employ an
adaptive mechanism for the local search. Neighborhood method set is firstly con-
structed, associated with the corresponding score system. According to the score of
each neighborhood method, the roulette wheel selection is used to decide which neigh-
borhood method is applied to improve the current solution.
3.7.1 Neighborhood methods
In this paper, we select 10 neighborhood methods, which are divided into inter-depot
and intra-depot neighborhood methods. They are as follows in detail:
N1(Inter-depot Move): randomly remove some consecutive customers of a depot
and insert them into routes of other depot.
N2(Inter-depot Exchange-Cross): exchange sub route of two depots.
N3(Inter-depot 1-0 exchange): remove a customer from the route of a depot and
insert it into the routes of other depot.
N4(Inter-depot 1-1 exchange): swap a pair of customers assigned to two depots
123
J Comb Optim
9 104321 8765
9651041 8732
9 104321 8765
9 104871 3265
(a)
(b) (f)
(h)(d)
(c) (g)
(e)
Inter-depot Move
Inter-depot Exchange-Cross
9 104321 8765
9 104132 8765
9 104321 8765
9 10
2143 3265
Intra-depot Move
Intra-depot Exchange-Cross
9 104321 8765
9510431 8726
9 104321 8765
9 104371 8265
Inter-depot 1-0
Inter-depot 1-1
9 104321 8765
9 104213 876
5
9 104321 8765
9 104123 3265
Intra-depot 1-0
Intra-depot 1-1
Fig. 5 Eight neighborhood methods
N5(Inter-depot large neighborhood search(LNS)): include removal and reinsertion.
N6(Intra-depot Move): randomly remove some consecutive customers of a depot
and insert them into other position of the same depot.
N7(Intra-depot Exchange-Cross): exchange two sub routes of a depot.
N8(Intra-depot 1-0): remove a customer from the route of a depot and insert it into
other route of the same depot.
N9(Intra-depot 1-1): swap a pair of customers assigned to a depot.
N10(Intra-depot LNS): LNS within a depot and its customer
Examples of ten neighborhood methods except for N5and N10 are shown in Fig. 5,
where numbers 1 to 8 stand for customers but numbers 9 and 10 denote the depots. As
N5and N10 are more complicated than other neighborhood operators, it is described
as follows:
LNS is very effective for those problem with complex constraints (Pisinger and
Ropke 2007). It includes two parts: removal and reinsertion. Namely, some customers
are removed from the routes, then reinserted into routes by a certain rules. The steps
of LNS is as Algorithm 4:
(1) Removal heuristic
We use two removal heuristics: infeasible routes removal heuristic (denoted by R1)
and related removal heuristic (denoted by R2). As the routes obtained by the split
algorithm satisfy the constraints of capacity and time windows, infeasible routes mean
violations of the vehicle number, duration or the number of parking spaces of a depot.
If the current solution is an infeasible solution, R1 is used prior to R2. Otherwise, only
R2 is used. In R1, all customers assigned to the depot with the most violations are
removed. R1 contributes to the reduction of the infeasibility. R2 was first introduced
123
J Comb Optim
Algorithm 4. LNS heuristic
Step1. Initialization: let xbe a given solution, and set parameter φwhich denotes the number of
removed customers, and empty the set C−for the removed customers.
Step2. Remove: remove φcustomers from the solution xand add them into the set C−according to
a removal heuristic, where the remaining part of solution xis denoted by x;
Step3. Reinsert: reinsert the customers of the set C−into the proper position of the xon the basis of
a insertion heuristic, and obtain a new solution xnew;
Step4. Move or not: if f(xnew)< f(x), then accept the xnew ; otherwise, reject it.
by Shaw (1997), and then different variations were constructed. Differences among
related removal heuristics lie in the definition of the relatedness. On the basis of the
relatedness of time windows and distances between the customers, the relatedness is
defined according to formula (15)
Relatedness (i,j)=1
w1cij +(1−w1)
ei−ej
+
li−lj
∀i,j∈C,i= j,(15)
where w1and (1−w1)indicate the weights of time windows and distances related-
ness, respectively, and relatedness (i,j)denotes the value of the relatedness between
customer iand j.
(2) Reinsertion heuristic
Reinsertion heuristic reinserts the removed customers by a certain rule into the
current solution to obtain a better solution. We propose a modified greedy insertion
method, called the greedy insertion based on probability assignment (GIPA). The GIPA
first assigns each of the removed customers to a depot with a probability by roulette
wheel selection and then employs a greedy insertion method to insert the customers
assigned to the depot into routes. On the one hand, due to the randomness of the roulette
wheel selection, the diversity of the solution is kept. On the other hand the method
reduces the number of insert positions, therefore decreases the computational time
correspondingly. Let Dibe a set of depot near to customer i, and |Di|is the number of
elements of the set Di;λid =1/c2
id ∀i∈C,d∈Di, and the probability of customer
ibeing assigned to depot dis pid, and then pid =λid/j∈Dλij ∀i∈C,d∈Di.
Its steps are delineated in Algorithm 5:
3.7.2 Adaptive selection of neighborhood methods
The roulette wheel selection method is employed to select the neighborhood method.
The neighborhood method iis selected with probability pi,where pi=τi
τi, and τi
is the weight of the neighborhood method Ni. In order to compute the weight τiof the
neighborhood method Ni, we divide the entire search into a number of segments. A
segment is a number of iterations of the genetic algorithm; here a segment is defined as
5 iterations. The weights of all neighborhood methods are set to 1 at the first segment.
The weight τi,t+1of neighborhood method Niin segment t+1 is calculated as formula
(16),
123
J Comb Optim
Algorithm 5. Reinsertion heuristic
Step1. Find the best position for each customer in the set C−, at which that increases the objective
value the least.
Step1.1. The roulette wheel selection rule is used to decide to which depot customer iin the set C−
is assigned to. The customer iis assigned to the depot denoted by d.
Step1.2. Find the best insertion position for customer iin the routes of depot d, at which the objective
value is increased the least. The increment in objective value is denoted byfi.
Step1.3. Repeat Step1.1 and Step1.2 until the best insertion position of each customer in the set C−is
decided.
Step2. Choose the customer ithat minimizes min
i∈C−fiand insert it at its best position, then delete
the customer ifrom the set C−
.
Step3. Repeat Step1 and Step2 until the set C−is empty, and obtain the new solution xnew.
τi,t+1=ρτit +(1−ρ)Scorei,t
numi,t(16)
where Scorei,tdenotes the score of neighborhood method Niobtained during the
segment t, and numi,tis the number of times that neighborhood method Niis used.
ρis a factor, and ρ∈(0,1).Thescore of all neighborhood methods is obtained by
a simple rule: if a neighborhood method resulted in a new global best solution, then
the score is increased by δ1; if a neighborhood method resulted in a solution the cost
of which is better than the cost of current solution but not a new global best solution,
then the score is increased by δ2.Afterτi,t+1is updated, both Scorei,t+1and numi,t+1
are reset to zero.
The process by which a neighborhood method is chosen is shown as Algorithm 6:
Algorithm 6. Adaptive local search
Step1. A individual x0is given to be improved.
Step2. Repeat step2.1 and step2.2 until preset iterations Iter1 is arrived.
Step2.1. A inter-depot neighborhood method Nkselected by roulette wheel selection method is
applied to the individual x0,wherek∈{1,2,3,4,5}. if f(xnew)< f(x0), then accept xnew ,
namely, x0←xnew; otherwise, reject it. The score of neighborhood method Nkis updated.
Step2.2. A intra-depot neighborhood method Nkselected by roulette wheel selection method is
applied to the individual x0,wherek∈{6,7,8,9,10}. if f(xnew)< f(x0), then accept
xnew, namely, x0←xnew; otherwise, reject it. The score of neighborhood method Nkis
updated.
Step3. Return the individual x0
To reduce the computational burden, the decoding result of an individual is recorded.
After the neighborhood method is applied, only the modified routes are decoded.
3.8 Population management and termination criteria
To enhance the quality of the entire population, the best individual replaces the worst
individual after each iteration ends. To maintain the diversity of the population and
123
J Comb Optim
avoid the premature convergence, we propose a simple method to manage the popula-
tion: we ensure that the number of the same individuals is not more than ε, otherwise
delete the surplus individuals and keep the number of the same individuals less than ε.
To maintain the same size of the population, new individuals are constructed as initial
solutions, and then the adaptive local search is employed to improve them.
We use a simple termination criterion in the proposed genetic algorithm. When the
maximum permissible number of iterations Iter2 is met in the genetic algorithm, the
process is terminated.
4 Computational experiments
We firstly construct test data for MDVRPTWSDR in Sect. 4.1. Then the parameter
values of the proposed HGA_ALS are given in Sect. 4.2 and its effectiveness is assessed
in Sect. 4.3. Finally, in Sect. 4.4 we compare the impacts of MDVRPTWSDR and
MDVRPTW on cost. The algorithm is coded in visual basic 6.0, and run on a laptop
computer with an Intel Core i7 2.9 GHz processor with 8 GB RAM and running
Windows® 7 Professional edition. For each data set, 10 replications of the algorithm
are executed.
4.1 Experimental data
No benchmark instance set is available for MDVRPTWSDR as it is a new vari-
ant of MDVRPTW. However, the main differences between MDVRPTWSDR and
MDVRPTW are the constraints of the depot ending and parking spaces, and the other
basic data is similar. There are benchmark instances for MDVRPTW introduced by
Cordeau et al. (2001). They are available in http://neo.lcc.uma.es/radi-aeb/WebVRP/
index.html. In this study, we select the instances in which the number of the customers
is less than 150 as test data, and add the number of the parking spaces for each instance.
The first five instances have narrow time windows, whereas the last five instances
have larger time windows. Characteristics of MDVRPTWSDR instances are shown in
Table 1.
Tab l e 1 Characteristics of
MDVRPTWSDR instances Problem MDVRPTW
instances
N|Kd||Pd|MT Q
1 pro01 48 2 4 4 500 200
2 pro02 96 3 6 4 480 195
3 pro03 144 4 8 4 460 150
4 pro07 72 2 4 6 500 200
5 pro08 144 3 6 6 475 190
6 pro11 48 1 2 4 500 200
7 pro12 96 2 4 4 480 195
8 pro13 144 3 6 4 460 150
9 pro17 72 1 2 6 500 200
10 pro18 144 2 4 6 475 190
123
J Comb Optim
Tab l e 2 Parameter value Parameter Final value Parameter Final value
Popsize 30 ρ0.9
α10.8, if the solution is
infeasible, otherwise,1.
δ115
α2500 δ25
α310 ε2
α450 Th 5
α5500 pm0.15
W10.65 Iter1 20
|Di|3Iter2 50
Tab l e 3 Comparison between HGA_SLS and HGA_ALS
Problem HGA_SLS HGA_ALS
Cost Number
of vehicles
Cpu time (m) Cost Number
of vehicles
Cpu time (m)
1 1070.73 8 1.8 1070.73 8 1.7
2 1734.41 12 21.5 1731.41 12 6.5
3 2370.99 15 58.4 2363.41 15 40.0
4 1396.96 11 5.9 1396.04 11 9.1
5 2076.816 47.5 2069.23 16 42.7
6 985.18 4 1.6 984.87 4 1.8
7 1425.77 8 18.0 1421.96 8 18.0
8 1973.27 12 34.5 1965.712 34.5
9 1169.55 6 5.8 1169.55 6 5.8
10 1744.84 12 40.0 1745.912 40.0
Average 1594.85 10.423.5 1591.88 10.420
.0
4.2 Parameter
We use MDVRPTWSDR instances 1 and 5 to test the parameters. The final values of
the parameters are shown in Table 2.
4.3 Evaluating the performance of the HGA_ALS
4.3.1 Comparison HGA_ALS with HGA_SLS for MDVRPTWSDR
We assess the effectiveness of HGA with adaptive local search by comparing with
HGA with stochastic local search (assigning equal probabilities to each neighbor-
hood method), called HGA_SLS. For each instance, 10 replications of the algorithm
were executed. The computational times are indicated by minutes. The best solutions
obtained by them are shown in Table 3. HGA_ALS obtains the best solution in 9 out
of 10 instances, whereas HGA_SLS only obtains it in 3 out of 10 instances. For the
123
J Comb Optim
Tab l e 4 Comparison of results for MDVRPTW instances
Problem BKS TS (2004) SITS (2012) GA + TS
(2012)
HGA_ALS Gap %
to BKS
1 1074.12 1074.12 1074.12 1101.8 1074.12 0.00
2 1762.21 1762.21 1762.21 1762.21 1762.97 0.04
3 2373.65 2373.65 2387.03 2408.42 2380.79 0.30
4 1418.22 1418.22 1418.22 1418.22 1418.22 0.00
5 2096.73 2102.61 2100.58 2103.89 2100.58 0.18
6 1005.73 1005.73 1005.73 1005.73 1005.73 0.00
7 1464.5 1478.51 1470.2 1478.51 1464.50 0.00
8 2001.81 2011.24 2001.81 2014.02 2002.13 0.02
9 1236.24 1236.24 1236.24 1239.13 1236.24 0.00
10 1788.18 1792.61 1788.18 1792.61 1789.27 0.06
Average 1622.14 1625.51 1624.43 1632.45 1623.45 0.06
instance 10, the best solution obtained by HGA_ALS is slightly worse than the one
obtained by HGA_SLS. HGA_ALS is also better than HGA_SLS on overall average.
4.3.2 HGA_ALS applied to MDVRPTW
In order to further assess the effectiveness of HGA_ALS, it is applied to MDVRPTW.
As mentioned in introduction, different algorithms have been applied to MDVRPTW,
where Vidal et al. (2013) summarize its best known solutions (BKS).
HGA_ALS is executed ten times for each instance. The results obtained by
HGA_ALS are compared with those obtained by three versions of tabu search: the
improved tabu search algorithm (TS) proposed by Cordeau et al. (2004), the sequential
iterated tabu search algorithm (SITS) proposed by Cordeau and Maischberger (2012),
and the hybridization of genetic algorithm and tabu search algorithm (GA+TS) pro-
posed by Noori and Ghannadpour (2012). The results are shown in Table 4, where
gap%=(the best solution obtained by HGA_ALS -BKS)/BKS.
Table 4shows that the average obtained by HGA_ALS is better than the ones
obtained by three versions of tabu search algorithms. The average gap % to the previous
best known solutions is equal to 0.06 %. Therefore, HGA_ALS has the competitiveness
on solution quality for the MDVRPTW.
4.4 Comparison MDVRPTWSDR with MDVRPTW
Table 5shows the impacts of MDVRPTWSDR and MDVRPTW on cost, where Sav-
ing%=(cost of MDVRPTWSDR -cost of MDVRPTW)/cost of MDVRPTW. They are
showninTable5: (1) MDVRPTWSDR can obtain less cost than MDVRPTW for each
instance; (2) the overall saving % is 2.05 %, and the saving % for the first five instances
is 1.18 %, whereas the saving % for the last five instances is 2.92 %. The reason for
the difference of saving % is that the last five instances have larger time windows than
the first five instances. Namely, the more loose the constraint is, the more the saving %
123
J Comb Optim
Tab l e 5 The cost differences between MDVRPTWSDR and MDVRPTW
Problem MDVRPTWSDR MDVRPTW Saving %
Cost Number
of vehicles
Cost Number
of vehicles
1 1070.73 8 1074.12 8 0.32
2 1731.41 12 1762.97 12 1.79
3 2363.41 15 2380.79 15 0.73
4 1396.04 11 1418.22 10 1.56
5 2069.23 16 2100.58 17 1.49
Average 1726.16 12.4 1747.34 12.41.18
6 984.87 4 1005.73 4 2.07
7 1421.96 8 1464.50 8 2.90
8 1965.70 12 2002.13 12 1.82
9 1169.55 6 1236.24 6 5.39
10 1745.90 12 1789.27 12 2.42
Average 1457.60 8.4 1499.57 8.42.92
Overall average 1591.88 10.4 1623.45 10.42.05
is. The results above show the transportation mode with flexible stop depot by sharing
depot resource can reduce the transportation cost.
5 Conclusion
The multi-depot vehicle routing problem with time windows and flexible choice of
the stop depot, namely, MDVRPTWSDR is studied in this paper. First, an integer
programming model is formulated with the minimum total traveling cost, considering
the constrains of capacity, time window, route duration, the number of vehicles of each
depot and the number of parking spaces of each depot. As the problem is NP-Hard, a
hybrid genetic algorithm with adaptive local search is proposed. Finally, the proposed
algorithm is tested on the modified benchmark instances, and computational results
show that the method performs better than HGA_SLS on overall average and the
number of best solutions. When HGA_ALS are applied to the classic MDVRPTW, it
obtains competitive solutions, which is better than those obtained by three versions of
tabu search algorithms on the average. Comparing to the classic MDVRPTW, allowing
flexible choice of the stop depot by sharing depot resources not only increase the
flexibility of transportation operation but also reduce total traveling cost about 2 %.
For future research, one important direction is to work on a more complex variant,
such as the MDVRPTWSDR under dynamic traffic environments. In addition, a more
efficient algorithm needs to be designed for the problem.
Acknowledgments The authors gratefully acknowledge valuable comments of three anonymous refer-
ees. This work was supported by Research Grant from National Natural Science Foundation of China
(No. 71001053) and partially supported by LATNA Laboratory, NRU HSE, RF government Grant
(ag. 11.G34.31.0057).
123
J Comb Optim
References
Bräysy O (2003) A reactive variable neighborhood search for the vehicle-routing problem with time win-
dows. INFORMS J Comput 15:347–368
Chakhlevitch K, Cowling P (2008) Hyperheuristics: recent developments. In: Cotta C et al (eds) Adaptive
and multilevel metaheuristics SCI 136. Springer, Heidelberg, pp 3–29
Clarke G, Wright J (1964) Scheduling of vehicles from a central depot to a number of delivery points. Oper
Res 12:568–581
Cordeau JF, Larporte G, Mercier A (2001) A unified tabu search heuristic for vehicle routing problems with
time windows. J Oper Res Soc 52:928–936
Cordeau JF,Larporte G, Mercier A (2004) Improved tabu search algorithm for the handling of route duration
constraints in vehicle routing problems with time windows. J Oper Res Soc 55:542–546
Cordeau JF, Maischberger M (2012) A parallel iterated tabu search heuristic for vehicle routing problems.
Comput Oper Res 39:2033–2050
Hashimoto H, Yagiura M, Imahori S, Ibaraki T (2013) Recent progress of local search in handling the time
window constraints of the vehicle routing problem. Ann Oper Res 204:171–187
Holland JH (1975) Adaptation in natural and artificial systems. The University of Michigan Press, Ann
Arbor, MI
Irnich S (2008) A unified modeling and solution framework for vehicle routing and local search-based
metaheuristics. INFORMS J Comput 20:270–287
Juan AA, Faulin J, Ferrer A, Lourenço HR, Barrios B (2013) MIRHA: multi-start biased randomization of
heuristics with adaptive local search for solving non-smooth routing problems. Top 21:109–132
Li F, Golden B, Wasil E (2007) The open vehicle routing problem: algorithms, large-scale test problems,
and computational results. Comput Oper Res 34:2918–2930
Moccia L, Cordeau JF, Laporte G (2012) A Incremental tabu search heuristic for the generalized Vehicle
routing problem with time windows. J Oper Res Soc 63:232–244
Nagata Y, Bräysy O, Dullaert W (2010) A penalty-based edge assembly memetic algorithm for the vehicle
routing problem with time windows. Comput Oper Res 37:724–737
Noori S, Ghannadpour SF (2012) High-level relay hybrid metaheuristic method for multi-depot vehicle
routing problem with time windows. J Math Modell Algorithms 11:159–179
Pisinger D, Ropke S (2007) A general heuristic for vehicle routing problems. Comput Oper Res 34:2403–
2435
Polacek M, Harlt RF, Doerner KF (2004) A variable neighborhood search for the multi depot vehicle routing
problem with time windows. J Heuristics 10:613–627
Polacek M, Benkner S, Doerner KF, Hartl RF (2008) A cooperative and adaptive variable neighborhood
search for the multi depot vehicle routing problem with time windows. BuR-Bus Res 1:207–218
Prins C (2004) A simple and effective evolutionary algorithm for the vehicle routing problem. Comput Oper
Res 31:1985–2002
Repoussis PP, Tarantilis CD, Ioannou G (2007) The open vehicle routing problem with time windows. J
Oper Res Soc 58:355–367
Ropke S, Pisinger D (2006) An adaptive large neighborhood search heuristic for the pickup and delivery
problem with time windows. Transp Sci 40:455–472
Savelsbergh MWP (1992) The vehicle routing problem with time windows: minimizing route duration.
ORSA J Comput 4:146–154
Shaw P (1997) A new local search algorithm providing high quality solutions to vehicle routing problems.
Department of Computer Science, University of Strathclyde, Scotland, Technical report
Solomon MM (1987) Algorithms for the vehicle routing and scheduling problems with time window
constraints. Oper Res 35:254–265
Tansini L, Viera O (2006) New measures of proximity for the assignment algorithms in the MDVRPTW. J
Oper Res Soc 57:241–249
Vidal T, Crainic TG, Gendreau M, Prins C (2013) A hybrid genetic algorithm with adaptive diversity
management for a large class of vehicle routing problems with time windows. Comput Oper Res 40:475–
489
123