Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.ReservoirConstraintProto Class 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 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 that 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.

Protobuf type operations_research.sat.ReservoirConstraintProto

Definition at line 31 of file ReservoirConstraintProto.java.

Inheritance diagram for com.google.ortools.sat.ReservoirConstraintProto:
com.google.ortools.sat.ReservoirConstraintProtoOrBuilder

Classes

class  Builder

Public Member Functions

long getMinLevel ()
long getMaxLevel ()
java.util.List< com.google.ortools.sat.LinearExpressionProtogetTimeExprsList ()
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuildergetTimeExprsOrBuilderList ()
int getTimeExprsCount ()
com.google.ortools.sat.LinearExpressionProto getTimeExprs (int index)
com.google.ortools.sat.LinearExpressionProtoOrBuilder getTimeExprsOrBuilder (int index)
java.util.List< com.google.ortools.sat.LinearExpressionProtogetLevelChangesList ()
java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuildergetLevelChangesOrBuilderList ()
int getLevelChangesCount ()
com.google.ortools.sat.LinearExpressionProto getLevelChanges (int index)
com.google.ortools.sat.LinearExpressionProtoOrBuilder getLevelChangesOrBuilder (int index)
java.util.List< java.lang.Integer > getActiveLiteralsList ()
int getActiveLiteralsCount ()
int getActiveLiterals (int index)
final boolean isInitialized ()
void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
int getSerializedSize ()
boolean equals (final java.lang.Object obj)
int hashCode ()
Builder newBuilderForType ()
Builder toBuilder ()
com.google.protobuf.Parser< ReservoirConstraintProtogetParserForType ()
com.google.ortools.sat.ReservoirConstraintProto getDefaultInstanceForType ()

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (java.io.InputStream input) throws java.io.IOException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
static com.google.ortools.sat.ReservoirConstraintProto parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
static com.google.ortools.sat.ReservoirConstraintProto parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
static com.google.ortools.sat.ReservoirConstraintProto parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
static Builder newBuilder ()
static Builder newBuilder (com.google.ortools.sat.ReservoirConstraintProto prototype)
static com.google.ortools.sat.ReservoirConstraintProto getDefaultInstance ()
static com.google.protobuf.Parser< ReservoirConstraintProtoparser ()

Static Public Attributes

static final int MIN_LEVEL_FIELD_NUMBER = 1
static final int MAX_LEVEL_FIELD_NUMBER = 2
static final int TIME_EXPRS_FIELD_NUMBER = 3
static final int LEVEL_CHANGES_FIELD_NUMBER = 6
static final int ACTIVE_LITERALS_FIELD_NUMBER = 5

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
Builder newBuilderForType (com.google.protobuf.GeneratedMessage.BuilderParent parent)

Member Function Documentation

◆ equals()

boolean com.google.ortools.sat.ReservoirConstraintProto.equals ( final java.lang.Object obj)

Definition at line 321 of file ReservoirConstraintProto.java.

◆ getActiveLiterals()

int com.google.ortools.sat.ReservoirConstraintProto.getActiveLiterals ( int index)

repeated int32 active_literals = 5;

Parameters
indexThe index of the element to return.
Returns
The activeLiterals at the given index.

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 237 of file ReservoirConstraintProto.java.

◆ getActiveLiteralsCount()

int com.google.ortools.sat.ReservoirConstraintProto.getActiveLiteralsCount ( )

repeated int32 active_literals = 5;

Returns
The count of activeLiterals.

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 229 of file ReservoirConstraintProto.java.

◆ getActiveLiteralsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.ReservoirConstraintProto.getActiveLiteralsList ( )

repeated int32 active_literals = 5;

Returns
A list containing the activeLiterals.

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 222 of file ReservoirConstraintProto.java.

◆ getDefaultInstance()

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance ( )
static

Definition at line 1560 of file ReservoirConstraintProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstanceForType ( )

Definition at line 1596 of file ReservoirConstraintProto.java.

◆ getDescriptor()

final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.ReservoirConstraintProto.getDescriptor ( )
static

Definition at line 56 of file ReservoirConstraintProto.java.

◆ getLevelChanges()

com.google.ortools.sat.LinearExpressionProto com.google.ortools.sat.ReservoirConstraintProto.getLevelChanges ( int index)
Currently, we only support constant level changes.

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 196 of file ReservoirConstraintProto.java.

◆ getLevelChangesCount()

int com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesCount ( )
Currently, we only support constant level changes.

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 185 of file ReservoirConstraintProto.java.

◆ getLevelChangesList()

java.util.List< com.google.ortools.sat.LinearExpressionProto > com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesList ( )
Currently, we only support constant level changes.

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 162 of file ReservoirConstraintProto.java.

◆ getLevelChangesOrBuilder()

com.google.ortools.sat.LinearExpressionProtoOrBuilder com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesOrBuilder ( int index)
Currently, we only support constant level changes.

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 207 of file ReservoirConstraintProto.java.

◆ getLevelChangesOrBuilderList()

java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesOrBuilderList ( )
Currently, we only support constant level changes.

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 174 of file ReservoirConstraintProto.java.

◆ getMaxLevel()

long com.google.ortools.sat.ReservoirConstraintProto.getMaxLevel ( )

int64 max_level = 2;

Returns
The maxLevel.

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 86 of file ReservoirConstraintProto.java.

◆ getMinLevel()

long com.google.ortools.sat.ReservoirConstraintProto.getMinLevel ( )

int64 min_level = 1;

Returns
The minLevel.

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 75 of file ReservoirConstraintProto.java.

◆ getParserForType()

com.google.protobuf.Parser< ReservoirConstraintProto > com.google.ortools.sat.ReservoirConstraintProto.getParserForType ( )

Definition at line 1591 of file ReservoirConstraintProto.java.

◆ getSerializedSize()

int com.google.ortools.sat.ReservoirConstraintProto.getSerializedSize ( )

Definition at line 280 of file ReservoirConstraintProto.java.

◆ getTimeExprs()

com.google.ortools.sat.LinearExpressionProto com.google.ortools.sat.ReservoirConstraintProto.getTimeExprs ( int index)
affine expressions.

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 135 of file ReservoirConstraintProto.java.

◆ getTimeExprsCount()

int com.google.ortools.sat.ReservoirConstraintProto.getTimeExprsCount ( )
affine expressions.

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 124 of file ReservoirConstraintProto.java.

◆ getTimeExprsList()

java.util.List< com.google.ortools.sat.LinearExpressionProto > com.google.ortools.sat.ReservoirConstraintProto.getTimeExprsList ( )
affine expressions.

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 101 of file ReservoirConstraintProto.java.

◆ getTimeExprsOrBuilder()

com.google.ortools.sat.LinearExpressionProtoOrBuilder com.google.ortools.sat.ReservoirConstraintProto.getTimeExprsOrBuilder ( int index)
affine expressions.

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 146 of file ReservoirConstraintProto.java.

◆ getTimeExprsOrBuilderList()

java.util.List<? extends com.google.ortools.sat.LinearExpressionProtoOrBuilder > com.google.ortools.sat.ReservoirConstraintProto.getTimeExprsOrBuilderList ( )
affine expressions.

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 113 of file ReservoirConstraintProto.java.

◆ hashCode()

int com.google.ortools.sat.ReservoirConstraintProto.hashCode ( )

Definition at line 345 of file ReservoirConstraintProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.sat.ReservoirConstraintProto.internalGetFieldAccessorTable ( )
protected

Definition at line 62 of file ReservoirConstraintProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.ReservoirConstraintProto.isInitialized ( )

Definition at line 244 of file ReservoirConstraintProto.java.

◆ newBuilder() [1/2]

Builder com.google.ortools.sat.ReservoirConstraintProto.newBuilder ( )
static

Definition at line 448 of file ReservoirConstraintProto.java.

◆ newBuilder() [2/2]

Builder com.google.ortools.sat.ReservoirConstraintProto.newBuilder ( com.google.ortools.sat.ReservoirConstraintProto prototype)
static

Definition at line 451 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [1/2]

Builder com.google.ortools.sat.ReservoirConstraintProto.newBuilderForType ( )

Definition at line 447 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [2/2]

Builder com.google.ortools.sat.ReservoirConstraintProto.newBuilderForType ( com.google.protobuf.GeneratedMessage.BuilderParent parent)
protected

Definition at line 461 of file ReservoirConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseDelimitedFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 419 of file ReservoirConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseDelimitedFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 425 of file ReservoirConstraintProto.java.

◆ parseFrom() [1/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 396 of file ReservoirConstraintProto.java.

◆ parseFrom() [2/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 400 of file ReservoirConstraintProto.java.

◆ parseFrom() [3/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 385 of file ReservoirConstraintProto.java.

◆ parseFrom() [4/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 390 of file ReservoirConstraintProto.java.

◆ parseFrom() [5/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( com.google.protobuf.CodedInputStream input) throws java.io.IOException
static

Definition at line 432 of file ReservoirConstraintProto.java.

◆ parseFrom() [6/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 438 of file ReservoirConstraintProto.java.

◆ parseFrom() [7/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 406 of file ReservoirConstraintProto.java.

◆ parseFrom() [8/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 411 of file ReservoirConstraintProto.java.

◆ parseFrom() [9/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 374 of file ReservoirConstraintProto.java.

◆ parseFrom() [10/10]

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ReservoirConstraintProto.parseFrom ( java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 379 of file ReservoirConstraintProto.java.

◆ parser()

com.google.protobuf.Parser< ReservoirConstraintProto > com.google.ortools.sat.ReservoirConstraintProto.parser ( )
static

Definition at line 1586 of file ReservoirConstraintProto.java.

◆ toBuilder()

Builder com.google.ortools.sat.ReservoirConstraintProto.toBuilder ( )

Definition at line 455 of file ReservoirConstraintProto.java.

◆ writeTo()

void com.google.ortools.sat.ReservoirConstraintProto.writeTo ( com.google.protobuf.CodedOutputStream output) throws java.io.IOException

Definition at line 254 of file ReservoirConstraintProto.java.

Member Data Documentation

◆ ACTIVE_LITERALS_FIELD_NUMBER

final int com.google.ortools.sat.ReservoirConstraintProto.ACTIVE_LITERALS_FIELD_NUMBER = 5
static

Definition at line 212 of file ReservoirConstraintProto.java.

◆ LEVEL_CHANGES_FIELD_NUMBER

final int com.google.ortools.sat.ReservoirConstraintProto.LEVEL_CHANGES_FIELD_NUMBER = 6
static

Definition at line 151 of file ReservoirConstraintProto.java.

◆ MAX_LEVEL_FIELD_NUMBER

final int com.google.ortools.sat.ReservoirConstraintProto.MAX_LEVEL_FIELD_NUMBER = 2
static

Definition at line 79 of file ReservoirConstraintProto.java.

◆ MIN_LEVEL_FIELD_NUMBER

final int com.google.ortools.sat.ReservoirConstraintProto.MIN_LEVEL_FIELD_NUMBER = 1
static

Definition at line 68 of file ReservoirConstraintProto.java.

◆ TIME_EXPRS_FIELD_NUMBER

final int com.google.ortools.sat.ReservoirConstraintProto.TIME_EXPRS_FIELD_NUMBER = 3
static

Definition at line 90 of file ReservoirConstraintProto.java.


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