Code Monkey home page Code Monkey logo

blackbox1's Introduction

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

blackbox1's People

Contributors

adrs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.