public static final class MPVariableProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<MPVariableProto.Builder> implements MPVariableProtoOrBuilder
A variable is always constrained in the form: lower_bound <= x <= upper_bound where lower_bound and upper_bound: - Can form a singleton: x = constant = lower_bound = upper_bound. - Can form a finite interval: lower_bound <= x <= upper_bound. (x is boxed.) - Can form a semi-infinite interval. - lower_bound = -infinity: x <= upper_bound. - upper_bound = +infinity: x >= lower_bound. - Can form the infinite interval: lower_bound = -infinity and upper_bound = +infinity, x is free. MPVariableProto furthermore stores: - The coefficient of the variable in the objective. - Whether the variable is integer.Protobuf type
operations_research.MPVariableProto| Modifier and Type | Method and Description |
|---|---|
MPVariableProto |
build() |
MPVariableProto |
buildPartial() |
MPVariableProto.Builder |
clear() |
MPVariableProto.Builder |
clearBranchingPriority()
optional int32 branching_priority = 6 [default = 0]; |
MPVariableProto.Builder |
clearIsInteger()
True if the variable is constrained to be integer.
|
MPVariableProto.Builder |
clearLowerBound()
lower_bound must be <= upper_bound.
|
MPVariableProto.Builder |
clearName()
The name of the variable.
|
MPVariableProto.Builder |
clearObjectiveCoefficient()
The coefficient of the variable in the objective.
|
MPVariableProto.Builder |
clearUpperBound()
optional double upper_bound = 2 [default = inf]; |
int |
getBranchingPriority()
optional int32 branching_priority = 6 [default = 0]; |
MPVariableProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getIsInteger()
True if the variable is constrained to be integer.
|
double |
getLowerBound()
lower_bound must be <= upper_bound.
|
java.lang.String |
getName()
The name of the variable.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the variable.
|
double |
getObjectiveCoefficient()
The coefficient of the variable in the objective.
|
double |
getUpperBound()
optional double upper_bound = 2 [default = inf]; |
boolean |
hasBranchingPriority()
optional int32 branching_priority = 6 [default = 0]; |
boolean |
hasIsInteger()
True if the variable is constrained to be integer.
|
boolean |
hasLowerBound()
lower_bound must be <= upper_bound.
|
boolean |
hasName()
The name of the variable.
|
boolean |
hasObjectiveCoefficient()
The coefficient of the variable in the objective.
|
boolean |
hasUpperBound()
optional double upper_bound = 2 [default = inf]; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
MPVariableProto.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MPVariableProto.Builder |
mergeFrom(com.google.protobuf.Message other) |
MPVariableProto.Builder |
mergeFrom(MPVariableProto other) |
MPVariableProto.Builder |
setBranchingPriority(int value)
optional int32 branching_priority = 6 [default = 0]; |
MPVariableProto.Builder |
setIsInteger(boolean value)
True if the variable is constrained to be integer.
|
MPVariableProto.Builder |
setLowerBound(double value)
lower_bound must be <= upper_bound.
|
MPVariableProto.Builder |
setName(java.lang.String value)
The name of the variable.
|
MPVariableProto.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of the variable.
|
MPVariableProto.Builder |
setObjectiveCoefficient(double value)
The coefficient of the variable in the objective.
|
MPVariableProto.Builder |
setUpperBound(double value)
optional double upper_bound = 2 [default = inf]; |
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<MPVariableProto.Builder>public MPVariableProto.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<MPVariableProto.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<MPVariableProto.Builder>public MPVariableProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MPVariableProto build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MPVariableProto buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MPVariableProto.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MPVariableProto.Builder>public MPVariableProto.Builder mergeFrom(MPVariableProto other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<MPVariableProto.Builder>public MPVariableProto.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<MPVariableProto.Builder>java.io.IOExceptionpublic boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];hasLowerBound in interface MPVariableProtoOrBuilderpublic double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];getLowerBound in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setLowerBound(double value)
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];value - The lowerBound to set.public MPVariableProto.Builder clearLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];public boolean hasUpperBound()
optional double upper_bound = 2 [default = inf];hasUpperBound in interface MPVariableProtoOrBuilderpublic double getUpperBound()
optional double upper_bound = 2 [default = inf];getUpperBound in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setUpperBound(double value)
optional double upper_bound = 2 [default = inf];value - The upperBound to set.public MPVariableProto.Builder clearUpperBound()
optional double upper_bound = 2 [default = inf];public boolean hasObjectiveCoefficient()
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];hasObjectiveCoefficient in interface MPVariableProtoOrBuilderpublic double getObjectiveCoefficient()
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];getObjectiveCoefficient in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setObjectiveCoefficient(double value)
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];value - The objectiveCoefficient to set.public MPVariableProto.Builder clearObjectiveCoefficient()
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];public boolean hasIsInteger()
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];hasIsInteger in interface MPVariableProtoOrBuilderpublic boolean getIsInteger()
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];getIsInteger in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setIsInteger(boolean value)
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];value - The isInteger to set.public MPVariableProto.Builder clearIsInteger()
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];public boolean hasName()
The name of the variable.
optional string name = 5 [default = ""];hasName in interface MPVariableProtoOrBuilderpublic java.lang.String getName()
The name of the variable.
optional string name = 5 [default = ""];getName in interface MPVariableProtoOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name of the variable.
optional string name = 5 [default = ""];getNameBytes in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setName(java.lang.String value)
The name of the variable.
optional string name = 5 [default = ""];value - The name to set.public MPVariableProto.Builder clearName()
The name of the variable.
optional string name = 5 [default = ""];public MPVariableProto.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of the variable.
optional string name = 5 [default = ""];value - The bytes for name to set.public boolean hasBranchingPriority()
optional int32 branching_priority = 6 [default = 0];hasBranchingPriority in interface MPVariableProtoOrBuilderpublic int getBranchingPriority()
optional int32 branching_priority = 6 [default = 0];getBranchingPriority in interface MPVariableProtoOrBuilderpublic MPVariableProto.Builder setBranchingPriority(int value)
optional int32 branching_priority = 6 [default = 0];value - The branchingPriority to set.public MPVariableProto.Builder clearBranchingPriority()
optional int32 branching_priority = 6 [default = 0];Copyright © 2024. All rights reserved.