Package com.google.ortools.linearsolver
Class MPQuadraticConstraint.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
- com.google.ortools.linearsolver.MPQuadraticConstraint.Builder
-
- All Implemented Interfaces:
MPQuadraticConstraintOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- MPQuadraticConstraint
public static final class MPQuadraticConstraint.Builder extends com.google.protobuf.GeneratedMessageV3.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:QuadraticConstraints
Protobuf typeoperations_research.MPQuadraticConstraint
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MPQuadraticConstraint.BuilderaddAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)Must be finite.MPQuadraticConstraint.BuilderaddAllQcoefficient(java.lang.Iterable<? extends java.lang.Double> values)Must be finite.MPQuadraticConstraint.BuilderaddAllQvar1Index(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.BuilderaddAllQvar2Index(java.lang.Iterable<? extends java.lang.Integer> values)repeated int32 qvar2_index = 4;MPQuadraticConstraint.BuilderaddAllVarIndex(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.BuilderaddCoefficient(double value)Must be finite.MPQuadraticConstraint.BuilderaddQcoefficient(double value)Must be finite.MPQuadraticConstraint.BuilderaddQvar1Index(int value)Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].MPQuadraticConstraint.BuilderaddQvar2Index(int value)repeated int32 qvar2_index = 4;MPQuadraticConstraint.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPQuadraticConstraint.BuilderaddVarIndex(int value)Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i].MPQuadraticConstraintbuild()MPQuadraticConstraintbuildPartial()MPQuadraticConstraint.Builderclear()MPQuadraticConstraint.BuilderclearCoefficient()Must be finite.MPQuadraticConstraint.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)MPQuadraticConstraint.BuilderclearLowerBound()lower_bound must be <= upper_bound.MPQuadraticConstraint.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)MPQuadraticConstraint.BuilderclearQcoefficient()Must be finite.MPQuadraticConstraint.BuilderclearQvar1Index()Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].MPQuadraticConstraint.BuilderclearQvar2Index()repeated int32 qvar2_index = 4;MPQuadraticConstraint.BuilderclearUpperBound()optional double upper_bound = 7 [default = inf];MPQuadraticConstraint.BuilderclearVarIndex()Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i].MPQuadraticConstraint.Builderclone()doublegetCoefficient(int index)Must be finite.intgetCoefficientCount()Must be finite.java.util.List<java.lang.Double>getCoefficientList()Must be finite.MPQuadraticConstraintgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()doublegetLowerBound()lower_bound must be <= upper_bound.doublegetQcoefficient(int index)Must be finite.intgetQcoefficientCount()Must be finite.java.util.List<java.lang.Double>getQcoefficientList()Must be finite.intgetQvar1Index(int index)Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i].intgetQvar1IndexCount()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].intgetQvar2Index(int index)repeated int32 qvar2_index = 4;intgetQvar2IndexCount()repeated int32 qvar2_index = 4;java.util.List<java.lang.Integer>getQvar2IndexList()repeated int32 qvar2_index = 4;doublegetUpperBound()optional double upper_bound = 7 [default = inf];intgetVarIndex(int index)Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i].intgetVarIndexCount()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].booleanhasLowerBound()lower_bound must be <= upper_bound.booleanhasUpperBound()optional double upper_bound = 7 [default = inf];protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()MPQuadraticConstraint.BuildermergeFrom(MPQuadraticConstraint other)MPQuadraticConstraint.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)MPQuadraticConstraint.BuildermergeFrom(com.google.protobuf.Message other)MPQuadraticConstraint.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MPQuadraticConstraint.BuildersetCoefficient(int index, double value)Must be finite.MPQuadraticConstraint.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)MPQuadraticConstraint.BuildersetLowerBound(double value)lower_bound must be <= upper_bound.MPQuadraticConstraint.BuildersetQcoefficient(int index, double value)Must be finite.MPQuadraticConstraint.BuildersetQvar1Index(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.BuildersetQvar2Index(int index, int value)repeated int32 qvar2_index = 4;MPQuadraticConstraint.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)MPQuadraticConstraint.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)MPQuadraticConstraint.BuildersetUpperBound(double value)optional double upper_bound = 7 [default = inf];MPQuadraticConstraint.BuildersetVarIndex(int index, int value)Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i].-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
clear
public MPQuadraticConstraint.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
getDefaultInstanceForType
public MPQuadraticConstraint getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MPQuadraticConstraint build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MPQuadraticConstraint buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public MPQuadraticConstraint.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
setField
public MPQuadraticConstraint.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
clearField
public MPQuadraticConstraint.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
clearOneof
public MPQuadraticConstraint.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
setRepeatedField
public MPQuadraticConstraint.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
addRepeatedField
public MPQuadraticConstraint.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
mergeFrom
public MPQuadraticConstraint.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPQuadraticConstraint.Builder>
-
mergeFrom
public MPQuadraticConstraint.Builder mergeFrom(MPQuadraticConstraint other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
mergeFrom
public MPQuadraticConstraint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MPQuadraticConstraint.Builder>- Throws:
java.io.IOException
-
getVarIndexList
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;- Specified by:
getVarIndexListin interfaceMPQuadraticConstraintOrBuilder- Returns:
- A list containing the varIndex.
-
getVarIndexCount
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;- Specified by:
getVarIndexCountin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The count of varIndex.
-
getVarIndex
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;- Specified by:
getVarIndexin interfaceMPQuadraticConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The varIndex at the given index.
-
setVarIndex
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;- Parameters:
index- The index to set the value at.value- The varIndex to set.- Returns:
- This builder for chaining.
-
addVarIndex
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;- Parameters:
value- The varIndex to add.- Returns:
- This builder for chaining.
-
addAllVarIndex
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;- Parameters:
values- The varIndex to add.- Returns:
- This builder for chaining.
-
clearVarIndex
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;- Returns:
- This builder for chaining.
-
getCoefficientList
public java.util.List<java.lang.Double> getCoefficientList()
Must be finite.
repeated double coefficient = 2;- Specified by:
getCoefficientListin interfaceMPQuadraticConstraintOrBuilder- Returns:
- A list containing the coefficient.
-
getCoefficientCount
public int getCoefficientCount()
Must be finite.
repeated double coefficient = 2;- Specified by:
getCoefficientCountin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The count of coefficient.
-
getCoefficient
public double getCoefficient(int index)
Must be finite.
repeated double coefficient = 2;- Specified by:
getCoefficientin interfaceMPQuadraticConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The coefficient at the given index.
-
setCoefficient
public MPQuadraticConstraint.Builder setCoefficient(int index, double value)
Must be finite.
repeated double coefficient = 2;- Parameters:
index- The index to set the value at.value- The coefficient to set.- Returns:
- This builder for chaining.
-
addCoefficient
public MPQuadraticConstraint.Builder addCoefficient(double value)
Must be finite.
repeated double coefficient = 2;- Parameters:
value- The coefficient to add.- Returns:
- This builder for chaining.
-
addAllCoefficient
public MPQuadraticConstraint.Builder addAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
repeated double coefficient = 2;- Parameters:
values- The coefficient to add.- Returns:
- This builder for chaining.
-
clearCoefficient
public MPQuadraticConstraint.Builder clearCoefficient()
Must be finite.
repeated double coefficient = 2;- Returns:
- This builder for chaining.
-
getQvar1IndexList
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;- Specified by:
getQvar1IndexListin interfaceMPQuadraticConstraintOrBuilder- Returns:
- A list containing the qvar1Index.
-
getQvar1IndexCount
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;- Specified by:
getQvar1IndexCountin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The count of qvar1Index.
-
getQvar1Index
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;- Specified by:
getQvar1Indexin interfaceMPQuadraticConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The qvar1Index at the given index.
-
setQvar1Index
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;- Parameters:
index- The index to set the value at.value- The qvar1Index to set.- Returns:
- This builder for chaining.
-
addQvar1Index
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;- Parameters:
value- The qvar1Index to add.- Returns:
- This builder for chaining.
-
addAllQvar1Index
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;- Parameters:
values- The qvar1Index to add.- Returns:
- This builder for chaining.
-
clearQvar1Index
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;- Returns:
- This builder for chaining.
-
getQvar2IndexList
public java.util.List<java.lang.Integer> getQvar2IndexList()
repeated int32 qvar2_index = 4;- Specified by:
getQvar2IndexListin interfaceMPQuadraticConstraintOrBuilder- Returns:
- A list containing the qvar2Index.
-
getQvar2IndexCount
public int getQvar2IndexCount()
repeated int32 qvar2_index = 4;- Specified by:
getQvar2IndexCountin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The count of qvar2Index.
-
getQvar2Index
public int getQvar2Index(int index)
repeated int32 qvar2_index = 4;- Specified by:
getQvar2Indexin interfaceMPQuadraticConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The qvar2Index at the given index.
-
setQvar2Index
public MPQuadraticConstraint.Builder setQvar2Index(int index, int value)
repeated int32 qvar2_index = 4;- Parameters:
index- The index to set the value at.value- The qvar2Index to set.- Returns:
- This builder for chaining.
-
addQvar2Index
public MPQuadraticConstraint.Builder addQvar2Index(int value)
repeated int32 qvar2_index = 4;- Parameters:
value- The qvar2Index to add.- Returns:
- This builder for chaining.
-
addAllQvar2Index
public MPQuadraticConstraint.Builder addAllQvar2Index(java.lang.Iterable<? extends java.lang.Integer> values)
repeated int32 qvar2_index = 4;- Parameters:
values- The qvar2Index to add.- Returns:
- This builder for chaining.
-
clearQvar2Index
public MPQuadraticConstraint.Builder clearQvar2Index()
repeated int32 qvar2_index = 4;- Returns:
- This builder for chaining.
-
getQcoefficientList
public java.util.List<java.lang.Double> getQcoefficientList()
Must be finite.
repeated double qcoefficient = 5;- Specified by:
getQcoefficientListin interfaceMPQuadraticConstraintOrBuilder- Returns:
- A list containing the qcoefficient.
-
getQcoefficientCount
public int getQcoefficientCount()
Must be finite.
repeated double qcoefficient = 5;- Specified by:
getQcoefficientCountin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The count of qcoefficient.
-
getQcoefficient
public double getQcoefficient(int index)
Must be finite.
repeated double qcoefficient = 5;- Specified by:
getQcoefficientin interfaceMPQuadraticConstraintOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The qcoefficient at the given index.
-
setQcoefficient
public MPQuadraticConstraint.Builder setQcoefficient(int index, double value)
Must be finite.
repeated double qcoefficient = 5;- Parameters:
index- The index to set the value at.value- The qcoefficient to set.- Returns:
- This builder for chaining.
-
addQcoefficient
public MPQuadraticConstraint.Builder addQcoefficient(double value)
Must be finite.
repeated double qcoefficient = 5;- Parameters:
value- The qcoefficient to add.- Returns:
- This builder for chaining.
-
addAllQcoefficient
public MPQuadraticConstraint.Builder addAllQcoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
repeated double qcoefficient = 5;- Parameters:
values- The qcoefficient to add.- Returns:
- This builder for chaining.
-
clearQcoefficient
public MPQuadraticConstraint.Builder clearQcoefficient()
Must be finite.
repeated double qcoefficient = 5;- Returns:
- This builder for chaining.
-
hasLowerBound
public boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];- Specified by:
hasLowerBoundin interfaceMPQuadraticConstraintOrBuilder- Returns:
- Whether the lowerBound field is set.
-
getLowerBound
public double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];- Specified by:
getLowerBoundin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The lowerBound.
-
setLowerBound
public MPQuadraticConstraint.Builder setLowerBound(double value)
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];- Parameters:
value- The lowerBound to set.- Returns:
- This builder for chaining.
-
clearLowerBound
public MPQuadraticConstraint.Builder clearLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];- Returns:
- This builder for chaining.
-
hasUpperBound
public boolean hasUpperBound()
optional double upper_bound = 7 [default = inf];- Specified by:
hasUpperBoundin interfaceMPQuadraticConstraintOrBuilder- Returns:
- Whether the upperBound field is set.
-
getUpperBound
public double getUpperBound()
optional double upper_bound = 7 [default = inf];- Specified by:
getUpperBoundin interfaceMPQuadraticConstraintOrBuilder- Returns:
- The upperBound.
-
setUpperBound
public MPQuadraticConstraint.Builder setUpperBound(double value)
optional double upper_bound = 7 [default = inf];- Parameters:
value- The upperBound to set.- Returns:
- This builder for chaining.
-
clearUpperBound
public MPQuadraticConstraint.Builder clearUpperBound()
optional double upper_bound = 7 [default = inf];- Returns:
- This builder for chaining.
-
setUnknownFields
public final MPQuadraticConstraint.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
mergeUnknownFields
public final MPQuadraticConstraint.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MPQuadraticConstraint.Builder>
-
-