shortestpath

command module
v0.0.0-...-da6d16a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 13 Imported by: 0

README

Point to Point Shortest Path Finder

About

Written by Adrian Stoll December 5, 2018. This web app generates animated gifs showcasing the progression of point-to-point shortest path algorithms in a road network. It supports coordinate entry, panning, zooming, and variable length animations. To generate an image without animations, set "frames" to one.

Screenshot

Algorithms

The app uses either Dijkstra's algorithm or the ALT (A star search, landmarks, triangle inequality) algorithm to find shortest paths. The red points are those inspected during the search. The black circles indicate the start and end points and the black points are those along the optimal path.

Ann Arbor to Toledo

The ALT algorithm makes use of special points called landmarks. To select landmarks I use the "farthest" heuristic which picks a point the greatest number of hops from any of the previously selected landmarks. The landmarks are indicated by yellow circles on the map. The ALT algorithm visits dramatically fewer points in a given search making it faster.

Ann Arbor to Toledo

Setup

  • Install go
  • Clone the repository git clone https://github.com/adrs/shortestpath.git ~/go/src/github.com/adrs/shortestpath
  • Download a road network dataset from DIMACS
  • Compile cd ~/go/src/github.com/adrs/shortestpath/ && go build

Usage

  • usage: ./shortestpath <node file> <vertex file>
  • Start webserver on port 8888 ./shortestpath USA-road-d.LKS.co USA-road-d.LKS.gr
  • Go to localhost:8888
  • Note: for the Great Lakes map with 16 landmarks, the server requires 1-2GB of ram.

References

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL