up previous next
Up: 1 Creating graphs Previous: 1.1.2 Information on knots Next: 2 Branch & Bound



1.2 Distance matrix

This is another way to create a graph. The N x N matrix is labled with the N cities' names (knots). Read it in this way:

It takes LENGTH (a value in a cell) to go from city READ LEFT CITIES NAME to READ CITY NAME ABOVE.


Add new cities using the Add new city button at the bottom.
You will be prompted for a name of the city (knots' name) and a position. The position (pixel) is used to draw the knot in the Draw graph tab. You can change the position any time by moving the knot see here [*].
Press OK to create the new city.


Change city changes the attributes for the knot.
You will be prompted for a new city name and new cooridiantes (pixel). Press OK to accept the changes.


Remove city removes a knot.
You will be propted for the city to remove. Select the city in the combobox and press OK to remove it.


Creating Edges / Changing length of edges
Since you have defined at least two knots, you see the matrix representing the shortest connections (edges) from one knot to another one; The value is the length (cost) of (for) the traversial. The diagonal elements are not accessible, because in most cases it doesn't make sense to specify an edge from one knot to itself.

Click on an cell to edit its' value. All double values are accepted. Leaving the cell blank will remove the edge. Anything not a number is treated as infinity.


up previous next
Up: 1 Creating graphs Previous: 1.1.2 Information on knots Next: 2 Branch & Bound