Sei sulla pagina 1di 51

1

Vehicle Routing & Scheduling


Find the best routes and schedule to deliver goods
to a set of customers (with specified demands)
from a central depot using a fleet of (identical)
vehicles
1959 Dantzig and Ramser, ARCO gasoline delivery to gas
stations
1964 Clarke and Wright, consumer goods delivery for
Coop. Wholesale Society in Midlands, England
1930s Menger, Travelling salesman problem
1800s Hamiltonian circuit
2
Practical Complications
Travel costs not symmetric, not known
Heterogeneous fleet, fleet size variable
Multiple capacity restriction
weight, volume, time
different for different products
Customer-vehicle compatibility
Delivery time-windows
Pickup & delivery on same route
Capacity? Precedence?
Multiple depots
Optional deliveries (e.g. replenishment), periodic deliveries
Complex or multiple objective(s)
3
Vehicle Routing: Theory and Practice
First generation (1950-60s)
greedy, local improvement heuristics
Second generation (1970-80s)
mathematical programming models
Third generation ?
Artificial intelligence?
Human-machine interactive?
on-line optimisation-based heuristics?
Need robust approach
4
Simple Delivery Problem
One depot
One customer
No capacity constraint
5
Shortest Path Problem
Given a network with (non-negative) costs on
the arcs, find a shortest-path from a given
origin node to a destination node.
A
B
C
F
H
D
G
I
J
E
90 minutes
ORIGIN
Amarillo
DESTINATION
Fort Worth
Oklahoma
City
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
6
Dijkstras algorithm (1959)
1. Initially, set e
0
= 0 and e
j
= for all other
nodes j. Let R= |.
2. Choose node k among nodes in N \R that
minimises e
j.
Let R R U {k}.
3. If destination node in R, stop.
4. Update: for each arc (k,j) adjacent to k,
e
j
min{ e
j
, e
k
+ d
kj
}
5. Repeat from Step 2.
Fast O(n
2
)
Easy to understand
7
A
B
C
F
H
D
G
I
J
E
90 minutes
ORIGIN
Amarillo
DESTINATION
Fort Worth
Oklahoma
City
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
8
A
B
C
F
H
D
G
I
J
E
90 minutes
ORIGIN
Amarillo
DESTINATION
Fort Worth
Oklahoma
City
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90

0
90
138
348
9
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
348

10
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294

228
11
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294

228
258
12
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294

228
258
360
288
13
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294
228
258
360
288
384
14
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294
228
258
336
288
384
15
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294
228
258
336
288
384
16
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294
228
258
336
288
384
17
A
B
C
F
H
D
G
I
J
E 90
ORIGIN
Amarillo
DESTINATION
Fort Worth
Note: All link times
are in minutes
66
84
138
348
120
156
84
132
132
60
48
150
126
48
126
90
90
174
138
294
228
258
336
288
384
18
Slight variation
One depot
Many customers
No capacity restrictions
19
Travelling Salesman Problem
Starting from the depot, find a shortest tour
that visits all other nodes exactly once and
returns to the depot.
Very difficult (NP-complete)
No quick method to find a guaranteed
optimal solution
20
Distance Matrix
Whse Cust
1
Cust
2
Cust
3
Cust
4
Cust
5
Cust
6
Cust
7
Cust
8
Cust
9
Cust
10
Cust
11
Cust
12
Cust
13
Whse 0
Cust 1 12 0
Cust 2 8 9 0
Cust 3 17 8 10 0
Cust 4 15 9 8 4 0
Cust 5 15 17 9 14 11 0
Cust 6 20 23 15 20 16 6 0
Cust 7 17 22 13 20 16 5 4 0
Cust 8 8 17 9 19 16 11 14 10 0
Cust 9 6 18 12 22 20 17 20 16 6 0
Cust 10 16 23 14 22 19 9 8 4 8 14 0
Cust 11 21 28 18 26 22 11 7 6 13 19 5 0
Cust 12 11 22 14 24 21 14 16 12 5 7 9 13 0
Cust 13 18 28 19 28 25 15 13 10 11 14 6 8 8 0
Vehicle Routing
21
Vehicle Routing - Clarke-Wright (1964)
Initially, each (customer) is served by a separate
route from the depot.
Consider merging routes to nodes i and j:
savings= s
ij
= d
i0
+ d
0j
- d
ij
Merge routes with maximum (positive) savings.
d
A,O
d
O,B
d
O,A
d
B,O
O
Depot
B
A
d
A,B
d
O,A
d
B,O
O
Depot
B
A
22
Savings Matrix
Truck Cust
1
Cust
2
Cust
3
Cust
4
Cust
5
Cust
6
Cust
7
Cust
8
Cust
9
Cust
10
Cust
11
Cust
12
Cust
13
Cust 1 1 0
Cust 2 2 11 0
Cust 3 3 21 15 0
Cust 4 4 18 15 28 0
Cust 5 5 10 14 18 19 0
Cust 6 6 9 13 17 19 29 0
Cust 7 7 7 12 14 16 27 7 0
Cust 8 8 3 7 6 7 12 14 15 0
Cust 9 9 0 2 1 1 4 6 7 8 0
Cust 10 10 5 10 11 12 22 28 29 16 8 0
Cust 11 11 5 11 12 14 25 34 32 16 8 32 0
Cust 12 12 1 5 4 8 12 15 16 14 10 18 19 0
Cust 13 13 2 7 7 8 18 25 25 15 10 28 31 21 0
Vehicle Routing
23
Re-calculate savings for current set of routes:
insert at beginning: savings= d
X0
+ d
0A
- d
XA
insert at end: savings= d
0X
+ d
B0
- d
BX
insert in middle: savings= d
0X
+ d
X0
+ d
AB
- d
AX
- d
XB
Repeat merging until no positive savings.
X
A
B A
B
X
A B
X
24
Other tour construction heuristics
Nearest Addition
1. Start with a tour of a single city, s
1
= {i
1
}.
2. Find the nearest city to the tour. Solve
Let the minimum be c
kj
where k eS, j eS.
Let (i, j) be an edge incident to j on TSP tour.
Replace edge (i, j) in tour by (i, k) and (k, j).
(k is added to tour next to j).
3. Repeat from Step 2 until tour completed.
ij
S j S i
c
e e ,
min
25
Other tour construction heuristics
Nearest Insertion
Select city k as nearest addition method. Insert
it between cities i and h which minimizes
c
ik
+ c
kh
c
ih
(increase in tour length).
(After selecting k (which is closest to j), insert k
anywhere in the tour to minimise increase in
tour length.)
26
Other tour construction heuristics
Nearest Merge
1. Start with each city as a subtour.
2. Find 2 subtours that minimize {c
ij
:i e T
1
, j eT
2
}
3. Merge:
(i)
(ii)
(iii)
T
1
T
2
T
1
k
T
2
} { min
2
) , (
ij kj ik
T j i
c c c +
e
} { min
2
1
) , (
) , (
kl ij jl ik
T l k
T j i
c c c c +
e
e
T
1
T
2
i
j
k
l
27
Other tour construction heuristics
Furthest Insertion
1. Select k to maximize distance to current
subtour.
2. Insert k to minimize c
ik
+ c
kj
c
ij
(to minimize additional length of tour).
28
Euclidean Problems
1. Greatest angle insertion
2. Convex hull insertion
- select k not on subtour to minimize c
ik
+ c
kj
c
ij
- break tie by
Other tour construction heuristics
ij
kj ik
c
c c +
29
Lin-Kernighan (1965, 1973)
Local improvement heuristics
2-opt 3-opt
k-opt
i
k
n
m
j
l
i
k
m
j
n l
(a)
(b)
(a) Current tour
(b) Tour after exchange
30
Practical Vehicle Routing &
Scheduling Problems
fleet of vehicles
vehicles capacitated
time restrictions
31
X-Coordinate Y-Coordinate Demand
Warehouse 0 0
Customer 1 0 12 48
Customer 2 6 5 36
Customer 3 7 15 43
Customer 4 9 12 92
Customer 5 15 3 57
Customer 6 20 0 16
Customer 7 17 -2 56
Customer 8 7 -4 30
Customer 9 1 -6 57
Customer 10 15 -6 47
Customer 11 20 -7 91
Customer 12 7 -9 55
Customer 13 2 -15 36
Vehicle Routing
32
Modified Clarke-Wright Savings methods
Capacitated homogeneous fleet
calculate C-W savings, but only merge routes
if vehicle capacity not exceeded
Capacitated non-homogeneous fleet
consider vehicle one at a time, merge routes if
capacity not exceeded
? Order of vehicles to consider?
Delivery time windows
only merge routes if delivery time (and/or
vehicle capacity) restrictions met
33
Two-phased Heuristic
Gillette & Millers Sweep Method (1974)
First assigns nodes to vehicles (cluster), then find best route
for each cluster.
1,000
3,000
2,000
2,000
2,000
1,000
2,000
3,000
2,000
4,000
3,000
2,000
Depot
1,000
3,000
2,000
2,000
2,000
1,000
2,000
3,000
2,000
4,000
3,000
2,000
Depot
(a) Pickup stop data (b) Sweep method solution
Geographical
region
Pickup
points
Route #1
10,000 units
Route #2
9,000 units
Route #3
8,000 units
34
Heuristic Principles for Good Routing
and Scheduling (Ballou)
Customers on a route should be in close proximity
(clustered)
Routes for different days should give tight clusters and
avoid overlap
Build routes beginning from farthest customer from depot
Use largest vehicle first
Pickups should be mixed into delivery routes
Consider alternate means for a customer isolated from
others on same route
Tight time-windows should be avoided
35
Computational Issues
Routing and Scheduling problems
straddle the boundary of easy (polynomial)
vs. hard (exponential) problems
36
Route Sequencing
Assignment of routes to vehicles
Departure and return time of routes specified
Two routes that do not overlap can be assigned to
the same vehicle
What is the assignment that uses the minimum
number of vehicles?
Easy:
Sort routes by start times (early to late),
assign in sequence to first available vehicle
Workload balance?
37
Suppose that a truck routing problem, with the same-size trucks
produces the following routes:
Route Departure Time Return Time
1 8:00 AM 10:25 AM
2 9:30 AM 11:45 AM
3 2:00 PM 4:53 PM
4 11:31 AM 3:21 PM
5 8:12 AM 9:52 AM
6 3:03 PM 5:13 PM
7 12:24 PM 2:22 PM
8 1:33 PM 4:43 PM
9 8:00 AM 10:34 AM
10 10:56 AM 2:25 PM
38
8 9 10 11 12 1 2 3 4 5 6
Route #1
Route #9
Route #5
Route #2
Route #10 Route #6
Route #4
Route #8
Route #7
Route #3
Truck #1
Truck #2
Truck #3
Truck #4
Truck #5
AM PM
Route Sequence to Minimize the Number of Trucks Needed
39
LTL Trucking
Given set of packages of specified sizes, pack into containers so
container capacity not exceeded
What is the minimum number of containers needed?
Bin-packing problem
First-fit algorithm: takes items in the order they come an places them in
the first bin in which they fit.
In 1973, J. Ullman proved that this algorithm can differ from an optimal
packing by as much at 70%
Decreasing first-fit: first orders the items from largest to smallest, then
places them sequentially in the first bin in which they fit.
In 1973, D. Johnson showed that this strategy is never suboptimal by more
than 22%, and furthermore that no efficient bin-packing algorithm can be
guaranteed to do better than 22%.
40
Combinatorial Explosion
Unless problem has special structure, enumerating
all possibilities is practically intractable.
No. of cities = n Possible TSP tours = (n-1)!
5 24
10 362,880
14 6,227,020,800
20 1.216 x 10
17
50 6.0828 x 10
62
70 1.7112 x 10
98
41
TSP Problem size
Cities Constraints Facets
6 25 100
7 56 3437
8 119 194187
10 501 8 million +
20 10^6 10^18 +
50 10^15 10^60 +
42
TSP State of the art
Optimum found and verified.
1950s : 50 cities
1980s : 120 cities
1986 : 3000 cities
(9 million variables, trillions of constraints)
2001:15112 cities (Germany)
2004: 24978 cities (Sweden)
43
Second Generation
Mathematical Programming Models and Heuristics
44
Travelling Salesman Problem

e
e
_ >
e =
=
) (
) (
empty not , nodes of subsets 2
nodes 2
. .
min
. otherwise 0 tour, in edge if 1 Let
S e
e
v e
e
e edges
e e
e
S V S x
V v x
t s
x d
e x
o
o
45
Generalised Assignment Model for Vehicle Routing
(Fisher & Jaikumar [1981])
The vehicle routing problem can be represented exactly by the
following nonlinear generalized assignment problem. Defining
. } 1 | { ) ( in points the of tour
problem salesman traveling optimal an of cost the is ) ( where
,..., 1 , ,... 0 , 1 or 0
,..., 1
0
, 1
,
,..., 1 ,
such that
) ( min
as defined is problem routing vehicle the ), ,..., ( and
otherwise
by vehicle visited is depot) or (customer point if
, 0
, 1
0
= =
= = =
=
=

=
= s
=

ik ik
ik
ik
k
ik
i
ik i
k
k
nk k k
ik
y i y N
y f
K k n i y
n i
i K
y
K k b y a
y f
y y y
k i
y
46
n j n i x
n S y N S S x
n i y x
n j y x
x c ) f(y
) f(y
j i k
x
ijk
k
S S ij
ijk
ik
j
ijk
jk
i
ijk
ij
ijk ij k
k
ijk
,... 0 , ,..., 0 , 1 or 0
| | 2 ), ( , 1 | |
,..., 0 ,
,..., 0 ,
such that
min
by ally mathematic defined be can function the
otherwise
point to point from directly travels vehicle if
, 0
, 1
Defining
= = =
s s _ s
= =
= =
=

e
Of course, we lack a closed form expression for f(y
k
). The generalized
assignment heuristic replaces f(y
k
) with a linear approximation E
i
d
ik
y
ik
and solves the resulting linear generalized assignment problem to
obtain an assignment of customers to vehicles.
47
Set Partitioning Model for Vehicle
Routing
The set partitioning heuristic begins by enumerating a number
of candidate vehicle routes. A candidate route is defined by a
set S _ {1,,n} of customers to be delivered by a single vehicle
and a delivery sequence for these customers. We index the
candidate routes by j and define the following parameters.
generated routes candidate of number
otherwise
route on included is customer if
, 0
, 1
route candidate of cost the
=

=
=
J
j i
a
j c
ij
j
48
J j y
n i y a
K y
y c
j
y
j
J
j
j ij
J
j
j
J
j
j j
j
,..., 1 , 1 or 0
,..., 1 , 1
min
problem. ng partitioni set following by the
ed approximat be can then problem routing vehicle the
otherwise
used is route candidate if
, 0
, 1
Letting
1
1
1
= =
= =
=

=
=
=
There are many effective optimization algorithms for set partitioning.
The set partitioning approach will find an optimal solution if the candidate route list
contains all feasible routes. In most situations, this would result in a set
partitioning problem too large to be solvable, so one instead heuristically generate
routes that are likely to be near-optimal for consideration.
49
Third Generation
Optimisation-based heuristics
AI techniques
human-machine interactive systems
Preview-Solve-Review
50
I
n
t
e
r
G
i
s


:

V
i
s
u
a
l

C
o
n
t
r
o
l

R
o
o
m
51
D
P
S

I
n
t
e
r
n
a
t
i
o
n
a
l

:

L
o
g
i
x
C
e
n
t
r
a
l

Potrebbero piacerti anche