Java Reference

Java 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.

Protobuf type

operations_research.sat.ReservoirConstraintProto

Definition at line 23 of file ReservoirConstraintProto.java.

Classes

class  Builder
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override long getMinLevel ()
 int64 min_level = 1; More...
 
.lang.Override long getMaxLevel ()
 int64 max_level = 2; More...
 
.lang.Override java.util.List< java.lang.Integer > getTimesList ()
 
int getTimesCount ()
 
int getTimes (int index)
 
.lang.Override java.util.List< java.lang.Long > getDemandsList ()
 
int getDemandsCount ()
 
long getDemands (int index)
 
.lang.Override java.util.List< java.lang.Integer > getActivesList ()
 
int getActivesCount ()
 
int getActives (int index)
 
.lang.Override final boolean isInitialized ()
 
.lang.Override void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
.lang.Override int getSerializedSize ()
 
.lang.Override boolean equals (final java.lang.Object obj)
 
.lang.Override int hashCode ()
 
.lang.Override Builder newBuilderForType ()
 
.lang.Override Builder toBuilder ()
 
.lang.Override com.google.protobuf.Parser< ReservoirConstraintProtogetParserForType ()
 
.lang.Override 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 TIMES_FIELD_NUMBER = 3
 
static final int DEMANDS_FIELD_NUMBER = 4
 
static final int ACTIVES_FIELD_NUMBER = 5
 

Protected Member Functions

.lang.Override java.lang.Object newInstance (UnusedPrivateParameter unused)
 
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 
.lang.Override Builder newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
 

Member Function Documentation

◆ equals()

.lang.Override boolean equals ( final java.lang.Object  obj)

Definition at line 432 of file ReservoirConstraintProto.java.

◆ getActives()

int getActives ( int  index)
literals.

repeated int32 actives = 5;

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

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 320 of file ReservoirConstraintProto.java.

◆ getActivesCount()

int getActivesCount ( )
literals.

repeated int32 actives = 5;

Returns
The count of actives.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 308 of file ReservoirConstraintProto.java.

◆ getActivesList()

.lang.Override java.util.List<java.lang.Integer> getActivesList ( )
literals.

repeated int32 actives = 5;

Returns
A list containing the actives.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 297 of file ReservoirConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 1199 of file ReservoirConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1224 of file ReservoirConstraintProto.java.

◆ getDemands()

long getDemands ( int  index)
constants, can be negative.

repeated int64 demands = 4;

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

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 280 of file ReservoirConstraintProto.java.

◆ getDemandsCount()

int getDemandsCount ( )
constants, can be negative.

repeated int64 demands = 4;

Returns
The count of demands.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 268 of file ReservoirConstraintProto.java.

◆ getDemandsList()

.lang.Override java.util.List<java.lang.Long> getDemandsList ( )
constants, can be negative.

repeated int64 demands = 4;

Returns
A list containing the demands.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 257 of file ReservoirConstraintProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
static

Definition at line 171 of file ReservoirConstraintProto.java.

◆ getMaxLevel()

.lang.Override long getMaxLevel ( )

int64 max_level = 2;

Returns
The maxLevel.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 201 of file ReservoirConstraintProto.java.

◆ getMinLevel()

.lang.Override long getMinLevel ( )

int64 min_level = 1;

Returns
The minLevel.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 190 of file ReservoirConstraintProto.java.

◆ getParserForType()

.lang.Override com.google.protobuf.Parser<ReservoirConstraintProto> getParserForType ( )

Definition at line 1219 of file ReservoirConstraintProto.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )

Definition at line 371 of file ReservoirConstraintProto.java.

◆ getTimes()

int getTimes ( int  index)
variables.

repeated int32 times = 3;

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

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 240 of file ReservoirConstraintProto.java.

◆ getTimesCount()

int getTimesCount ( )
variables.

repeated int32 times = 3;

Returns
The count of times.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 228 of file ReservoirConstraintProto.java.

◆ getTimesList()

.lang.Override java.util.List<java.lang.Integer> getTimesList ( )
variables.

repeated int32 times = 3;

Returns
A list containing the times.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 217 of file ReservoirConstraintProto.java.

◆ getUnknownFields()

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ( )

Definition at line 47 of file ReservoirConstraintProto.java.

◆ hashCode()

.lang.Override int hashCode ( )

Definition at line 456 of file ReservoirConstraintProto.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
protected

Definition at line 177 of file ReservoirConstraintProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )

Definition at line 327 of file ReservoirConstraintProto.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
static

Definition at line 557 of file ReservoirConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 560 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )

Definition at line 556 of file ReservoirConstraintProto.java.

◆ newBuilderForType() [2/2]

.lang.Override Builder newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent  parent)
protected

Definition at line 570 of file ReservoirConstraintProto.java.

◆ newInstance()

.lang.Override java.lang.Object newInstance ( UnusedPrivateParameter  unused)
protected

Definition at line 40 of file ReservoirConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 529 of file ReservoirConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 534 of file ReservoirConstraintProto.java.

◆ parseFrom() [1/10]

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

Definition at line 507 of file ReservoirConstraintProto.java.

◆ parseFrom() [2/10]

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

Definition at line 511 of file ReservoirConstraintProto.java.

◆ parseFrom() [3/10]

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

Definition at line 496 of file ReservoirConstraintProto.java.

◆ parseFrom() [4/10]

static 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 501 of file ReservoirConstraintProto.java.

◆ parseFrom() [5/10]

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

Definition at line 541 of file ReservoirConstraintProto.java.

◆ parseFrom() [6/10]

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

Definition at line 547 of file ReservoirConstraintProto.java.

◆ parseFrom() [7/10]

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

Definition at line 517 of file ReservoirConstraintProto.java.

◆ parseFrom() [8/10]

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

Definition at line 522 of file ReservoirConstraintProto.java.

◆ parseFrom() [9/10]

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

Definition at line 485 of file ReservoirConstraintProto.java.

◆ parseFrom() [10/10]

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

Definition at line 490 of file ReservoirConstraintProto.java.

◆ parser()

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

Definition at line 1214 of file ReservoirConstraintProto.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )

Definition at line 564 of file ReservoirConstraintProto.java.

◆ writeTo()

.lang.Override void writeTo ( com.google.protobuf.CodedOutputStream  output) throws java.io.IOException

Definition at line 337 of file ReservoirConstraintProto.java.

Member Data Documentation

◆ ACTIVES_FIELD_NUMBER

final int ACTIVES_FIELD_NUMBER = 5
static

Definition at line 285 of file ReservoirConstraintProto.java.

◆ DEMANDS_FIELD_NUMBER

final int DEMANDS_FIELD_NUMBER = 4
static

Definition at line 245 of file ReservoirConstraintProto.java.

◆ MAX_LEVEL_FIELD_NUMBER

final int MAX_LEVEL_FIELD_NUMBER = 2
static

Definition at line 194 of file ReservoirConstraintProto.java.

◆ MIN_LEVEL_FIELD_NUMBER

final int MIN_LEVEL_FIELD_NUMBER = 1
static

Definition at line 183 of file ReservoirConstraintProto.java.

◆ TIMES_FIELD_NUMBER

final int TIMES_FIELD_NUMBER = 3
static

Definition at line 205 of file ReservoirConstraintProto.java.


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