SlideShare a Scribd company logo
1 of 50
Download to read offline
Traveling Salesman Problem
The TSP involves finding the minimum traveling cost for
visiting a fixed set of customers.
The vehicle must visit each customer exactly once and return
to its point of origin also called depot.
The objective function is the total cost of the tour.
Traveling Salesman Problem
Traveling Salesman Problem
Traveling Salesman Problem
Traveling Salesman Problem
Traveling Salesman Problem
Applications of the TSP
Traveling Salesman Problem
Applications of the TSP
Traveling Salesman Problem
The Hardness of the TSP
Traveling Salesman Problem
The Hardness of the TSP
Traveling Salesman Problem
Traveling Salesman Problem
Traveling Salesman Problem
Traveling Salesman Problem
2 3
1 4
5
3 5
2
3
2
1
3 2
4
4
The total number of solutions is (n-1)! /2 if the distances are
symmetric.
For example, if there are 50 customers to visit, the total
number of solutions is 49!/2=3.04x1062.
Traveling Salesman Problem
2 3
1 4
5
3 5
2
3
2
1
3 2
4
4
Solution
If the depot is located at node 1, then the optimal tour is
1-5-2-3-4-1 with total cost equal to 11.
Traveling Salesman Problem
Mathematical Programming
Inputs: n = number of customers including the depot
cij = cost of traveling from customer i to j
Decision variables:
otherwise0
.tocustomerfromtravelsvehicletheif1 ji
xij
Traveling Salesman Problem
jix
ix
jx
xc
ij
n
j
ij
n
i
ij
n
i
n
j
ijij
,allfor0,1
allfor1
allfor1s.t.
min
1
1
1 1
(1)
(2)
Constraints (1) and (2) ensure that each customer is visited
exactly once.
Traveling Salesman Problem
2 3
1 4
5
3 5
2
3
2
1
3 2
4
4
minimize 2x12+3x13+2x14+3x15+3x23+4x24+...+5x45
s.t. x12+x13+x14+x15 = 1 for node 1
x21+x31+x41+x51 = 1 for node 1
...
...
Traveling Salesman Problem
2 3
1 4
5
Is this solution feasible to our formulation?
We need additional constraints, so-called subtour
elimination constraints.
Traveling Salesman Problem
Si Sj
ij Sx subseteveryfor1
Si Sj
ij SSx subseteveryfor1
2 3
1 4
5
Traveling Salesman Problem
Subtour elimination constraints for the example:
4,3,5,2,1 SS
2 3
1 4
5
1545324231413 xxxxxx
5,3,2,4,1 SS
1454342151312 xxxxxx
2 3
1 4
5
Traveling Salesman Problem
Heuristics for the TSP
1. Construction Heuristics
build a feasible solution by adding a node to the
partial tour one at a time and stopping when a feasible
solution is found.
Many construction heuristics are also called greedy
heuristics because they seek to maximize the
improvement at each step.
Traveling Salesman Problem
Nearest Neighbor
Step 1. Start with any node as the beginning of the path.
Step 2. Find the node closest to the last node added to the
path.
Step 3. Repeat Step 2 until all nodes are contained in the
path. Then, join the first and last nodes.
Traveling Salesman Problem
2 3
1 4
5
3
2
1
2
3
Start with node 2.
Nodes added Tour
2 2
5 2-5
1 2-5-1
4 2-5-1-4
3 2-5-1-4-3
2-5-1-4-3-2
2 3
1 4
5
3 5
2
3
2
1
3 2
4
4
Traveling Salesman Problem
Nearest Insertion
Step 1. Start with a node i only.
Step 2. Find node k such that cik is minimal and form
subtour i–k–i.
Step 3. Selection step. Given a subtour, find node k not in
the subtour closest to any node in the subtour.
Step 4. Insertion step. Find the arc (i,j) in the subtour
which minimizes cik+ckj-cij. Insert k between i and j.
Step 5. Go to step 3 unless we have a Hamiltonian cycle.
Traveling Salesman Problem
Farthest Insertion
Step 1. Start with a node i only.
Step 2. Find node k such that cik is maximal and form
subtour i–k–i.
Step 3. Selection step. Given a subtour, find node k not in
the subtour farthest from any node in the subtour.
Step 4. Insertion step. Find the arc (i,j) in the subtour
which minimizes cik+ckj-cij. Insert k between i and j.
Step 5. Go to step 3 unless we have a Hamiltonian cycle.
Traveling Salesman Problem
Arbitrary Insertion
Step 1. Start with a node i only.
Step 2. Find node k such that cik is minimal and form
subtour i–k–i.
Step 3. Selection step. Arbitrarily select node k not in the
subtour to enter the subtour.
Step 4. Insertion step. Find the arc (i,j) in the subtour
which minimizes cik+ckj-cij. Insert k between i and j.
Step 5. Go to step 3 unless we have a Hamiltonian cycle.
Traveling Salesman Problem
Cheapest Insertion
Step 1. Start with a node i only.
Step 2. Find node k such that cik is minimal and form
subtour i–k–i.
Step 3. Insertion step. Find arc (i,j) in the subtour and
node k not, such that cik+ckj-cij is minimal and, then, insert
k between i and j.
Step 4. Go to step 3 unless we have a Hamiltonian cycle.
Traveling Salesman Problem
Clarke and Wright Savings Heuristic
1. Select any node as the central depot which is denoted as node 0. Form
subtours i-0-i for i=1,2,...,n. (Each customer is visited by a separate
vehicle)
2. Compute savings sij=c0i + c0j - cij for all i,j
3. Identify the node pair (i,j) that gives the highest saving sij
4. Form a new subtour by connecting (i,j) and deleting arcs (i,0) and (0, j)
if the following conditions are satisfied
a) both node i and node j have to be directly accessible from node 0
b) node i and node j are not in the same tour.
Traveling Salesman Problem
Clarke and Wright Savings Heuristic
5. Set sij=- , which means that this node pair is processed.
Go to Step 3, unless we have a tour.
Traveling Salesman Problem
Heuristics for the TSP
2. Improvement Heuristics
begin with a feasible solution and successively improve
it by a sequence of exchanges while maintaining a
feasible solution throughout the process.
Traveling Salesman Problem
Heuristics for the TSP
1 2
3 4
1 2
3 4
Traveling Salesman Problem
Two exchange heuristics (2-opt)
Starting with any tour, we consider the effect of removing
any two arcs in the tour and replacing them with the unique
set of two arcs that form a different tour.
If we find a tour with a lower cost than the current tour,
then we use it as the new tour.
When no possible exchange can produce a tour that is
better than the current tour, we stop.
Traveling Salesman Problem
3
2 3
1 4
5
3 5
2 2
Suppose the initial tour is given as 1-2-3-4-5 with cost 15.
2 3
1 4
5
3 5
2
3
2
1
3 2
4
4
Traveling Salesman Problem
3
2 3
1 4
5
3 5
2 2
3
2 3
1 4
5
3 5
2 2
Remove 1-2 and 3-4
Add 1-3 and 2-4
cost=18
3
2 3
1 4
5
3 5
43
Traveling Salesman Problem
3
2 3
1 4
5
3 5
2 2
3
2 3
1 4
5
3 5
2
Remove 1-2 and 4-5
Add 1-4 and 2-5
cost=11
3
2 3
1 4
5
3
21
2
Traveling Salesman Problem
There are n (n-1)/2 - n possible ways of removing and
adding arcs. In this case, n=5, and we have 5
combinations.
The best tour obtained from the process at the first
iteration is 2-3-4-1-5-2 with cost 11.
We use this solution as the starting tour and apply the
process again.
Vehicle Routing Problem
The vehicle routing problem involves finding a set of
trips, one for each vehicle, to deliver known quantities of
goods to a set of customers.
The objective is to minimize the travel costs of all trips
combined.
There may be upper bounds on the total load of each
vehicle and the total duration of its trip.
The most basic Vehicle Routing Problem (VRP) is the
single-depot capacitated VRP.
Inputs: n = number of customers
K = number of vehicles available
cij = cost of traveling from customer i to j
di = demand of customer i
Qk = capacity of vehicle k
Vehicle Routing Problem
n=14, K=5, Qk=100
2 13
4 5
6
7 8 9
10
11
12
13
14
545
306045
10
40
10
35
80
25
25
1520
Vehicle Routing Problem
2 13
4
5
6
7 8 9
10
11
12
13
14
545
306045
10
40
10
35
80
25
25
15
20
Each customer must be visited by a vehicle
The demand assigned to vehicle k must not exceed its capacity
The tour for vehicle k begins at the depot, visits all its customers and
returns to the depot.
Iterated Tour Partitioning Heuristic
1. Find the traveling salesman tour through all customers and
the depot.
2. Starting at the depot and following the tour in any arbitrary
orientation, partition the path into disjoint segments such
that the total demand in each segment does not exceed the
vehicle capacity Q.
Vehicle Routing Problem
5
10
20
15
20
5
10
25
10
15
25
Q=60
Vehicle Routing Problem
The TSP tour
5
10
20
15
20
5
10
25
10
15
25
Q=60
Vehicle Routing Problem
Vehicle Routing Problem
Sweep Heuristic (Gillett and Miller)
1. Calculate the polar coordinates of all customers where the center is the
depot and an arbitrary customer is chosen to be at angle 0. Reorder the
customers so that
0 = 1 2 ... n
2. Starting from the unrouted customer i with smallest angle i construct a
new cluster by sweeping consecutive customers i+1, i+2 ... until the
capacity constraint will not allow the next customer to be added.
3. Continue Step 2 until all customers are included in a cluster.
4. For each cluster constructed, solve the TSP on the subset of customers
and the depot.
Vehicle Routing Problem
Clarke and Wright Savings Heuristic
1. Form subtours i-0-i for i=1,2,...,n. (Each customer is visited by a
separate vehicle)
2. Compute savings sij=c0i + c0j - cij for all i,j
3. Identify the node pair (i,j) that gives the highest saving sij
4. Form a new subtour by connecting (i,j) and deleting arcs (i,0) and (0, j)
if the following conditions are satisfied
a) both node i and node j have to be directly accessible from node 0
b) node i and node j are not in the same tour.
c) forming the new subtour does not violate any of the constraints
associated with the vehicles
Vehicle Routing Problem
Clarke and Wright Savings Heuristic
5. Set sij=- , which means that this node pair is processed.
Go to Step 3, unless all node pairs with sij 0 are processed.
Vehicle Routing Problem
A chain of convenience stores has seven locations in one
city. Each week goods must be delivered from a central
warehouse to the stores. Items are packaged in standard-
sized containers. The following table gives he number of
containers that must be delivered for one week and the
one-way travel times in minute between each pair of
customers. Each delivery vehicle has a capacity for 80
containers. The company would like to make all deliveries
within an 8-hour shift on a single day of the week.
Vehicle Routing Problem
i / j 0 1 2 3 4 5 6 7 Req
0 - 20 57 51 50 10 15 90
1 20 - 51 10 55 25 30 53 46
2 57 51 - 50 20 30 10 47 55
3 51 10 50 - 50 11 60 38 33
4 50 55 20 50 - 50 60 10 30
5 10 25 30 11 50 - 20 90 24
6 15 30 10 60 60 20 - 12 75
7 90 53 47 38 10 90 12 - 30
When each customer is serviced individually from the
depot, the total travel time becomes minutes5862
7
1
0
i
jt
Vehicle Routing Problem
i / j 1 2 3 4 5 6 7
1 -
2 26 -
3 61 58 -
4 15 87 51 -
5 5 37 50 10 -
6 5 62 6 5 5 -
7 57 100 103 130 10 93 -
Savings
s47 = t04 + t07 - t47 = 50 + 90 - 10 = 130
Because the total demand is 60, we may combine these routes.
Vehicle Routing Problem
The next largest savings is s37=103. If we try combine
customer 3 with customer 7 (who is already combined with
customer 4), the total demand on the route would be 93,
which exceeds the vehicle capacity.
We therefore move on to the next-largest savings, s27=100.
Adding customer 2 also violates the capacity constraint.
So does the next-largest savings, s67=93.
Vehicle Routing Problem
Route: 0-4-7-0 0-3-1-0 0-2-5-0 0-6-0
Time: 150 81 97 30
Capacity 60 79 79 75
i / j 1 2 3 4 5 6 7 Req
1 - 46
2 26 - 55
3 61 58 - 33
4 15 87 51 - 30
5 5 37 50 10 - 24
6 5 62 6 5 5 - 75
7 57 100 103 130 10 93 - 30

More Related Content

What's hot

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programingrupali_2bonde
 
Traveling salesman problem(tsp)
Traveling salesman problem(tsp)Traveling salesman problem(tsp)
Traveling salesman problem(tsp)Viraj Patil
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound techniqueishmecse13
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problemJayesh Chauhan
 
The Traveling Salesman Problem
The Traveling Salesman ProblemThe Traveling Salesman Problem
The Traveling Salesman ProblemMaryam Alipour
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problemWajahat Hussain
 
Solving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithmSolving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithmAlex Bidanets
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problemPradeep Behera
 
01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic ProgrammingFenil Shah
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programmingShakil Ahmed
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingcontact2kazi
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programmingparamalways
 
Knapsack problem using greedy approach
Knapsack problem using greedy approachKnapsack problem using greedy approach
Knapsack problem using greedy approachpadmeshagrekar
 

What's hot (20)

Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
Traveling salesman problem(tsp)
Traveling salesman problem(tsp)Traveling salesman problem(tsp)
Traveling salesman problem(tsp)
 
Branch and bound technique
Branch and bound techniqueBranch and bound technique
Branch and bound technique
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
The Traveling Salesman Problem
The Traveling Salesman ProblemThe Traveling Salesman Problem
The Traveling Salesman Problem
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Branch & bound
Branch & boundBranch & bound
Branch & bound
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Solving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithmSolving the traveling salesman problem by genetic algorithm
Solving the traveling salesman problem by genetic algorithm
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Chap8 new
Chap8 newChap8 new
Chap8 new
 
Hamiltonian path
Hamiltonian pathHamiltonian path
Hamiltonian path
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Knapsack problem using greedy approach
Knapsack problem using greedy approachKnapsack problem using greedy approach
Knapsack problem using greedy approach
 

Viewers also liked

Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemShow ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemjayatra
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen ProblemSukrit Gupta
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problemMohamed Gad
 
Solving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmSolving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmishmecse13
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Memetic search in differential evolution algorithm
Memetic search in differential evolution algorithmMemetic search in differential evolution algorithm
Memetic search in differential evolution algorithmDr Sandeep Kumar Poonia
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmDr Sandeep Kumar Poonia
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmDr Sandeep Kumar Poonia
 
Splay trees by NIKHIL ARORA (www.internetnotes.in)
Splay trees by NIKHIL ARORA (www.internetnotes.in)Splay trees by NIKHIL ARORA (www.internetnotes.in)
Splay trees by NIKHIL ARORA (www.internetnotes.in)nikhilarora2211
 
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmComparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmDr Sandeep Kumar Poonia
 
A novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmA novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmDr Sandeep Kumar Poonia
 

Viewers also liked (20)

Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemShow ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
 
The n Queen Problem
The n Queen ProblemThe n Queen Problem
The n Queen Problem
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Solving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithmSolving travelling salesman problem using firefly algorithm
Solving travelling salesman problem using firefly algorithm
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithm
 
Lecture24
Lecture24Lecture24
Lecture24
 
Memetic search in differential evolution algorithm
Memetic search in differential evolution algorithmMemetic search in differential evolution algorithm
Memetic search in differential evolution algorithm
 
Lecture25
Lecture25Lecture25
Lecture25
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithm
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithm
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithm
 
Splay trees by NIKHIL ARORA (www.internetnotes.in)
Splay trees by NIKHIL ARORA (www.internetnotes.in)Splay trees by NIKHIL ARORA (www.internetnotes.in)
Splay trees by NIKHIL ARORA (www.internetnotes.in)
 
Splay Tree
Splay TreeSplay Tree
Splay Tree
 
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithmComparative study of_hybrids_of_artificial_bee_colony_algorithm
Comparative study of_hybrids_of_artificial_bee_colony_algorithm
 
A novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithmA novel hybrid crossover based abc algorithm
A novel hybrid crossover based abc algorithm
 
RMABC
RMABCRMABC
RMABC
 
Splay tree
Splay treeSplay tree
Splay tree
 
Lecture27 linear programming
Lecture27 linear programmingLecture27 linear programming
Lecture27 linear programming
 
2-3 Tree
2-3 Tree2-3 Tree
2-3 Tree
 

Similar to Lecture28 tsp

Transportation problem
Transportation problemTransportation problem
Transportation problemShubhagata Roy
 
Mba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsMba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsRai University
 
Production & Operation Management Chapter25[1]
Production & Operation Management Chapter25[1]Production & Operation Management Chapter25[1]
Production & Operation Management Chapter25[1]Hariharan Ponnusamy
 
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptx
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptxPresentation%20on%20Transportation%20and%20Assignment%20Problem.pptx
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptxIBMRD Ahmednagar
 
A feasible solution algorithm for a primitive vehicle routing problem
A feasible solution algorithm for a primitive vehicle routing problemA feasible solution algorithm for a primitive vehicle routing problem
A feasible solution algorithm for a primitive vehicle routing problemCem Recai Çırak
 
Transportation model
Transportation modelTransportation model
Transportation modelSATISH
 
Transportatopn problm
Transportatopn problmTransportatopn problm
Transportatopn problmAnshul Singh
 
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...dbpublications
 
Introduction to Optimization revised.ppt
Introduction to Optimization revised.pptIntroduction to Optimization revised.ppt
Introduction to Optimization revised.pptJahnaviGautam
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsKaviya452563
 
Hungarian Assignment Problem
Hungarian Assignment ProblemHungarian Assignment Problem
Hungarian Assignment ProblemVivekSaurabh7
 
Transportation and transshipment problems
Transportation  and transshipment problemsTransportation  and transshipment problems
Transportation and transshipment problemsDr. Adinath Damale
 

Similar to Lecture28 tsp (20)

Operation Research
Operation ResearchOperation Research
Operation Research
 
8783733
87837338783733
8783733
 
Transportation problem
Transportation problemTransportation problem
Transportation problem
 
07. Transportation Problem.pptx
07. Transportation Problem.pptx07. Transportation Problem.pptx
07. Transportation Problem.pptx
 
Mba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problemsMba i qt unit-1.2_transportation, assignment and transshipment problems
Mba i qt unit-1.2_transportation, assignment and transshipment problems
 
Transportation technique
Transportation techniqueTransportation technique
Transportation technique
 
Production & Operation Management Chapter25[1]
Production & Operation Management Chapter25[1]Production & Operation Management Chapter25[1]
Production & Operation Management Chapter25[1]
 
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptx
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptxPresentation%20on%20Transportation%20and%20Assignment%20Problem.pptx
Presentation%20on%20Transportation%20and%20Assignment%20Problem.pptx
 
Assign transportation
Assign transportationAssign transportation
Assign transportation
 
A feasible solution algorithm for a primitive vehicle routing problem
A feasible solution algorithm for a primitive vehicle routing problemA feasible solution algorithm for a primitive vehicle routing problem
A feasible solution algorithm for a primitive vehicle routing problem
 
Operations Research Project
Operations Research ProjectOperations Research Project
Operations Research Project
 
Transportation model
Transportation modelTransportation model
Transportation model
 
Transportatopn problm
Transportatopn problmTransportatopn problm
Transportatopn problm
 
Tsp bn b
Tsp bn bTsp bn b
Tsp bn b
 
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...
Fixed Position Constraints in a Travelling Salesman Problem (TSP) with Multip...
 
Introduction to Optimization revised.ppt
Introduction to Optimization revised.pptIntroduction to Optimization revised.ppt
Introduction to Optimization revised.ppt
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Assignment model
Assignment modelAssignment model
Assignment model
 
Hungarian Assignment Problem
Hungarian Assignment ProblemHungarian Assignment Problem
Hungarian Assignment Problem
 
Transportation and transshipment problems
Transportation  and transshipment problemsTransportation  and transshipment problems
Transportation and transshipment problems
 

More from Dr Sandeep Kumar Poonia

Improved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmImproved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsDr Sandeep Kumar Poonia
 
New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm Dr Sandeep Kumar Poonia
 
Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Dr Sandeep Kumar Poonia
 
Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Dr Sandeep Kumar Poonia
 
Problems in parallel computations of tree functions
Problems in parallel computations of tree functionsProblems in parallel computations of tree functions
Problems in parallel computations of tree functionsDr Sandeep Kumar Poonia
 

More from Dr Sandeep Kumar Poonia (19)

Soft computing
Soft computingSoft computing
Soft computing
 
Improved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithmImproved onlooker bee phase in artificial bee colony algorithm
Improved onlooker bee phase in artificial bee colony algorithm
 
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked listsMultiplication of two 3 d sparse matrices using 1d arrays and linked lists
Multiplication of two 3 d sparse matrices using 1d arrays and linked lists
 
New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm New Local Search Strategy in Artificial Bee Colony Algorithm
New Local Search Strategy in Artificial Bee Colony Algorithm
 
A new approach of program slicing
A new approach of program slicingA new approach of program slicing
A new approach of program slicing
 
Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...Performance evaluation of different routing protocols in wsn using different ...
Performance evaluation of different routing protocols in wsn using different ...
 
Enhanced abc algo for tsp
Enhanced abc algo for tspEnhanced abc algo for tsp
Enhanced abc algo for tsp
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
 
Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...
 
Lecture26
Lecture26Lecture26
Lecture26
 
Lecture23
Lecture23Lecture23
Lecture23
 
Problems in parallel computations of tree functions
Problems in parallel computations of tree functionsProblems in parallel computations of tree functions
Problems in parallel computations of tree functions
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Network flow problems
Network flow problemsNetwork flow problems
Network flow problems
 
Shortest Path in Graph
Shortest Path in GraphShortest Path in Graph
Shortest Path in Graph
 
Topological Sort
Topological SortTopological Sort
Topological Sort
 
Graph
GraphGraph
Graph
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Lecture28 tsp

  • 1. Traveling Salesman Problem The TSP involves finding the minimum traveling cost for visiting a fixed set of customers. The vehicle must visit each customer exactly once and return to its point of origin also called depot. The objective function is the total cost of the tour.
  • 8. Traveling Salesman Problem The Hardness of the TSP
  • 9. Traveling Salesman Problem The Hardness of the TSP
  • 13. Traveling Salesman Problem 2 3 1 4 5 3 5 2 3 2 1 3 2 4 4 The total number of solutions is (n-1)! /2 if the distances are symmetric. For example, if there are 50 customers to visit, the total number of solutions is 49!/2=3.04x1062.
  • 14. Traveling Salesman Problem 2 3 1 4 5 3 5 2 3 2 1 3 2 4 4 Solution If the depot is located at node 1, then the optimal tour is 1-5-2-3-4-1 with total cost equal to 11.
  • 15. Traveling Salesman Problem Mathematical Programming Inputs: n = number of customers including the depot cij = cost of traveling from customer i to j Decision variables: otherwise0 .tocustomerfromtravelsvehicletheif1 ji xij
  • 16. Traveling Salesman Problem jix ix jx xc ij n j ij n i ij n i n j ijij ,allfor0,1 allfor1 allfor1s.t. min 1 1 1 1 (1) (2) Constraints (1) and (2) ensure that each customer is visited exactly once.
  • 17. Traveling Salesman Problem 2 3 1 4 5 3 5 2 3 2 1 3 2 4 4 minimize 2x12+3x13+2x14+3x15+3x23+4x24+...+5x45 s.t. x12+x13+x14+x15 = 1 for node 1 x21+x31+x41+x51 = 1 for node 1 ... ...
  • 18. Traveling Salesman Problem 2 3 1 4 5 Is this solution feasible to our formulation? We need additional constraints, so-called subtour elimination constraints.
  • 19. Traveling Salesman Problem Si Sj ij Sx subseteveryfor1 Si Sj ij SSx subseteveryfor1 2 3 1 4 5
  • 20. Traveling Salesman Problem Subtour elimination constraints for the example: 4,3,5,2,1 SS 2 3 1 4 5 1545324231413 xxxxxx 5,3,2,4,1 SS 1454342151312 xxxxxx 2 3 1 4 5
  • 21. Traveling Salesman Problem Heuristics for the TSP 1. Construction Heuristics build a feasible solution by adding a node to the partial tour one at a time and stopping when a feasible solution is found. Many construction heuristics are also called greedy heuristics because they seek to maximize the improvement at each step.
  • 22. Traveling Salesman Problem Nearest Neighbor Step 1. Start with any node as the beginning of the path. Step 2. Find the node closest to the last node added to the path. Step 3. Repeat Step 2 until all nodes are contained in the path. Then, join the first and last nodes.
  • 23. Traveling Salesman Problem 2 3 1 4 5 3 2 1 2 3 Start with node 2. Nodes added Tour 2 2 5 2-5 1 2-5-1 4 2-5-1-4 3 2-5-1-4-3 2-5-1-4-3-2 2 3 1 4 5 3 5 2 3 2 1 3 2 4 4
  • 24. Traveling Salesman Problem Nearest Insertion Step 1. Start with a node i only. Step 2. Find node k such that cik is minimal and form subtour i–k–i. Step 3. Selection step. Given a subtour, find node k not in the subtour closest to any node in the subtour. Step 4. Insertion step. Find the arc (i,j) in the subtour which minimizes cik+ckj-cij. Insert k between i and j. Step 5. Go to step 3 unless we have a Hamiltonian cycle.
  • 25. Traveling Salesman Problem Farthest Insertion Step 1. Start with a node i only. Step 2. Find node k such that cik is maximal and form subtour i–k–i. Step 3. Selection step. Given a subtour, find node k not in the subtour farthest from any node in the subtour. Step 4. Insertion step. Find the arc (i,j) in the subtour which minimizes cik+ckj-cij. Insert k between i and j. Step 5. Go to step 3 unless we have a Hamiltonian cycle.
  • 26. Traveling Salesman Problem Arbitrary Insertion Step 1. Start with a node i only. Step 2. Find node k such that cik is minimal and form subtour i–k–i. Step 3. Selection step. Arbitrarily select node k not in the subtour to enter the subtour. Step 4. Insertion step. Find the arc (i,j) in the subtour which minimizes cik+ckj-cij. Insert k between i and j. Step 5. Go to step 3 unless we have a Hamiltonian cycle.
  • 27. Traveling Salesman Problem Cheapest Insertion Step 1. Start with a node i only. Step 2. Find node k such that cik is minimal and form subtour i–k–i. Step 3. Insertion step. Find arc (i,j) in the subtour and node k not, such that cik+ckj-cij is minimal and, then, insert k between i and j. Step 4. Go to step 3 unless we have a Hamiltonian cycle.
  • 28. Traveling Salesman Problem Clarke and Wright Savings Heuristic 1. Select any node as the central depot which is denoted as node 0. Form subtours i-0-i for i=1,2,...,n. (Each customer is visited by a separate vehicle) 2. Compute savings sij=c0i + c0j - cij for all i,j 3. Identify the node pair (i,j) that gives the highest saving sij 4. Form a new subtour by connecting (i,j) and deleting arcs (i,0) and (0, j) if the following conditions are satisfied a) both node i and node j have to be directly accessible from node 0 b) node i and node j are not in the same tour.
  • 29. Traveling Salesman Problem Clarke and Wright Savings Heuristic 5. Set sij=- , which means that this node pair is processed. Go to Step 3, unless we have a tour.
  • 30. Traveling Salesman Problem Heuristics for the TSP 2. Improvement Heuristics begin with a feasible solution and successively improve it by a sequence of exchanges while maintaining a feasible solution throughout the process.
  • 31. Traveling Salesman Problem Heuristics for the TSP 1 2 3 4 1 2 3 4
  • 32. Traveling Salesman Problem Two exchange heuristics (2-opt) Starting with any tour, we consider the effect of removing any two arcs in the tour and replacing them with the unique set of two arcs that form a different tour. If we find a tour with a lower cost than the current tour, then we use it as the new tour. When no possible exchange can produce a tour that is better than the current tour, we stop.
  • 33. Traveling Salesman Problem 3 2 3 1 4 5 3 5 2 2 Suppose the initial tour is given as 1-2-3-4-5 with cost 15. 2 3 1 4 5 3 5 2 3 2 1 3 2 4 4
  • 34. Traveling Salesman Problem 3 2 3 1 4 5 3 5 2 2 3 2 3 1 4 5 3 5 2 2 Remove 1-2 and 3-4 Add 1-3 and 2-4 cost=18 3 2 3 1 4 5 3 5 43
  • 35. Traveling Salesman Problem 3 2 3 1 4 5 3 5 2 2 3 2 3 1 4 5 3 5 2 Remove 1-2 and 4-5 Add 1-4 and 2-5 cost=11 3 2 3 1 4 5 3 21 2
  • 36. Traveling Salesman Problem There are n (n-1)/2 - n possible ways of removing and adding arcs. In this case, n=5, and we have 5 combinations. The best tour obtained from the process at the first iteration is 2-3-4-1-5-2 with cost 11. We use this solution as the starting tour and apply the process again.
  • 37. Vehicle Routing Problem The vehicle routing problem involves finding a set of trips, one for each vehicle, to deliver known quantities of goods to a set of customers. The objective is to minimize the travel costs of all trips combined. There may be upper bounds on the total load of each vehicle and the total duration of its trip. The most basic Vehicle Routing Problem (VRP) is the single-depot capacitated VRP.
  • 38. Inputs: n = number of customers K = number of vehicles available cij = cost of traveling from customer i to j di = demand of customer i Qk = capacity of vehicle k Vehicle Routing Problem n=14, K=5, Qk=100 2 13 4 5 6 7 8 9 10 11 12 13 14 545 306045 10 40 10 35 80 25 25 1520
  • 39. Vehicle Routing Problem 2 13 4 5 6 7 8 9 10 11 12 13 14 545 306045 10 40 10 35 80 25 25 15 20 Each customer must be visited by a vehicle The demand assigned to vehicle k must not exceed its capacity The tour for vehicle k begins at the depot, visits all its customers and returns to the depot.
  • 40. Iterated Tour Partitioning Heuristic 1. Find the traveling salesman tour through all customers and the depot. 2. Starting at the depot and following the tour in any arbitrary orientation, partition the path into disjoint segments such that the total demand in each segment does not exceed the vehicle capacity Q. Vehicle Routing Problem
  • 43. Vehicle Routing Problem Sweep Heuristic (Gillett and Miller) 1. Calculate the polar coordinates of all customers where the center is the depot and an arbitrary customer is chosen to be at angle 0. Reorder the customers so that 0 = 1 2 ... n 2. Starting from the unrouted customer i with smallest angle i construct a new cluster by sweeping consecutive customers i+1, i+2 ... until the capacity constraint will not allow the next customer to be added. 3. Continue Step 2 until all customers are included in a cluster. 4. For each cluster constructed, solve the TSP on the subset of customers and the depot.
  • 44. Vehicle Routing Problem Clarke and Wright Savings Heuristic 1. Form subtours i-0-i for i=1,2,...,n. (Each customer is visited by a separate vehicle) 2. Compute savings sij=c0i + c0j - cij for all i,j 3. Identify the node pair (i,j) that gives the highest saving sij 4. Form a new subtour by connecting (i,j) and deleting arcs (i,0) and (0, j) if the following conditions are satisfied a) both node i and node j have to be directly accessible from node 0 b) node i and node j are not in the same tour. c) forming the new subtour does not violate any of the constraints associated with the vehicles
  • 45. Vehicle Routing Problem Clarke and Wright Savings Heuristic 5. Set sij=- , which means that this node pair is processed. Go to Step 3, unless all node pairs with sij 0 are processed.
  • 46. Vehicle Routing Problem A chain of convenience stores has seven locations in one city. Each week goods must be delivered from a central warehouse to the stores. Items are packaged in standard- sized containers. The following table gives he number of containers that must be delivered for one week and the one-way travel times in minute between each pair of customers. Each delivery vehicle has a capacity for 80 containers. The company would like to make all deliveries within an 8-hour shift on a single day of the week.
  • 47. Vehicle Routing Problem i / j 0 1 2 3 4 5 6 7 Req 0 - 20 57 51 50 10 15 90 1 20 - 51 10 55 25 30 53 46 2 57 51 - 50 20 30 10 47 55 3 51 10 50 - 50 11 60 38 33 4 50 55 20 50 - 50 60 10 30 5 10 25 30 11 50 - 20 90 24 6 15 30 10 60 60 20 - 12 75 7 90 53 47 38 10 90 12 - 30 When each customer is serviced individually from the depot, the total travel time becomes minutes5862 7 1 0 i jt
  • 48. Vehicle Routing Problem i / j 1 2 3 4 5 6 7 1 - 2 26 - 3 61 58 - 4 15 87 51 - 5 5 37 50 10 - 6 5 62 6 5 5 - 7 57 100 103 130 10 93 - Savings s47 = t04 + t07 - t47 = 50 + 90 - 10 = 130 Because the total demand is 60, we may combine these routes.
  • 49. Vehicle Routing Problem The next largest savings is s37=103. If we try combine customer 3 with customer 7 (who is already combined with customer 4), the total demand on the route would be 93, which exceeds the vehicle capacity. We therefore move on to the next-largest savings, s27=100. Adding customer 2 also violates the capacity constraint. So does the next-largest savings, s67=93.
  • 50. Vehicle Routing Problem Route: 0-4-7-0 0-3-1-0 0-2-5-0 0-6-0 Time: 150 81 97 30 Capacity 60 79 79 75 i / j 1 2 3 4 5 6 7 Req 1 - 46 2 26 - 55 3 61 58 - 33 4 15 87 51 - 30 5 5 37 50 10 - 24 6 5 62 6 5 5 - 75 7 57 100 103 130 10 93 - 30