/nextmoov-smop-general

Smart Mobility Planner (SMOP): A real-time, intermodal route planning solution backed-up by open-source technologies & data.

SMOP header

Smart Mobility Planner

General information

The Smart MObility Planner (a.k.a SMOP) is a real-time, intermodal route planning solution developed by the four belgian Public Transport Operators (PTOs), namely the TEC, De Lijn, STIB-MIVB and SNCB-NMBS together with nextmoov as technical partner.

One key objective of the SMOP was to build a robust route planning solution (both in terms of functional scope and performance) that is backed-up solely by open-source technologies and data. The selected route planning engine is Open Trip Planner.

The SMOP pilot project was a winner of the Smart Mobility Belgium call for ideas.

A comprehensive description of the project can be found here.

Architecture

Software Architecture

Modules

SMOP is composed of multiple services:

And a demonstration frontend : nextmoov-smop-frontend

You can get all the modules by using : git submodule update --init.

In each submodules you can find a config.js file where you can set the connection strings, by example. Take care to rebuild your Docker images if you change de configuration.

Starting things

You can start the entire system or use each module independently or a mix of both, depending on your needs You can customize the root docker-compose.yml file (commenting out what do not need) or run each module independently (they each have a their own docker-compose.yml file in their root folder – see Modules.

Note: you always need the reverse proxy for exposing endpoints

Requirements

  • docker
  • docker-compose
  • [provide data source (see With OTP)]
  • [Build OTP beforehand (see With OTP)]

Starting the services

  • clone the repo
    git clone git@github.com:nextmoov/nextmoov-smop-general.git
  • move into the created folder
    cd nextmoov-smop-general
  • provide required source data if needed (see With OTP)
  • build the database (see with otp - takes 15 to 20 min)
    docker-compose run otp-builder ./build
  • run via docker-compose
    docker-compose up

Everything was tested with :

$ docker-compose -v
docker-compose version 1.21.0, build unknown
$ docker -v
Docker version 19.03.5, build 633a0ea838

With OTP

aka With Route Planning

WARNING: By default, on MAC/Windows Docker Desktop is restricted to not use too much RAM. OTP needs at peak 8GB of RAM/SWAP to run.

To have a system operational with OTP, you need to:

  • To provide the data

    • an OSM PBF file (See Data sources) in the directory data alongside the docker-compose.yml file.
    • static GTFS zip files (See Data sources) in the directory data alongside the docker-compose.yml file.
      The provided static GTFS files needs to be named xxx-gtfs.zip (where xxx is only composed of lower case letters - what you put in place of xxx doesn't matter as long as it follow the template. The otp-builder will look through the folder for file named according to said template).
  • Build OTP (taking around 15 mins) : docker-compose run otp-builder ./build

Example of last line of the build, when it succeeds :

13:49:26.629 INFO (GraphBuilder.java:153) Graph building took 15.1 minutes.

Then see Without OTP.

Without OTP

aka Without Route Planning

To start the system, you need to :

  • Start everything : docker-compose up

Using the services

All services will be accessible trough the reverse-proxy Traefik 2 on http://localhost:8080.

Only the OTP web interface is located at http://localhost:8081.

See each services for more information about their API.

Data sources

Maps (aka OSM PBF)

The map data proposed are here : Geofabriek - Download Belgium

GTFS static

The consolidated GTFS file may be provided by iRail - GTFS

GTFS RT

To have access to the GTFS RT feeds from the public transport operators (PTOs) you need to subscribe to their services :

Villo!

JCDecaux provides an open API to get bikes availability, you can subscribe here to create an account.

"contracts" are the key related to a specific location:

  • For Brussels : contract=Bruxelles-Capitale
  • For Namur : contract=Namur