VEHICLE ROUTING PROBLEM
Readings: E&M 350-353
Topics:
•
VRP versus TSP•
Solution methods•
Decision support systems for VRP Relationship between TSP and VRPVehicle routing problem (VRP) is similar to the Traveling salesman problem (TSP) but with more constraints such as vehicle capacity. Consider a TSP problem:
Suppose that the vehicle has a capacity of 10 and each customer has an order size as shown below, then the TSP solution is no longer feasible.
Depot
Depot
4 3
1
2
5 2
1 4
3 2
3
Depot
4 3
1
2 5
2
1 4
3 2
3
Depot
4 3
1
2 5
2
1 4
3 2
3
A simple method :
Use the TSP as usual
When exceeding the vehicle capacity, go back to the depot
Start another tour with the nearest customer as the first customer
Repeat b. and c. until all customers are served.Can we use only three tours to serve all customers?
As a Decision Problem
Decisions–
Assignment of orders to vehicles–
The sequence of orders to be served
Constraints–
Vehicle capacity (in terms of volume or weight normally)
Objectives–
Minimizing mileages or time
Considerations–
Known demand–
Delivery or pick-upSolution Strategy
Tour construction heuristics
• Insertion methods (e.g. nearest insertion, min cost insertion)
• Savings methods (e.g. Clarke-Wright savings)
• Generalized assignment methods (e.g Fisher-Jaikumar method) Tour improvement
• Intra-route improvement methods (e.g. 2-Opt, 3-Opt)
• Inter-route improvement methods (e.g. Relocate)
Tour construction method 1: Clarke-Wright savings method
1
43 45
43
29 3
43
72 57
52 25
Depot 2
5 4
60 3
40
45 35
Demand for customer 5
Given 1 depot
4 customers with known demand Vehicle capacity (100)
Costs for traveling between customers
Basic Steps
Identify the distance matrix
Identify the savings matrix
Combine routess(2, 4) = c(1, 2) + c(4, 1) – c(2, 4) = 25 + 57 – 34 = 48
s(2, 5) = c(1, 2) + c(5, 1) – c(2, 5) = 25 + 43 – 43 = 25
s(3, 4) = c(1, 3) + c(4, 1) – c(3, 4) = 43 + 57 – 52 = 48
- 45 72 43 43 5
- - 52 34 57 4
- -
29 43 3
48 39 -
25 2
- - - - - 1
5 4 3 2 1
s(2, 3) = 25 + 43 – 29 = 39
25
48
- 45 72 43 43 5
55 -
52 34 57 4
14 48 -
29 43 3
25 48 39 -
25 2
- - - - - 1
5 4 3 2 1
Begin combining tours: starting with the highest savings and (a) the combined tour cannot exceed vehicle capacity, (b) insertion cannot be in the interior of a tour.
1 2
5 4
3
4 4
5 2
Depo 4
Demand (5) = 60 Demand (4) = 35 Vehicle capacity = 100 Decision: combine the tour
- 45 72 43 43 5
55 - 52 34 57 4
14 48 -
29 43 3
25 48 39 -
25 2
- - - - - 1
5 4 3 2 1
Next highest savings:
1
2
5 4
3
43 4
5 25
Depot 45
34
Demand (2) = 40 Demand (4+5) = 95 Vehicle capacity = 100 Decision: cannot combine the
All nodes are visited once and the total cost is 242.
How to speed up the Clarke-Wright Savings Method?
We can use Heap to store the savings (from the largest to the smallest). The use of Heap can speed up the operations.
Tour construction method 2: Generalized assignment method (also called Fisher – Jaikumar Method)
Assign seed points for each route
Evaluate insertion cost for each customer
Assign customers to routesParameters
di : demand of customer i uk : capacity of vehicle k
Decision variables
1 if customer is assigned to route 0 otherwise
ik
i k
y
=
1 if is visited followed by visiting on route 0 otherwise
ijk
i j k
x
=
Define:
N(yk) = all nodes on route k f(yk) = the cost of route k
Our objective is to minimize the route cost while satisfying the demand. Therefore, we can write the problem as follows:
min ( )
subject to
0 1 1,..., {0,1}
k k
i ik k
i
k ik
ik
f y
d y u
y k i
i n
y
≤
=
= =
∈
∑
∑
∑
The cost of route f (yk) is defined as follows:
Example
0
1
3
2 4
5 6
Vehicle 1
Vehicle 2
0 1
51 41
=
= y y
1 0
52 42
=
= y y
{ 1 , 3 , 4 }
) ( y
1= N
{ 2 , 5 , 6 }
)
( y
2=
N
( ) min
subject to 0,...,
1, ( )
k ij ijk
ij
ijk ik
i
ijk ik
j
ijk k
i Q j Q
f y c x
x y j n
x y
x Q N y
∈ ∉
=
= =
=
≥ ⊂
∑
∑
∑
∑ ∑
A big problem: f (yk) is a complex, nonlinear function.
Solution idea: Approximate f (yk) by some linear function:
f (yk) ~ ik ik i
∑ c y
The coefficient,
c
ik, represents the approximated cost of putting customer i on route k.How do we get
c
ik?Idea 1: cheapest insertion cost
Idea 2: use the concept of opportunity cost
Steps of the generalized assignment
Step 1: Assign a seed to each vehicle (or route) where the seeds are farthest away from each other
(Suppose that we have 3 vehicles)
D
Step 2: Evaluate the cost of inserting the customers into the existing routes.
Option 1: Approximate by the cheapest insertion cost
D
a
c
b
Customer 1 7
9
Customer 2 14 13
12
Best choice for customer 1: c cost = 7 Best choice for customer 2: b cost = 12 Best choice for customer 3: b not available Second best for customer 3: a cost = 19
Total cost: 38
1
3
1
9
Customer 3
2
2
D
Customer 1
a
c
b
Customer 2
7 9
14 13
12 13
19
Customer 3
Opportunity cost for customer 1: 2 Opportunity cost for customer 2: 1 Opportunity cost for customer 3: 6
22
Option 2: Approximate by Opportunity cost or Regret
Regret = Cost for second best choice – cost for the best choice Customer with the highest opportunity cost should be inserted first
Opportunity cost for customer 1: 2 Opportunity cost for customer 2: 1
customer 3 to b: 13 customer 1 to c: 7 customer 2 to a: 14 Total: 34
Step 3: Rank customers from highest to lowest regret.
Step 4: Insert the customers according to the rank of regrets one at a time. Notice that the regrets may need to be updated.
Tour improvement Methods
There are general types of methods:
1. Intra-route improvement (changing the sequence of customers within a route) Examples:
2-Opt
3-Opt2. Inter-route improvement
Exchanging customers between routes
Exchanging segments of routes between routesExample of Intra-route improvement: 2-opt algorithm
Do a swap of arc pairs in a route if it can reduce the cost (or time). Below we consider a case where customers may impose delivery time-windows.
Example: Regret (3) > Regret (2)
D
Customer 2
a
c
b
Customer 3
From 3 to c route: 11 From 3 to b route: 17 From 3 to a route: 18 Regret(3) = 6
From 2 to c route: 10 From 2 to a route: 11 From 2 to b route: 12 Regret(2) = 1
2-opt
Note: the indices i and j are in the order of the nodes being visited in a given tour. For simplicity, we represent the route as a chain and ignore the physical shape of the route
i j
i j
2-opt
2-opt swapping illustration
i+1 j+1
i+1 j+1
o Flow chart:
We can continue the swapping until the two cost savings of two consecutive swaps is smaller than some small values or the number of swapping has reached a pre-defined maximum number of swaps. In implementing 2-Opt algorithm, there are several possible ways to select which pairs of arcs to be considered for swapping.
• Select the pair of arcs with the best cost savings and then make swap;
• Select several pair of arcs with the best cost savings and swap the best pair. From the second swap on, this method will check the feasibility before making it since the route has been changed after the first swap.
For the node pairs of i, j, consider swapping?
d(i,j)+d(i+1, j+1)<
d(i, i+1) +d(j,j+1) ?
Y
Return new solution
N
N
Y
Swap the arcs (Note that the arcs from i+1 to j are reversed
After the swap, is the resulting tour feasible?
Stop? N
Y Y
• Randomly consider a pair of arcs and makes swap if it is feasible and can produce cost savings;
• Traverse the route from the starting point and make the swap once an eligible pair of arcs (feasible and cost savings) is found.
Example of Inter-route improvement: Relocate
Consider the swapping between two existing routes. One way is to “relocate” a node in a route (say route B) to another route (say route A)
j
Depot
j+1 i
i-1
i+1 Route A
Route B
We need to choose the route from which one node will be removed (route B) and the route to which the node will be inserted (route A). Then, we can follow the procedure below:
For each node i in B
d(j,i)+d(i, j+1) +d(i-1, i+1)<
d(i, i+1) +d(j, j+1) +d(i-1, i)?
Insert i between (j, j+1)
& Connect i-1, i+1
N
Y
Find a new feasible position for i in Route A, say between j and j+1 Expanding route A,
Shrinking route B
Y Y
Return
Finish expanding/shrinking
Y N
In implementing the relocate algorithm, we have several options:
For each node in the shrinking route, find the first position in the expanding route after which the node can be inserted and the relocation of the node results in cost saving.
Similar to the above, except that for each node in the shrinking route, it will find the position in the expanding route that the relocation will result in the largest saving.
For each node in the shrinking route, find the best position as well as the best expanding route
Other Implementation issues
– Time window constraints
Each customer has a specified time period during which the vehicle can visit
– Backhaul (pickup and delivery)
Not just delivery goods from the depot, but also pick up goods from customers
– Multiple depots
Vehicles can be coming from different depots
– Split orders
May have more than one delivery to a customer
The case of a chemical product manufacturer:
Production unit
Fleet unit
Warehouse Customer
service
Information system
orders
delivery
Sites
– Multiple factories in Pearl River Delta
– Supply petrol chemical products to customers in PRD
Production
– Just-in-time production Distribution
– 20 - 50 trucks per factory – Order cut-off at 4 pm – More than 1 trip per vehicle
– Divide region in zones and one route per zone Process
– Receive an order
– Estimate the order finishing time
– Sort the orders to be finished on tomorrow – Estimate the delivery schedules
– According to the delivery schedules, re-estimate the production schedules – When the orders are ready, ask warehouse people prepare for the loading – Ask fleet unit to send trucks to warehouse for loading
Operation Issues
– Information is not synchronized – Paper work between units
– Spend 3 hours in determining initial delivery schedules – Low truck utilization
– Difficult to entertain customer’s request on exact/approximate delivery time – Urgent orders (some trucks are reserved to handle urgent order)
DECISION SUPPORT SYSTEMS FOR VRP
What is a decision support system?
What are the differences between Databases, Enterprise systems, Decision support systems?
Database
– Organized storage of data
– Minimize data redundancy and inconsistency – Data retrieval, search, and sort
Enterprise system
– Minimize inconsistency across databases – Real-time data
– Integrating databases
Decision support system
– A system to support decision making – Extract data and process data intelligently
The Components of DSS:
1. Database 2. Model-base 3. User interface
Decision support system development
• Analyzing the needs
o Focus on causes, not symptoms
o What will be the reasonable expectation?
• Data Development
o Data administration is a critical requirement for long-term success o DSS requires their own database to produce effective results o Is historical data available? Is the data telling the truth?
• Model-base
o Model contents should be consistent with its goals: strategic, tactical, or operational?
o What class of models do you want? Descriptive? Prescriptive?
• Performance – how to measure?
• What assumptions do you make? Are we assuming:
o Perfect data
o Dispatchers follow instruction exactly o Drivers follow instruction exactly
o Shippers with perfectly predictable demands
o
Personnel from different department have the same goalSource: P.72, Mazza, Faircloug, Melton, de Pablo, Scheffer, Stevens, Software Engineering Standards, Prentice Hall
Major phases in DSS development (and examples of activities) User Requirement Definition
Capture, determine, specify and verify user requirements
Software Requirement Definition
Construct logical model
Specify functional, performance, documentation, acceptance testing requirements, etc.
Architectural Design
Decompose software into components
Define data input and output requirement, data structure, etc.
Select programming languages
Detailed Design and Production
Detailed design of lower-level components Coding
Integrating components Testing
Transfer
Installation
Acceptance tests
Operations and Maintenance
Final acceptance
Data Preparation for DSS:
Static Dynamic
Customer
independent Raw location data:
Road, speed limit, tolls, major intersections, landmarks, etc.
Processed data:
Distances, costs, times, … etc. between points of interests (via shortest path methods on raw location data)
Travel flow pattern Road restriction
Customer
dependent Locations
Trucks’ Details (e.g. capacity, loading and unloading time, running cost) Drivers’ Details (e.g. salary, overtime) Products’ Details (e.g. size, weight, price)
Demand data:
Orders’ Details (e.g. daily demand, amount)
Items’ Details (e.g. product to be ordered, quantity)
Processing on preliminary static data:
Use shortest path engine to compute the distance, cost, or time, etc. between customers or between depot and customers.
VRP Engine for the DSS
A combination of Saving Heuristics, Generalized assignment (Fisher-Jaikumar method), tour improvement (2-Opt, Or-Opt), and different insertion methods.
Resulting handling and tools for analysis
• Visualizing results o Gantt charts o Static route display o Animation
• Allow users to make changes
• Measure performance
• Compare scenarios
• What-if analysis
Typical decision support
• What are some good suggested solutions?
• What is the impact of changing the sequence of orders being served?
• What orders should be outsourced?
• Can an urgent pickup order be accepted? By what vehicle? At what time?
• What are the costs if different numbers of vehicles are used?