Coder Social home page Coder Social logo

belgianmobility / nextmoov-smop-general Goto Github PK

View Code? Open in Web Editor NEW
34.0 2.0 1.0 793 KB

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

Home Page: https://smartmobilityplanner.be

mobility route-planner

nextmoov-smop-general's Introduction

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 [email protected]: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

nextmoov-smop-general's People

Contributors

antony-funquality avatar denisflorkin avatar fhalin avatar thomashermine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vzgly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.