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.]
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.
|
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.
|
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.
|
int |
hashCode() |
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() |
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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic 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.GeneratedMessagepublic 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 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 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 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static MPConstraintProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPConstraintProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPConstraintProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic MPConstraintProto.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MPConstraintProto.Builder newBuilder()
public static MPConstraintProto.Builder newBuilder(MPConstraintProto prototype)
public MPConstraintProto.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MPConstraintProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static MPConstraintProto getDefaultInstance()
public static com.google.protobuf.Parser<MPConstraintProto> parser()
public com.google.protobuf.Parser<MPConstraintProto> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic MPConstraintProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.