public final class MPConstraintProto extends com.google.protobuf.GeneratedMessage 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 | Class and Description |
---|---|
static class |
MPConstraintProto.Builder
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.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
COEFFICIENT_FIELD_NUMBER |
static int |
IS_LAZY_FIELD_NUMBER |
static int |
LOWER_BOUND_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
UPPER_BOUND_FIELD_NUMBER |
static int |
VAR_INDEX_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
double |
getCoefficient(int index)
Must be finite.
|
int |
getCoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getCoefficientList()
Must be finite.
|
static MPConstraintProto |
getDefaultInstance() |
MPConstraintProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.]
|
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.
|
com.google.protobuf.Parser<MPConstraintProto> |
getParserForType() |
int |
getSerializedSize() |
double |
getUpperBound()
optional double upper_bound = 3 [default = inf]; |
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.
|
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.
|
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.
|
int |
hashCode() |
boolean |
hasIsLazy()
[Advanced usage: do not use this if you don't know what you're doing.]
|
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() |
static MPConstraintProto.Builder |
newBuilder() |
static MPConstraintProto.Builder |
newBuilder(MPConstraintProto prototype) |
MPConstraintProto.Builder |
newBuilderForType() |
protected MPConstraintProto.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static MPConstraintProto |
parseDelimitedFrom(java.io.InputStream input) |
static MPConstraintProto |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPConstraintProto |
parseFrom(byte[] data) |
static MPConstraintProto |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPConstraintProto |
parseFrom(java.nio.ByteBuffer data) |
static MPConstraintProto |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPConstraintProto |
parseFrom(com.google.protobuf.ByteString data) |
static MPConstraintProto |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPConstraintProto |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MPConstraintProto |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPConstraintProto |
parseFrom(java.io.InputStream input) |
static MPConstraintProto |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MPConstraintProto> |
parser() |
MPConstraintProto.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int VAR_INDEX_FIELD_NUMBER
public static final int COEFFICIENT_FIELD_NUMBER
public static final int LOWER_BOUND_FIELD_NUMBER
public static final int UPPER_BOUND_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int IS_LAZY_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public 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 MPConstraintProtoOrBuilder
public 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 MPConstraintProtoOrBuilder
public 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 MPConstraintProtoOrBuilder
index
- The index of the element to return.public java.util.List<java.lang.Double> getCoefficientList()
Must be finite.
repeated double coefficient = 7 [packed = true];
getCoefficientList
in interface MPConstraintProtoOrBuilder
public int getCoefficientCount()
Must be finite.
repeated double coefficient = 7 [packed = true];
getCoefficientCount
in interface MPConstraintProtoOrBuilder
public double getCoefficient(int index)
Must be finite.
repeated double coefficient = 7 [packed = true];
getCoefficient
in interface MPConstraintProtoOrBuilder
index
- The index of the element to return.public boolean hasLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
hasLowerBound
in interface MPConstraintProtoOrBuilder
public double getLowerBound()
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
getLowerBound
in interface MPConstraintProtoOrBuilder
public boolean hasUpperBound()
optional double upper_bound = 3 [default = inf];
hasUpperBound
in interface MPConstraintProtoOrBuilder
public double getUpperBound()
optional double upper_bound = 3 [default = inf];
getUpperBound
in interface MPConstraintProtoOrBuilder
public boolean hasName()
The name of the constraint.
optional string name = 4 [default = ""];
hasName
in interface MPConstraintProtoOrBuilder
public java.lang.String getName()
The name of the constraint.
optional string name = 4 [default = ""];
getName
in interface MPConstraintProtoOrBuilder
public com.google.protobuf.ByteString getNameBytes()
The name of the constraint.
optional string name = 4 [default = ""];
getNameBytes
in interface MPConstraintProtoOrBuilder
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 MPConstraintProtoOrBuilder
public 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 MPConstraintProtoOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessage
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static MPConstraintProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPConstraintProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPConstraintProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public MPConstraintProto.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static MPConstraintProto.Builder newBuilder()
public static MPConstraintProto.Builder newBuilder(MPConstraintProto prototype)
public MPConstraintProto.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected MPConstraintProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static MPConstraintProto getDefaultInstance()
public static com.google.protobuf.Parser<MPConstraintProto> parser()
public com.google.protobuf.Parser<MPConstraintProto> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public MPConstraintProto getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2025. All rights reserved.