DotNet Reference
DotNet Reference
Detailed Description
Maintain a reservoir level within bounds.
The water level starts at 0, and at any time >= 0, it must be within min_level, and max_level. Furthermore, this constraints expect all times variables to be >= 0. If the variable actives[i] is true, and if the variable times[i] is assigned a value t, then the current level changes by demands[i] (which is constant) at the time t.
Note that level min can be > 0, or level max can be < 0. It just forces some demands to be executed at time 0 to make sure that we are within those bounds with the executed demands. Therefore, at any time t >= 0: sum(demands[i] * actives[i] if times[i] <= t) in [min_level, max_level] The array of boolean variables 'actives', if defined, indicates which actions are actually performed. If this array is not defined, then it is assumed that all actions will be performed.
Definition at line 2193 of file CpModel.pb.cs.
Public Member Functions | |
| ReservoirConstraintProto () | |
| ReservoirConstraintProto (ReservoirConstraintProto other) | |
| ReservoirConstraintProto | Clone () |
| override bool | Equals (object other) |
| bool | Equals (ReservoirConstraintProto other) |
| override int | GetHashCode () |
| override string | ToString () |
| void | WriteTo (pb::CodedOutputStream output) |
| int | CalculateSize () |
| void | MergeFrom (ReservoirConstraintProto other) |
| void | MergeFrom (pb::CodedInputStream input) |
Static Public Attributes | |
| const int | MinLevelFieldNumber = 1 |
| Field number for the "min_level" field. More... | |
| const int | MaxLevelFieldNumber = 2 |
| Field number for the "max_level" field. More... | |
| const int | TimesFieldNumber = 3 |
| Field number for the "times" field. More... | |
| const int | DemandsFieldNumber = 4 |
| Field number for the "demands" field. More... | |
| const int | ActivesFieldNumber = 5 |
| Field number for the "actives" field. More... | |
Properties | |
| static pb::MessageParser< ReservoirConstraintProto > | Parser [get] |
| static pbr::MessageDescriptor | Descriptor [get] |
| long | MinLevel [get, set] |
| long | MaxLevel [get, set] |
| pbc::RepeatedField< int > | Times [get] |
| variables. More... | |
| pbc::RepeatedField< long > | Demands [get] |
| constants, can be negative. More... | |
| pbc::RepeatedField< int > | Actives [get] |
| literals. More... | |
Constructor & Destructor Documentation
◆ ReservoirConstraintProto() [1/2]
|
inline |
Definition at line 2210 of file CpModel.pb.cs.
◆ ReservoirConstraintProto() [2/2]
|
inline |
Definition at line 2217 of file CpModel.pb.cs.
Member Function Documentation
◆ CalculateSize()
|
inline |
Definition at line 2351 of file CpModel.pb.cs.
◆ Clone()
|
inline |
Definition at line 2227 of file CpModel.pb.cs.
◆ Equals() [1/2]
|
inline |
Definition at line 2293 of file CpModel.pb.cs.
◆ Equals() [2/2]
|
inline |
Definition at line 2298 of file CpModel.pb.cs.
◆ GetHashCode()
|
inline |
Definition at line 2314 of file CpModel.pb.cs.
◆ MergeFrom() [1/2]
|
inline |
Definition at line 2386 of file CpModel.pb.cs.
◆ MergeFrom() [2/2]
|
inline |
Definition at line 2369 of file CpModel.pb.cs.
◆ ToString()
|
inline |
Definition at line 2328 of file CpModel.pb.cs.
◆ WriteTo()
|
inline |
Definition at line 2333 of file CpModel.pb.cs.
Member Data Documentation
◆ ActivesFieldNumber
|
static |
Field number for the "actives" field.
Definition at line 2280 of file CpModel.pb.cs.
◆ DemandsFieldNumber
|
static |
Field number for the "demands" field.
Definition at line 2267 of file CpModel.pb.cs.
◆ MaxLevelFieldNumber
|
static |
Field number for the "max_level" field.
Definition at line 2243 of file CpModel.pb.cs.
◆ MinLevelFieldNumber
|
static |
Field number for the "min_level" field.
Definition at line 2232 of file CpModel.pb.cs.
◆ TimesFieldNumber
|
static |
Field number for the "times" field.
Definition at line 2254 of file CpModel.pb.cs.
Property Documentation
◆ Actives
|
get |
literals.
Definition at line 2288 of file CpModel.pb.cs.
◆ Demands
|
get |
constants, can be negative.
Definition at line 2275 of file CpModel.pb.cs.
◆ Descriptor
|
staticget |
Definition at line 2200 of file CpModel.pb.cs.
◆ MaxLevel
|
getset |
Definition at line 2246 of file CpModel.pb.cs.
◆ MinLevel
|
getset |
Definition at line 2235 of file CpModel.pb.cs.
◆ Parser
|
staticget |
Definition at line 2197 of file CpModel.pb.cs.
◆ Times
|
get |
variables.
Definition at line 2262 of file CpModel.pb.cs.
The documentation for this class was generated from the following file: