The Route Optimization service aims at finding a good plan for the given transports. In order to determine what "good" means here, two questions need to be answered:
The way these questions are answered can be controlled by the user.
What makes one plan better than another?
Default objective
The default objective comprises four criteria in the following order.
- The first criterion is to have a plan where every transport is planned in a route. This means a plan with all transports planned is always considered as better than a plan with unplanned transports, no matter what the other KPIs are. But sometimes, there are just too many transports and not all of them can be planned. In this case, we distinguish the standard case from the priorities case:
- Standard case: A plan with the least unplanned transports is considered as best.
- Priorities case: This is the case when the query parameter
considerTransportPriorities
is set to true and all transports are ranked bypriority
. When comparing two plans, the plan with less unplanned transports of priority x is best, where x is the highest priority in which the number of unplanned transports differs between the two plans. See transport priorities concept page for more details.
- By default, the second criterion is to use as few vehicles as possible or, in other words, to create as few routes as possible. This default behavior can be adjusted. By adding
IGNORE_MINIMIZATION_OF_NUMBER_OF_ROUTES
totweaksToObjective
, this criterion is skipped. - By default, the third criterion is to create as few trips as possible. This default behavior can be adjusted. By adding
IGNORE_MINIMIZATION_OF_NUMBER_OF_ROUTES
totweaksToObjective
, this criterion is skipped. - By default, the fourth criterion is to minimize distance, driving time and travel time of each route. To be precise, a linear combination of these values is minimized.
Tweaks to objective
tweaksToObjective
is a query parameter. There are two non-exclusive options:
- When routes are drawn onto a map by drawing straight lines between two consecutive stops, these lines may intersect each other. With
AVOID_INTERSECTIONS
some extra effort is spent on avoiding these intersections. However, a plan calculated withAVOID_INTERSECTIONS
enabled may be worse than a plan calculated withAVOID_INTERSECTIONS
disabled. IGNORE_MINIMIZATION_OF_NUMBER_OF_ROUTES
suppresses the criteria 2 and 3 of the default objective (as described in paragraph Default objective above).
How much effort should be put into finding a better plan?
The more time is spent on the optimization, the higher the chances of finding a better plan. There is a trade-off between the solution quality and the running time of the optimization. This trade-off can be adjusted via two query parameters.
Optimization quality
There is standard setting of the trade-off between solution quality and running time. With the query parameter quality
, the user can set this to HIGH
and thus put solution quality in favor of running time.
Enhanced feature set
The query parameter optimizationPremium
unleashes some more algorithmic features that can improve the solution quality but come at the cost of a higher running time. See Optimization Premium concept page for more details.