Add fixed costs for soft time window in solving routing problem #2974
Unanswered
kaikezhang
asked this question in
Routing (and legacy CP) questions
Replies: 2 comments 9 replies
-
|
I would also like to find a solution for this particular scenario. IMHO it's impossible right now. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Did you try to use two nodes and two disjunctions ?
e.g. node A with TW[13,42], fixed cost = 31, coeficient = 23
warning: Still didn't had the time to test it, any feedback welcome ! |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Python to solve routing problem where I need to impose fixed costs and variable costs on nodes with delayed service. I noticed the SetCumulVarSoftUpperBound function allows me to add variable costs, that is cost = coefficient * (cumulVar - upper_bound) if cumulVar > upper_bound. In my problem, I also need to impose fixed costs, that is, cost = fixed_costs + coefficient * (cumulVar - upper_bound) if cumulVar > upper_bound. Is there any way I can achieve this?
Beta Was this translation helpful? Give feedback.
All reactions