Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.ReservoirConstraint Class Reference

Specialized reservoir constraint. More...

Inheritance diagram for Google.OrTools.Sat.ReservoirConstraint:
Google.OrTools.Sat.Constraint

Public Member Functions

 ReservoirConstraint (CpModel cp_model, CpModelProto model)
 
ReservoirConstraint AddEvent< T, L > (T time, L level_change)
 Adds a mandatory event.
 
ReservoirConstraint AddOptionalEvent< T, L > (T time, L level_change, ILiteral literal)
 Adds an optional event.
 
- Public Member Functions inherited from Google.OrTools.Sat.Constraint
 Constraint (CpModelProto model)
 
void OnlyEnforceIf (ILiteral lit)
 Adds a literal to the constraint.
 
void OnlyEnforceIf (ILiteral[] lits)
 Adds a list of literals to the constraint.
 

Additional Inherited Members

- Properties inherited from Google.OrTools.Sat.Constraint
int Index [get]
 The index of the constraint in the model.
 
ConstraintProto Proto [get, set]
 The underlying constraint proto.
 

Detailed Description

Specialized reservoir constraint.

This constraint allows adding events (time, levelChange, isActive (optional)) to the reservoir constraint incrementally.

Definition at line 306 of file Constraints.cs.

Constructor & Destructor Documentation

◆ ReservoirConstraint()

Google.OrTools.Sat.ReservoirConstraint.ReservoirConstraint ( CpModel cp_model,
CpModelProto model )
inline

Definition at line 308 of file Constraints.cs.

Member Function Documentation

◆ AddEvent< T, L >()

ReservoirConstraint Google.OrTools.Sat.ReservoirConstraint.AddEvent< T, L > ( T time,
L level_change )
inline

Adds a mandatory event.

It will increase the used capacity by level_change at time time. time must be an affine expression.

Definition at line 323 of file Constraints.cs.

◆ AddOptionalEvent< T, L >()

ReservoirConstraint Google.OrTools.Sat.ReservoirConstraint.AddOptionalEvent< T, L > ( T time,
L level_change,
ILiteral literal )
inline

Adds an optional event.

If is_active is true, It will increase the used capacity by level_change at time time. time must be an affine expression.

Definition at line 342 of file Constraints.cs.


The documentation for this class was generated from the following file: