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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public 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.GeneratedMessage
public 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 MPQuadraticConstraintOrBuilder
public 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 MPQuadraticConstraintOrBuilder
public 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 MPQuadraticConstraintOrBuilder
index
- 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 MPQuadraticConstraintOrBuilder
public int getCoefficientCount()
Must be finite.
repeated double coefficient = 2;
getCoefficientCount
in interface MPQuadraticConstraintOrBuilder
public double getCoefficient(int index)
Must be finite.
repeated double coefficient = 2;
getCoefficient
in interface MPQuadraticConstraintOrBuilder
index
- 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 MPQuadraticConstraintOrBuilder
public 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 MPQuadraticConstraintOrBuilder
public 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 MPQuadraticConstraintOrBuilder
index
- The index of the element to return.public java.util.List<java.lang.Integer> getQvar2IndexList()
repeated int32 qvar2_index = 4;
getQvar2IndexList
in interface MPQuadraticConstraintOrBuilder
public int getQvar2IndexCount()
repeated int32 qvar2_index = 4;
getQvar2IndexCount
in interface MPQuadraticConstraintOrBuilder
public int getQvar2Index(int index)
repeated int32 qvar2_index = 4;
getQvar2Index
in interface MPQuadraticConstraintOrBuilder
index
- 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 MPQuadraticConstraintOrBuilder
public int getQcoefficientCount()
Must be finite.
repeated double qcoefficient = 5;
getQcoefficientCount
in interface MPQuadraticConstraintOrBuilder
public double getQcoefficient(int index)
Must be finite.
repeated double qcoefficient = 5;
getQcoefficient
in interface MPQuadraticConstraintOrBuilder
index
- 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 MPQuadraticConstraintOrBuilder
public double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
getLowerBound
in interface MPQuadraticConstraintOrBuilder
public boolean hasUpperBound()
optional double upper_bound = 7 [default = inf];
hasUpperBound
in interface MPQuadraticConstraintOrBuilder
public double getUpperBound()
optional double upper_bound = 7 [default = inf];
getUpperBound
in interface MPQuadraticConstraintOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessage
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static MPQuadraticConstraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticConstraint parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticConstraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPQuadraticConstraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticConstraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPQuadraticConstraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public MPQuadraticConstraint.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static MPQuadraticConstraint.Builder newBuilder()
public static MPQuadraticConstraint.Builder newBuilder(MPQuadraticConstraint prototype)
public MPQuadraticConstraint.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected MPQuadraticConstraint.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static MPQuadraticConstraint getDefaultInstance()
public static com.google.protobuf.Parser<MPQuadraticConstraint> parser()
public com.google.protobuf.Parser<MPQuadraticConstraint> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public MPQuadraticConstraint getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2025. All rights reserved.