mcheung610 / r5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

R5: Rapid Realistic Routing on Real-world and Reimagined networks

R5 is a fast routing engine for multimodal (transit/bike/walk/car) networks. It is currently designed for analytic applications but there are plans to eventually have it support point-to-point journey planning. The routing is "realistic" because it works by planning many trips over a time window, which is more reflective of how people use the transportation system than planning a single trip at an exact departure time---very few people leave for work at precisely 7:53 AM every morning, and even fewer leave at a precise time when going to a non-work event. There's more information on our thinking on this particular point here.

Please follow the Conveyal Java style guide at https://github.com/conveyal/JavaStyle/

Javadoc for the project is built automatically after every change and published at http://javadoc.conveyal.com/r5/master/

History

R5 grew out of several open-source projects. The focus on analytic applications, and the core development team behind R5, came from OpenTripPlanner. Many of the algorithms, as well as the name, came from r4.

Building a network

R5 is developed primarily as a routing library for use in other projects (Conveyal Analysis, Modeify etc.) However for testing purposes there are commands to build a network and provide basic routing and visualization of network structure in a web interface. To build a network, place one or more GTFS feeds in a directory together with an OSM PBF file covering the same region. Then run com.conveyal.r5.R5Main point --build /Users/me/path/to/inputs, using the -Xmx switch to give the JVM a GB or two of memory if possible. This will create a file called network.dat in the same directory as the input files. Then run com.conveyal.r5.R5Main point --graphs /path/to/input/files to start up the web server. The routing interface should then be available at http://localhost:8080/, a somewhat more advanced interface at http://localhost:8080/new.html and a vector-based visualization for examining the contents of the network at http://localhost:8080/debug.html. For the debug visualization, you will need to zoom in fairly close before edges are loaded.

Performing a Release

See the section on "performing a release" at https://github.com/conveyal/JavaStyle.

Developer Setup

Download OSM PBF and caltrain GTFS

https://mapzen.com/data/metro-extracts/metro/san-francisco-bay_california/ http://www.caltrain.com/developer.html

Build R5

brew install java
brew install gpg

gpg --gen-key

// Put this in the bashrc

export GPG_TTY=$(tty)

// build the jar with dependencies

mvn clean compile assembly:single

// create the network

java -cp r5-2.5.0-SNAPSHOT-jar-with-dependencies.jar com.conveyal.r5.R5Main point --build /path/to/files

// start r5 as local servers

java -cp r5-2.5.0-SNAPSHOT-jar-with-dependencies.jar com.conveyal.r5.R5Main point --graphs /path/to/files

About

License:MIT License


Languages

Language:Java 95.4%Language:JavaScript 3.8%Language:HTML 0.3%Language:CSS 0.3%Language:Shell 0.1%Language:Python 0.0%