Generating Prolog source-code from the current graph

SAVE
AS Copy
to ClipBoard CONSULT
GENERATE
Format
String
If a structure of edges and nodes already exists on the graph design area, you can generate the corresponding code for this graph by clicking on the button "Generate". The generated code uses a "format-string" which can contain the "percent symbol" (%) 2, 3, or 4 times.
1) If the format-string has 2 occurrences of '%', then each occurrence will be replaced by appropriate nodes (starting node and destination node) for each edge of the graph.
2) If the format-string has 3 occurrences of '%', then the first occurrence of '%' will be replaced by a certain "node-index number" (in ascending order), and the remaining two occurrences will be replaced by a starting node and a destination node (as before).
3) If the format-string has 4 occurrences of '%', then the fourth occurrence of '%' will be replaced by a certain "edge - length" (or distance), which is calculated using the Pythagorean formula (for the hypotenouse of a triangle with vertical and horizontal displacements as sides). The other 3 occurrences of '% will be replaced by a certain "node-index number" (in ascending order), a starting node and a destination node (as before). The extra-argument(4) for "edge length" can be used in the implementation of optimum path algorithms or G.I.S. experimentations.