Upload
harsha-deshpande
View
219
Download
0
Embed Size (px)
Citation preview
8/2/2019 # 4 Vehicle Routing 1
1/97
Material Handling & Transportation
Issues
8/2/2019 # 4 Vehicle Routing 1
2/97
Shared Transportation Capacity
Large shipments reduce transportationcosts but increase inventory costs
EOQ trades off these two costs
Reduce shipment size withoutincreasing transportation costs?
Combine shipments on one vehicle
8/2/2019 # 4 Vehicle Routing 1
3/97
TL vs LTL
Inventory
Transport
Transport
Inventory
8/2/2019 # 4 Vehicle Routing 1
4/97
Shared Loads
Inventory
Transport
Transport?
Inventory
?
8/2/2019 # 4 Vehicle Routing 1
5/97
Issues
Design Routes that
Minimize the transportation cost
Respect the capacity of the vehicle
This may require several routes
Consider inventory holding costs
This may require more frequent visits
8/2/2019 # 4 Vehicle Routing 1
6/97
Vehicle Routing Problem
8/2/2019 # 4 Vehicle Routing 1
7/97
Classical VRP
ncustomers must be served from a singledepot utilizing vehicles with capacity Qfor
delivering goods Each customer requires a quantity qi Qof
goods
Customer orders cannot be split
8/2/2019 # 4 Vehicle Routing 1
8/97
Graphical Representation
Depot
8/2/2019 # 4 Vehicle Routing 1
9/97
Additional Features
Depots Multiple locations
Vehicles Multiple vehicle
types and capacities
Release, maximumand down times
Customers Time windows (soft
or hard)
Accessibilityrestrictions
Priority Pickup and delivery
Routes Maximum time Link costs
Objective Functions Minimize total
traveled distance Minimize total
traveled time Minimize number of
vehicles
Maximize quality ofservice
Multiple objectivefunctions
8/2/2019 # 4 Vehicle Routing 1
10/97
Vehicle Routing & Scheduling
Model
Problem Variety Pure Pickup or Delivery Problems
Mixed pickups and deliveries Pickup-Delivery Problems
Backhauls
Complications
Simplest Model: TSP
8/2/2019 # 4 Vehicle Routing 1
11/97
Vehicle Routing
Find best vehicle route(s) to serve a set of ordersfrom customers.
Best route may be
minimum cost, minimum distance, or
minimum travel time.
Orders may be Delivery from depot to customer.
Pickup at customer and return to depot.
Pickup at one place and deliver to another place.
8/2/2019 # 4 Vehicle Routing 1
12/97
8/2/2019 # 4 Vehicle Routing 1
13/97
Model
Nodes: physical locations
Depot.
Customers.
Arcs or Links
Transportation links.
Number on each arc
represents cost, distance,or travel time.
depot
1
4
6
6
8
5
4
4
8
3
8/2/2019 # 4 Vehicle Routing 1
14/97
Pure Pickup or Delivery
Delivery: Load vehicle at depot. Design route todeliver to many customers (destinations).
Pickup: Design route to pickup orders from
many customers and deliver to depot.
Examples:
UPS, FedEx, etc.
Manufacturers & carriers.
Carpools, school buses, etc.
depot
8/2/2019 # 4 Vehicle Routing 1
15/97
8/2/2019 # 4 Vehicle Routing 1
16/97
TSP & VRP
TSP: Travelling Salesman Problem One vehicle can deliver all orders.
VRP: Vehicle Routing Problem
More than one vehicle is required to serve all orders.
VRP
depot
TSP
depot
8/2/2019 # 4 Vehicle Routing 1
17/97
8/2/2019 # 4 Vehicle Routing 1
18/97
Mixed Pickup & Delivery
Interspersed
depot
Pickup
Delivery
depot
Not Interspersed
depot
Separate routes
8/2/2019 # 4 Vehicle Routing 1
19/97
Interspersed Routes
depot
Pickup
Delivery
For clockwise trip:
Load at depot
Stop 1: Deliver A
Stop 2: Pickup B
Stop 3: Deliver C
Stop4: Deliver D
etc.
A
B
ED
C
F
G
H
I
J
K
L
ACDFIJK
CDFIJK
BCDFIJK
BDFIJK Delivering C requires moving B
BFIJK Delivering D requires moving B
8/2/2019 # 4 Vehicle Routing 1
20/97
Pickup-Delivery Problems
Pickup at one or more origin and delivery to oneor more destinations.
Often long haul trips.
depot
A
B
C
Pickup
Delivery
A
B
C
8/2/2019 # 4 Vehicle Routing 1
21/97
Intersperse Pickups and Deliveries?
Can pickups and deliveries be interspersed?
depot
A
B
C
Pickup
Delivery
A
B
C
Interspersed
depot
A
B
C
A
B
C
Not Interspersed
8/2/2019 # 4 Vehicle Routing 1
22/97
Backhauls
If vehicle does not end at depot, should it returnempty (deadhead) or find a backhaul?
How far out of the way should it look for a backhaul?
Pickup
Delivery
depot
A
B
CA
B
C
DD
8/2/2019 # 4 Vehicle Routing 1
23/97
Backhauls
Compare profit from deadheading and carryingbackhaul.
Pickup
Delivery
depot
A
B
CA
B
C
D D
Empty Return
Backhaul
8/2/2019 # 4 Vehicle Routing 1
24/97
8/2/2019 # 4 Vehicle Routing 1
25/97
More Complications
Time windows for pickup and delivery. Hard vs. soft
Compatibility
Vehicles and customers. Vehicles and orders.
Order types.
Drivers and vehicles.
Driver rules (DOT)
Max drive duration = 10 hrs. before 8 hr. break.
Max work duration = 15 hrs. before 8 hr break.
Max trip duration = 144 hrs.
8/2/2019 # 4 Vehicle Routing 1
26/97
Simple Models
Homogeneous vehicles.
One capacity (weight or volume).
Minimize distance.
No time windows or one time window percustomer.
No compatibility constraints.
No DOT rules.
8/2/2019 # 4 Vehicle Routing 1
27/97
Simplest Model: TSP
Given a depot and a set of n customers, find atour (route) starting and ending at the depot,that visits each customer once and is of minimumlength.
One vehicle.
No capacities.
Minimize distance.
No time windows.
No compatibility constraints.
No DOT rules.
8/2/2019 # 4 Vehicle Routing 1
28/97
Multiple Routes
Capacitated VRP: vehicles have capacities. Weight, Cubic feet, Floor space, Value.
Deadlines force short routes.
Pickup at end of day. Deliver in early morning.
Time windows
Pickup. Delivery.
Hard or Soft.
8/2/2019 # 4 Vehicle Routing 1
29/97
Multiple Route Solution Strategies
Find feasible routes.
Cluster first, route second.
Cluster orders to satisfy capacities.
Create one route per cluster. (TSP for each cluster)
Route first, cluster second.
Create one route (TSP).
Break route into pieces satisfying capacities.
Build multiple routes simultaneously.
Improve routes iteratively.
8/2/2019 # 4 Vehicle Routing 1
30/97
Heuristics that GrowFragments Strip Heuristic
Nearest neighbor
Double-endednearest neighbor
Heuristics that GrowTours Nearest addition
Farthest addition
Random addition
Heuristics Based onTrees Minimum spanning
tree
Christofides heuristic
Fast recursivepartitioning
Construction Heuristics
8/2/2019 # 4 Vehicle Routing 1
31/97
The Strip Heuristic
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
The Strip Heuristic Partition the region into narrow strips Routing in each strip is easy ~ 1-Dimensional Paste the routes together
8/2/2019 # 4 Vehicle Routing 1
32/97
Sweep Algorithm
Draw a ray starting from the depot.
Sweep clockwise (or counter-clockwise) and addcustomers to the route as encountered.
Start a new route when vehicle is full.
Re-optimize each route (solve a TSP forcustomers in each route).
8/2/2019 # 4 Vehicle Routing 1
33/97
8/2/2019 # 4 Vehicle Routing 1
34/97
1. Randomly select a starting node
2. Add to the last node the closest node until no morenodes are available
3. Connect the last node with the first node
O(n2) running time
Nearest Neighbor
Double-ended Nearest Neighbor
Conceptually the same as nearest neighbor heuristic
The fragment is allowed to grow from both ends
8/2/2019 # 4 Vehicle Routing 1
35/97
Nearest Neighbor
Add nearest customer to end of the route.
depot
1
depot
2
depot
3
8/2/2019 # 4 Vehicle Routing 1
36/97
Nearest Neighbor
Add nearest customer to end of the route.
depot
4
depot
5
depot
6
8/2/2019 # 4 Vehicle Routing 1
37/97
Nearest Neighbor
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
38/97
Nearest Neighbor Algorithm
depot
Suppose each vehicle capacity = 4 customers
depot
First route
8/2/2019 # 4 Vehicle Routing 1
39/97
Third routedepot
Nearest Neighbor Algorithm
Suppose each vehicle capacity = 4 customers
depot
Second route
8/2/2019 # 4 Vehicle Routing 1
40/97
1. Select a node and thenode nearest to it andbuild a two-node tour
2. Insert in the tour theclosest node yuntil nomore nodes areavailable
O(n2) running time
x
y
z
Minimize d(x,y) + d(y,z)d(x,z)
Nearest Insertion
8/2/2019 # 4 Vehicle Routing 1
41/97
Nearest Insertion
Insert customer closest to the route in the bestsequence.
depot
1
depot
2
depot
3
8/2/2019 # 4 Vehicle Routing 1
42/97
Nearest Insertion
Insert customer closest to the route in the bestsequence.
depot
4
depot
5
depot
6
8/2/2019 # 4 Vehicle Routing 1
43/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
44/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
45/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
46/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
47/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
48/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
49/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
50/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
51/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
52/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
53/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
54/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
55/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
56/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
57/97
Nearest Insertion
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
8/2/2019 # 4 Vehicle Routing 1
58/97
1. Select a node and the node farthest toit and build a two-node tour
2. Insert in the tour the farthest node yuntil no more nodes are available
O(n2) running time
Farthest Insertion
8/2/2019 # 4 Vehicle Routing 1
59/97
This heuristic adds points to the tour ina random order
Random Insertion
8/2/2019 # 4 Vehicle Routing 1
60/97
Minimum Spanning Tree
Construct a minimum spanning tree
Traverse the tree to build a tour byeliminating edges from vertices with degree
three and adding edges to vertices withdegree one
8/2/2019 # 4 Vehicle Routing 1
61/97
Build a minimum spanning tree on theedges between customers
Double the tree to get an Eulerian Tour(visits everyone perhaps several times andreturns to the start)
Short cut the Eulerian Tour to get aHamilton Tour (Traveling Salesman Tour)
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
62/97
Is Easy to construct
Use the Greedy Algorithm
Add edges in increasing order of length
Discard any that create a cycle
Is a Lower bound on the TSP
Drop one edge from the TSP and you
have a spanning tree It must be at least as long as the minimum
spanning tree
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
63/97
x
x
x
x
x
xx
x
x
x
x
x x
x
x
x
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
64/97
Double the Spanning Tree
Duplicate each edge in the Spanning Tree
The resulting graph is connected
The degree at every node must be even
Thats an Eulerian Graph (you can start at a
city, walk on each edge exactly once and
return to where you started) Its no more than twice the length of the
shortest TSP
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
65/97
x
x
x
x
x
xx
x
x
x
x
x x
x
x
x1
2
3
45 6
7
8
910
111213
14
15
16
17
1819
20
21
22
23
2425
2627
28
29
30
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
66/97
Short Cut the Eulerian Tour
x
x
x
x
x
xx
x
x
x
x
x x
x
x
x1
2
3
45 6
7
8
910
111213
14
15
16
17
1819
20
21
22
23
2425
2627
28
29
30
Minimum Spanning Tree
S
8/2/2019 # 4 Vehicle Routing 1
67/97
Short Cut the Eulerian Tour
x
x
x
x
x
xx
x
x
x
x
x x
x
x
x1
2
3
45 6
7
8
910
111213
14
15
16
17
1819
20
21
22
23
2425
2627
28
29
30
Minimum Spanning Tree
8/2/2019 # 4 Vehicle Routing 1
68/97
Christofides Heuristic
Construct an MST[Min. Spanning Tree]
Construct a matching of all vertices with odd
degree Combine the matching edges with the MST
edges, so that now all vertices have an evendegree
Compute an Eulerian tour through the graph
8/2/2019 # 4 Vehicle Routing 1
69/97
Clarke G. and J. W. Wright (1964) Scheduling of vehicles from a central depot to
a number of delivery points, Operations Research, vol. 12, pp. 568-581.
Start with an initial solution where each customer is serviced
individually from the depot
1
2
3
0
Savings Method
8/2/2019 # 4 Vehicle Routing 1
70/97
Savings Calculation
i j
0
c0i cj0
cij
sij= ci0 + c0j- cij
Savings Method
8/2/2019 # 4 Vehicle Routing 1
71/97
Procedure
1. Compute savings sij for all pairs2. Choose the pair with the largest savings
and join customers in a new route iffeasible.
3. If all positive savings have been examined,stop. Otherwise go to 2.
Savings Method
8/2/2019 # 4 Vehicle Routing 1
72/97
Savings Method
Start with separate one stop routes from depot toeach customer.
Calculate all savings for joining two customers
and eliminating a trip back to the depot. Sij= Ci0 + C0j- Cij
Order savings from largest to smallest.
Form route by linking customers according tosavings.
8/2/2019 # 4 Vehicle Routing 1
73/97
Savings Method
depot
1 2 3
4
Remove Add
depot
1 23
4
Savings = S12 = C10+C02 -C12
8/2/2019 # 4 Vehicle Routing 1
74/97
Savings Method
5
depot
1 2
3
4
6
5
depot
S121 2
3
4
6
depot
S13
1 2
3
4
6
5
5
S14
depot
1 24
6
3
depot
S15
1 24
6
3
5
depot
S16
1 24
6
3
5
Small savings
8/2/2019 # 4 Vehicle Routing 1
75/97
Savings Method
5 5
depot
S241 2
3
4
6
depot
S25
1 2
3
4
6
5
5
depot
S26
1 24
6
3
Large savings
depot
1 2
3
4
6
S23
Large savings
3
5
depot
S34
1 24
6depot
S35
1 24
6
3
5
8/2/2019 # 4 Vehicle Routing 1
76/97
Savings Method
depot depot depot
depot
S451 2
3
4 5
6
1 2
3
45
6
S46
S56
1 2
3
4
6
5
1 24
5
6
3
Large savingsS36
In general, with n customers thereare n(n-1)/2 savings to calculate.
8/2/2019 # 4 Vehicle Routing 1
77/97
Savings Method
Order savings from largest to smallest. S35
S34
S45
S36
S56
S23
S46
S24
S25
S12
S26
S13
etc.
h d
8/2/2019 # 4 Vehicle Routing 1
78/97
Savings Method
depot
1 2
3
4 5
6
Form route by linking customers according tosavings.
S35:link 3&5
0-3-5-0
depot
1 2
3
45
6
S34:link 3&4 (keep 3-5)
0-4-3-5-0
S i h d
8/2/2019 # 4 Vehicle Routing 1
79/97
Savings Method
Form route by linking customers according tosavings. S35 0-3-5-0
S34 0-4-3-5-0
S45
S36
S56
S23
S46
S24
S25
S12
S26
S13
etc.
8/2/2019 # 4 Vehicle Routing 1
80/97
S i M th d
8/2/2019 # 4 Vehicle Routing 1
81/97
Savings Method
depot
1 2
3
4
6
5
S23: skip
depot
S46: skip
1 2
3
4
6
5
depot
1 2
3
4
6
5
S24:link 2&4
8/2/2019 # 4 Vehicle Routing 1
82/97
S i M th d
8/2/2019 # 4 Vehicle Routing 1
83/97
Savings Method
Form route by linking customers according tosavings. S35 0-3-5-0
S34 0-4-3-5-0
S45 skip
S36 skip
S56 0-4-3-5-6-0
S23 skip
S46 skip
S24 0-2-4-3-5-6-0
S25 skip
S12 0-1-2-4-3-5-6-0
Diff t A h
8/2/2019 # 4 Vehicle Routing 1
84/97
Different Approaches
Route First - Cluster Second
Build a TSP tour
Partition it to meet capacity
Cluster First - Route Second
Decide who gets served by eachroute
Then build the routes
R t Fi t
8/2/2019 # 4 Vehicle Routing 1
85/97
Route First
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
6
4
55
5
5
3
26
4 6
3
352
Vehicle Cap: 15
Cl t Fi t
8/2/2019 # 4 Vehicle Routing 1
86/97
Cluster First
Sweep Heuristic
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
6
4
55
5
5
3
26
4 6
3
352
Vehicle Cap: 15
Cluster Algorithms
8/2/2019 # 4 Vehicle Routing 1
87/97
Cluster Algorithms
Select certain customers as seed points forroutes.
Farthest from depot.
Highest priority.
Equally spaced.
Grow routes starting at seeds. Add customers:
Based on nearest neighbor or nearest insertion
Based on savings.
Based on minimum angle.
Re-optimize each route (solve a TSP forcustomers in each route).
Cluster with Nearest Neighbor
8/2/2019 # 4 Vehicle Routing 1
88/97
Cluster with Nearest Neighbor
depot
Suppose each vehicle capacity = 4 customers
Select 3 seeds
depot
Add nearestneighbor
Cluster with Nearest Neighbor
8/2/2019 # 4 Vehicle Routing 1
89/97
Cluster with Nearest Neighbor
depot
Suppose each vehicle capacity = 4 customers
Add nearestneighbor
depot
Add nearestneighbor
Cluster with Minimum Angle
8/2/2019 # 4 Vehicle Routing 1
90/97
Cluster with Minimum Angle
depot
Suppose each vehicle capacity = 4 customers
Select 3 seeds
depot
Add customers withminimum angle
Cluster with Minimum Angle
8/2/2019 # 4 Vehicle Routing 1
91/97
Cluster with Minimum Angle
depot
Suppose each vehicle capacity = 4 customers
Add customers withminimum angle
depot
Add customers withminimum angle
Improvement Heuristics
8/2/2019 # 4 Vehicle Routing 1
92/97
Improvement Heuristics
depot
Starting routes
depot
Improved routes
Intra-route
improvementInter-route
improvement
VRP Route Improvement Heuristics
8/2/2019 # 4 Vehicle Routing 1
93/97
VRP Route Improvement Heuristics
Start with a feasible route.
Make changes to improve route. Exchange heuristics within a route
Switch position of one customer in the route. Switch 2 arcs in a route. Switch 3 arcs in a route.
Exchange heuristics between routes. Move a customer from one route to another. Switch two customers between routes.
Local search methods. Simulated Annealing. Tabu Search. Genetic Algorithms.
K opt Exchange
8/2/2019 # 4 Vehicle Routing 1
94/97
K-opt Exchange
Replace k arcs in a given route by k new arcs sothe result is a route with lower cost.
2-opt: Replace 4-5 and 3-6 by 4-3 and 5-6.
depot
1 2
3
45
6
Original route
depot
1 2
3
4 5
6
Improved route
2 opt Exchange
8/2/2019 # 4 Vehicle Routing 1
95/97
2-Opt
x
x
x
x
x
xx
x
x
x
x
xx
x
x
x
2-opt Exchange
3 opt Exchange
8/2/2019 # 4 Vehicle Routing 1
96/97
3-opt Exchange
3-opt: Replace 2-3, 5-4 and 4-6 by 2-4, 4-3 and5-6.
depot
1 2
3
45
6
Original route
depot
1 2
3
4
5
6
Improved route
Improvement Heuristics
8/2/2019 # 4 Vehicle Routing 1
97/97
Improvement Heuristics
depot
Cluster with Nearest Neighbor
depot
Optimized routesStarting routes