How to Use the TSP Applet
Notations
- Source is denoted as the home city and is marked with 'HOME'.
- Intermediate nodes are in white.
- The edges in the MST shortest path and in the 2-approximation tour are red.
- The selected vertices are in blue.
- The graph can not be changed when it is running unless the Stop button is clicked, followed by a click of the Reset or Clear buttons.
How to Build a Graph
- To create a
vertex, click the mouse on the desired
location.
- To modify a vertex position, click and hold a vertex and drag it with your mouse to the
desired position.
- To view the Euclidean distance between two vertices, single click on a vertex, then single click on a second vertex. The distance between the two vertices selected will be displayed in the bottom left text field.
- To delete a vertex, double click on the
desired vertex and click
on the Remove Vertex button.
- To clear a graph built by the user,
click on Clear button.
- To restore the graph to the status before running on
Custom mode,
click on the Reset button.
How to Run the TSP Applet
- Clear: Clicking on this
button
will reset
the applet to the initial demo graph if you are in Demo mode, or will clear the applet to an empty graph if you are in Custom
mode.
- Reset: Clicking
on this button will restore the graph to the state it was in before running the algorithm.
- Demo: Select this option to run from a
demo
graph.
- Custom: Select this option to build a
custom graph.
- Step by Step: Click on this button to
run the next step of the algorithm on the current displayed graph.
- Run till Finish: Click on this button to
run the
algorithm until it is finished.
- Stop: Clicking on this button will stop the algorithm if it is in Run till Finish mode. You will then be able to click on Step by Step or Reset.
- The two Graph Types (Custom/Demo) can be switched among each other when the algorithm is not running. The algorithm will be run on the graph type that is selected.
- You can specify any of the three different animation speeds (Slow/Medium/Fast) before or during the algorithm is run.
If you can not open this applet with Internet Explorer, use Netscape 6
or
higher, or use Mozilla.