CLI Usage
The Command-Line Interface (CLI) is a powerful way to interact with the application, allowing you to calculate shortest paths, manage datasets, and customize settings.
Starting the CLI
Once the macLinuxProjectBuilder.sh
or windowsProjectBuilder.bat
script completes, the terminal will display the following prompt:
Enter a command or the start node:
This indicates that the program is ready to accept commands or input for shortest path calculations.
Basic Commands
Node IDs
Enter a start node (integer between 1 and 23,947,347), and the program will prompt for an end node.
The shortest path between the nodes will be calculated and displayed.
Example:
Enter a command or the start node: 1 Enter the end node: 5 Shortest path: [1 -> 3 -> 5] Distance: 12.5
Commands
Enter keywords to perform specific actions. For example:
help
: Lists all available commands.Available commands: - fast - med - comparator - display files - exit
build graph
: Rebuilds the graph structure from the dataset.
Advanced Commands
comparator
comparator
Activates "Comparator Mode," which compares results from A* and Dijkstra for the same path.
Example:
Enter a command or the start node: comparator Comparator mode activated. Enter a start node: 1 Enter an end node: 10 A*: Distance = 20.3, Time = 1.2ms Dijkstra: Distance = 20.3, Time = 1.8ms
weight
weight
Prompts for a new heuristic weight for A*.
Example:
Enter a command or the start node: weight Enter new weight: 1.5 Heuristic weight updated.
build lm
build lm
Rebuilds landmarks for improved pathfinding performance.
Exiting the CLI
Type
exit
to terminate the application.The API server (if running) will also stop.
Example:
Enter a command or the start node: stop Application terminated.
Last updated