management science 461 lecture 7 – routing (tsp) october 28, 2008
DESCRIPTION
3 Problem Description Given a set of nodes and a cost metric (distance matrix, network, time network, etc) Find a route of minimum total length that visits each node exactly once This is called the Travelling Salesman Problem. Sounds easy….TRANSCRIPT
![Page 1: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/1.jpg)
Management Science 461
Lecture 7 – Routing (TSP)October 28, 2008
![Page 2: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/2.jpg)
2
Facility Location Models
AssumesShipments are not combinedEach truck serves one client at a timeShortest path between facility and client
Can we relax this assumption?Combine shipmentsRespect truck capacityRespect trip time limit
![Page 3: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/3.jpg)
3
Problem Description
Given a set of nodes and a cost metric (distance matrix, network, time network, etc)
Find a route of minimum total length that visits each node exactly once
This is called the Travelling Salesman Problem. Sounds easy….
![Page 4: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/4.jpg)
4
Applications
Business: delivery routes, facility layout Manufacturing: Job scheduling, job
execution order, robotic function ordering State of art: Concorde
http://www.tsp.gatech.edu/concorde.html Largest TSP solved: 49 in 1954; 532 in
1987; 7,397 in 1994; 24,978 in 2004 (took 8 years of computation time)
![Page 5: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/5.jpg)
Modelling TSP
Minimize total cost travelled, making sure each node is visited
Have full distance matrix D for all O-D pairs
Binary variable Xij is 1 if node j visited after node i in the tour
Constraint: ensure all cities visited.
5
![Page 6: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/6.jpg)
Formulation
6
}1,0{2subject to
minimize
ij
j j jiij
i j ijij
XiXX
cx
![Page 7: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/7.jpg)
Formulation Problem – Nothing prohibits a subtour Need one constraint for every possible
tour, which is 2N-1
7
4
1
23
65
![Page 8: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/8.jpg)
8
Heuristics for the TSP
Trade-off between finding good solutions and time spent coding
Simple heuristics in this class:Construction Heuristics: Nearest Neighbor,
Nearest Insertion, Cheapest Insertion, Farthest Insertion
Improvement Heuristics: 2-opt and k-optOthers – See Concorde
![Page 9: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/9.jpg)
9
Nearest Neighbor (NN)
Start with a random node nFind the nearest node to n not already
selectedSelect the node, travel thereRepeat until all nodes selected; reconnect to
n
![Page 10: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/10.jpg)
10
4
1
2
3
65
From To Dist.
1 2 8
1 3 3
1 4 7
1 5 2
1 6 10
1
![Page 11: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/11.jpg)
11
4
1
2
3
655
From To Dist.
5 2 4
5 3 3
5 4 6
5 6 4
![Page 12: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/12.jpg)
12
4
1
2
3
65
3
From To Dist.
3 2 5
3 4 9
3 6 6
![Page 13: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/13.jpg)
13
2 From To Dist.
2 4 6
2 6 74
1
2
3
65
![Page 14: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/14.jpg)
14
Nearest Insertion (NI)
Choose a starting node Choose a node to enter the path by
considering minimum distance Consider where on the tour is the least-
cost location for adding the node Repeat until all nodes are part of the tour.
![Page 15: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/15.jpg)
15
4
1
2
3
655
From To Dist.
1 2 8
1 3 3
1 4 7
1 5 2
1 6 10
![Page 16: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/16.jpg)
16
24
1
2
3
65
3
From To Dist.
1 2 8
1 3 3
1 4 7
1 6 10
5 2 4
5 3 3
5 4 6
5 6 4
1-5-1(4)
1-3-5-11-5-3-1
: 8: 8
![Page 17: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/17.jpg)
17
33
4
1
2
3
65 6
1-5-3-1(8)
1-6-5-3-1 : 20: 15
From To Dist.
1 2 81 4 71 6 105 2 45 4 65 6 43 2 53 4 93 6 6
1-5-6-3-1: 211-5-3-6-1
2
3
![Page 18: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/18.jpg)
18
6
2
1-5-6-3-1(15)
1-2-5-6-3-1 : 25: 221-5-2-6-3-1: 211-5-6-2-3-1
2
4
3
From To Dist.
1 2 81 4 73 2 53 4 95 2 45 4 66 2 76 4 6
: 251-5-6-3-2-1
64
1
2
3
65
2
![Page 19: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/19.jpg)
19
77
2
1-5-6-2-3-1(21)
1-4-5-6-2-3-1 : 32: 291-5-4-6-2-3-1: 261-5-6-4-2-3-1
2
4
3
From To Dist.
1 4 72 4 63 4 95 4 66 4 6
: 311-5-6-2-4-3-1
5
: 341-5-6-2-3-4-1
4
1
2
3
65
4
![Page 20: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/20.jpg)
20
2-opt Heuristic
Start with a completed tour Repeat until no improvements possible:
Repeat for all pairs of links on the tour: Consider deleting the pair and reconstructing a
valid tour Keep the modification that most improves tour
length
![Page 21: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/21.jpg)
21
2-Opt Heuristic
k+1j+1
k
j
k+1j+1
k
jBefore
After: alternate linkspart of pathreversed
Repeat for all pairs of links until no improvement possible
![Page 22: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/22.jpg)
22
4
1
23
65
2-opt example
![Page 23: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/23.jpg)
23
4
1
23
65
Another 2-opt example
![Page 24: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/24.jpg)
24
4
1
23
65 Not a tour!
Another example
![Page 25: Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008](https://reader035.vdocument.in/reader035/viewer/2022070616/5a4d1be97f8b9ab0599e32ce/html5/thumbnails/25.jpg)
25
Comparison Between HeuristicsHeuristic avg. % above opt.Nearest neighbor (100 runs) 15.3Nearest insertion (100 runs) 17.6Cheapest insertion (100 runs) 13.9Farthest insertion (100 runs) 4.9Arbitrary insertion (100 runs) 3.8Clarke-Wright (100 runs) 3.62-Opt (25 runs) 2.22-Opt (50 runs) + 3-Opt 0.9NN + 2-Opt + 3-Opt 1.2AI + 3-Opt (10 runs) 1.0FI + 3-Opt (10 runs) 0.8Four composite heur. above 0.5