Giter Site home page Giter Site logo

openmove / docker-ors-vroom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stefanocudini/docker-ors-vroom

0.0 1.0 0.0 84.44 MB

Docker service to test VRP(Vehicle Routing Problem) with OpenRouteService and VROOM

Dockerfile 0.43% JavaScript 2.03% Jupyter Notebook 97.14% Python 0.05% Shell 0.35%

docker-ors-vroom's Introduction

Docker Application to solve Vehicle Routing Problem using OpenRouteService and VROOM

TSP Travel Salesman Problem

1 vehicle 2 optimal routes to cross all positions

TSP Algorithm

VRP Vehicle Routing Problem

2 Vechicles, the numbers above the markers represent the quantity of material to be loaded on the vehicle

VRP Algorithm

VRP Delivery

3 Vehicles that deliver material of various quantities

VRP Algorithm

References to OpenRouteService Optimization API https://openrouteservice.org/dev/#/api-docs/optimization/post

Configuration files

  • ./docker-compose.yml
  • ./ors/conf/app.config
  • ./vroom/conf/config.yml
  • ./ors-proxy/config.js

Config documentation

https://github.com/GIScience/openrouteservice/wiki/Configuration-(app.config)

Enable ORS proxy

ors-proxy is a work-around to manage osm road restrictions in vroom results

---------    -------------    ---------    -----------
|  ORS  | <= | ORS-PROXY | <= | VROOM | <= | JUPYTER |
---------    -------------    ---------    -----------
                    |             ^             ^
                    v             |             |
                LOGGING       config.yml    test.ipynb

To test restrictions use this volume: ./data/mezzocorona_restrictions.osm.pbf:/ors-core/data/osm_file.pbf

run ors-proxy service: docker-compose up -d ors-proxy

and in file vroom/conf/config.yml replace 'ors' with 'ors-proxy' port 9090

Setup

Download this reporitory

git clone https://github.com/DigitalCommonsLab/docker-ors-vroom.git
cd docker-ors-vroom
docker-compose up -d

first time the images building require some minutes... first time graphs generation require some minutes... and require one restart of container

monitoring of routing engines

docker logs -f smartbin-ors

monitoring data packets from VROOM to ORS(optional require ors-proxy started) configure VROOM to port 9090

docker-compose logs -f ors-proxy

Testing OpenRouteService API

vehicles actives: "hgv","car" look at /ors/conf/app.config

check if running, brownser in:

http://localhost:8080/ors/health

Testing VROOM API

brownser in: http://localhost:8084/optimization

if respose is http 200 ok, http://localhost:8081/optimization/health

Testing OpenRouteService in Map

brownser in: http://localhost:8082

Testing VROOM in Map

upload json file problems inside jupyter/data/xxx.json

brownser in: http://localhost:8083

Testing Algorithms in Jupyter notebook

  • ./jupyter/test.ipynb python notebook to test Routing Algorithms by OpenRouteService python binding

brownser in: http://localhost:8090

VROOM 1.8 with Shipments feature

load test3.ipynb notebook to test

https://github.com/VROOM-Project/vroom/blob/master/docs/API.md#shipments

Testing OpenRouteService via python(inside Jupyter)

OpenRouteService python binding, clone or install via pip https://github.com/DigitalCommonsLab/openrouteservice-py

pip install openrouteservice

import openrouteservice as ors

client = ors.Client(base_url='http://ors:8080/ors', key='')

#TSP only openrouteservice routing engine
route = client.directions(...)

#VRP vroom vrp engine
routes = client.optimization(...)

Create random testing data for VROOM

simple VRP problem to test vroom instance(on port 3000)

brownser in: http://localhost:8083

git clone https://github.com/VROOM-Project/vroom-scripts.git

cd vroom-scripts/src/

./random_problem.py -j2 --top 46.07 --bottom 46.02 --left 11.14 --right 11.18

TODO

include custom parameters in file ./ors/HeavyVehicleFlagEncoder.java

docker-ors-vroom's People

Contributors

stefanocudini avatar

Watchers

 avatar

docker-ors-vroom's Issues

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.