-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
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.