Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Simulated Annealing Method for the Traveling Salesman Model Documents

This material has 2 associated documents. Select a document title to view a document's information.

Main Document

Simulated Annealing Method for the Traveling Salesman Model 

written by Larry Engelhardt

The Simulated Annealing Method for the Traveling Salesman Model demonstrates the use of the "simulated annealing algorithm" to attempt to solve the "travelling salesman" problem. A text file containing longitude and latitude data for 120 cities in the US and southern Canada is loaded when this program begins.  Other data can be loaded instead, but the data file should have the same format as this text file (available under "source").  A "temperature" controls how much the results (in this case, the total distance traveled) are allowed to fluctuate.  In the process of annealing, the temperature is slowly lowered in an attempt to minimize the total distance traveled, and it can also be manually adjusted with a slider.

The Simulated Annealing Method for the Traveling Salesman Model was developed using the Easy Java Simulations (EJS) modeling tool.  It is distributed as a ready-to-run (compiled) Java archive.   Double clicking the ejs_fmu_SimulatedAnnealing_TravelingSalesman.jar file will run the program if Java is installed.  You can modify this simulation if you have EJS installed by right-clicking within the map and selecting "Open Ejs Model" from the pop-up menu item.

Last Modified August 24, 2013

This file has previous versions.

Source Code Documents

Simulated Annealing Method for the Traveling Salesman Source Code 

The source code zip archive contains an EJS-XML representation of the Simulated Annealing Method for the Traveling Salesman Model.   Unzip this archive in your EJS workspace to compile and run this model using EJS.

Last Modified November 12, 2011

The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics