Documente Academic
Documente Profesional
Documente Cultură
Topics:
VRP versus TSP
Solution methods
Decision support systems for VRP
Relationship between TSP and VRP
Vehicle routing problem (VRP) is similar to the Traveling salesman problem (TSP) but with more
constraints such as vehicle capacity. Consider a TSP problem:
Depot
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.
1
3
2
2
Depot
1
4
3
4
1
VRP
A simple method :
2
2
Depot
1
3
2
2
1
Depot
As a Decision Problem
Decisions
Constraints
Objectives
Known demand
Delivery or pick-up
2
VRP
Solution 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)
Given
1 depot
4 customers with known demand
Vehicle capacity (100)
Costs for traveling between customers
35
3
40
2
45
52
43
57
60
29
25
72
Demand for
customer 5
43
45
43
1
Depot
Basic Steps
3
VRP
4
VRP
5
VRP
s(2, 3) = 25 + 43 29 = 39
s(2, 4) = c(1, 2) + c(4, 1) c(2, 4)
= 25 + 57 34 = 48
25
39
48
25
43
29
48
57
34
52
43
43
72
45
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
25 -
43 29 -
57 34 52 -
43 43 72 45 -
4
2
4
39 48 25
5
48 14
55
Demand (5) = 60
Demand (4) = 35
Vehicle capacity = 100
Decision: combine the tour
4
1
Depo
6
VRP
Demand (2) = 40
Demand (4+5) = 95
Vehicle capacity = 100
Decision: cannot combine the
25 -
43 29 -
57 34 52 -
43 43 72 45 -
2
45
39 48 25
48 14
55
34
25
5
4
43
1
Depot
7
VRP
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.
Parameters
di
uk
: demand of customer i
: capacity of vehicle k
8
VRP
Decision variables
Example
y41 = 1
Vehicle 1
y51 = 0
N ( y1 ) = {1, 3, 4}
1
2
0
5
6
min
Vehicle 2
y42 = 0
y52 = 1
N ( y2 ) = {2, 5, 6}
f ( yk )
k
subject to
di yik
i
yik
k
yik
uk
k i = 0
=
1 i = 1,..., n
{0,1}
f ( yk ) = min
subject to
cij xijk
ij
xijk
yik
xijk
yik
xijk
iQ jQ
j = 0,..., n
1, Q N ( yk )
cik yik
i
The coefficient, cik , represents the approximated cost of putting customer i on route k.
How do we get cik ?
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)
10
VRP
Step 2: Evaluate the cost of inserting the customers into the existing routes.
a
Customer 1
cost = 7
cost = 12
not available
cost = 19
19
22
13
14
13
Customer 2
12
Customer 3
Customer 1
9
7
19
22
14
13
13
Customer 3
12
Customer 2
11
VRP
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
Customer 3
Regret(2) = 1
b
Step 4: Insert the customers according to the rank of regrets one at a time. Notice that the regrets
may need to be updated.
2-Opt
3-Opt
2. Inter-route improvement
12
VRP
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
2-opt
i+1
i+1
j+1
j+1
13
VRP
o Flow chart:
For the node pairs
of i, j, consider swapping?
Y
d(i,j)+d(i+1, j+1)<
d(i, i+1) +d(j, j+1) ?
Y
After the swap, is the
resulting tour feasible?
Y
Swap the arcs (Note that the
arcs from i+1 to j are reversed
Stop?
Y
Return new solution
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.
14
VRP
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.
i-1
Route A
i+1
j+1
Route B
Depot
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:
15
VRP
Expanding route A,
Shrinking route B
Y
Find a new feasible position for
i in Route A, say between j and j+1
Y
d(j,i)+d(i, j+1) +d(i-1, i+1)<
d(i, i+1) +d(j, j+1) +d(i-1, i)?
Y
Insert i between (j, j+1)
& Connect i-1, i+1
Finish expanding/shrinking
Return
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
16
VRP
Production
unit
Warehouse
Information
system
Fleet unit
delivery
Sites
Multiple factories in Pearl River Delta
Supply petrol chemical products to customers in PRD
17
VRP
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 customers request on exact/approximate delivery time
Urgent orders (some trucks are reserved to handle urgent order)
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
18
VRP
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?
19
VRP
Source: P.72, Mazza, Faircloug, Melton, de Pablo, Scheffer, Stevens, Software Engineering
Standards, Prentice Hall
Architectural Design
Decompose software into components
Define data input and output requirement, data structure, etc.
Select programming languages
Transfer
Installation
Acceptance tests
Customer
independent
Customer
dependent
Static
Dynamic
Demand data:
Orders Details (e.g. daily
demand, amount)
Items Details (e.g. product to be
ordered, quantity)
21
VRP
Visualizing results
o Gantt charts
o Static route display
o Animation
Allow users to make changes
Measure performance
Compare scenarios
What-if analysis
22
VRP