DotNet Reference

.Net Reference

Detailed Description

Maintain a reservoir level within bounds.

The water level starts at 0, and at any time, it must be within [min_level, max_level].

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. Therefore, at any time t: sum(demands[i] * actives[i] if times[i] <= t) in [min_level, max_level]

Note that min level must be <= 0, and the max level must be >= 0. Please use fixed demands to simulate initial state.

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 2971 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< ReservoirConstraintProtoParser [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]

Definition at line 2992 of file CpModel.pb.cs.

◆ ReservoirConstraintProto() [2/2]

Definition at line 2999 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int CalculateSize ( )
inline

Definition at line 3157 of file CpModel.pb.cs.

◆ Clone()

ReservoirConstraintProto Clone ( )
inline

Definition at line 3009 of file CpModel.pb.cs.

◆ Equals() [1/2]

override bool Equals ( object  other)
inline

Definition at line 3075 of file CpModel.pb.cs.

◆ Equals() [2/2]

bool Equals ( ReservoirConstraintProto  other)
inline

Definition at line 3080 of file CpModel.pb.cs.

◆ GetHashCode()

override int GetHashCode ( )
inline

Definition at line 3096 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void MergeFrom ( pb::CodedInputStream  input)
inline

Definition at line 3192 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void MergeFrom ( ReservoirConstraintProto  other)
inline

Definition at line 3175 of file CpModel.pb.cs.

◆ ToString()

override string ToString ( )
inline

Definition at line 3110 of file CpModel.pb.cs.

◆ WriteTo()

void WriteTo ( pb::CodedOutputStream  output)
inline

Definition at line 3115 of file CpModel.pb.cs.

Member Data Documentation

◆ ActivesFieldNumber

const int ActivesFieldNumber = 5
static

Field number for the "actives" field.

Definition at line 3062 of file CpModel.pb.cs.

◆ DemandsFieldNumber

const int DemandsFieldNumber = 4
static

Field number for the "demands" field.

Definition at line 3049 of file CpModel.pb.cs.

◆ MaxLevelFieldNumber

const int MaxLevelFieldNumber = 2
static

Field number for the "max_level" field.

Definition at line 3025 of file CpModel.pb.cs.

◆ MinLevelFieldNumber

const int MinLevelFieldNumber = 1
static

Field number for the "min_level" field.

Definition at line 3014 of file CpModel.pb.cs.

◆ TimesFieldNumber

const int TimesFieldNumber = 3
static

Field number for the "times" field.

Definition at line 3036 of file CpModel.pb.cs.

Property Documentation

◆ Actives

pbc.RepeatedField<int> Actives
get

literals.

Definition at line 3070 of file CpModel.pb.cs.

◆ Demands

pbc.RepeatedField<long> Demands
get

constants, can be negative.

Definition at line 3057 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Descriptor
staticget

Definition at line 2982 of file CpModel.pb.cs.

◆ MaxLevel

long MaxLevel
getset

Definition at line 3028 of file CpModel.pb.cs.

◆ MinLevel

long MinLevel
getset

Definition at line 3017 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<ReservoirConstraintProto> Parser
staticget

Definition at line 2979 of file CpModel.pb.cs.

◆ Times

pbc.RepeatedField<int> Times
get

variables.

Definition at line 3044 of file CpModel.pb.cs.


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