When things don't fit...
There are two main reasons a visit may end up unserved: either it just can't fit (i.e. the problem might have too many constraints to accommodate every visit), or it's an input error (i.e. a visit may be incompatible in with every vehicle in the fleet).
In the first case, the reason will be returned as cannot be visited within the constraints
. It basically means that we just couldn't fit it in. You can typically resolve this by either adding more vehicles, or extending the shift times, or increasing the capacities. It really depends on the situation; you might want to inspect the inputs of the visit that was unserved, and find out why it couldn't fit.
In the second case, where there is a clear reason why, we can be more helpful. As this is often due to a user input error, we provide special messages to assist the user in quickly identifying the unserved reason:
Unserved reasons |
---|
The types do not match with any vehicle. |
A visit may be of a type that none of the vehicles in the fleet can serve. This is often due to a misspelling. Can you make sure the type tags are exactly the same? |
The load is too large for any vehicle. |
A visit may have a load greater than the capacity of any vehicle in the fleet. It simply can't fit anywhere! You might need to buy a bigger truck. Or cut the load in pieces :) |
No vehicle available during the specified time windows. |
A visit may have a time window constraint that prevents any vehicle from being able to serve it. Note that we also take the duration into account. The overlap between the time window of the visit and the driver shift times (excluding breaks) should be at least as large as the duration – or else it won't fit. You can avoid this situation by increasing the time windows. Note that using the max_visit_lateness and max_vehicle_overtime parameters in Options might help as well. |
The lat/lng is too far from the rest of the visits; likely a geocoding error? |
What the message says. Check if your lat/lng coordinates make sense? Usually due to geocoding errors, which can be prevented if you clean up your addresses before geocoding. |
Sorry, none of the stops can be scheduled. Please check your inputs and constraints. |
If all of your visits are incompatible, due to any of the reasons above, we will throw a 400 error instead. We already know that nothing is compatible, so we won't even try to run the routes. When you're using /vrp-long or /pdp-long this means that the job won't even get created. |