Java Reference
Java Reference
Detailed Description
Maintain a reservoir level within bounds. The water level starts at 0, and at
any time >= 0, it must be within min_level, and max_level. Furthermore, this
constraints expect all times variables to be >= 0.
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.
Note that level min can be > 0, or level max can be < 0. It just forces
some demands to be executed at time 0 to make sure that we are within those
bounds with the executed demands. Therefore, at any time t >= 0:
sum(demands[i] * actives[i] if times[i] <= t) in [min_level, max_level]
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
Definition at line 25 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< ReservoirConstraintProto > | getParserForType () |
| .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< ReservoirConstraintProto > | parser () |
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()
|
inline |
Definition at line 434 of file ReservoirConstraintProto.java.
◆ getActives()
|
inline |
literals.
repeated int32 actives = 5;
- Parameters
-
index The index of the element to return.
- Returns
- The actives at the given index.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 322 of file ReservoirConstraintProto.java.
◆ getActivesCount()
|
inline |
literals.
repeated int32 actives = 5;
- Returns
- The count of actives.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 310 of file ReservoirConstraintProto.java.
◆ getActivesList()
|
inline |
literals.
repeated int32 actives = 5;
- Returns
- A list containing the actives.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 299 of file ReservoirConstraintProto.java.
◆ getDefaultInstance()
|
inlinestatic |
Definition at line 1203 of file ReservoirConstraintProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 1228 of file ReservoirConstraintProto.java.
◆ getDemands()
|
inline |
constants, can be negative.
repeated int64 demands = 4;
- Parameters
-
index The index of the element to return.
- Returns
- The demands at the given index.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 282 of file ReservoirConstraintProto.java.
◆ getDemandsCount()
|
inline |
constants, can be negative.
repeated int64 demands = 4;
- Returns
- The count of demands.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 270 of file ReservoirConstraintProto.java.
◆ getDemandsList()
|
inline |
constants, can be negative.
repeated int64 demands = 4;
- Returns
- A list containing the demands.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 259 of file ReservoirConstraintProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 173 of file ReservoirConstraintProto.java.
◆ getMaxLevel()
|
inline |
int64 max_level = 2;
- Returns
- The maxLevel.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 203 of file ReservoirConstraintProto.java.
◆ getMinLevel()
|
inline |
int64 min_level = 1;
- Returns
- The minLevel.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 192 of file ReservoirConstraintProto.java.
◆ getParserForType()
|
inline |
Definition at line 1223 of file ReservoirConstraintProto.java.
◆ getSerializedSize()
|
inline |
Definition at line 373 of file ReservoirConstraintProto.java.
◆ getTimes()
|
inline |
variables.
repeated int32 times = 3;
- Parameters
-
index The index of the element to return.
- Returns
- The times at the given index.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 242 of file ReservoirConstraintProto.java.
◆ getTimesCount()
|
inline |
variables.
repeated int32 times = 3;
- Returns
- The count of times.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 230 of file ReservoirConstraintProto.java.
◆ getTimesList()
|
inline |
variables.
repeated int32 times = 3;
- Returns
- A list containing the times.
Implements ReservoirConstraintProtoOrBuilder.
Definition at line 219 of file ReservoirConstraintProto.java.
◆ getUnknownFields()
|
inline |
Definition at line 49 of file ReservoirConstraintProto.java.
◆ hashCode()
|
inline |
Definition at line 458 of file ReservoirConstraintProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 179 of file ReservoirConstraintProto.java.
◆ isInitialized()
|
inline |
Definition at line 329 of file ReservoirConstraintProto.java.
◆ newBuilder() [1/2]
|
inlinestatic |
Definition at line 559 of file ReservoirConstraintProto.java.
◆ newBuilder() [2/2]
|
inlinestatic |
Definition at line 562 of file ReservoirConstraintProto.java.
◆ newBuilderForType() [1/2]
|
inline |
Definition at line 558 of file ReservoirConstraintProto.java.
◆ newBuilderForType() [2/2]
|
inlineprotected |
Definition at line 572 of file ReservoirConstraintProto.java.
◆ newInstance()
|
inlineprotected |
Definition at line 42 of file ReservoirConstraintProto.java.
◆ parseDelimitedFrom() [1/2]
|
inlinestatic |
Definition at line 531 of file ReservoirConstraintProto.java.
◆ parseDelimitedFrom() [2/2]
|
inlinestatic |
Definition at line 536 of file ReservoirConstraintProto.java.
◆ parseFrom() [1/10]
|
inlinestatic |
Definition at line 509 of file ReservoirConstraintProto.java.
◆ parseFrom() [2/10]
|
inlinestatic |
Definition at line 513 of file ReservoirConstraintProto.java.
◆ parseFrom() [3/10]
|
inlinestatic |
Definition at line 498 of file ReservoirConstraintProto.java.
◆ parseFrom() [4/10]
|
inlinestatic |
Definition at line 503 of file ReservoirConstraintProto.java.
◆ parseFrom() [5/10]
|
inlinestatic |
Definition at line 543 of file ReservoirConstraintProto.java.
◆ parseFrom() [6/10]
|
inlinestatic |
Definition at line 549 of file ReservoirConstraintProto.java.
◆ parseFrom() [7/10]
|
inlinestatic |
Definition at line 519 of file ReservoirConstraintProto.java.
◆ parseFrom() [8/10]
|
inlinestatic |
Definition at line 524 of file ReservoirConstraintProto.java.
◆ parseFrom() [9/10]
|
inlinestatic |
Definition at line 487 of file ReservoirConstraintProto.java.
◆ parseFrom() [10/10]
|
inlinestatic |
Definition at line 492 of file ReservoirConstraintProto.java.
◆ parser()
|
inlinestatic |
Definition at line 1218 of file ReservoirConstraintProto.java.
◆ toBuilder()
|
inline |
Definition at line 566 of file ReservoirConstraintProto.java.
◆ writeTo()
|
inline |
Definition at line 339 of file ReservoirConstraintProto.java.
Member Data Documentation
◆ ACTIVES_FIELD_NUMBER
|
static |
Definition at line 287 of file ReservoirConstraintProto.java.
◆ DEMANDS_FIELD_NUMBER
|
static |
Definition at line 247 of file ReservoirConstraintProto.java.
◆ MAX_LEVEL_FIELD_NUMBER
|
static |
Definition at line 196 of file ReservoirConstraintProto.java.
◆ MIN_LEVEL_FIELD_NUMBER
|
static |
Definition at line 185 of file ReservoirConstraintProto.java.
◆ TIMES_FIELD_NUMBER
|
static |
Definition at line 207 of file ReservoirConstraintProto.java.
The documentation for this class was generated from the following file: