public static final class MPIndicatorConstraint.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPIndicatorConstraint.Builder> implements MPIndicatorConstraintOrBuilder
Indicator constraints encode the activation or deactivation of linear constraints given the value of one Boolean variable in the model. For example: y = 0 => 2 * x1 + 3 * x2 >= 42 The 2 * x1 + 3 * x2 >= 42 constraint is only active if the variable y is equal to 0. As of 2019/04, only SCIP, CP-SAT and Gurobi support this constraint type.Protobuf type
operations_research.MPIndicatorConstraint| Modifier and Type | Method and Description |
|---|---|
MPIndicatorConstraint |
build() |
MPIndicatorConstraint |
buildPartial() |
MPIndicatorConstraint.Builder |
clear() |
MPIndicatorConstraint.Builder |
clearConstraint()
The constraint activated by the indicator variable.
|
MPIndicatorConstraint.Builder |
clearVarIndex()
Variable index (w.r.t.
|
MPIndicatorConstraint.Builder |
clearVarValue()
Value the above variable should take.
|
MPConstraintProto |
getConstraint()
The constraint activated by the indicator variable.
|
MPConstraintProto.Builder |
getConstraintBuilder()
The constraint activated by the indicator variable.
|
MPConstraintProtoOrBuilder |
getConstraintOrBuilder()
The constraint activated by the indicator variable.
|
MPIndicatorConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getVarIndex()
Variable index (w.r.t.
|
int |
getVarValue()
Value the above variable should take.
|
boolean |
hasConstraint()
The constraint activated by the indicator variable.
|
boolean |
hasVarIndex()
Variable index (w.r.t.
|
boolean |
hasVarValue()
Value the above variable should take.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
MPIndicatorConstraint.Builder |
mergeConstraint(MPConstraintProto value)
The constraint activated by the indicator variable.
|
MPIndicatorConstraint.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MPIndicatorConstraint.Builder |
mergeFrom(com.google.protobuf.Message other) |
MPIndicatorConstraint.Builder |
mergeFrom(MPIndicatorConstraint other) |
MPIndicatorConstraint.Builder |
setConstraint(MPConstraintProto.Builder builderForValue)
The constraint activated by the indicator variable.
|
MPIndicatorConstraint.Builder |
setConstraint(MPConstraintProto value)
The constraint activated by the indicator variable.
|
MPIndicatorConstraint.Builder |
setVarIndex(int value)
Variable index (w.r.t.
|
MPIndicatorConstraint.Builder |
setVarValue(int value)
Value the above variable should take.
|
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<MPIndicatorConstraint.Builder>public MPIndicatorConstraint.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<MPIndicatorConstraint.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<MPIndicatorConstraint.Builder>public MPIndicatorConstraint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MPIndicatorConstraint build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MPIndicatorConstraint buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MPIndicatorConstraint.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPIndicatorConstraint.Builder>public MPIndicatorConstraint.Builder mergeFrom(MPIndicatorConstraint other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPIndicatorConstraint.Builder>public MPIndicatorConstraint.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<MPIndicatorConstraint.Builder>java.io.IOExceptionpublic boolean hasVarIndex()
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator.
optional int32 var_index = 1;hasVarIndex in interface MPIndicatorConstraintOrBuilderpublic int getVarIndex()
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator.
optional int32 var_index = 1;getVarIndex in interface MPIndicatorConstraintOrBuilderpublic MPIndicatorConstraint.Builder setVarIndex(int value)
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator.
optional int32 var_index = 1;value - The varIndex to set.public MPIndicatorConstraint.Builder clearVarIndex()
Variable index (w.r.t. the "variable" field of MPModelProto) of the Boolean variable used as indicator.
optional int32 var_index = 1;public boolean hasVarValue()
Value the above variable should take. Must be 0 or 1.
optional int32 var_value = 2;hasVarValue in interface MPIndicatorConstraintOrBuilderpublic int getVarValue()
Value the above variable should take. Must be 0 or 1.
optional int32 var_value = 2;getVarValue in interface MPIndicatorConstraintOrBuilderpublic MPIndicatorConstraint.Builder setVarValue(int value)
Value the above variable should take. Must be 0 or 1.
optional int32 var_value = 2;value - The varValue to set.public MPIndicatorConstraint.Builder clearVarValue()
Value the above variable should take. Must be 0 or 1.
optional int32 var_value = 2;public boolean hasConstraint()
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;hasConstraint in interface MPIndicatorConstraintOrBuilderpublic MPConstraintProto getConstraint()
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;getConstraint in interface MPIndicatorConstraintOrBuilderpublic MPIndicatorConstraint.Builder setConstraint(MPConstraintProto value)
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;public MPIndicatorConstraint.Builder setConstraint(MPConstraintProto.Builder builderForValue)
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;public MPIndicatorConstraint.Builder mergeConstraint(MPConstraintProto value)
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;public MPIndicatorConstraint.Builder clearConstraint()
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;public MPConstraintProto.Builder getConstraintBuilder()
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;public MPConstraintProtoOrBuilder getConstraintOrBuilder()
The constraint activated by the indicator variable.
optional .operations_research.MPConstraintProto constraint = 3;getConstraintOrBuilder in interface MPIndicatorConstraintOrBuilderCopyright © 2024. All rights reserved.