Traveling Salesman Problems
with
Side Constraints
Martin Savelsbergh
Centre for Optimal Planning and Operations
Motivation:
“Rich” Vehicle Routing Problems
Outline
• Motivation
• Delivery Volume Optimization
• Delivery Time Optimization
“Rich” Vehicle Routing Problems
•
•
•
•
•
•
•
•
•
Time windows
Split deliveries
Stochastic demands
Nonhomogeneous vehicles
Pickups and deliveries
Multiple depots
Driver regulations
Period routing
Inventory routing
Solving Rich VRPs: Metaheuristics
•
•
•
•
•
•
•
•
Simulated annealing
Tabu search
Granular tabu search
Very large neighborhood search
Variable neighborhood search
Adaptive large neighborhood search
Genetic algorithms
Memetic algorithms
Metaheuristics for Solving Rich VRPs
• A core ingredient of all metaheuristics is evaluating
the feasibility and quality of a VRP solution
• A core ingredient of all metaheuristics is
evaluating the feasibility and quality of a route
(TSP tour)
• Evaluating the feasibility and quality of a route in
the presence of side constraints is not always
easy
Evaluating Feasibility and Quality:
Driver Regulations
Inventory Routing
Inventory
Inventory Routing Problem
• When to deliver?
• How much to deliver?
• How to deliver?
storage capacity
safety stock
deliveries
•
•
•
•
•
Customer delivery window
Customer usage rate
Customer storage capacity
Vehicle capacity
Vehicle pump rate
Time
Delivery Volume Optimization
Joint work with Ann Campbell
• Given a route, i.e., a sequence of customers, decide
the delivery times and delivery quantities so as to
maximize the volume delivered on the route
• Non-trivial
– The amount that can be delivered at a customer depends on
the time at which the delivery starts
– The time it takes to make the delivery depends on the size of
the delivery
Delivery Volume Optimization
Parameters
Optimization Model
Variables
Customer Delivery Profile
available product
in vehicle
available
storage space
Usage rate
available time
to reach next
customer
Pump rate
Minimum
quantity
Earliest time
Latest time
Maximum delivery
quantity as a function of
delivery start time
Customer Delivery Profile
Usage rate
Pump rate
Minimum
quantity
Earliest time
Latest time
Customer Delivery Profile
Can be tank capacity
Pump rate
Usage
rate
Earliest time
Latest time
Minimum
quantity
Earliest time
Latest time
Example
5
5
5
12.5
10
10
8
6
6
5
10
12.5
19
20
25
30
Proposed Solution Methodologies
• Deliver at peak at all customers - not possible
• Deliver as late as possible at all customers
– Total delivery volume: 11
• Deliver at peak at first, then largest upon arrival at
second
– Total delivery volume: 17.5
• Deliver the most to customer with the largest usage
rate
– Total delivery volume: 17.5
Proposed Solution Methodologies
1. Deliver maximum at second customer
2. Determine time at which we must have finished
delivery at customer 1 to arrive by this time
3. Determine point on the profile for customer 1 that
allows to deliver the most and finish by this time
Total delivery volume: 20
DVO Algorithm
• Deliver maximum at customer n
• Determine time t at which delivery at customer n-1
must finish to arrive on time for delivery at customer n
• Determine time t’ at customer n-1 that allows to
deliver the most at customer n-1 and finish delivery by
time t
• Determine time t at which delivery at customer n-2
must finish to arrive on time for delivery at customer
n-1
• …
Observation
• Consider that when we backtrack we will always
deliver to previous customer at or before its peak
• Delivery to a prior customer at its peak associated
with waiting time
Proof Sketch
•
•
Decompose solution into maximal sections without waiting time
Any increase in the delivery quantity at a customer requires
starting the delivery later
• Starting a delivery x units later results in an increase in delivery
quantity of x · ui
• Starting a delivery x units later results in delaying arrival at next
customer by x + x · ui · R
• The results in a loss of pump time, and thus a reduction in
amount deliverable of (x + x · ui · R) / R
• So we experience a net decrease of x / R
x
Easy Extensions
• Shifts
– Often time limit is on driver’s tour of duty
– Same ideas extend, starting from last route
• Operating mode
– Only using product certain hours a day
• Creates plateaus in customer profile
– Changing usage rate between “early” and “late”
• Profile has changing slope
Harder Extensions
• Time limit on the duration of the route
Time Limit
• Extension - optimize delivery volume such that the
route is completed within a specified period of time
• Make algorithm “smarter” such that it always has
enough time to feasibly visit the rest of the customers
on the route
Time Limit Example
Time limit = 44 (implies latest end time = 49)
5
7
5
5
2
5
6
2
1
5
10
8
17
35
41
45
Time Limit Optimality
• If we deliver truck capacity, we are optimal
• If deliver less than truck capacity but time limit is
spent driving and pumping, we are optimal
• Only issue is when there is wait between customers
• Could we be using this wait time as pump time and
delivering more?
• Try shifting back the ending time of the route to
decrease the amount of wait
– Alters the profile at least for the last customer
Time Limit Example
5
5
7
5
2
5
6
5.6
3
2
1
5
9
10
8
17
Original policy -> 13
End 1 time unit earlier -> 13.6
35
40.4 41
45
Time Limit Example
5
5
7
5
5
2
6
5.6
3
4
2
1
5
9
10
8
17
Original policy -> 13
End 1 unit earlier -> 13.6
End 5 units earlier -> 15
35 38 40.4
41
45
Time Limit Extension
• How far to shift the end time?
– Small x gives us a net increase in delivery volume
– As x gets bigger, we will be swapping pump time after wait for
pump time before
– If x is too large, we will just lose pump time
Time Limit Algorithm
• Find the minimum of
– x removes all waiting time from solution
– x no longer allows for increased pump time at customers
before the wait
– x forces us to deliver below the profile amount at time “early”
for customer n
• Optimal, even with wait at multiple locations
Pricing for
Delivery Flexibility
Revenue
Cost
Profit
Revenue Management
Pricing
Increase revenue
Pricing
Decrease Cost
Pricing
Delivery
Flexibility
Delivery Time Optimization
• Given a route, i.e., a sequence of customers, decide
the delivery times so as to minimize the early and late
penalties
•
•
•
•
•
•
Vehicle capacity
Customer demand
Customer hard window
Customer soft window
Early delivery penalty
Late delivery penalty
E
e
l
infeasible
late penalty
no penalty
early penalty
forced waiting
Customer Penalty Profile
penalty
time
L
Deliver Time Optimization
Joint work with Claudia Archetti & Nicola Bianche
Parameters
Optimization Model
Variables
penalty
We will not incur the late
penalty because we will
choose to depart at e and wait
at next node
time
e
l
penalty
We will not incur a late
penalty because we will
choose to depart at e1
time
penalty
Early penalty: 2
Late penalty: 3
26
24
-6
22
20
18
-4
16
-1
14
12
time
-2
-2
-2
1
-2
-2
Travel times: 1
3
3
-2
-2
-2
0
0
3
4
5
7
8
11
36
-9
32
Early penalty: 3
Late penalty: 2
30
28
26
-6
24
22
20
-4
18
16
14
-1
12
time
2
-3
-3
-3
-3
1
-3
Travel times: 1
2
-3
-3
0
0
3
4
5
7
8
11
Early penalty: 2
Late penalty: 3
penalty
0
15
14
-2
13
12
11
10
0
9
time
-2
Travel times: 1
3
-2
5
6
8
9
0
Penalties:
1
2
3
4
5
e
1
1
1
10
1
Travel times: 1
1
1
-10
-10
-1
-1
2
0
-1
-1
1
0
-10
-1
-1
1
1
2
3
4
5
6
7
8
9
10
11
l
2
2
1
1
1
Penalties:
1
2
3
4
5
e
1
1
1
10
1
Travel times: 1
0
1
1
-10
0
-10
10
-1
-1
0
1
2
3
4
5
6
7
8
9
10
11
l
2
2
10
1
1
Observations
• The penalty function, i.e., the penalty as a function of
the time of departure at the depot, is piecewise linear
and monotonically nonincreasing
• The breakpoints of the penalty function occur at the
end points of the hard and soft time windows of the
customers (adjusted for travel time from the depot)
Observations
• There exists a set of optimal departure times with the
property that the tour is partitioned into a sequence of
subpaths T1, T2, …, Tk with associated break points b1
< b2 < … < bk such that the departure time for
customer j on the subpath Ti is the time associated
with break point bi plus the travel time from the depot
to customer j
• The break point bi associated with subpath Ti is the
first breakpoint where the slope of the penalty function
for subpath Ti is nonnegative
Algorithm
Step 1: Determine break points
Step 2: Set i = 1
Step 3: Determine the slope of subpaths {i,i+1}, {i,i+2}, …,
{i,n} at all break points
Step 4: Find the first break point with a subpath {i,k} with a
nonnegative slope
Step 5: Set the departure times for {i,k}
Step 6: If k = n, then stop, else set i = k and go to Step 3
Algorithm
• Can be implemented in O(n^2) time
• Determine active penalties at E0 and determine list of
break points – O(n)
• Sort list of break points – O(n log n)
• Determine slope of penalties at break points for
subpaths and find subpaths with nonnegative slopes
– O(n^2)
Penalties:
1
2
3
4
5
e
1
1
1
10
1
Travel times: 1
1
1
-10
-10
-1
-1
2
0
-1
-1
1
0
-10
-1
-1
1
1
2
3
4
5
6
7
8
9
10
11
l
2
2
1
1
1
E
e
l
L
p(early)
0
5
6
30
1
2
0
2
3
30
1
2
0
11
12
30
1
1
0
10
11
30
10
1
0
4
5
30
1
1
E
e
l
L
Example
p(late)
breakpoint
active-e
0
5
6
30
0 1,2,3,4
-1
1
2
29
1 1,3,4
-2
9
10
28
-3
7
8
27
-4
0
1
26
active-l
SLOPE 1-1
SLOPE 1-2
SLOPE 1-3
SLOPE 1-4
SLOPE 1-5
-1
-2
-3
-13
-13
5
-1
-1
-2
-12
-11
2 1,3,4
2,5
-1
1
0
-10
-9
5 3,4
2,5
6 3,4
1,2,5
73
1,2,5
83
1,2,4,5
9
1,2,4,5
10
breakpoint
1,2,3,4,5
active-e
active-l
SLOPE 1-1
SLOPE 1-2
SLOPE 3-3
SLOPE 3-4
SLOPE 3-5
2 3,4
5
-1
-11
-10
5 3,4
5
-1
-11
-10
6 3,4
5
-1
-11
-10
73
5
-1
-1
0
83
5
9
4,5
10
4,5
Final Remarks
• Rich vehicle routing problems give rise to interesting
and challenging constrained TSPs.
• Efficient algorithms for evaluating the feasibility and
quality of a solution to a TSP with a single side
constraint can often be devised. What to do in case
of a solution to a TSP with many side constraints?
Questions?
© Copyright 2026 Paperzz