chairemobilite / trRouting

Transit Routing server app using Connection Scan Algorithm and flexible parameters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trRouting

Transit routing server app written in C++ using the Connection Scan Algorithm including flexible parameters.

Performance

With random origin and destination (multiple accessible stops at origin and destination): ~150 ms for access and egress footpaths calculation, ~8 ms for CSA two-way calculation (tested with montreal area GTFS data including all urban and suburban transit agencies, with transfer footpaths between stops of 10 minutes walking or less) on a MacPro 2013 with single thread used (you can start multiple servers and execute parallel requests).

References

Connection Scan Algorithm (CSA) (working version)
Trib-Based Algorithm (TBA) (not yet released)

API Documentation

Documentation of the trRouting API can be found here: https://chairemobilite.github.io/trRouting/

Dependencies

Open Source Routing Machine (OSRM) (an osrm server with a walking profile must be running for the transit region while making queries to the trRouting server, see OSRM profiles for more profile info and Running OSRM to know how to prepare osm data for OSRM and start the server)

Mac OS X Install with homebrew

brew install boost
brew install capnp
brew install spdlog
brew install nlohmann-json

Ubuntu 16.04 Install

Install Cap'nProto

sudo apt-get install clang libboost-all-dev libexpat1-dev libjsoncpp-dev libspdlog-dev nlohmann-json3-dev

Compilation

trRouting use autoconf/automake as its build system. A recap of the usual commands:

If you are running out of a git checkout:

autoreconf -i

Then:

./configure
make

On ARM mac with boost installed by homebrew:

CPPFLAGS=-I/opt/homebrew/include/ ./configure --with-boost-libdir="/opt/homebrew/lib/"
make

Test

trRouting uses Googletest to unit test the application. To run the tests, you must first fetch the googletest submodule once into the repo:

git submodule init
git submodule update

Then, to run the unit tests individually, simply run make check.

If you get the following error when running make check, that's because the submodule initiation and update was done after the compilation configuration. Simply run again autoreconf -i && ./configure and it should work.

Makefile:443: ../googletest/googletest/src/.deps/libgtest_la-gtest-all.Plo: No such file or directory
make[1]: *** No rule to make target '../googletest/googletest/src/.deps/libgtest_la-gtest-all.Plo'.  Stop.

Benchmarks

This repo also contains benchmarks to run various calculations. The benchmarks are under the tests/ along, with the unit tests. To automatically run them with the make check command, configure the repo by running ./configure --enable-benchmark. Otherwise, benchmarks can be executed manually by running the executable in the benchmark directory.

See the README in the benchmark's directory for additional instructions to run them.

Docker

A provided dockerfile allows to easily build an image

Build

docker build -t LOCAL_IMAGE_NAME .

Running as a deamon

docker run -t LOCAL_IMAGE_NAME

FOSSA Status

About

Transit Routing server app using Connection Scan Algorithm and flexible parameters

License:GNU General Public License v3.0


Languages

Language:C++ 84.8%Language:M4 12.3%Language:Cap'n Proto 2.1%Language:Makefile 0.7%Language:Dockerfile 0.1%