https://github.com/stefanocudini/docker-ors-vroom
Docker service to test VRP(Vehicle Routing Problem) with OpenRouteService and VROOM
https://github.com/stefanocudini/docker-ors-vroom
Last synced: 6 days ago
JSON representation
Docker service to test VRP(Vehicle Routing Problem) with OpenRouteService and VROOM
- Host: GitHub
- URL: https://github.com/stefanocudini/docker-ors-vroom
- Owner: stefanocudini
- Created: 2020-12-01T15:16:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-29T20:34:46.000Z (over 3 years ago)
- Last Synced: 2025-03-29T19:41:57.400Z (30 days ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 82.5 MB
- Stars: 9
- Watchers: 0
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Application to solve Vehicle Routing Problem using OpenRouteService and VROOM
## TSP Travel Salesman Problem
*1 vehicle 2 optimal routes to cross all positions*

## VRP Vehicle Routing Problem
*2 Vechicles, the numbers above the markers represent the quantity of material to be loaded on the vehicle*

## VRP Delivery
*3 Vehicles that deliver material of various quantities*

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.pbfrun 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
```bash
git clone https://github.com/DigitalCommonsLab/docker-ors-vroom.git
cd docker-ors-vroom
``````bash
docker-compose up -d
```
first time the images building require some minutes...
first time graphs generation require some minutes... and require one restart of containermonitoring of routing engines
```bash
docker logs -f smartbin-ors
```monitoring data packets from VROOM to ORS(optional require ors-proxy started)
configure VROOM to port 9090
```bash
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/optimizationif 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```bash
pip install openrouteserviceimport 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```bash
git clone https://github.com/VROOM-Project/vroom-scripts.gitcd 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