public static final class MPConstraintProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPConstraintProto.Builder> implements MPConstraintProtoOrBuilder
A linear constraint is always of the form: lower_bound <= sum of linear term elements <= upper_bound, where lower_bound and upper_bound: - Can form a singleton: lower_bound == upper_bound. The constraint is an equation. - Can form a finite interval [lower_bound, upper_bound]. The constraint is both lower- and upper-bounded, i.e. "boxed". - Can form a semi-infinite interval. lower_bound = -infinity: the constraint is upper-bounded. upper_bound = +infinity: the constraint is lower-bounded. - Can form the infinite interval: lower_bound = -infinity and upper_bound = +infinity. The constraint is free.Protobuf type
operations_research.MPConstraintProto| Modifier and Type | Method and Description |
|---|---|
MPConstraintProto.Builder |
addAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
|
MPConstraintProto.Builder |
addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)
var_index[i] is the variable index (w.r.t.
|
MPConstraintProto.Builder |
addCoefficient(double value)
Must be finite.
|
MPConstraintProto.Builder |
addVarIndex(int value)
var_index[i] is the variable index (w.r.t.
|
MPConstraintProto |
build() |
MPConstraintProto |
buildPartial() |
MPConstraintProto.Builder |
clear() |
MPConstraintProto.Builder |
clearCoefficient()
Must be finite.
|
MPConstraintProto.Builder |
clearIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.]
A lazy constraint is handled differently by the core solving engine, but
it does not change the result.
|
MPConstraintProto.Builder |
clearLowerBound()
lower_bound must be <= upper_bound.
|
MPConstraintProto.Builder |
clearName()
The name of the constraint.
|
MPConstraintProto.Builder |
clearUpperBound()
optional double upper_bound = 3 [default = inf]; |
MPConstraintProto.Builder |
clearVarIndex()
var_index[i] is the variable index (w.r.t.
|
double |
getCoefficient(int index)
Must be finite.
|
int |
getCoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getCoefficientList()
Must be finite.
|
MPConstraintProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.]
A lazy constraint is handled differently by the core solving engine, but
it does not change the result.
|
double |
getLowerBound()
lower_bound must be <= upper_bound.
|
java.lang.String |
getName()
The name of the constraint.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the constraint.
|
double |
getUpperBound()
optional double upper_bound = 3 [default = inf]; |
int |
getVarIndex(int index)
var_index[i] is the variable index (w.r.t.
|
int |
getVarIndexCount()
var_index[i] is the variable index (w.r.t.
|
java.util.List<java.lang.Integer> |
getVarIndexList()
var_index[i] is the variable index (w.r.t.
|
boolean |
hasIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.]
A lazy constraint is handled differently by the core solving engine, but
it does not change the result.
|
boolean |
hasLowerBound()
lower_bound must be <= upper_bound.
|
boolean |
hasName()
The name of the constraint.
|
boolean |
hasUpperBound()
optional double upper_bound = 3 [default = inf]; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
MPConstraintProto.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MPConstraintProto.Builder |
mergeFrom(com.google.protobuf.Message other) |
MPConstraintProto.Builder |
mergeFrom(MPConstraintProto other) |
MPConstraintProto.Builder |
setCoefficient(int index,
double value)
Must be finite.
|
MPConstraintProto.Builder |
setIsLazy(boolean value)
[Advanced usage: do not use this if you don't know what you're doing.]
A lazy constraint is handled differently by the core solving engine, but
it does not change the result.
|
MPConstraintProto.Builder |
setLowerBound(double value)
lower_bound must be <= upper_bound.
|
MPConstraintProto.Builder |
setName(java.lang.String value)
The name of the constraint.
|
MPConstraintProto.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of the constraint.
|
MPConstraintProto.Builder |
setUpperBound(double value)
optional double upper_bound = 3 [default = inf]; |
MPConstraintProto.Builder |
setVarIndex(int index,
int value)
var_index[i] is the variable index (w.r.t.
|
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<MPConstraintProto.Builder>public MPConstraintProto.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<MPConstraintProto.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<MPConstraintProto.Builder>public MPConstraintProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MPConstraintProto build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MPConstraintProto buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MPConstraintProto.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPConstraintProto.Builder>public MPConstraintProto.Builder mergeFrom(MPConstraintProto other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPConstraintProto.Builder>public MPConstraintProto.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<MPConstraintProto.Builder>java.io.IOExceptionpublic java.util.List<java.lang.Integer> getVarIndexList()
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];getVarIndexList in interface MPConstraintProtoOrBuilderpublic int getVarIndexCount()
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];getVarIndexCount in interface MPConstraintProtoOrBuilderpublic int getVarIndex(int index)
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];getVarIndex in interface MPConstraintProtoOrBuilderindex - The index of the element to return.public MPConstraintProto.Builder setVarIndex(int index, int value)
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];index - The index to set the value at.value - The varIndex to set.public MPConstraintProto.Builder addVarIndex(int value)
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];value - The varIndex to add.public MPConstraintProto.Builder addAllVarIndex(java.lang.Iterable<? extends java.lang.Integer> values)
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];values - The varIndex to add.public MPConstraintProto.Builder clearVarIndex()
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];public java.util.List<java.lang.Double> getCoefficientList()
Must be finite.
repeated double coefficient = 7 [packed = true];getCoefficientList in interface MPConstraintProtoOrBuilderpublic int getCoefficientCount()
Must be finite.
repeated double coefficient = 7 [packed = true];getCoefficientCount in interface MPConstraintProtoOrBuilderpublic double getCoefficient(int index)
Must be finite.
repeated double coefficient = 7 [packed = true];getCoefficient in interface MPConstraintProtoOrBuilderindex - The index of the element to return.public MPConstraintProto.Builder setCoefficient(int index, double value)
Must be finite.
repeated double coefficient = 7 [packed = true];index - The index to set the value at.value - The coefficient to set.public MPConstraintProto.Builder addCoefficient(double value)
Must be finite.
repeated double coefficient = 7 [packed = true];value - The coefficient to add.public MPConstraintProto.Builder addAllCoefficient(java.lang.Iterable<? extends java.lang.Double> values)
Must be finite.
repeated double coefficient = 7 [packed = true];values - The coefficient to add.public MPConstraintProto.Builder clearCoefficient()
Must be finite.
repeated double coefficient = 7 [packed = true];public boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];hasLowerBound in interface MPConstraintProtoOrBuilderpublic double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];getLowerBound in interface MPConstraintProtoOrBuilderpublic MPConstraintProto.Builder setLowerBound(double value)
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];value - The lowerBound to set.public MPConstraintProto.Builder clearLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];public boolean hasUpperBound()
optional double upper_bound = 3 [default = inf];hasUpperBound in interface MPConstraintProtoOrBuilderpublic double getUpperBound()
optional double upper_bound = 3 [default = inf];getUpperBound in interface MPConstraintProtoOrBuilderpublic MPConstraintProto.Builder setUpperBound(double value)
optional double upper_bound = 3 [default = inf];value - The upperBound to set.public MPConstraintProto.Builder clearUpperBound()
optional double upper_bound = 3 [default = inf];public boolean hasName()
The name of the constraint.
optional string name = 4 [default = ""];hasName in interface MPConstraintProtoOrBuilderpublic java.lang.String getName()
The name of the constraint.
optional string name = 4 [default = ""];getName in interface MPConstraintProtoOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name of the constraint.
optional string name = 4 [default = ""];getNameBytes in interface MPConstraintProtoOrBuilderpublic MPConstraintProto.Builder setName(java.lang.String value)
The name of the constraint.
optional string name = 4 [default = ""];value - The name to set.public MPConstraintProto.Builder clearName()
The name of the constraint.
optional string name = 4 [default = ""];public MPConstraintProto.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of the constraint.
optional string name = 4 [default = ""];value - The bytes for name to set.public boolean hasIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];hasIsLazy in interface MPConstraintProtoOrBuilderpublic boolean getIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];getIsLazy in interface MPConstraintProtoOrBuilderpublic MPConstraintProto.Builder setIsLazy(boolean value)
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];value - The isLazy to set.public MPConstraintProto.Builder clearIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];Copyright © 2024. All rights reserved.