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.
SMOP is composed of multiple services:
- Maps : nextmoov-smop-maps
- Autocomplete addresses : nextmoov-smop-autocomplete-addr
- Autocomplete transit : nextmoov-smop-autocomplete-transit
- OTP : nextmoov-smop-otp
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.
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
- 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
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 namedxxx-gtfs.zip
(where xxx is only composed of lower case letters - what you put in place ofxxx
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).
- an OSM PBF file (See Data sources) in the directory
-
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.
aka Without Route Planning
To start the system, you need to :
- Start everything :
docker-compose up
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.
The map data proposed are here : Geofabriek - Download Belgium
The consolidated GTFS file may be provided by iRail - GTFS
To have access to the GTFS RT feeds from the public transport operators (PTOs) you need to subscribe to their services :
- DeLijn
- SNCB / NMBS
- STIB / MIVB
- TEC is currently working on feed accessible to everyone
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