Counting the minimum number of stops for active vehicles only
minimal_stops parameter (see Limit the number of stops per shift) works on all specified vehicles. Using it can cause the algorithm to build a route for all your vehicles, even if fewer are needed for delivery. This approach helps avoid penalties for violating the limit on the minimum number of stops.
ignore_min_stops_for_unused option is useful if you need to consider the following conditions when planning:
There are more vehicles than necessary for order delivery, and you need to optimize the number of vehicles on the route.
A certain minimum number of stops is required.
In this case, set the option's value to
true so that penalties only apply to the vehicles already involved.
false. In this case, penalties for violating
minimal_stops apply to all specified vehicles.
There are 5 vehicles in the courier service's fleet. 15 orders need to be delivered today.
3: Each vehicle must make at least 3 stops.
2000: The penalty for each stop below the minimum number is 2000.
When a route is built under these conditions, all vehicles are involved, even if a smaller number would be enough. This is how the algorithm minimizes the overall cost: in this case, the penalties for violating the minimum number of stops outweigh the profit from using fewer vehicles.
The same as in Example 1, but
The algorithm also plans 15 deliveries, but it only allows you to use the vehicles that are already involved instead of all the vehicles available. In this case, all routes meet the