| home | contents | previous | next page | send comment | send link | add bookmark |

2. Operation

The program finds an approximate minimum length path through a set of user specified points. The initial path, final path, and intermediate solution paths are displayed in a graphical window.

Menu controls and hot key controls are provided. These will allow running the algorithm to completion, single stepping the algorithm so that the results at each annealing "temperature" can be displayed, and resetting the algorithm to the original sequence.

Dialog box input will allow the user to adjust key parameters described above.

A graphical user interface window is displayed while the program is running. Figure 1 shows the appearance of the screen with some data entered.

The title bar at the top of the display contains the application name and a title for the current set of data. This title is used as the file name for saving data.

The menu bar contains three groups of menus:

File - file access group

New (Ctrl + N) - clears current data and initializes an empty data structure.

Open (Ctrl + O) - calls up a dialog box that enables opening a previously stored data file.

Save (Ctrl + S) - saves the current data as formatted text.

Save As- calls up a dialog box that enables saving the current data with a user selected file name.

Exit - closes the application (the file is not saved, but a dialog asks the user to confirm the exit command).

Compute - algorithm control group

Run (Ctrl + V) - runs the algorithm for the data set displayed for as many steps of temperature reduction selected by the user in the Settings dialog. The displayed path and the current path length are updated on completion of each temperature step of the simulated annealing algorithm. The final displayed path is the best path found. The mouse cursor is an hourglass symbol while computations are being performed.

Step (Ctrl + X) - runs the algorithm for the next temperature step. On completion, the new path is displayed together with the path length. The mouse cursor is an hourglass symbol while computations are being performed.

Reset (Ctrl + Z) - restores the path to the previous state. For the Run command, the initial path is restored. For the "Step" command, the previous path is restored.

Settings - calls up a dialog box that enables the user to change certain parameters of the simulated annealing algorithm.

Help - information group

About - calls up a dialog box that contains some information describing the application.

The program allows you to enter an initial sequence of points in a graphical window using a mouse.

Alternatively, a point sequence can be entered from a text file. Points in a text file must have this format:

index : x_coord , y_coord '\n'

Note that point coordinates are calculated from the upper left corner of the plot area; x_coord is number of pixels to the right; y_coord is number of pixels down from the top.

The plot area displays the current path through points stored in a linked list. A new point can be added to the linked list by positioning the mouse and pressing the left mouse button. The plot will be redrawn to show the new path. The beginning point is a blue square; the last is a red square. New points are attached to the previous last point.

The status bar shows the position of the mouse cursor in the plot area and current path length. The mouse location is shown in brackets in the format [x_coord, y_coord]; the path length is displayed to the right of the mouse position counter in pixel units.


| home | contents | previous | next page | send comment | send link | add bookmark |

Copyright © 2004, Stephen R. Schmitt