2011년 4월 9일 토요일

Traveling salesman problem - Simulated Annealing

The optimized solution after 'lots' of iteration.
Temperature, T, was slowly decreased each iteration.
The red star is the start cities.
The blue cities are where airplanes which are faster than cars are available.
100 cities in total.

In this simulation, we assumed traveling by just a car.

Hm.. looks like not the best solution.
need to contraint T in other way?

Energy of system as a function of iteration.
E is the sum of distances between cities.

For Applied Mathematics 205b class, Harvard.

#Updated : Rather than swapping cities, reversing the traveling direction works much better. Below is the final solution using the reversing strategy.

The cIrcular cities. We all know what is the best configuration, and SA exactly found it.

One more example with 1,000 cities.


left : the initial configuration, right : the solution.

looks pretty good.