Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.ReservoirConstraintProto Class Referencesealed

Maintain a reservoir level within bounds. The water level starts at 0, and at any time, it must be within [min_level, max_level]. More...

Inheritance diagram for Google.OrTools.Sat.ReservoirConstraintProto:

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.
 
const int MaxLevelFieldNumber = 2
 Field number for the "max_level" field.
 
const int TimeExprsFieldNumber = 3
 Field number for the "time_exprs" field.
 
const int LevelChangesFieldNumber = 6
 Field number for the "level_changes" field.
 
const int ActiveLiteralsFieldNumber = 5
 Field number for the "active_literals" field.
 

Properties

static pb::MessageParser< ReservoirConstraintProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
long MinLevel [get, set]
 
long MaxLevel [get, set]
 
pbc::RepeatedField< global::Google.OrTools.Sat.LinearExpressionProto > TimeExprs [get]
 affine expressions.
 
pbc::RepeatedField< global::Google.OrTools.Sat.LinearExpressionProto > LevelChanges [get]
 Currently, we only support constant level changes.
 
pbc::RepeatedField< int > ActiveLiterals [get]
 

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 active_literals[i] is true, and if the expression time_exprs[i] is assigned a value t, then the current level changes by level_changes[i] at the time t. Therefore, at any time t: sum(level_changes[i] * active_literals[i] if time_exprs[i] <= t) in [min_level, max_level]

Note
min level must be <= 0, and the max level must be >= 0. Please use fixed level_changes 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 2873 of file CpModel.pb.cs.

Constructor & Destructor Documentation

◆ ReservoirConstraintProto() [1/2]

Google.OrTools.Sat.ReservoirConstraintProto.ReservoirConstraintProto ( )
inline

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

◆ ReservoirConstraintProto() [2/2]

Google.OrTools.Sat.ReservoirConstraintProto.ReservoirConstraintProto ( ReservoirConstraintProto other)
inline

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

Member Function Documentation

◆ CalculateSize()

int Google.OrTools.Sat.ReservoirConstraintProto.CalculateSize ( )
inline

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

◆ Clone()

ReservoirConstraintProto Google.OrTools.Sat.ReservoirConstraintProto.Clone ( )
inline

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

◆ Equals() [1/2]

override bool Google.OrTools.Sat.ReservoirConstraintProto.Equals ( object other)
inline

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

◆ Equals() [2/2]

bool Google.OrTools.Sat.ReservoirConstraintProto.Equals ( ReservoirConstraintProto other)
inline

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

◆ GetHashCode()

override int Google.OrTools.Sat.ReservoirConstraintProto.GetHashCode ( )
inline

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

◆ MergeFrom() [1/2]

void Google.OrTools.Sat.ReservoirConstraintProto.MergeFrom ( pb.CodedInputStream input)
inline

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

◆ MergeFrom() [2/2]

void Google.OrTools.Sat.ReservoirConstraintProto.MergeFrom ( ReservoirConstraintProto other)
inline

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

◆ ToString()

override string Google.OrTools.Sat.ReservoirConstraintProto.ToString ( )
inline

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

◆ WriteTo()

void Google.OrTools.Sat.ReservoirConstraintProto.WriteTo ( pb.CodedOutputStream output)
inline

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

Member Data Documentation

◆ ActiveLiteralsFieldNumber

const int Google.OrTools.Sat.ReservoirConstraintProto.ActiveLiteralsFieldNumber = 5
static

Field number for the "active_literals" field.

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

◆ LevelChangesFieldNumber

const int Google.OrTools.Sat.ReservoirConstraintProto.LevelChangesFieldNumber = 6
static

Field number for the "level_changes" field.

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

◆ MaxLevelFieldNumber

const int Google.OrTools.Sat.ReservoirConstraintProto.MaxLevelFieldNumber = 2
static

Field number for the "max_level" field.

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

◆ MinLevelFieldNumber

const int Google.OrTools.Sat.ReservoirConstraintProto.MinLevelFieldNumber = 1
static

Field number for the "min_level" field.

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

◆ TimeExprsFieldNumber

const int Google.OrTools.Sat.ReservoirConstraintProto.TimeExprsFieldNumber = 3
static

Field number for the "time_exprs" field.

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

Property Documentation

◆ ActiveLiterals

pbc.RepeatedField<int> Google.OrTools.Sat.ReservoirConstraintProto.ActiveLiterals
get

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

◆ Descriptor

pbr.MessageDescriptor Google.OrTools.Sat.ReservoirConstraintProto.Descriptor
staticget

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

◆ LevelChanges

pbc.RepeatedField<global.Google.OrTools.Sat.LinearExpressionProto> Google.OrTools.Sat.ReservoirConstraintProto.LevelChanges
get

Currently, we only support constant level changes.

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

◆ MaxLevel

long Google.OrTools.Sat.ReservoirConstraintProto.MaxLevel
getset

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

◆ MinLevel

long Google.OrTools.Sat.ReservoirConstraintProto.MinLevel
getset

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

◆ Parser

pb.MessageParser<ReservoirConstraintProto> Google.OrTools.Sat.ReservoirConstraintProto.Parser
staticget

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

◆ TimeExprs

pbc.RepeatedField<global.Google.OrTools.Sat.LinearExpressionProto> Google.OrTools.Sat.ReservoirConstraintProto.TimeExprs
get

affine expressions.

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


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