matlab-enhanced Swiki= [View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide]

Simulated Annealing

Links to learn about Simulated Annealing:
SA at Wikipedia
SA at CSEP

Simulated Annealing in Mathematica:
NormalEuclideanSA.nb
NormalRandomSA.nb
ClumpyEuclideanSA.nb
ClumpyRandomSA.nb
SAStats.nb

About the Mathematica files:
The above files use simulated annealing to search for a minimum distance solution to the Traveling Salesman Problem on various types of distribution networks. "Normal" in a filename refers to the fact that points are placed at locations independent of the location of the other points. "Clumpy" means that groups of points are deliberately placed near one another, so that the points in the graph look clumped together. "Euclidean" in a filename means that the points each have a location in Euclidean space, which means that the solution may be graphed at any point in the algorithm. Points in a file named with "Random" have no position in space, but only randomly generated distances between one another. "Random" graphs don't have to satisfy the triangle inequality, and they cannot be plotted. In assigning distances between points in normal and clumpy random graphs, I simply tried to closely match the appearance of various plots of the Euclidean distance matrices.

Each of the files are similarly structured. After each of the variables and modules have been input, the algorithm may be run. Initialize the variables, create a new graph, look at the initial randomly generated tour (in the Euclidean cases, anyway), run however many iterations of the algorithm you want, look at the generated plots of the total tour distance and Temperature as the algorithm progresses, redraw the tour, run some more iterations if you want, and so on. The initial temperatures and cooling factors may be changed, too. "SAStats" is a file that allows for comparison of the effectiveness of simulated annealing on the different graphs.