public static final class MPQuadraticConstraint.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPQuadraticConstraint.Builder> 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 | Method and Description |
|---|---|
MPQuadraticConstraint.Builder |
addAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
|
MPQuadraticConstraint.Builder |
addAllQcoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
|
MPQuadraticConstraint.Builder |
addAllQvar1Index(java.lang.Iterable<? extends java.lang.Integer> values)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
MPQuadraticConstraint.Builder |
addAllQvar2Index(java.lang.Iterable<? extends java.lang.Integer> values)
repeated int32 qvar2_index = 4; |
MPQuadraticConstraint.Builder |
addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
MPQuadraticConstraint.Builder |
addCoefficient(double value)
Must be finite.
|
MPQuadraticConstraint.Builder |
addQcoefficient(double value)
Must be finite.
|
MPQuadraticConstraint.Builder |
addQvar1Index(int value)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
MPQuadraticConstraint.Builder |
addQvar2Index(int value)
repeated int32 qvar2_index = 4; |
MPQuadraticConstraint.Builder |
addVarIndex(int value)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
MPQuadraticConstraint |
build() |
MPQuadraticConstraint |
buildPartial() |
MPQuadraticConstraint.Builder |
clear() |
MPQuadraticConstraint.Builder |
clearCoefficient()
Must be finite.
|
MPQuadraticConstraint.Builder |
clearLowerBound()
lower_bound must be <= upper_bound.
|
MPQuadraticConstraint.Builder |
clearQcoefficient()
Must be finite.
|
MPQuadraticConstraint.Builder |
clearQvar1Index()
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
MPQuadraticConstraint.Builder |
clearQvar2Index()
repeated int32 qvar2_index = 4; |
MPQuadraticConstraint.Builder |
clearUpperBound()
optional double upper_bound = 7 [default = inf]; |
MPQuadraticConstraint.Builder |
clearVarIndex()
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
double |
getCoefficient(int index)
Must be finite.
|
int |
getCoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getCoefficientList()
Must be finite.
|
MPQuadraticConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
double |
getLowerBound()
lower_bound must be <= upper_bound.
|
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; |
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].
|
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() |
MPQuadraticConstraint.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MPQuadraticConstraint.Builder |
mergeFrom(com.google.protobuf.Message other) |
MPQuadraticConstraint.Builder |
mergeFrom(MPQuadraticConstraint other) |
MPQuadraticConstraint.Builder |
setCoefficient(int index,
double value)
Must be finite.
|
MPQuadraticConstraint.Builder |
setLowerBound(double value)
lower_bound must be <= upper_bound.
|
MPQuadraticConstraint.Builder |
setQcoefficient(int index,
double value)
Must be finite.
|
MPQuadraticConstraint.Builder |
setQvar1Index(int index,
int value)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].
|
MPQuadraticConstraint.Builder |
setQvar2Index(int index,
int value)
repeated int32 qvar2_index = 4; |
MPQuadraticConstraint.Builder |
setUpperBound(double value)
optional double upper_bound = 7 [default = inf]; |
MPQuadraticConstraint.Builder |
setVarIndex(int index,
int value)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MPQuadraticConstraint.Builder>public MPQuadraticConstraint.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<MPQuadraticConstraint.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MPQuadraticConstraint.Builder>public MPQuadraticConstraint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MPQuadraticConstraint build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MPQuadraticConstraint buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MPQuadraticConstraint.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPQuadraticConstraint.Builder>public MPQuadraticConstraint.Builder mergeFrom(MPQuadraticConstraint other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPQuadraticConstraint.Builder>public MPQuadraticConstraint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPQuadraticConstraint.Builder>java.io.IOExceptionpublic 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 MPQuadraticConstraint.Builder setVarIndex(int index, int value)
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;index - The index to set the value at.value - The varIndex to set.public MPQuadraticConstraint.Builder addVarIndex(int value)
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;value - The varIndex to add.public MPQuadraticConstraint.Builder addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)
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;values - The varIndex to add.public MPQuadraticConstraint.Builder clearVarIndex()
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;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 MPQuadraticConstraint.Builder setCoefficient(int index, double value)
Must be finite.
repeated double coefficient = 2;index - The index to set the value at.value - The coefficient to set.public MPQuadraticConstraint.Builder addCoefficient(double value)
Must be finite.
repeated double coefficient = 2;value - The coefficient to add.public MPQuadraticConstraint.Builder addAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
repeated double coefficient = 2;values - The coefficient to add.public MPQuadraticConstraint.Builder clearCoefficient()
Must be finite.
repeated double coefficient = 2;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 MPQuadraticConstraint.Builder setQvar1Index(int index, int value)
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;index - The index to set the value at.value - The qvar1Index to set.public MPQuadraticConstraint.Builder addQvar1Index(int value)
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;value - The qvar1Index to add.public MPQuadraticConstraint.Builder addAllQvar1Index(java.lang.Iterable<? extends java.lang.Integer> values)
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;values - The qvar1Index to add.public MPQuadraticConstraint.Builder clearQvar1Index()
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;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 MPQuadraticConstraint.Builder setQvar2Index(int index, int value)
repeated int32 qvar2_index = 4;index - The index to set the value at.value - The qvar2Index to set.public MPQuadraticConstraint.Builder addQvar2Index(int value)
repeated int32 qvar2_index = 4;value - The qvar2Index to add.public MPQuadraticConstraint.Builder addAllQvar2Index(java.lang.Iterable<? extends java.lang.Integer> values)
repeated int32 qvar2_index = 4;values - The qvar2Index to add.public MPQuadraticConstraint.Builder clearQvar2Index()
repeated int32 qvar2_index = 4;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 MPQuadraticConstraint.Builder setQcoefficient(int index, double value)
Must be finite.
repeated double qcoefficient = 5;index - The index to set the value at.value - The qcoefficient to set.public MPQuadraticConstraint.Builder addQcoefficient(double value)
Must be finite.
repeated double qcoefficient = 5;value - The qcoefficient to add.public MPQuadraticConstraint.Builder addAllQcoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
repeated double qcoefficient = 5;values - The qcoefficient to add.public MPQuadraticConstraint.Builder clearQcoefficient()
Must be finite.
repeated double qcoefficient = 5;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 MPQuadraticConstraint.Builder setLowerBound(double value)
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];value - The lowerBound to set.public MPQuadraticConstraint.Builder clearLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];public 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 MPQuadraticConstraint.Builder setUpperBound(double value)
optional double upper_bound = 7 [default = inf];value - The upperBound to set.public MPQuadraticConstraint.Builder clearUpperBound()
optional double upper_bound = 7 [default = inf];Copyright © 2024. All rights reserved.