Rapid Realistic Routing on Real-world and Reimagined networks
Switch branches/tags
1km-linking 1.0.x TypeOfEdgeLabelerTest-fix add-trips-mode addReverseFieldToStreetRouter addingMoreSpeedFormatSupport async-cache bikeShareEndSearch changeSpeedUnit check-pickup-dropoff checkingStatesDominanceBeforeQueue conveyal-entur coverage-and-point-to-point-tests default-field-fix delete-jobs dev enable-static-sites enumFlagsOptimization evaluate-sampling-distr-atl explicit-bike-lts fare-limits-bogota faster-frequency-searches fix-checksum-error fix-fare-table fix-fast-raptor-bug fix-hypothesis-test fix-modeify-time-estimates float-accessibility-values grid-endpoint grid-main hardcode-percentile hardwire-percentile-85-wstlur high-priority-browsochrones improve-bootstrap-hypothesis-tests improve-modeify island-pruning lambda limit-frequency-searches linkToReverseEdges linkage-cache-weighing log-request master maven-semantic-release-v4-update maven-semantic-release-v4.1.x-update median-atlanta-hardwired merge-reducers mmap_file_collections multiple-cutoffs multipoint new-dc-fares no-custom-ami no-optimizations nysdot object-differ-dependency parkRideAnalyst pixel-weights pointset-buffering pre-release-patches range-raptor-frequency regional-analysis-medians-travis regional-analysis-medians remove-cruft-merge remove-cruft remove-time-when-removing-stops reverseRouting revert-338-remove-cruft scenario-editor serialize-distance-tables skip-unlinked-origins spark-update stopPositionIndex store-static-site-scenarios-s3 transport-network-without-osm travis-codecov-env-test turnRestrictionRoadSplit
Nothing to show
Clone or download


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

R5 is a routing engine for multimodal (transit/bike/walk/car) networks, with attention given to speed and efficient use of resources. It is intended primarily for analysis applications (one-to-many trees, travel time matrices, and cumulative opporunitites accessibility indicators) but it also has basic support for point-to-point journey planning which may expand over time.

We refer to the routing method as "realistic" because it works by planning many trips at different departure times in a time window, which better reflects how people use transportation system than planning a single trip at an exact departure time. There's more information on our thinking on this particular point here and in this TRB article.

We say "Real-world and Reimagined" networks because R5's networks are built from widely available open GTFS data describing existing transit service, but R5 includes a system for applying light-weight patches to those networks for immediate, interactive scenario comparison.

When contributing code, 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/

This is a Maven project, so you'll need to install maven to build R5 before running it. Build instructions are in pom.xml. Once R5 is built (e.g. using mvn clean package), it can be run (e.g. java -jar -Xmx4G target/v3.0.0.jar worker -- see list of commands here).


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

Releases are automatically generated using maven-semantic-release.