Class ReservoirConstraint
java.lang.Object
com.google.ortools.sat.Constraint
com.google.ortools.sat.ReservoirConstraint
Specialized reservoir constraint.
This constraint allows adding events (time, levelChange, isActive (optional)) to the reservoir constraint incrementally.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEvent
(long time, long levelChange) Adds a mandatory event at a fixed timeaddEvent
(LinearArgument time, long levelChange) Adds a mandatory eventaddOptionalEvent
(long time, long levelChange, Literal isActive) Adds an optional event at a fixed timeaddOptionalEvent
(LinearExpr time, long levelChange, Literal isActive) Adds an optional eventMethods inherited from class com.google.ortools.sat.Constraint
getBuilder, getIndex, onlyEnforceIf, onlyEnforceIf
-
Constructor Details
-
ReservoirConstraint
-
-
Method Details
-
addEvent
Adds a mandatory eventIt will increase the used capacity by `levelChange` at time `time`. `time` must be an affine expression.
-
addEvent
Adds a mandatory event at a fixed timeIt will increase the used capacity by `levelChange` at time `time`.
-
addOptionalEvent
Adds an optional eventIf `isActive` is true, It will increase the used capacity by `levelChange` at time `time`. `time` must be an affine expression.
-
addOptionalEvent
Adds an optional event at a fixed timeIf `isActive` is true, It will increase the used capacity by `levelChange` at time `time`.
-