-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Parameter for ORS #310
Comments
No that's not possible. ORS can't respect any restrictions for matrix requests. Not yet anyways, we're working towards it at some point: However, you CAN do it with Valhalla (and only with Valhalla of all FOSS routers) and vroom's custom matrix capabilities. You could also sponsor #306, then it'd be possible natively. And even #219 to be able to use Mapbox or our hosted ORS directly. Almost forgot about that.. |
Too bad ORS don't support that. Valhalla is to slow. I use OSRM with VROOM for car and foot and in progress to extend the services to hgv. So i'm stuck with OSRM and 3 different fixed hvg-profiles :-( Anyway, thanks for clarification. |
hi i am using vroom and as ORS backend .. in my use case I don't need to be dynamic for every requests, because the profile of the vehicle I use is always the same. I would like for example some predefined preference values, for example: can I make sure to enter these preferences for all requests to the api matrix? and therefore to have them also in the vroom result? or is there another way to switch these preferences from vroom to ors? I'm using ors-python bindings |
Well, vroom uses the Matrix service, where all of these settings are not applicable. Matrix is pretty much the opposite of dynamic for the time being... If you really want restrictions, you'll need to request And do note, that |
hi @nilsnolde tnks for your suggestions! mmh interesting considerations.. In my use case of vroom I have only the capacity of vehicles and the amounts of jobs, without timing limits.. or time windows.. I was thinking that as a good temporary solution if I calculate the order of execution of jobs with vroom and then pass the vroom output coordinates(in the same order) to a normal ors directions request? would it make sense in your opinion? |
Not exactly, we fire a matrix request prior to optimization, but if you use the
That's pretty much what When using OSRM, all the "predefined preference values" are baked in the profile so you end up with consistent responses for
|
hi @jcoupey VROOM is really powerful for my use case, great job!
I'm using VROOM with my own instance of OpenRouteService and I connect it through ORS python bindings. import openrouteservice as ors
clientVrp = ors.Client(base_url='http://localhot:8081/', key='')
optimized = clientVrp.optimization (
vehicles = vehicles,
jobs = jobs,
geometry = True
) can I use the G flag you are talking about in python bindings? many tnks |
From your You could use the same steps as in my previous message, but replace the third point by passing the profile config at the const routingServers = {
'my-profile': {
host: 'ors',
port: '8080'
},
...
} |
You already do,
No, not possible. As I said in the first comment, you can't use parameters with the matrix API! What @jcoupey suggests (to create a separate profile & graph hard-coded with those parameters) is indeed the best way. You shouldn't be afraid of Java though;) |
many thanks for your patience! @nilsnolde && @jcoupey maybe I have not explained well my problem is much simpler.. from the docs I have not understood well where I can to insert the default parameters for my HGV profile. within this default configuration how can I enter the parameters of the vehicle like: height, weight, width? the docs... is not clear about this :( if I understand correctly the solution I can insert them in the my app.json file and then regenerate the graphs and also my api matrix will use these parameters, is it right? |
That goes a little too much off-topic for vroom and I'd refer you to our forum: https://ask.openrouteservice.org. In short: no, that's not how you do it. You have to create it in Java and recompile the source, i.e. clone this and adapt: https://github.com/GIScience/openrouteservice/blob/master/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/HeavyVehicleFlagEncoder.java. Then change a few entrypoints for the API etc. It's involved and sorry, we can't give any support for custom stuff like that, which goes way beyond any normal usage. |
I understood, thanks for this reason I had written also here: GIScience/openrouteservice#385 |
Is it possible to add additional parameter to VROOM's input, when using ORS as routing backend? If yes, can someone please provide a example?
For example if i would optimize hgv with dynamic restrictions like maxweight and maxheight, i must set options.profile_params.restrictions:
{ "preference": "fastest", "instructions": true, "geometry": true, "units": "m", "attributes": [ "detourfactor", "percentage" ], "instructions_format": "html", "elevation": true, "options": { "profile_params": { "restrictions": { "height": "3", "weight": "7" } }, "vehicle_type": "hgv" }, "coordinates": [ [ 8.706011, 48.830232 ], [ 8.708618, 48.827859 ] ], "extra_info": [ "steepness", "waytype", "surface" ] }
The text was updated successfully, but these errors were encountered: