Java Reference
Java Reference
Detailed Description
A linear constraint is always of the form: lower_bound <= sum of linear term elements <= upper_bound, where lower_bound and upper_bound:
- Can form a singleton: lower_bound == upper_bound. The constraint is an equation.
- Can form a finite interval [lower_bound, upper_bound]. The constraint is both lower- and upper-bounded, i.e. "boxed".
- Can form a semi-infinite interval. lower_bound = -infinity: the constraint is upper-bounded. upper_bound = +infinity: the constraint is lower-bounded.
- Can form the infinite interval: lower_bound = -infinity and upper_bound = +infinity. The constraint is free.
Protobuf typeoperations_research.MPConstraintProto
Definition at line 23 of file MPConstraintProto.java.
Classes | |
| class | Builder |
Public Member Functions | |
| .lang.Override final com.google.protobuf.UnknownFieldSet | getUnknownFields () |
| .lang.Override java.util.List< java.lang.Integer > | getVarIndexList () |
| int | getVarIndexCount () |
| int | getVarIndex (int index) |
| .lang.Override java.util.List< java.lang.Double > | getCoefficientList () |
| int | getCoefficientCount () |
| double | getCoefficient (int index) |
| .lang.Override boolean | hasLowerBound () |
| .lang.Override double | getLowerBound () |
| .lang.Override boolean | hasUpperBound () |
optional double upper_bound = 3 [default = inf]; More... | |
| .lang.Override double | getUpperBound () |
optional double upper_bound = 3 [default = inf]; More... | |
| .lang.Override boolean | hasName () |
| .lang.Override java.lang.String | getName () |
| .lang.Override com.google.protobuf.ByteString | getNameBytes () |
| .lang.Override boolean | hasIsLazy () |
| .lang.Override boolean | getIsLazy () |
| .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< MPConstraintProto > | getParserForType () |
| .lang.Override com.google.ortools.linearsolver.MPConstraintProto | getDefaultInstanceForType () |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPConstraintProto | parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static Builder | newBuilder () |
| static Builder | newBuilder (com.google.ortools.linearsolver.MPConstraintProto prototype) |
| static com.google.ortools.linearsolver.MPConstraintProto | getDefaultInstance () |
| static com.google.protobuf.Parser< MPConstraintProto > | parser () |
Static Public Attributes | |
| static final int | VAR_INDEX_FIELD_NUMBER = 6 |
| static final int | COEFFICIENT_FIELD_NUMBER = 7 |
| static final int | LOWER_BOUND_FIELD_NUMBER = 2 |
| static final int | UPPER_BOUND_FIELD_NUMBER = 3 |
| static final int | NAME_FIELD_NUMBER = 4 |
| static final int | IS_LAZY_FIELD_NUMBER = 5 |
| .lang.Deprecated static final com.google.protobuf.Parser< MPConstraintProto > | PARSER |
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 497 of file MPConstraintProto.java.
◆ getCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 7 [packed = true];
- Parameters
-
index The index of the element to return.
- Returns
- The coefficient at the given index.
Implements MPConstraintProtoOrBuilder.
Definition at line 257 of file MPConstraintProto.java.
◆ getCoefficientCount()
|
inline |
Must be finite.
repeated double coefficient = 7 [packed = true];
- Returns
- The count of coefficient.
Implements MPConstraintProtoOrBuilder.
Definition at line 245 of file MPConstraintProto.java.
◆ getCoefficientList()
|
inline |
Must be finite.
repeated double coefficient = 7 [packed = true];
- Returns
- A list containing the coefficient.
Implements MPConstraintProtoOrBuilder.
Definition at line 234 of file MPConstraintProto.java.
◆ getDefaultInstance()
|
inlinestatic |
Definition at line 1421 of file MPConstraintProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 1446 of file MPConstraintProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 160 of file MPConstraintProto.java.
◆ getIsLazy()
|
inline |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
- Returns
- The isLazy.
Implements MPConstraintProtoOrBuilder.
Definition at line 397 of file MPConstraintProto.java.
◆ getLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
- Returns
- The lowerBound.
Implements MPConstraintProtoOrBuilder.
Definition at line 285 of file MPConstraintProto.java.
◆ getName()
|
inline |
The name of the constraint.
optional string name = 4 [default = ""];
- Returns
- The name.
Implements MPConstraintProtoOrBuilder.
Definition at line 331 of file MPConstraintProto.java.
◆ getNameBytes()
|
inline |
The name of the constraint.
optional string name = 4 [default = ""];
- Returns
- The bytes for name.
Implements MPConstraintProtoOrBuilder.
Definition at line 355 of file MPConstraintProto.java.
◆ getParserForType()
|
inline |
Definition at line 1441 of file MPConstraintProto.java.
◆ getSerializedSize()
|
inline |
Definition at line 446 of file MPConstraintProto.java.
◆ getUnknownFields()
|
inline |
Definition at line 49 of file MPConstraintProto.java.
◆ getUpperBound()
|
inline |
optional double upper_bound = 3 [default = inf];
- Returns
- The upperBound.
Implements MPConstraintProtoOrBuilder.
Definition at line 304 of file MPConstraintProto.java.
◆ getVarIndex()
|
inline |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
- Parameters
-
index The index of the element to return.
- Returns
- The varIndex at the given index.
Implements MPConstraintProtoOrBuilder.
Definition at line 217 of file MPConstraintProto.java.
◆ getVarIndexCount()
|
inline |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
- Returns
- The count of varIndex.
Implements MPConstraintProtoOrBuilder.
Definition at line 202 of file MPConstraintProto.java.
◆ getVarIndexList()
|
inline |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
- Returns
- A list containing the varIndex.
Implements MPConstraintProtoOrBuilder.
Definition at line 188 of file MPConstraintProto.java.
◆ hashCode()
|
inline |
Definition at line 537 of file MPConstraintProto.java.
◆ hasIsLazy()
|
inline |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
- Returns
- Whether the isLazy field is set.
Implements MPConstraintProtoOrBuilder.
Definition at line 382 of file MPConstraintProto.java.
◆ hasLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
- Returns
- Whether the lowerBound field is set.
Implements MPConstraintProtoOrBuilder.
Definition at line 273 of file MPConstraintProto.java.
◆ hasName()
|
inline |
The name of the constraint.
optional string name = 4 [default = ""];
- Returns
- Whether the name field is set.
Implements MPConstraintProtoOrBuilder.
Definition at line 319 of file MPConstraintProto.java.
◆ hasUpperBound()
|
inline |
optional double upper_bound = 3 [default = inf];
- Returns
- Whether the upperBound field is set.
Implements MPConstraintProtoOrBuilder.
Definition at line 296 of file MPConstraintProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 166 of file MPConstraintProto.java.
◆ isInitialized()
|
inline |
Definition at line 403 of file MPConstraintProto.java.
◆ newBuilder() [1/2]
|
inlinestatic |
Definition at line 647 of file MPConstraintProto.java.
◆ newBuilder() [2/2]
|
inlinestatic |
Definition at line 650 of file MPConstraintProto.java.
◆ newBuilderForType() [1/2]
|
inline |
Definition at line 646 of file MPConstraintProto.java.
◆ newBuilderForType() [2/2]
|
inlineprotected |
Definition at line 660 of file MPConstraintProto.java.
◆ newInstance()
|
inlineprotected |
Definition at line 42 of file MPConstraintProto.java.
◆ parseDelimitedFrom() [1/2]
|
inlinestatic |
Definition at line 619 of file MPConstraintProto.java.
◆ parseDelimitedFrom() [2/2]
|
inlinestatic |
Definition at line 624 of file MPConstraintProto.java.
◆ parseFrom() [1/10]
|
inlinestatic |
Definition at line 597 of file MPConstraintProto.java.
◆ parseFrom() [2/10]
|
inlinestatic |
Definition at line 601 of file MPConstraintProto.java.
◆ parseFrom() [3/10]
|
inlinestatic |
Definition at line 586 of file MPConstraintProto.java.
◆ parseFrom() [4/10]
|
inlinestatic |
Definition at line 591 of file MPConstraintProto.java.
◆ parseFrom() [5/10]
|
inlinestatic |
Definition at line 631 of file MPConstraintProto.java.
◆ parseFrom() [6/10]
|
inlinestatic |
Definition at line 637 of file MPConstraintProto.java.
◆ parseFrom() [7/10]
|
inlinestatic |
Definition at line 607 of file MPConstraintProto.java.
◆ parseFrom() [8/10]
|
inlinestatic |
Definition at line 612 of file MPConstraintProto.java.
◆ parseFrom() [9/10]
|
inlinestatic |
Definition at line 575 of file MPConstraintProto.java.
◆ parseFrom() [10/10]
|
inlinestatic |
Definition at line 580 of file MPConstraintProto.java.
◆ parser()
|
inlinestatic |
Definition at line 1436 of file MPConstraintProto.java.
◆ toBuilder()
|
inline |
Definition at line 654 of file MPConstraintProto.java.
◆ writeTo()
|
inline |
Definition at line 413 of file MPConstraintProto.java.
Member Data Documentation
◆ COEFFICIENT_FIELD_NUMBER
|
static |
Definition at line 222 of file MPConstraintProto.java.
◆ IS_LAZY_FIELD_NUMBER
|
static |
Definition at line 368 of file MPConstraintProto.java.
◆ LOWER_BOUND_FIELD_NUMBER
|
static |
Definition at line 262 of file MPConstraintProto.java.
◆ NAME_FIELD_NUMBER
|
static |
Definition at line 308 of file MPConstraintProto.java.
◆ PARSER
|
static |
Definition at line 1426 of file MPConstraintProto.java.
◆ UPPER_BOUND_FIELD_NUMBER
|
static |
Definition at line 289 of file MPConstraintProto.java.
◆ VAR_INDEX_FIELD_NUMBER
|
static |
Definition at line 173 of file MPConstraintProto.java.
The documentation for this class was generated from the following file: