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

Public Member Functions

.lang.Override Builder clear ()
 
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
.lang.Override com.google.ortools.sat.ReservoirConstraintProto getDefaultInstanceForType ()
 
.lang.Override com.google.ortools.sat.ReservoirConstraintProto build ()
 
.lang.Override com.google.ortools.sat.ReservoirConstraintProto buildPartial ()
 
.lang.Override Builder clone ()
 
.lang.Override Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
.lang.Override Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
.lang.Override Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
.lang.Override Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
.lang.Override Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.ReservoirConstraintProto other)
 
.lang.Override final boolean isInitialized ()
 
.lang.Override Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
.lang.Override long getMinLevel ()
 int64 min_level = 1; More...
 
Builder setMinLevel (long value)
 int64 min_level = 1; More...
 
Builder clearMinLevel ()
 int64 min_level = 1; More...
 
.lang.Override long getMaxLevel ()
 int64 max_level = 2; More...
 
Builder setMaxLevel (long value)
 int64 max_level = 2; More...
 
Builder clearMaxLevel ()
 int64 max_level = 2; More...
 
java.util.List< java.lang.Integer > getTimesList ()
 
int getTimesCount ()
 
int getTimes (int index)
 
Builder setTimes (int index, int value)
 
Builder addTimes (int value)
 
Builder addAllTimes (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearTimes ()
 
java.util.List< java.lang.Long > getDemandsList ()
 
int getDemandsCount ()
 
long getDemands (int index)
 
Builder setDemands (int index, long value)
 
Builder addDemands (long value)
 
Builder addAllDemands (java.lang.Iterable<? extends java.lang.Long > values)
 
Builder clearDemands ()
 
java.util.List< java.lang.Integer > getActivesList ()
 
int getActivesCount ()
 
int getActives (int index)
 
Builder setActives (int index, int value)
 
Builder addActives (int value)
 
Builder addAllActives (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearActives ()
 
.lang.Override final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
.lang.Override final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

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

Protected Member Functions

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

Member Function Documentation

◆ addActives()

Builder addActives ( int  value)
literals.

repeated int32 actives = 5;

Parameters
valueThe actives to add.
Returns
This builder for chaining.

Definition at line 1140 of file ReservoirConstraintProto.java.

◆ addAllActives()

Builder addAllActives ( java.lang.Iterable<? extends java.lang.Integer >  values)
literals.

repeated int32 actives = 5;

Parameters
valuesThe actives to add.
Returns
This builder for chaining.

Definition at line 1155 of file ReservoirConstraintProto.java.

◆ addAllDemands()

Builder addAllDemands ( java.lang.Iterable<? extends java.lang.Long >  values)
constants, can be negative.

repeated int64 demands = 4;

Parameters
valuesThe demands to add.
Returns
This builder for chaining.

Definition at line 1048 of file ReservoirConstraintProto.java.

◆ addAllTimes()

Builder addAllTimes ( java.lang.Iterable<? extends java.lang.Integer >  values)
variables.

repeated int32 times = 3;

Parameters
valuesThe times to add.
Returns
This builder for chaining.

Definition at line 941 of file ReservoirConstraintProto.java.

◆ addDemands()

Builder addDemands ( long  value)
constants, can be negative.

repeated int64 demands = 4;

Parameters
valueThe demands to add.
Returns
This builder for chaining.

Definition at line 1033 of file ReservoirConstraintProto.java.

◆ addRepeatedField()

.lang.Override Builder addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)

Definition at line 712 of file ReservoirConstraintProto.java.

◆ addTimes()

Builder addTimes ( int  value)
variables.

repeated int32 times = 3;

Parameters
valueThe times to add.
Returns
This builder for chaining.

Definition at line 926 of file ReservoirConstraintProto.java.

◆ build()

Definition at line 652 of file ReservoirConstraintProto.java.

◆ buildPartial()

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

Definition at line 661 of file ReservoirConstraintProto.java.

◆ clear()

.lang.Override Builder clear ( )

Definition at line 625 of file ReservoirConstraintProto.java.

◆ clearActives()

Builder clearActives ( )
literals.

repeated int32 actives = 5;

Returns
This builder for chaining.

Definition at line 1171 of file ReservoirConstraintProto.java.

◆ clearDemands()

Builder clearDemands ( )
constants, can be negative.

repeated int64 demands = 4;

Returns
This builder for chaining.

Definition at line 1064 of file ReservoirConstraintProto.java.

◆ clearField()

.lang.Override Builder clearField ( com.google.protobuf.Descriptors.FieldDescriptor  field)

Definition at line 696 of file ReservoirConstraintProto.java.

◆ clearMaxLevel()

Builder clearMaxLevel ( )

int64 max_level = 2;

Returns
This builder for chaining.

Definition at line 850 of file ReservoirConstraintProto.java.

◆ clearMinLevel()

Builder clearMinLevel ( )

int64 min_level = 1;

Returns
This builder for chaining.

Definition at line 819 of file ReservoirConstraintProto.java.

◆ clearOneof()

.lang.Override Builder clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor  oneof)

Definition at line 701 of file ReservoirConstraintProto.java.

◆ clearTimes()

Builder clearTimes ( )
variables.

repeated int32 times = 3;

Returns
This builder for chaining.

Definition at line 957 of file ReservoirConstraintProto.java.

◆ clone()

.lang.Override Builder clone ( )

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

◆ getActivesCount()

int getActivesCount ( )
literals.

repeated int32 actives = 5;

Returns
The count of actives.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 1099 of file ReservoirConstraintProto.java.

◆ getActivesList()

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

repeated int32 actives = 5;

Returns
A list containing the actives.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 1087 of file ReservoirConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 647 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 1004 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 992 of file ReservoirConstraintProto.java.

◆ getDemandsList()

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

◆ getDescriptor()

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

Definition at line 597 of file ReservoirConstraintProto.java.

◆ getDescriptorForType()

.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType ( )

Definition at line 642 of file ReservoirConstraintProto.java.

◆ getMaxLevel()

.lang.Override long getMaxLevel ( )

int64 max_level = 2;

Returns
The maxLevel.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 832 of file ReservoirConstraintProto.java.

◆ getMinLevel()

.lang.Override long getMinLevel ( )

int64 min_level = 1;

Returns
The minLevel.

Implements ReservoirConstraintProtoOrBuilder.

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

◆ getTimesCount()

int getTimesCount ( )
variables.

repeated int32 times = 3;

Returns
The count of times.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 885 of file ReservoirConstraintProto.java.

◆ getTimesList()

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

repeated int32 times = 3;

Returns
A list containing the times.

Implements ReservoirConstraintProtoOrBuilder.

Definition at line 873 of file ReservoirConstraintProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 603 of file ReservoirConstraintProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )

Definition at line 771 of file ReservoirConstraintProto.java.

◆ mergeFrom() [1/3]

◆ mergeFrom() [2/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.CodedInputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException

Definition at line 776 of file ReservoirConstraintProto.java.

◆ mergeFrom() [3/3]

.lang.Override Builder mergeFrom ( com.google.protobuf.Message  other)

Definition at line 718 of file ReservoirConstraintProto.java.

◆ mergeUnknownFields()

.lang.Override final Builder mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)

Definition at line 1184 of file ReservoirConstraintProto.java.

◆ setActives()

Builder setActives ( int  index,
int  value 
)
literals.

repeated int32 actives = 5;

Parameters
indexThe index to set the value at.
valueThe actives to set.
Returns
This builder for chaining.

Definition at line 1124 of file ReservoirConstraintProto.java.

◆ setDemands()

Builder setDemands ( int  index,
long  value 
)
constants, can be negative.

repeated int64 demands = 4;

Parameters
indexThe index to set the value at.
valueThe demands to set.
Returns
This builder for chaining.

Definition at line 1017 of file ReservoirConstraintProto.java.

◆ setField()

.lang.Override Builder setField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
java.lang.Object  value 
)

Definition at line 690 of file ReservoirConstraintProto.java.

◆ setMaxLevel()

Builder setMaxLevel ( long  value)

int64 max_level = 2;

Parameters
valueThe maxLevel to set.
Returns
This builder for chaining.

Definition at line 840 of file ReservoirConstraintProto.java.

◆ setMinLevel()

Builder setMinLevel ( long  value)

int64 min_level = 1;

Parameters
valueThe minLevel to set.
Returns
This builder for chaining.

Definition at line 809 of file ReservoirConstraintProto.java.

◆ setRepeatedField()

.lang.Override Builder setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor  field,
int  index,
java.lang.Object  value 
)

Definition at line 706 of file ReservoirConstraintProto.java.

◆ setTimes()

Builder setTimes ( int  index,
int  value 
)
variables.

repeated int32 times = 3;

Parameters
indexThe index to set the value at.
valueThe times to set.
Returns
This builder for chaining.

Definition at line 910 of file ReservoirConstraintProto.java.

◆ setUnknownFields()

.lang.Override final Builder setUnknownFields ( final com.google.protobuf.UnknownFieldSet  unknownFields)

Definition at line 1178 of file ReservoirConstraintProto.java.


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