Optimization API without "shortest_route" objecive


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?

One example:
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 :slight_smile: ) 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 :slight_smile:

This example illustrates a bit what I mean:

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.

I wonder if this option was updated for vehicle=bike yet. The “shortest” is not the shortest path at all. Here are examples for “shortest” and “fastest”:


@nhatvinh this is unrelated, please create a new topic.