Truck capacity is smaller than volume, but this is not true


We have a case where we must visit 239 locations, for this we have 70 vehicles with a capacity of 750, 2 of the 239 locations have a much higher demand than all the rest, one is 713 and the second is 434.

Entering this into the solver throws an error:

RuntimeError: cuOpt failure at file=/cuopt-build-utilities/cuopt/cpp/src/solution/ line=196: Truck capacity is smaller than volume

Which is not true, since 1 vehicle with a capacity of 750 can carry a demand of 713 and another can carry a demand of 434 (considering that we have 70 vehicles available with no time restrictions or anything extra, only capacity restriction)

This is the only line where a constraint is added:
model.add_capacity_dimension("demand", df['demand'], capacity)

Now, if I remove these two high demands (the one with 713 and 434) from the locations and keep the other 237, whose maximum remains at 214 cuOpt is able to find a solution

How can we solve this situation?

When you remove those two and get the result, can you please check what is leftover capacity in each vehicle after serving all the demand?

Hi, the problem was in the order in which we passed the dataframe with the locations to go through, for display purposes we were ordering from highest to lowest according to demand, leaving the largest values in the first position (wrongly representing the deposit), the solution was to always insert the deposit in the first position with zero demand