public final class MPQuadraticConstraint extends com.google.protobuf.GeneratedMessage implements MPQuadraticConstraintOrBuilder
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/9.0/refman/constraints.html#subsubsection:QuadraticConstraintsProtobuf type
operations_research.MPQuadraticConstraint| Modifier and Type | Class and Description |
|---|---|
static class |
MPQuadraticConstraint.Builder
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.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
COEFFICIENT_FIELD_NUMBER |
static int |
LOWER_BOUND_FIELD_NUMBER |
static int |
QCOEFFICIENT_FIELD_NUMBER |
static int |
QVAR1_INDEX_FIELD_NUMBER |
static int |
QVAR2_INDEX_FIELD_NUMBER |
static int |
UPPER_BOUND_FIELD_NUMBER |
static int |
VAR_INDEX_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
double |
getCoefficient(int index)
Must be finite.
|
int |
getCoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getCoefficientList()
Must be finite.
|
static MPQuadraticConstraint |
getDefaultInstance() |
MPQuadraticConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
double |
getLowerBound()
lower_bound must be <= upper_bound.
|
com.google.protobuf.Parser<MPQuadraticConstraint> |
getParserForType() |
double |
getQcoefficient(int index)
Must be finite.
|
int |
getQcoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getQcoefficientList()
Must be finite.
|
int |
getQvar1Index(int index)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
int |
getQvar1IndexCount()
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
java.util.List<java.lang.Integer> |
getQvar1IndexList()
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
int |
getQvar2Index(int index)
repeated int32 qvar2_index = 4; |
int |
getQvar2IndexCount()
repeated int32 qvar2_index = 4; |
java.util.List<java.lang.Integer> |
getQvar2IndexList()
repeated int32 qvar2_index = 4; |
int |
getSerializedSize() |
double |
getUpperBound()
optional double upper_bound = 7 [default = inf]; |
int |
getVarIndex(int index)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
int |
getVarIndexCount()
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
java.util.List<java.lang.Integer> |
getVarIndexList()
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
int |
hashCode() |
boolean |
hasLowerBound()
lower_bound must be <= upper_bound.
|
boolean |
hasUpperBound()
optional double upper_bound = 7 [default = inf]; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static MPQuadraticConstraint.Builder |
newBuilder() |
static MPQuadraticConstraint.Builder |
newBuilder(MPQuadraticConstraint prototype) |
MPQuadraticConstraint.Builder |
newBuilderForType() |
protected MPQuadraticConstraint.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static MPQuadraticConstraint |
parseDelimitedFrom(java.io.InputStream input) |
static MPQuadraticConstraint |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticConstraint |
parseFrom(byte[] data) |
static MPQuadraticConstraint |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticConstraint |
parseFrom(java.nio.ByteBuffer data) |
static MPQuadraticConstraint |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticConstraint |
parseFrom(com.google.protobuf.ByteString data) |
static MPQuadraticConstraint |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticConstraint |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MPQuadraticConstraint |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticConstraint |
parseFrom(java.io.InputStream input) |
static MPQuadraticConstraint |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MPQuadraticConstraint> |
parser() |
MPQuadraticConstraint.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int VAR_INDEX_FIELD_NUMBER
public static final int COEFFICIENT_FIELD_NUMBER
public static final int QVAR1_INDEX_FIELD_NUMBER
public static final int QVAR2_INDEX_FIELD_NUMBER
public static final int QCOEFFICIENT_FIELD_NUMBER
public static final int LOWER_BOUND_FIELD_NUMBER
public static final int UPPER_BOUND_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic java.util.List<java.lang.Integer> getVarIndexList()
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;getVarIndexList in interface MPQuadraticConstraintOrBuilderpublic int getVarIndexCount()
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;getVarIndexCount in interface MPQuadraticConstraintOrBuilderpublic int getVarIndex(int index)
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;getVarIndex in interface MPQuadraticConstraintOrBuilderindex - The index of the element to return.public java.util.List<java.lang.Double> getCoefficientList()
Must be finite.
repeated double coefficient = 2;getCoefficientList in interface MPQuadraticConstraintOrBuilderpublic int getCoefficientCount()
Must be finite.
repeated double coefficient = 2;getCoefficientCount in interface MPQuadraticConstraintOrBuilderpublic double getCoefficient(int index)
Must be finite.
repeated double coefficient = 2;getCoefficient in interface MPQuadraticConstraintOrBuilderindex - The index of the element to return.public java.util.List<java.lang.Integer> getQvar1IndexList()
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;getQvar1IndexList in interface MPQuadraticConstraintOrBuilderpublic int getQvar1IndexCount()
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;getQvar1IndexCount in interface MPQuadraticConstraintOrBuilderpublic int getQvar1Index(int index)
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;getQvar1Index in interface MPQuadraticConstraintOrBuilderindex - The index of the element to return.public java.util.List<java.lang.Integer> getQvar2IndexList()
repeated int32 qvar2_index = 4;getQvar2IndexList in interface MPQuadraticConstraintOrBuilderpublic int getQvar2IndexCount()
repeated int32 qvar2_index = 4;getQvar2IndexCount in interface MPQuadraticConstraintOrBuilderpublic int getQvar2Index(int index)
repeated int32 qvar2_index = 4;getQvar2Index in interface MPQuadraticConstraintOrBuilderindex - The index of the element to return.public java.util.List<java.lang.Double> getQcoefficientList()
Must be finite.
repeated double qcoefficient = 5;getQcoefficientList in interface MPQuadraticConstraintOrBuilderpublic int getQcoefficientCount()
Must be finite.
repeated double qcoefficient = 5;getQcoefficientCount in interface MPQuadraticConstraintOrBuilderpublic double getQcoefficient(int index)
Must be finite.
repeated double qcoefficient = 5;getQcoefficient in interface MPQuadraticConstraintOrBuilderindex - The index of the element to return.public boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];hasLowerBound in interface MPQuadraticConstraintOrBuilderpublic double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];getLowerBound in interface MPQuadraticConstraintOrBuilderpublic boolean hasUpperBound()
optional double upper_bound = 7 [default = inf];hasUpperBound in interface MPQuadraticConstraintOrBuilderpublic double getUpperBound()
optional double upper_bound = 7 [default = inf];getUpperBound in interface MPQuadraticConstraintOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static MPQuadraticConstraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPQuadraticConstraint parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPQuadraticConstraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPQuadraticConstraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPQuadraticConstraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPQuadraticConstraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPQuadraticConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic MPQuadraticConstraint.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MPQuadraticConstraint.Builder newBuilder()
public static MPQuadraticConstraint.Builder newBuilder(MPQuadraticConstraint prototype)
public MPQuadraticConstraint.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MPQuadraticConstraint.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static MPQuadraticConstraint getDefaultInstance()
public static com.google.protobuf.Parser<MPQuadraticConstraint> parser()
public com.google.protobuf.Parser<MPQuadraticConstraint> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic MPQuadraticConstraint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.