Closed johnjinwoua closed 4 years ago
If you mean using travel costs that change across the day depending on start time after a given job, then it's not currently possible to do that.
The reason is that it would require to change significantly the current approach. For example in order to evaluate the potential gain when moving a job from one route to another, we're currently able to do this in constant time because it only affects the surrounding edges in both routes. As soon as you have time-dependent travel times, then removing/adding a job at some point would have an impact for all arrival times down the line, and would require to recompute all travel times, adding one level of algorithmic complexity for simple operations.
An alternative way of doing this is to add a weighting coefficient to the output of the routing calculator (ors) depending on the traffic status on the route.
Do you mean applying a single weighting coefficient to the whole matrix retrieved using the routing engine?
Do you mean applying a single weighting coefficient to the whole matrix retrieved using the routing engine?
For example : if the duration calculated by ORS from A to B is 10 minutes (without live traffic information) and I know that due to rush hour, the trip will last 3 extra minutes (+30%). Is there a way to specify that either in ORS or in Vroom ? Because I saw that vroom uses the output matrix from ORS to do compute the sequencing... So if we can specify that on the output of ORS before feeding it to Vroom's input, I think the problem will be solved.
OK, so this is would only be time-dependant in the sense that at the time you fire the request, you use a specific scaling factor for durations?
In that case, you'd still have a static view of durations within each request, and the same factor applies to all durations in the matrix?
OK, so this is would only be time-dependant in the sense that at the time you fire the request, you use a specific scaling factor for durations?
for example yes !
In that case, you'd still have a static view of durations within each request, and the same factor applies to all durations in the matrix?
Not to all the durations in the matrix... Just for the routes we have some extra informations on the traffic status.
If I succeed to modify the output of ORS before feeding VROOM, it might work ?
He wants to consider live traffic while routing. Actually nothing to do with vroom. See here, same question: https://ask.openrouteservice.org/t/live-time-traffic/1756
Like I said @johnjinwoua, OSRM can do it and it works with vroom out-of-the-box. Exactly how to implement that in OSRM is rather a question for that repository. If you want a static scaling depending on the time of the day and you don't care that live traffic doesn't influence the routing, then I'd just fire a Matrix request to ORS, scale the response and then a custom matrix to vroom. Will work
I'd just fire a Matrix request to ORS, scale the response and then a custom matrix to vroom.
This is exactly what I am saying. Each time that I fire a request to ORS, I can scale the output before feeding vroom with. But How can I do that in the source code ?
Thanks
ORS source code? You'd do that in the app that's requesting ORS and vroom, a whole lot easier.
The request in Vroom (I am using Docker) sends automatically a request to ORS. How can I scale the output of the matrix provided by ORS as it is send directly to vroom ?
@johnjinwoua if you want to make your own custom adjustments to the matrix, then you can:
vroom
For that last step, see the documentation on using custom matrices.
If you used the default docker-compose
ORS is exposed on localhost:8080
and accepts matrix requests at localhost:8080/ors/v2/matrix/<profile>
:
https://openrouteservice.org/dev/#/api-docs/v2/matrix/{profile}/post
Thanks, I'll try it out and come back to you guys.
Closing for now.
Hello,
I am working on a project in which I'd like to include live time traffic in the route and job calculation.
How is it possible to do this in Vroom ?
An alternative way of doing this is to add a weighting coefficient to the output of the routing calculator (ors) depending on the traffic status on the route.
Does anyone have an advice ?
Thanks