Add CP-SAT AddCumulative-like constraint where capacity can be different over periods of time #4332
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lperron
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.
-
What language and solver does this apply to?
C++ / CP-SAT
Describe the problem you are trying to solve.
Current implementation of AddCumulative assumes capacity as a constant or LinearExpr. In my case the capacity changes over period of time. Capacity can be pre-computed; it doesn't need to be modeled as a function from t.
No performant solution is found yet with available set of constraints.
Describe the solution you'd like
Override for AddCumulative constraint or a new type of similar constraint, where capacity can be defined as static map from time interval to constant.
Describe alternatives you've considered
No viable performant alternative is discovered within CP-SAT framework yet. Internet search pointed to other people with similar problem, alas I didn't find a solution yet.
Additional context
Depending on the scope of the change I might be able to code this myself and contribute to CP-SAT. I hope that following the implementation path of AddCumulative constraint would be a good guide. And with relatively limited increase of
capacity
from a constant to an array of constants - new constraint will be performant enough.Beta Was this translation helpful? Give feedback.
All reactions