8 The Vehicle-Routing Problem
Farzaneh Daneshzand
Department of Industrial Engineering, Amirkabir University of Technology, Tehran, Iran
In brief, the solution of vehicle-routing problem (VRP) determines a set of routes that starts and ends at its own depot, each performed by a single vehicle in a way that minimizes the global transportation cost and fulfills the demands of the custo-mers and operational constraints (Figure 8.1)[1].
Other VRP variants that have been studied recently in the literature are open VRP (OVRP), multidepot VRP (MDVRP), mix fleet VRP (MFVRP), split-delivery VRP (SDVRP), periodic VRP (PVRP), stochastic VRP (SVRP), and fuzzy VRP (VRPF).
In the following sections, we will discuss these variants and their most important formulations.
8.2.1 The Capacitated VRP
The basic version of VRP is CVRP. In this problem, each vehicle has a capacity that is known in advance, so loading the vehicle more than its capacity is not allowed. There are two versions of CVRP: ACVRP, when the cost matrix is asym-metric, and SCVRP, when the cost matrix is symmetric.
The integer linear programming formulation of ACVRP proposed by Toth and Vigo[4]is presented as follows.
Model Assumptions
G The demands are deterministic.
G The demands may not be split.
G The vehicles are identical.
G The vehicles are based at a single central depot.
G The capacity restrictions for the vehicles are imposed.
Model Inputs
G 5 (V, A): A complete graph V 5 {0, . . ., n}: The vertex set A: The arc set
dj: The demand of each customer (d05 0)
cij: The nonnegative travel cost spent to go from vertex i to vertex j SDV: The customer set
d(S) 5P
di: The total demand of the set K: The number of identical vehicles C: The capacity of each vehicle
Kmin, r(S): The minimum number of vehicles needed to serve all customers Depot
Figure 8.1 The scheme of the VRP[2].
Model Output
xij5 1 if arc (i, j)AA belongs to the optimal solution and 0 otherwise.
Objective Function and Its Constraints
minX
iAV
X
jAV
cijxij ð8:1Þ
X
jAV
xij5 1 ’iAV=f0g ð8:2Þ
X
jAV
xij5 1 ’iAV=f0g ð8:3Þ
X
iAV
xi05 K ð8:4Þ
X
jAV
x0j5 K ð8:5Þ
X
i=2S
X
jAS
xij$ rðsÞ ’S D V=f0g; S 6¼ φ ð8:6Þ
xij5 f0; 1g ’i; jAV ð8:7Þ
Equations (8.2) and (8.3) are indegree and outdegree constraints, respectively.
Constraints (8.4) and (8.5) impose the degree requirement for the depot vertex.
Inequalities(Eqn (8.6))are called capacity cut constraints (CCCs), and they impose vehicle capacity requirements while ensuring the connectivity of the solution. In fact, they stipulate that each cut (V/S, S) defined by a customer set S is crossed by a number of arcs not smaller than r(S).
An alternative formulation may be obtained by transferring the CCCs into sub-tour elimination constraints (SECs):
X
iAS
X
jAS
xij# Sj j 2 rðSÞ ð8:8Þ
This constraint indicates that at least r(S) arcs leave each customer set S. Both families of constraints(8.6)and(8.8)grow exponentially withn. It means that it is practically impossible to solve the linear programming relaxation of the problem directly (Eqns (8.18.7)). A possible way to solve these problems is to consider only some of these constraints and to add the remaining ones only if needed.
8.2.2 Distance-Constrained and Capacitated VRP
The DCVRP is a variant of CVRP on which both vehicle capacity and maximum distance constraints are imposed. In such problems, each tour length should not exceed the quantity known before. The symmetric DCVRP model of Laporte et al.
[5]is presented as follows.
Model Assumptions (Other Than Assumptions of CVRP)
G Distance restrictions are imposed.
Model Inputs (Other Than Inputs of CVRP)
r0(S): Given a subset S of customer vertices, the quantity r0(S) represents the mini-mum number of vehicles needed to serve all the customers in S.
Model Output
xij5 1 if arc (i, j)AA belongs to the optimal solution and 0 otherwise.
Objective Function andits Constraints
min X
iAV=fng
X
j.i
cijxij ð8:9Þ
X
h , i
xhi1X
j . i
xij5 2 ’iAV=f0g ð8:10Þ
X
jAV=f0g
x0j5 2K ð8:11Þ
X
iAS
X
j . i jAS
xij# Sj j 2 r0ðSÞ ’S D V=f0g; S 6¼ φ ð8:12Þ
xijAf0; 1g ’i; jAV=f0g; i , j ð8:13Þ
x0jAf0; 1; 2g ’iAV=f0g ð8:14Þ
Constraints (8.10)and(8.11)are the degree constraints. Inequality(Eqn (8.12)) is an SEC that imposes the connectivity of solution, the vehicle capacity, and the maximum route length requirements by forcing a sufficient number of edges to leave each subset of vertices.
8.2.3 VRP with Time Windows
The VRPTW is the extension of CVRP where the service at each customer must start within a specified time window and the vehicle must remain at the customer’s location during service. The model of Toth and Vigo[4]for VRPTW is presented here.
Model Assumptions (Other Than Assumptions of CVRP)
G For each customer i, the service starts within the time window, [ai, bi], and the vehicle stops for sitime instants.
Model Inputs (Other Than Inputs of CVRP)
E: The earliest possible departure from the depot L: The latest possible arrival at the depot
[a0, b0]5 [an11, bn11]5 [E, L]: The time window associated with node 0, n 1 1 Δ1(i): The vertices that are directly reachable from i, the forward start of i Δ2(i): The vertices from which i is directly reachable, the backward start of i Si: The service time for customer i
tij: The travel time for each arc (i, j)AA
wik: The start of service at node i when serviced by vehicle k.
Model Outputs
xijk5 1 if arc (i, j) is used by vehicle k, (i, j)AA, kAK.
Note that the depot is presented by two nodes: 0, n 1 1.
Objective Function and its Constraints
minXkAK
X
ði;jÞAA
cijxijk ð8:15Þ
X
kAK
X
jAr1ðiÞ
xijk5 1 ’iAN ð8:16Þ
X
jAr1ð0Þ
x0jk5 1 ’kAK ð8:17Þ
X
iAr2ðjÞ
xijk2 X
iAr1ðjÞ
xjik5 0 ’kAK; jAN ð8:18Þ
X
iAr2ðn11Þ
xi;n 1 1;k5 1 ’kAK ð8:19Þ
xijkðwik1 Si1 tij2 wikÞ # 0 ’kAK; ði; jÞAA ð8:20Þ
ai
X
jAr1ðiÞ
xijk# wik# bi
X
jAr1ðiÞ
xijk ’kAK; iAN ð8:21Þ
E # wik# L ’kAK; iAf0; n 1 1g ð8:22Þ
X
iAN
di X
jAr1ðiÞ
xijk# C ’kAK ð8:23Þ
xijk$ 0 ’kAK; ði; jÞAA ð8:24Þ
xijkAf0; 1g ’kAK; ði; jÞAA ð8:25Þ
The objective function (Eqn (8.15)) expresses the total cost. Constraint (8.16) restricts the assignment of each customer to exactly one vehicle route. Constraints (8.178.19) characterize the flow on the path to be followed by vehicle k.
Constraints (8.208.23) guarantee schedule feasibility according to time and capacity considerations, respectively, and the last constraint imposes binary condi-tions on flow variables.
8.2.4 VRP with Backhauls
In VRPB, customers can demand or return some commodities. In fact, it is an extension of the CVRP in which the customers are partitioned into two subsets:
line-haul and back-haul customers. Each line-haul customer requires a given quan-tity to be delivered while a given quanquan-tity of products must be picked up from back-haul customers.
This kind of mixed distribution causes a significant saving in transportation costs, because one is able to visit back-haul customers while delivering the pro-ducts to the line-haul customers. The assumption is that on each route, all deliveries are made before any pickups[6].
Here, we present the formulation of Toth and Vigo[4] for VRPB as an asym-metric problem.
Model Assumptions (Other Than Assumptions of CVRP)
G The sum of demands of the line-haul and back-haul vertices visited by a circuit does not exceed separately the vehicle capacity, C.
G In each circuit, the line-haul vertices precede the back-haul vertices, if any.
Model Inputs (Other Than Inputs of CVRP)
L 5 {1, . . ., n}: Line-haul customer subsetB 5 {n 1 1, . . ., n 1 m}: Back-haul customer subset F 5 L,B
Cij: The nonnegative cost associated with each arc (i, j) Є A L05 L,{0}
B05 B,{0}
G 5 ðV; AÞ: A directed graph obtained from G by defining V 5 V A 5 ðA1,A2,A3Þ
A15 {(i, j) Є A: i Є L0, j Є L}
A25 {(i, j) Є A: i Є B, j Є B0} A35 {(i, j) Є A: i Є L, j Є B0}
Model Outputs
xij5 1 if and only if arc (i, j) is in the optimal solution and 0 otherwise.
Objective Function and Its Constraints
min X
ði;jÞAA
cijxij ð8:26Þ
X
iArj2
xij5 1 ’jAV=f0g ð8:27Þ
X
iAri1
xij5 1 ’iAV=f0g ð8:28Þ
X
iAr02
xi05 K ð8:29Þ
X
iAr01
x0j5 K ð8:30Þ
X
jAS
X
iArj2=S
xij$ rðSÞ ’SAF ð8:31Þ
X
iAS
X
iArj1=S
xij$ rðSÞ ’SAF ð8:32Þ
xijAf0; 1g ’ði; jÞAA ð8:33Þ
The objective function minimizes the total cost.Equations (8.278.30)impose indegree and outdegree constraints for the customer and the depot vertices, respec-tively. Constraints(8.31)and(8.32)are CCCs and impose the connectivity and the capacity constraints. Because of the degree constraints, for any given S, the left-hand side of Eqns (8.31) and (8.32) are equal. Hence, if constraint (8.31) is imposed, constraint(8.32)is redundant and vice versa.
8.2.5 VRP with Pickup and Delivery
In VRPPD, the vehicles have two sets of tasks, one delivering goods to customers and the other picking goods up at customer locations.
In the VRPPD, a heterogeneous vehicle fleet must satisfy a set of transportation requests. Each request is defined by a pickup point, a corresponding delivery point, and a demand to be transported between these locations.
VRPPD can be formulated as a mixed-integer linear programming model. The integer linear model proposed by Hoff, Gribkovskaia, Laporte, and Lokketangen is presented[7].
Model Assumptions (Other Than Assumptions of CVRP)
G There are n customers; i represents two vertices i and n 1 i. It means that vertex i is used to perform a delivery, and vertex i 1 n is used to perform a pickup.
G pi5 di1nfor i 5 1, 2, . . . n
G Visiting i, i 1 n in succession by the same vehicle is, in fact, making a simultaneous pickup and delivery operation at customer i. Otherwise, the two operations are performed separately by the same vehicle or by two different vehicles.
Model Inputs (Other Than Inputs of CVRP)
The extended cost matrix C 5 ðcijÞð2n11Þð2n11Þcij5
cij if i # n and j # n ci2n;j if i $ n 1 1 and j # n; j 6¼ i 2 n ci;j2n if i # n; j $ n 1 1; i 6¼ j 2 n ci2n; j2n if i $ n 1 1; j $ n 1 1
0 if j 5 i 2 n or i 5 j 2 n 8>
>>
><
>>
>>
:
uik: An upper bound on the total pickup demand accumulated in vehicle k on leaving vertex i (i 5 0, 1, . . . , 2n; k 5 1, . . . , m)
vik: An upper bound on the total delivery demand remaining in vehicle k on leaving vertex i
qij: The distance between customer i and j di: The demand of customer i
pi: The supply of customer i
D: The maximum distance that the vehicles may cover in a tour C: The maximum capacity of a vehicle.
Model Outputs
xijk: 1 if vehicle k travels directly from vertex i to vertex j (i, j 5 0, . . . , 2n, i 6¼ j, k 5 1, 2, . . ., m) and 0 otherwise.
Yik: 1 if vehicle k performs a delivery at vertex i (i 5 1, 2, . . . , n, k 5 1, 2, . . . , m).
Zikis 1 if vehicle k performs a pickup at vertex i (i 5 1 1 n, . . . , 2n, k 5 1, 2, . . . , m).
Objective Function and its Constraints
minXmk51
X2n
i50
X2n
j50
cijxijk ð8:34Þ
X2n
j50
xojk5 1 k 5 1; 2; . . . ; m ð8:35Þ
X2n
j50
xijk5X2n
j50
xijik ði 5 0; . . . ; 2n; k 5 1; 2 . . . ; mÞ ð8:36Þ
Xm
k51
X2n
j50
xijk5 1 ði 5 0; . . . ; 2nÞ ð8:37Þ
u0k5 0 ðk 5 1; 2; . . . ; mÞ ð8:38Þ
v0k5Xn
i51
diyik ðk 5 1; 2; :::; mÞ ð8:39Þ
0# uik1 vik# Qk ði 5 0; . . . ; 2n; k 5 1; 2; . . . ; mÞ ð8:40Þ
ujk$ uik1 pjzjk2 ð1 2 xijkÞQk ði 5 0; . . . ; 2n; j5 1; . . . ; 2n; k 5 1; 2; . . . ; mÞ ð8:41Þ vjk$vik2djyjk2ð12xijkÞQk ði50; ...; 2n; j51; ...; 2n; k51;2; ...; mÞ
ð8:42Þ
xijk# yik1 zik ði 5 1; . . . ; 2n; j 5 0; . . . ; 2n; k 5 1; 2; . . . ; mÞ ð8:43Þ
xijkAf0; 1g ði; j 5 0; . . . ; 2n; i 6¼ j; k 5 1; . . . ; mÞ ð8:44Þ
yijkAf0; 1g ði 5 1; . . . ; n; k 5 1; . . . ; mÞ ð8:45Þ
zikAf0; 1g ði 5 n 1 1; . . . ; 2n; k 5 1; 2; . . . ; mÞ ð8:46Þ Constraint (8.35) implies that m vehicles leave the depot. Constraint (8.36) ensures that the incoming flow at each customer vertex is equal to the outgoing flow and that the same vehicle enters and leaves the vertex. Constraint (8.37) means that each vertex is visited exactly once, and constraints(8.38)and(8.39)are used to initialize the pickup and delivery demands in the vehicles. Constraint(8.40) guarantees that the vehicle load never exceeds the vehicle capacity. Inequalities (Eqns (8.41 and 8.42)) control the upper bounds on the amounts of pickup and delivery demands in the vehicle on leaving each vertex. These constraints are, in fact, SECs. Constraint (8.43) states that if a vehicle performs no delivery and no pickup at vertex i, then it does not travel along any arc (i, j). Because constraint (8.37) forces each vertex to be visited by exactly one vehicle, there necessarily exists an index k, for which both sides ofEqn (8.43)will be equal to 1.
Constraints(8.388.42)ensure that theuikand vikvariables are nonnegative.