Java Reference
Java Reference
Detailed Description
Quadratic constraints of the form lb <= sum a_i x_i + sum b_ij x_i x_j <= ub, where a, b, lb and ub are constants, and x are the model's variables. Quadratic matrices that are Positive Semi-Definite, Second-Order Cones or rotated Second-Order Cones are always accepted. Other forms may or may not be accepted depending on the underlying solver used. See https://scip.zib.de/doc/html/cons__quadratic_8h.php and https://www.gurobi.com/documentation/8.1/refman/constraints.html#subsubsection:QuadraticConstraints
Protobuf type
Definition at line 19 of file MPQuadraticConstraint.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 java.util.List< java.lang.Integer > | getQvar1IndexList () |
| int | getQvar1IndexCount () |
| int | getQvar1Index (int index) |
| .lang.Override java.util.List< java.lang.Integer > | getQvar2IndexList () |
repeated int32 qvar2_index = 4; More... | |
| int | getQvar2IndexCount () |
repeated int32 qvar2_index = 4; More... | |
| int | getQvar2Index (int index) |
repeated int32 qvar2_index = 4; More... | |
| .lang.Override java.util.List< java.lang.Double > | getQcoefficientList () |
| int | getQcoefficientCount () |
| double | getQcoefficient (int index) |
| .lang.Override boolean | hasLowerBound () |
| .lang.Override double | getLowerBound () |
| .lang.Override boolean | hasUpperBound () |
optional double upper_bound = 7 [default = inf]; More... | |
| .lang.Override double | getUpperBound () |
optional double upper_bound = 7 [default = inf]; More... | |
| .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< MPQuadraticConstraint > | getParserForType () |
| .lang.Override com.google.ortools.linearsolver.MPQuadraticConstraint | getDefaultInstanceForType () |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | 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.MPQuadraticConstraint prototype) |
| static com.google.ortools.linearsolver.MPQuadraticConstraint | getDefaultInstance () |
| static com.google.protobuf.Parser< MPQuadraticConstraint > | parser () |
Static Public Attributes | |
| static final int | VAR_INDEX_FIELD_NUMBER = 1 |
| static final int | COEFFICIENT_FIELD_NUMBER = 2 |
| static final int | QVAR1_INDEX_FIELD_NUMBER = 3 |
| static final int | QVAR2_INDEX_FIELD_NUMBER = 4 |
| static final int | QCOEFFICIENT_FIELD_NUMBER = 5 |
| static final int | LOWER_BOUND_FIELD_NUMBER = 6 |
| static final int | UPPER_BOUND_FIELD_NUMBER = 7 |
| .lang.Deprecated static final com.google.protobuf.Parser< MPQuadraticConstraint > | 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 585 of file MPQuadraticConstraint.java.
◆ getCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 2;
- Parameters
-
index The index of the element to return.
- Returns
- The coefficient at the given index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 315 of file MPQuadraticConstraint.java.
◆ getCoefficientCount()
|
inline |
Must be finite.
repeated double coefficient = 2;
- Returns
- The count of coefficient.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 303 of file MPQuadraticConstraint.java.
◆ getCoefficientList()
|
inline |
Must be finite.
repeated double coefficient = 2;
- Returns
- A list containing the coefficient.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 292 of file MPQuadraticConstraint.java.
◆ getDefaultInstance()
|
inlinestatic |
Definition at line 1695 of file MPQuadraticConstraint.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 1720 of file MPQuadraticConstraint.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 219 of file MPQuadraticConstraint.java.
◆ getLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
- Returns
- The lowerBound.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 465 of file MPQuadraticConstraint.java.
◆ getParserForType()
|
inline |
Definition at line 1715 of file MPQuadraticConstraint.java.
◆ getQcoefficient()
|
inline |
Must be finite.
repeated double qcoefficient = 5;
- Parameters
-
index The index of the element to return.
- Returns
- The qcoefficient at the given index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 438 of file MPQuadraticConstraint.java.
◆ getQcoefficientCount()
|
inline |
Must be finite.
repeated double qcoefficient = 5;
- Returns
- The count of qcoefficient.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 426 of file MPQuadraticConstraint.java.
◆ getQcoefficientList()
|
inline |
Must be finite.
repeated double qcoefficient = 5;
- Returns
- A list containing the qcoefficient.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 415 of file MPQuadraticConstraint.java.
◆ getQvar1Index()
|
inline |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
- Parameters
-
index The index of the element to return.
- Returns
- The qvar1Index at the given index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 372 of file MPQuadraticConstraint.java.
◆ getQvar1IndexCount()
|
inline |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
- Returns
- The count of qvar1Index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 354 of file MPQuadraticConstraint.java.
◆ getQvar1IndexList()
|
inline |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
- Returns
- A list containing the qvar1Index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 337 of file MPQuadraticConstraint.java.
◆ getQvar2Index()
|
inline |
repeated int32 qvar2_index = 4;
- Parameters
-
index The index of the element to return.
- Returns
- The qvar2Index at the given index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 399 of file MPQuadraticConstraint.java.
◆ getQvar2IndexCount()
|
inline |
repeated int32 qvar2_index = 4;
- Returns
- The count of qvar2Index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 391 of file MPQuadraticConstraint.java.
◆ getQvar2IndexList()
|
inline |
repeated int32 qvar2_index = 4;
- Returns
- A list containing the qvar2Index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 384 of file MPQuadraticConstraint.java.
◆ getSerializedSize()
|
inline |
Definition at line 527 of file MPQuadraticConstraint.java.
◆ getUnknownFields()
|
inline |
Definition at line 47 of file MPQuadraticConstraint.java.
◆ getUpperBound()
|
inline |
optional double upper_bound = 7 [default = inf];
- Returns
- The upperBound.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 484 of file MPQuadraticConstraint.java.
◆ getVarIndex()
|
inline |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
- Parameters
-
index The index of the element to return.
- Returns
- The varIndex at the given index.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 276 of file MPQuadraticConstraint.java.
◆ getVarIndexCount()
|
inline |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
- Returns
- The count of varIndex.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 261 of file MPQuadraticConstraint.java.
◆ getVarIndexList()
|
inline |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
- Returns
- A list containing the varIndex.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 247 of file MPQuadraticConstraint.java.
◆ hashCode()
|
inline |
Definition at line 621 of file MPQuadraticConstraint.java.
◆ hasLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
- Returns
- Whether the lowerBound field is set.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 453 of file MPQuadraticConstraint.java.
◆ hasUpperBound()
|
inline |
optional double upper_bound = 7 [default = inf];
- Returns
- Whether the upperBound field is set.
Implements MPQuadraticConstraintOrBuilder.
Definition at line 476 of file MPQuadraticConstraint.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 225 of file MPQuadraticConstraint.java.
◆ isInitialized()
|
inline |
Definition at line 490 of file MPQuadraticConstraint.java.
◆ newBuilder() [1/2]
|
inlinestatic |
Definition at line 734 of file MPQuadraticConstraint.java.
◆ newBuilder() [2/2]
|
inlinestatic |
Definition at line 737 of file MPQuadraticConstraint.java.
◆ newBuilderForType() [1/2]
|
inline |
Definition at line 733 of file MPQuadraticConstraint.java.
◆ newBuilderForType() [2/2]
|
inlineprotected |
Definition at line 747 of file MPQuadraticConstraint.java.
◆ newInstance()
|
inlineprotected |
Definition at line 40 of file MPQuadraticConstraint.java.
◆ parseDelimitedFrom() [1/2]
|
inlinestatic |
Definition at line 706 of file MPQuadraticConstraint.java.
◆ parseDelimitedFrom() [2/2]
|
inlinestatic |
Definition at line 711 of file MPQuadraticConstraint.java.
◆ parseFrom() [1/10]
|
inlinestatic |
Definition at line 684 of file MPQuadraticConstraint.java.
◆ parseFrom() [2/10]
|
inlinestatic |
Definition at line 688 of file MPQuadraticConstraint.java.
◆ parseFrom() [3/10]
|
inlinestatic |
Definition at line 673 of file MPQuadraticConstraint.java.
◆ parseFrom() [4/10]
|
inlinestatic |
Definition at line 678 of file MPQuadraticConstraint.java.
◆ parseFrom() [5/10]
|
inlinestatic |
Definition at line 718 of file MPQuadraticConstraint.java.
◆ parseFrom() [6/10]
|
inlinestatic |
Definition at line 724 of file MPQuadraticConstraint.java.
◆ parseFrom() [7/10]
|
inlinestatic |
Definition at line 694 of file MPQuadraticConstraint.java.
◆ parseFrom() [8/10]
|
inlinestatic |
Definition at line 699 of file MPQuadraticConstraint.java.
◆ parseFrom() [9/10]
|
inlinestatic |
Definition at line 662 of file MPQuadraticConstraint.java.
◆ parseFrom() [10/10]
|
inlinestatic |
Definition at line 667 of file MPQuadraticConstraint.java.
◆ parser()
|
inlinestatic |
Definition at line 1710 of file MPQuadraticConstraint.java.
◆ toBuilder()
|
inline |
Definition at line 741 of file MPQuadraticConstraint.java.
◆ writeTo()
|
inline |
Definition at line 500 of file MPQuadraticConstraint.java.
Member Data Documentation
◆ COEFFICIENT_FIELD_NUMBER
|
static |
Definition at line 280 of file MPQuadraticConstraint.java.
◆ LOWER_BOUND_FIELD_NUMBER
|
static |
Definition at line 442 of file MPQuadraticConstraint.java.
◆ PARSER
|
static |
Definition at line 1700 of file MPQuadraticConstraint.java.
◆ QCOEFFICIENT_FIELD_NUMBER
|
static |
Definition at line 403 of file MPQuadraticConstraint.java.
◆ QVAR1_INDEX_FIELD_NUMBER
|
static |
Definition at line 319 of file MPQuadraticConstraint.java.
◆ QVAR2_INDEX_FIELD_NUMBER
|
static |
Definition at line 376 of file MPQuadraticConstraint.java.
◆ UPPER_BOUND_FIELD_NUMBER
|
static |
Definition at line 469 of file MPQuadraticConstraint.java.
◆ VAR_INDEX_FIELD_NUMBER
|
static |
Definition at line 232 of file MPQuadraticConstraint.java.
The documentation for this class was generated from the following file: