the optimization API gives us the option to decide which optimization we have (min / max -> vehicles, completeion_time etc.)
So, is there a way to tell the API to calculate after the shortest routes?
we have a situation, where the optimization api gives us a solution which is longer than if we would rearrange the shipments by ourselfes.
Our customer calculates prizes based on the length of the route, not on the travel time.
This is not yet possible. There are possibilities to tweak the cost that we have not made public as we are not sure if and how we should make them accessible.
Additionally we currently tweak our routing engine (also based on your feedback - it is not forgotten ) so that if there are two routes with nearly the same time but significant different distance, the shorter route is picked.
In general using the shortest route does not make much sense for car even if the customer says this is required. There are always some (hidden) costs for time
This example illustrates a bit what I mean:
- shortest, 14.9km, 45min, https://graphhopper.com/maps/?point=49.834882%2C11.550064&point=49.932329%2C11.559677&vehicle=car&weighting=shortest&ch.disable=true
- fastest, 25.1km, 20min, https://graphhopper.com/maps/?point=49.834882%2C11.550064&point=49.932329%2C11.559677&vehicle=car&weighting=fastest
- short_fastest (close to shortest regarding the distance), 15.6km, 28min, https://graphhopper.com/maps/?point=49.834882%2C11.550064&point=49.932329%2C11.559677&vehicle=car&ch.disable=true&weighting=short_fastest&short_fastest.distance_factor=0.2
- short_fastest (close to fastest regarding the time), 19.7km, 21min, https://graphhopper.com/maps/?point=49.834882%2C11.550064&point=49.932329%2C11.559677&vehicle=car&ch.disable=true&weighting=short_fastest
IMO “shortest” does not make sense. Not from the picked route (detour through villages with small streets) and also not from the much longer taking time (over 2x the fastest route).
I really appreciate that you listen to customer feedback!
And you are absolutely right, that in the most cases the shortest route is not the best choice.
But in our case it could be necessary, especially in the optimization API. This is so, because the contracts of our customers are based on costs-per-kilometer. They accept a slightly longer travel time for a shorter route.
I am not talking about so clear examples as you posted - these cases are clear, and you are fully right. But to have the option to choose would be much better.
I think thats why you have the parameter “weighting” with “fastest”, “shortest” and “short_fast” (or so) in the routing-api. Thats is exactly what we looked for in the Optimization API.
Are there any updates available on this topic?
There is a private beta feature where you can tweak transportation costs (have sent them to you), which might help in this case but does only weight the distances vs. times for the Route Optimization API. It does not change the actual distance or time for a certain route from A to B.
@nhatvinh this is unrelated, please create a new topic.