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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public 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.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessage.Builder<MPVariableProto.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessage.Builder<MPVariableProto.Builder>
public MPVariableProto getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public MPVariableProto build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public MPVariableProto buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public MPVariableProto.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
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.MessageLiteOrBuilder
isInitialized
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.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<MPVariableProto.Builder>
java.io.IOException
public boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
hasLowerBound
in interface MPVariableProtoOrBuilder
public double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
getLowerBound
in interface MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public double getUpperBound()
optional double upper_bound = 2 [default = inf];
getUpperBound
in interface MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public double getObjectiveCoefficient()
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];
getObjectiveCoefficient
in interface MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public java.lang.String getName()
The name of the variable.
optional string name = 5 [default = ""];
getName
in interface MPVariableProtoOrBuilder
public com.google.protobuf.ByteString getNameBytes()
The name of the variable.
optional string name = 5 [default = ""];
getNameBytes
in interface MPVariableProtoOrBuilder
public 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 MPVariableProtoOrBuilder
public int getBranchingPriority()
optional int32 branching_priority = 6 [default = 0];
getBranchingPriority
in interface MPVariableProtoOrBuilder
public 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 © 2025. All rights reserved.