An Exact Algorithm for the Vehicle Routing Problem with

Download Report

Transcript An Exact Algorithm for the Vehicle Routing Problem with

An Exact Algorithm for the
Vehicle Routing Problem with Backhauls
A Thesis
Submitted to the Department of Industrial Engineering
and the Institute of Engineering and Science
of Bilkent University
in Partial Fulfillment of the Requirements
For the Degree of
Master of Science
by
Cumhur Alper GELOĞULLARI
Supervisor
Assoc. Prof. Osman OĞUZ
28.08.2001
Outline
• Importance of Routing Problems
• Problem Statement
• Literature Review
• The Algorithm
• Computational Experiments
• Conclusion
Motivation
• Logistics:
“That part of the supply chain process that plans, implements and
controls the efficient, effective flow and storage of goods, services, and
related information from the point of origin to the point of
consumption in order to meet customers’ requirements”
•Logistics: a means of cost saving
•Distribution costs constituted 21% of the US GNP in 1983.
•VRPs play a central role in logistics.
Problem Statement
The basic Vehicle Routing Problem (VRP):
Customers
D
Problem Statement
The basic Vehicle Routing Problem (VRP):
Minimize
subject to
total distance traveled
each customer is serviced
each route starts and ends at the depot
capacity restrictions on the vehicles
Problem Statement
The VRPs exhibit a wide range of real world applications.
• Dial-a-ride problem
• House call tours by a doctor
• Preventive maintenance inspection tours
• Collection of coins from mail boxes
• Waste Collection
• School Bus Routing
Problem Statement
PARAMETER
DOMAIN
Objective
Fleet size
Fleet type
# of depots
Type of demand
Minimize distance/time, # of vehicles
one vehicle / multiple vehicles
homogenous / heterogenous
single depot / multiple depots
deterministic / stochastic
Total time / distance constraints
imposed / not imposed
Time windows
imposed / not imposed
Precedence relations
imposed / not imposed
Vehicle capacity
finite / infinite
Underlying graph
directed / undirected
symmetric / asymmetric
Problem Statement
The Vehicle Routing Problem with Backhauls (VRPB):
• linehaul (delivery) customers
• backhaul (pick up) customers
D
Linehaul customer
Backhaul customer
Problem Statement
• The VRP replaces deadhead trip back to the depot with a
profitable activity.
• Yearly savings of $160 millions in USA grocery industry.
Literature Review
Related Problems: The TSP and m-TSP
• Traveling Salesman Problem (TSP)
• Multiple Traveling Salesman Problem (m-TSP)
• m-TSP is a special case of the VRP.
Literature Review
Exact Algorithms for the VRPB
• Vehicles are assumed to be rear-loaded.
• Two exact algorithms for the VRPB:
• Toth & Vigo (1997)
• Mingozi & Giorgi (1999)
The Algorithm
The VRPB under consideration is
• Asymmetric
• Linehaul and Backhaul customers can be in any sequence
in a vehicle route
• Both homogenous and heterogenous fleet
The Algorithm
PRELIMINARIES:
•
•
•
•
•
•
L : # of linehaul customers
B : # of backhaul customers
di : demand of (or amount supplied by) customer i
m : # of vehicles
Qk : capacity of vehicle k
cij : distance from customer i to customer j
• a route is denoted by Rk = {i1=0, i2, i3......., ir=0}
• q(Rk) = capacity required by route Rk
The Algorithm
• VRPB = m-TSP subject to capacity constraints
• m-TSP is a relaxation of the VRPB.
• A feasible solution to the m-TSP is not necessarily a feasible
solution for the VRPB.
The Algorithm
The Default Algorithm
• Step 1: Solve the corresponding m-TSP. Let
• Step 2: Check whether
xm* TSP
xm* TSP
be its solution.
is feasible for the VRPB.
• Step 3: If feasible, stop
optimal solution for the VRPB is obtained.
else
add inequalities valid for the VRPB but violated by
goto step 1.
xm* TSP
The Algorithm
Solution of the m-TSP
• Solve m-TSP with branch & bound
• Bektaş’ s Formulation
– decision variable xij
The Algorithm
Feasibility Check
Computation of q(Rk):
Consider the route: {0,4,1,2,3,5,0} where
Route:
0
4
1
2
3
5
0
Type of customer:
-
B
L
L
L
B
-
Demand / Supply:
0
15
10
5
5
10
0
Total Load on the vecicle: 20
35
25
20
15
25
0
The Algorithm
Feasibility Check & Cuts
1) Route Elimination Constraints:
Qmax : maximum vehicle capacity
l ( Rk ) : # of edges in Rk
If for a route, Rk ,
q(Rk) >Qmax
then Rk is infeasible for the VRPB.
x
( i , j )Rk
ij
 l ( Rk ) 1
is valid for the VRPB but violates Rk .
The Algorithm
Feasibility Check & Cuts
For the previous example: Let Qmax=30
The route {0,4,1,2,3,5,0} is infeasible for the VRPB, then add
x04  x 41  x12  x 23  x35  x50  5
to the m-TSP formulation.
Addition of this constraint prohibits the formation of this infeasible route ONLY .
1
2
4
3
5
D
The Algorithm
Feasibility Check & Cuts
2) Multiple Routes Elimination Constraints:
Consider the example:
Route
{0,1,2,3,4,0}
{0,5,6,0}
{0,7,0}
Route #
q(Rk)
1
2
3
25
22
12
Qk
 30

 15
Vehicle #
1
20
We add
x01  x12  x23  x34  x40  x05  x56  x60  7
2
3
The Algorithm
Acceleration Procedures
Local search:
• Begin with an initial solution and improve it
• For the TSP:
a 2-exchange
The Algorithm
Acceleration Procedures
iteration 0:
cost=200
iteration 5:
cost=207
iteration 1:
cost=202
iteration 6:
cost=207
iteration 2:
cost=202
iteration 7:
cost=208
iteration 3:
cost=205
iteration 8:
cost=209
iteration 4:
cost=206
iteration 9:
cost=210
The Algorithm
Acceleration Procedures
Representation of the set of routes:
D
D
D
D
The Algorithm
Acceleration Procedures
Local Search Operators:
Swap Operator:
i
i
j
j
The Algorithm
Acceleration Procedures
Local Search Operators:
Relocate Operator:
j
j
i
j
j
j
The Algorithm
Acceleration Procedures
Local Search Operators:
Crossover Operator:
i
i
D
D
j
D
D
j
Computational Experiments
• C code using CPLEX Callable Library Routines
• A total of 720 instances are tested.
• Two sets of AVRPB instances
Computational Experiments
• Homogenous Fleet (identical vehicles) (540 instances)
• Problem size: 10 - 90 with increments of 10
• For a given problem size, 3 instances for %B=0, %B=20 and %B=50
• cij~U[0,100]
di~U[0,100]
• Common vehicle capacity:
Q  (1 ) maxdi   di
• Number of vehicles:
  di 
m

Q


where   [0,1].
 = 0.25,  = 0.50,  = 0.75 and  = 1.00
%B=0
Alpha
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
Avg.
Time
Improved Algorithm
Avg.
Avg.
Avg.
\# iter.
\# TEC
\# TPC
10
0,25
0,50
0,75
1,00
1,00
0,74
0,42
0,12
5,40
3,20
1,20
-
5,80
3,40
1,20
-
0,97
0,73
0,43
-
4,60
3,00
1,00
-
4,80
3,20
1,00
-
5,00
0,60
0,40
-
20
0,25
0,50
0,75
1,00
7,80
7,68
4,40
0,45
11,20
6,80
3,00
-
14,00
5,60
3,00
-
6,13
6,16
3,16
-
8,20
6,20
2,20
-
9,20
6,20
2,20
-
10,00
4,20
3,00
-
30
0,25
0,50
0,75
1,00
70,69
15,32
9,67
3,60
15,80
2,20
0,60
-
17,40
2,40
0,60
-
43,46
13,98
8,71
-
10,40
2,00
0,40
-
11,40
2,00
0,40
-
18,80
4,20
1,60
-
40
0,25
0,50
0,75
1,00
256,34
46,14
28,38
12,32
28,20
5,80
2,80
-
32,40
6,40
3,00
-
186,60
44,61
28,84
-
12,60
5,20
2,60
-
14,40
5,60
2,60
-
15,00
4,00
2,20
-
50
0,25
0,50
0,75
1,00
502,79
105,20
15,87
31,18
18,80
5,80
0,60
-
23,20
5,80
0,60
-
391,69
100,78
14,40
-
12,60
5,20
0,60
-
13,80
5,20
0,60
-
29,80
15,00
1,60
-
60
0,25
0,50
0,75
1,00
805,08
446,90
36,62
41,59
28,80
8,20
1,20
-
35,60
8,20
1,40
-
546,21
181,58
37,66
-
19,40
4,20
1,20
-
21,20
4,20
1,40
-
32,60
8,00
0,40
-
70
0,25
0,50
0,75
1,00
1.383,60 21,00
392,28
9,40
27,71
1,00
73,61
-
23,60
9,80
1,00
-
1.193,22
332,89
28,07
-
17,60
8,60
1,00
-
17,80
9,00
1,00
-
32,40
6,20
0,40
-
80
0,25
0,50
0,75
1,00
1.790,07 21,80
645,59 14,20
43,42
1,60
139,86
-
23,80
15,40
1,80
-
1.553,99
497,18
31,34
-
18,00
11,40
1,00
-
18,00
11,60
1,20
-
24,00
19,40
3,40
-
90
0,25
0,50
0,75
1,00
2.496,71 23,40
1.427,34 18,20
77,09
0,80
293,72
-
24,20
19,60
0,80
-
2.227,70
990,53
78,56
-
18,40
14,20
0,80
-
18,40
14,60
0,80
-
34,60
22,60
4,00
-
% B=20
Default Algorithm
Avg.
Avg.
Avg.
Improved Algorithm
Avg.
Avg.
Avg.
Avg.
Alpha
Time
Time
10
0,25
0,50
0,75
1,00
1,02
0,60
0,42
0,16
4,60
2,40
0,80
-
4,60
2,40
0,80
-
0,90
0,59
0,34
-
4,00
2,00
0,60
-
4,00
2,00
0,60
-
1,60
1,40
0,60
-
20
0,25
0,50
0,75
1,00
6,38
2,00
0,20
0,55
6,00
2,40
0,20
-
6,60
2,40
0,48
-
5,00
1,87
0,20
-
3,80
1,80
0,20
-
4,00
2,00
0,80
-
9,20
3,00
30
0,25
0,50
0,75
1,00
32,65
17,74
2,36
2,08
12,40
5,00
0,40
-
13,80
5,00
0,40
-
31,69
16,72
2,43
-
11,60
4,20
0,40
-
12,80
4,40
0,40
-
3,40
2,40
0,00
-
40
0,25
0,50
0,75
1,00
59,09
41,95
12,63
10,05
9,40
4,00
0,60
-
10,00
4,00
0,60
-
48,92
39,83
12,40
-
7,20
3,60
0,60
-
7,60
3,60
0,60
-
5,40
1,40
0,40
-
50
0,25
0,50
0,75
1,00
204,91
89,27
35,03
34,95
10,80
2,60
0,20
-
11,40
2,60
0,20
-
180,80
76,63
35,81
-
9,40
2,20
0,20
-
9,60
2,20
0,20
-
16,80
2,80
0,80
-
60
0,25
0,50
0,75
1,00
769,28
202,75
94,19
38,67
18,80
1,40
0,40
-
23,40
1,80
0,60
-
407,83
203,57
94,97
-
12,40
1,20
0,40
-
13,40
1,60
0,60
-
26,60
3,20
0,60
-
70
0,25
0,50
0,75
1,00
1.399,61
227,61
35,36
91,55
21,00
3,20
0,60
-
22,00
3,20
0,60
-
1.095,86 17,00
220,50
2,80
36,73
0,60
-
17,00
2,80
0,60
-
24,00
2,80
0,40
-
80
0,25
0,50
0,75
1,00
1.572,84
392,85
45,02
173,95
18,60
6,00
1,40
-
20,40
6,60
1,60
-
1.478,81 16,20
314,81
5,20
46,08
1,40
-
16,60
5,40
1,60
-
18,80
18,20
3,20
-
90
0,25
0,50
0,75
1,00
2.606,85
371,21
93,60
365,29
26,40
5,60
1,20
-
27,80
6,60
1,40
-
2.124,82 21,20
332,21
5,00
96,40
1,00
-
22,00
5,60
1,00
-
27,00
11,00
3,20
-
\# iter. \# TEC
\# iter. \# TEC \# TPC
-
% B=50
Default Algorithm
Avg.
Avg. Avg.
Improved Algorithm
Avg.
Avg.
Avg.
Avg.
Alpha
Time
Time
10
0,25
0,50
0,75
1,00
1,24
0,24
0,20
0,17
6,60
0,60
0,20
-
6,80
0,60
0,20
-
1,11
0,26
0,21
-
5,60
0,60
0,20
-
5,80
0,60
0,20
-
6,40
0,80
0,00
-
20
0,25
0,50
0,75
1,00
7,40
6,43
2,63
0,70
8,60
4,40
2,20
-
9,40
4,40
2,40
-
6,72
6,79
2,67
-
7,20
4,40
2,20
-
7,60
4,40
2,40
-
6,00
2,00
1,40
-
30
0,25
0,50
0,75
1,00
19,92
11,05
4,58
4,08
7,00
2,60
0,40
-
7,20
2,80
0,60
-
18,18
11,02
4,90
-
6,40
2,20
0,40
-
6,60
2,40
0,60
-
5,80
2,20
0,60
-
40
0,25
0,50
0,75
1,00
123,88
24,48
7,80
9,36
10,40
2,40
0,00
-
11,40
2,40
0,00
-
108,98
24,07
8,10
-
8,00
2,00
0,00
-
8,20
2,00
0,00
-
12,40
2,00
0,00
-
50
0,25
0,50
0,75
1,00
404,51
36,63
28,45
19,11
16,20
2,20
1,00
-
17,60
2,40
1,00
-
280,14
35,40
28,91
-
12,00
1,40
1,00
-
13,20
1,40
1,00
-
33,80
4,40
1,40
-
60
0,25
0,50
0,75
1,00
664,97
266,61
43,66
40,83
12,00
3,60
0,40
-
12,40
3,80
0,60
-
222,58
204,00
43,55
-
3,80
2,80
0,40
-
4,20
3,00
0,60
-
12,60
4,60
1,60
-
70
0,25
0,50
0,75
1,00
1.318,47
224,13
97,33
102,74
17,20
2,80
1,00
-
19,20
3,00
1,00
-
1.200,16 13,80
223,14
2,80
97,83
1,00
-
14,20
3,00
1,00
-
19,80
3,80
1,60
-
80
0,25
0,50
0,75
1,00
1.428,46
240,47
119,45
102,74
13,40
2,40
0,80
-
14,20
2,60
0,80
-
1.125,90 11,00
243,66
2,40
120,45
0,80
-
11,00
2,60
0,80
-
23,60
1,80
1,20
-
90
0,25
0,50
0,75
1,00
2.058,27
367,36
115,59
217,31
15,60
3,00
0,80
-
16,40
3,60
1,00
-
1.728,97 11,80
330,20
2,60
117,87
0,80
-
12,00
2,80
1,00
-
32,40
9,40
2,00
-
\# iter. \# TEC
\# iter. \# TEC \# TPC
Computational Experiments
• Observations
• As 
, the problem gets harder to solve
• For a given value of  , the problem gets easier as %B
• Acceleration Procedures work well
Computational Experiments
• Acceleration Procedures work well
% B=0
Alpha
0,25
0,50
0,75
% B=20
Alpha
0,25
0,50
0,75
% B=50
Alpha
0,25
0,50
0,75
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
741,93
310,31
27,48
18,02
7,44
1,42
20,58
7,72
1,49
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
739,18
149,55
35,42
14,22
3,62
0,64
15,56
3,84
0,74
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
669,68
130,82
46,63
11,89
2,67
0,76
12,73
2,84
0,84
Improved Algorithm
Avg.
Avg.
Avg.
Avg. % Improvement
Time \# iter. \# TEC \# TPC
in Time
625,07
218,28
25,69
12,70
6,06
1,20
13,42
6,22
1,24
21,72
8,58
1,89
15,75
29,66
6,52
Improved Algorithm
Avg.
Avg.
Avg.
Avg. % Improvement
Time \# iter. \# TEC \# TPC
in Time
597,18
134,08
36,15
11,42
3,11
0,60
11,89
3,29
0,71
14,76
5,13
1,15
19,21
10,35
-2,06
Improved Algorithm
Avg.
Avg.
Avg.
Avg. % Improvement
Time \# iter. \# TEC \# TPC
in Time
521,42
119,84
47,17
8,84
2,36
0,76
9,20
2,47
0,84
16,98
3,44
1,09
22,14
8,40
-1,15
Computational Experiments
• Heterogenous Fleet (different vehicles) (180 instances)
• Q=100 m=4
Q1=125 Q2=113 Q3=87 Q4=75
•  = 0.25,  = 0.50
% B=0
Alpha
0,25
0,50
% B=50
Alpha
0,25
0,50
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
620,35
368,38
15,93
10,61
13,51
8,82
Default Algorithm
Avg.
Avg.
Avg.
Time \# iter. \# TEC
615,25
267,65
12,58
6,18
11,16
4,71
%B=0, %B=50
Avg.
\# MTEC
Avg.
Time
2,67
1,89
512,90
307,65
Avg.
\# MTEC
Avg.
Time
1,58
1,47
515,22
219,83
Improved Algorithm
Avg.
Avg.
Avg.
Avg.
\# iter. \# TEC \# MTEC \# TPC
12,60
8,40
10,95
7,05
1,64
1,25
17,87
12,56
Improved Algorithm
Avg.
Avg.
Avg.
Avg.
\# iter. \# TEC \# MTEC \# TPC
9,96
4,93
9,16
4,13
0,87
0,82
13,60
10,13
% Improvement
in Time
17,32
16,49
% Improvement
in Time
16,26
17,87
Computational Experiments
• For Homogenous Fleet:
• Time to solve the hardest problem took 42 min.
– Acceleration procedures provide
• max improvement of 66% in time
• min improvement of -4.95% in time
• For Heterogenous Fleet:
• Time to solve the hardest problem took 33 min.
• Acceleration procedures provide
• max improvement of 28% in time
• min improvement of -10.48% in time
Conclusion
• First Exact Algorithm for the VRPB such that
• Asymmetric
• Linehaul and Backhaul customers can be in any sequence
in a vehicle route
• Both homogenous and heterogenous fleet
• The algorithm can be used for both AVRP and AVRPB
Further Research
• VRPB with time and distance restrictions
• VRPB with time windows
• Other local search procedures