1. How many node do you need (i.e. avoid the dropping penalty) to compensate for the "load of truck < min_truck_capacity" penalty ?
1. The way I have given the loads in the problem statement, I have enough nodes to form 5 trucks (and not drop any node) while meeting all constraints.
2. Max. No. of nodes allowed (per truck) is 6, and they should cover all the min quantity to avoid node drop penalty.
2. How did you model this constraint? Did you use RoutingDimension::SetCumulVarSoftLowerBound() ?
Answer:
I modeled it using "AddConstantDimensionWithSlack", fetched cumulative load of truck at end node & using conditions & methods such as "MakeIsLessCstVar", "MakeProd", "AddConstraint" & others and then used "SetCumulVarSoftUpperBound" on dimension at vehicle end index to have 0 in initial nodes & actual association penalty of truck in vehicle end node
I tried with SetCumulVarSoftLowerBound but most of the solution is not inline with our expectations & even tried "RemoveIndex" as well, but solutions are not being formed and so I opted the above approach
Just to add on to the initial question, I reduced my sample size and gave node demands such that they can fit into 5 trucks (2 big & 3 small), the solver didn't drop anything in the manual plan. My observation was:
1. If I give exactly 2 big trucks & 3 small trucks as available to solver, solver formed solution same as manual but when I give 2 big trucks & 7 small trucks are available (i.e., more than sufficient), solver formed 1 big truck & 3 small trucks and dropped few node demands and objective cost of solution is way higher than previous solution
Let me know if there is any mistake in our approach