willy s bane n.
Skip this Video
Loading SlideShow in 5 Seconds..
Willy’s Bane PowerPoint Presentation
Download Presentation
Willy’s Bane

Loading in 2 Seconds...

  share
play fullscreen
1 / 19
Download Presentation

Willy’s Bane - PowerPoint PPT Presentation

usoa
137 Views
Download Presentation

Willy’s Bane

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Willy’s Bane A simulated annealing approach to the travelling salesman problem Brian BabcockTrevor Blanarik

  2. Travelling Salesman • We need to visit a set of cities, each only once, using the shortest path possible. • There are several approaches to this problem, we chose to use simulated annealing.

  3. Simulated Annealing • Named after metallurgic annealing • Metal is heated until glowing and then gradually cooled. • Randomly switches two cities • ‘Temperature’ slowly reduces toward zero • May accept a worse solution, depends on current temperature • A high temperature will accept a very large uphill change – a low temperature will not

  4. Sequential • Set up a single simulated annealing run using a single temperature and cooling rate • Simulated annealing ends when a better result has not been found after 100 iterations • Resulting path is printed to a Drawing file

  5. Parallel • SMP, sizeup • Same as the sequential version, except each thread uses a different temperature. • After a run of SA, each thread checks to see if its new path is shorter than the current best path. • Shared variable • Threads exit when every thread has failed at least three times in a row • Acts like several SAs wrapped in a hill-climbing algorithm

  6. Metrics Inputs: 50 Cities on a grid 500 x 1000 units. A fixed initial configuration is created with a seed of 1 for the random number generator. Initial length = 20038.51133626955

  7. Metrics

  8. Metrics Varying cooling schedules

  9. Metrics Varying cooling schedules

  10. Initial Random Tour Length = 20038

  11. Sequential Result Length = 5861

  12. SMP 1 Thread Length = 5988.244

  13. SMP 2 Threads Length = 5749.68

  14. SMP 4 Threads Length = 5526.10

  15. SMP 8 Threads Length = 4802.435

  16. What We Learned • A group of parallel threads acts like a ‘search party’ – they keep each other on the right track, toward the optimal answer. • Sometimes 2 threads will arrive at the very same solution, independently of each other. • Choosing 2 cities to swap at random, rather than choosing 2 neighboring cities is much faster and gets much better answers.

  17. What We Learned • Time can be pretty unpredictable with an algorithm like this – since every move is random, the algorithm could end up in a local optimum early on, and end quickly. • Or, it could gradually find better answers and take a very long time. • Having more threads tends to help it converge to a much better solution, but often at the expense of time.

  18. Future Work • Cluster version • Communication required to keep shared ‘best path’ variable updated. • Different cooling rates • A speedup version which parallelizes the SA loop

  19. Sources • Nourani, Yaghout, and Bjarne Andresen. "A comparison of simulated annealing      cooling strategies." J. Phys. A: Math 31 (1998): 8373–8385. • SREENIVAS, T H, K GANAPATHY SUBRAMANIAM, and D. JANAKI RAM. "Parallel Simulated      Annealing Algorithms." JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING 37      (1996): 207-212.