Skip to content

Standalone problem instance

Julien Coupey edited this page Aug 10, 2021 · 4 revisions

Create a problem instance that can be solved without accessing an OSRM server

Being able to solve a problem without an OSRM server at hand can be convenient in several situations.

  • Solve the problem without firing the same table request to OSRM on each run
  • Create a "standalone" problem whose costs are set once and for all, and won't change with OSM data updates or across OSRM versions and profiles
  • Share a problem instance with someone that has no access to the underlying OSRM stack

We provide a python script that does exactly this, by computing the cost matrices once per required profile and adding it under the matrices key in a new input file.

git clone https://github.com/VROOM-Project/vroom-scripts.git
python3 ./vroom-scripts/src/add_osrm_matrix.py my_problem.json

Default IP and port for OSRM can be adjusted in ./vroom-scripts/src/utils/osrm.py. The problem described in my_problem_matrix.json can now be solved without access to OSRM.

Clone this wiki locally