Google OR-Tools v9.15
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< ReservoirConstraintProto > getParserForType ()
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< ReservoirConstraintProto > parser ()

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 281 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 197 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 189 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 182 of file ReservoirConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 1376 of file ReservoirConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1412 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)

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 160 of file ReservoirConstraintProto.java.

◆ getLevelChangesCount()

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

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 153 of file ReservoirConstraintProto.java.

◆ getLevelChangesList()

java.util.List< com.google.ortools.sat.LinearExpressionProto > com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesList ( )

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 138 of file ReservoirConstraintProto.java.

◆ getLevelChangesOrBuilder()

com.google.ortools.sat.LinearExpressionProtoOrBuilder com.google.ortools.sat.ReservoirConstraintProto.getLevelChangesOrBuilder ( int index)

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 167 of file ReservoirConstraintProto.java.

◆ getLevelChangesOrBuilderList()

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

repeated .operations_research.sat.LinearExpressionProto level_changes = 6;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 146 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 1407 of file ReservoirConstraintProto.java.

◆ getSerializedSize()

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

Definition at line 240 of file ReservoirConstraintProto.java.

◆ getTimeExprs()

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

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 119 of file ReservoirConstraintProto.java.

◆ getTimeExprsCount()

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

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 112 of file ReservoirConstraintProto.java.

◆ getTimeExprsList()

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

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 97 of file ReservoirConstraintProto.java.

◆ getTimeExprsOrBuilder()

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

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 126 of file ReservoirConstraintProto.java.

◆ getTimeExprsOrBuilderList()

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

repeated .operations_research.sat.LinearExpressionProto time_exprs = 3;

Implements com.google.ortools.sat.ReservoirConstraintProtoOrBuilder.

Definition at line 105 of file ReservoirConstraintProto.java.

◆ hashCode()

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

Definition at line 305 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 204 of file ReservoirConstraintProto.java.

◆ newBuilder() [1/2]

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

Definition at line 408 of file ReservoirConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 411 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [1/2]

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

Definition at line 407 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 421 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 379 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 385 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 356 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 360 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 345 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 350 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 392 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 398 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 366 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 371 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 334 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 339 of file ReservoirConstraintProto.java.

◆ parser()

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

Definition at line 1402 of file ReservoirConstraintProto.java.

◆ toBuilder()

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

Definition at line 415 of file ReservoirConstraintProto.java.

◆ writeTo()

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

Definition at line 214 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 172 of file ReservoirConstraintProto.java.

◆ LEVEL_CHANGES_FIELD_NUMBER

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

Definition at line 131 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: