120 likes | 219 Views
HW06 Solve The Traveling Salesman Problem Using Three Algorithms. 1. Nearest Unvisited Neighbor 2. Sweep Algorithm 3. Integer Programming. Location Of Points. Drawing. C. B. 5 4 3 2 1 0. Z. D. E. A. 0 1 2 3 4 5. Distances. Nearest Neighbor.
E N D
HW06 Solve The Traveling Salesman Problem Using Three Algorithms.1. Nearest Unvisited Neighbor2. Sweep Algorithm3. Integer Programming
Drawing C B 5 4 3 2 1 0 Z D E A 0 1 2 3 4 5
Nearest Neighbor Begin at A Go to E (3.16) From E Go to D (2.24) From D Go to C (2.83) From C Go to B (1.00) From B Go to Z (2.00) From Z return to A (5.83) Total Distance: 17.06
Nearest Neighbor Drawing C B 5 4 3 2 1 0 Z D E A 0 1 2 3 4 5
Sweep Heuristic Total Distance: 15.43
Sweep Heuristic Drawing C B 5 4 3 2 1 0 Z D E A 0 1 2 3 4 5
Integer Programming (1) • AMPL generated Subtours • A-D-E-A and B-C-Z-B • With the total distance of 14.25
Integer Prog Drawing (1) C B 5 4 3 2 1 0 Z D E A 0 1 2 3 4 5
Integer Programming (2) • Add in constraints to eliminate subtour • Total Distance is 15.43
Integer Prog Drawing (2) C B 5 4 3 2 1 0 Z D E A 0 1 2 3 4 5