when configuring vroom (or rather, vroom-express), make sure that you have the routingServers set up correctly in your config.yml, i.e. that the host and port for ors profiles are set correctly.
Then, your optimization queries should go to vroom directly, which will in turn call your configured ors instance.
You don’t have to configure a “detour” via ors
thank you for your quick reply! Will this url work if I configured in vroom?
looks like I need to rebuild the vroom image to use ors instead of the default osrm backend
configure config.yml like this:
cliArgs:
geometry: false # retrieve geometry (-g)
planmode: false # run vroom in plan mode (-c) if set to true
threads: 4 # number of threads to use (-t)
explore: 5 # exploration level to use (0..5) (-x)
limit: '1mb' # max request size
logdir: '/..' # the path for the logs relative to ./src
logsize: '100M' # max log file size for rotation
maxlocations: 1000 # max number of jobs/shipments locations
maxvehicles: 200 # max number of vehicles
override: true # allow cli options override (-c, -g, -t and -x)
path: '' # VROOM path (if not in $PATH)
port: 3000 # expressjs port
router: 'ors' # routing backend (osrm, libosrm or ors)
timeout: 300000 # milli-seconds
baseurl: '/' #base url for api
routingServers:
osrm:
car:
host: '0.0.0.0'
port: '5000'
bike:
host: '0.0.0.0'
port: '5001'
foot:
host: '0.0.0.0'
port: '5002'
ors:
driving-car:
host: '0.0.0.0'
port: '8080'
driving-hgv:
host: '0.0.0.0'
port: '8080'
cycling-regular:
host: '0.0.0.0'
port: '8080'
cycling-mountain:
host: '0.0.0.0'
port: '8080'
cycling-road:
host: '0.0.0.0'
port: '8080'
cycling-electric:
host: '0.0.0.0'
port: '8080'
foot-walking:
host: '0.0.0.0'
port: '8080'
foot-hiking:
host: '0.0.0.0'
port: '8080'
valhalla:
auto:
host: '0.0.0.0'
port: '8002'
bicycle:
host: '0.0.0.0'
port: '8002'
pedestrian:
host: '0.0.0.0'
port: '8002'
motorcycle:
host: '0.0.0.0'
port: '8002'
motor_scooter:
host: '0.0.0.0'
port: '8002'
taxi:
host: '0.0.0.0'
port: '8002'
hov:
host: '0.0.0.0'
port: '8002'
truck:
host: '0.0.0.0'
port: '8002'
bus:
host: '0.0.0.0'
port: '8002'
if your system correctly resolves host: '0.0.0.0' to localhost, then this looks like it could work.
Note, that you’ll have to query localhost:3000 for optimization queries, not …ors/v2/optimization.