Hello Team,
I’ve gotten great results out of this tool so far. Thanks for all your work, and sorry if these are noob questions.
I currently have a CVRPPD model that has distance, weight, and length dimensions. I’d like to somehow add a ‘utilization%’ dimension (from 0 to 100) for both weight and length that’s calculated using each route’s total distance and add a soft lower bound to it.
cumulative weight(n) * leg distance(n) + cumulative weight(n+1) * leg distance(n+1) +...
weight capacity * route distance
Obviously this can’t work as a normal dimension since it depends on the weight dimension and the total route distance. Do you have any suggestions?
I’ve tried manually creating a constantDimension and setting each vehicles end value in an atSolutionCallback with no luck.
github gist: Minimum problem for OR Tools help (github.com)
In the gist, the second route of the optimal solution should be dropped.
Bonus:
- Is there any way to set multiple levels of soft bounds? (If < 90%, use one coefficient, if <70%, use a higher coefficient, etc.) Or something to that effect?
Thanks in advance,
Michael