Skip to content

AdrS/shortestpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Web application to show shortest paths

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages