public final class MPModelProto extends com.google.protobuf.GeneratedMessage implements MPModelProtoOrBuilder
MPModelProto contains all the information for a Linear Programming model.Protobuf type
operations_research.MPModelProto| Modifier and Type | Class and Description |
|---|---|
static class |
MPModelProto.Annotation
Annotations can be freely added by users who want to attach arbitrary
payload to the model's variables or constraints.
|
static interface |
MPModelProto.AnnotationOrBuilder |
static class |
MPModelProto.Builder
MPModelProto contains all the information for a Linear Programming model.
|
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 |
ANNOTATION_FIELD_NUMBER |
static int |
CONSTRAINT_FIELD_NUMBER |
static int |
GENERAL_CONSTRAINT_FIELD_NUMBER |
static int |
MAXIMIZE_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
OBJECTIVE_OFFSET_FIELD_NUMBER |
static int |
QUADRATIC_OBJECTIVE_FIELD_NUMBER |
static int |
SOLUTION_HINT_FIELD_NUMBER |
static int |
VARIABLE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
MPModelProto.Annotation |
getAnnotation(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9; |
int |
getAnnotationCount()
repeated .operations_research.MPModelProto.Annotation annotation = 9; |
java.util.List<MPModelProto.Annotation> |
getAnnotationList()
repeated .operations_research.MPModelProto.Annotation annotation = 9; |
MPModelProto.AnnotationOrBuilder |
getAnnotationOrBuilder(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9; |
java.util.List<? extends MPModelProto.AnnotationOrBuilder> |
getAnnotationOrBuilderList()
repeated .operations_research.MPModelProto.Annotation annotation = 9; |
MPConstraintProto |
getConstraint(int index)
All the constraints appearing in the model.
|
int |
getConstraintCount()
All the constraints appearing in the model.
|
java.util.List<MPConstraintProto> |
getConstraintList()
All the constraints appearing in the model.
|
MPConstraintProtoOrBuilder |
getConstraintOrBuilder(int index)
All the constraints appearing in the model.
|
java.util.List<? extends MPConstraintProtoOrBuilder> |
getConstraintOrBuilderList()
All the constraints appearing in the model.
|
static MPModelProto |
getDefaultInstance() |
MPModelProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
MPGeneralConstraintProto |
getGeneralConstraint(int index)
All the general constraints appearing in the model.
|
int |
getGeneralConstraintCount()
All the general constraints appearing in the model.
|
java.util.List<MPGeneralConstraintProto> |
getGeneralConstraintList()
All the general constraints appearing in the model.
|
MPGeneralConstraintProtoOrBuilder |
getGeneralConstraintOrBuilder(int index)
All the general constraints appearing in the model.
|
java.util.List<? extends MPGeneralConstraintProtoOrBuilder> |
getGeneralConstraintOrBuilderList()
All the general constraints appearing in the model.
|
boolean |
getMaximize()
True if the problem is a maximization problem.
|
java.lang.String |
getName()
Name of the model.
|
com.google.protobuf.ByteString |
getNameBytes()
Name of the model.
|
double |
getObjectiveOffset()
Offset for the objective function.
|
com.google.protobuf.Parser<MPModelProto> |
getParserForType() |
MPQuadraticObjective |
getQuadraticObjective()
Optionally, a quadratic objective.
|
MPQuadraticObjectiveOrBuilder |
getQuadraticObjectiveOrBuilder()
Optionally, a quadratic objective.
|
int |
getSerializedSize() |
PartialVariableAssignment |
getSolutionHint()
Solution hint.
|
PartialVariableAssignmentOrBuilder |
getSolutionHintOrBuilder()
Solution hint.
|
MPVariableProto |
getVariable(int index)
All the variables appearing in the model.
|
int |
getVariableCount()
All the variables appearing in the model.
|
java.util.List<MPVariableProto> |
getVariableList()
All the variables appearing in the model.
|
MPVariableProtoOrBuilder |
getVariableOrBuilder(int index)
All the variables appearing in the model.
|
java.util.List<? extends MPVariableProtoOrBuilder> |
getVariableOrBuilderList()
All the variables appearing in the model.
|
int |
hashCode() |
boolean |
hasMaximize()
True if the problem is a maximization problem.
|
boolean |
hasName()
Name of the model.
|
boolean |
hasObjectiveOffset()
Offset for the objective function.
|
boolean |
hasQuadraticObjective()
Optionally, a quadratic objective.
|
boolean |
hasSolutionHint()
Solution hint.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static MPModelProto.Builder |
newBuilder() |
static MPModelProto.Builder |
newBuilder(MPModelProto prototype) |
MPModelProto.Builder |
newBuilderForType() |
protected MPModelProto.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static MPModelProto |
parseDelimitedFrom(java.io.InputStream input) |
static MPModelProto |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPModelProto |
parseFrom(byte[] data) |
static MPModelProto |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPModelProto |
parseFrom(java.nio.ByteBuffer data) |
static MPModelProto |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPModelProto |
parseFrom(com.google.protobuf.ByteString data) |
static MPModelProto |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPModelProto |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MPModelProto |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPModelProto |
parseFrom(java.io.InputStream input) |
static MPModelProto |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MPModelProto> |
parser() |
MPModelProto.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 VARIABLE_FIELD_NUMBER
public static final int CONSTRAINT_FIELD_NUMBER
public static final int GENERAL_CONSTRAINT_FIELD_NUMBER
public static final int MAXIMIZE_FIELD_NUMBER
public static final int OBJECTIVE_OFFSET_FIELD_NUMBER
public static final int QUADRATIC_OBJECTIVE_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int SOLUTION_HINT_FIELD_NUMBER
public static final int ANNOTATION_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<MPVariableProto> getVariableList()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;getVariableList in interface MPModelProtoOrBuilderpublic java.util.List<? extends MPVariableProtoOrBuilder> getVariableOrBuilderList()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;getVariableOrBuilderList in interface MPModelProtoOrBuilderpublic int getVariableCount()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;getVariableCount in interface MPModelProtoOrBuilderpublic MPVariableProto getVariable(int index)
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;getVariable in interface MPModelProtoOrBuilderpublic MPVariableProtoOrBuilder getVariableOrBuilder(int index)
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;getVariableOrBuilder in interface MPModelProtoOrBuilderpublic java.util.List<MPConstraintProto> getConstraintList()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;getConstraintList in interface MPModelProtoOrBuilderpublic java.util.List<? extends MPConstraintProtoOrBuilder> getConstraintOrBuilderList()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;getConstraintOrBuilderList in interface MPModelProtoOrBuilderpublic int getConstraintCount()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;getConstraintCount in interface MPModelProtoOrBuilderpublic MPConstraintProto getConstraint(int index)
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;getConstraint in interface MPModelProtoOrBuilderpublic MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;getConstraintOrBuilder in interface MPModelProtoOrBuilderpublic java.util.List<MPGeneralConstraintProto> getGeneralConstraintList()
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;getGeneralConstraintList in interface MPModelProtoOrBuilderpublic java.util.List<? extends MPGeneralConstraintProtoOrBuilder> getGeneralConstraintOrBuilderList()
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;getGeneralConstraintOrBuilderList in interface MPModelProtoOrBuilderpublic int getGeneralConstraintCount()
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;getGeneralConstraintCount in interface MPModelProtoOrBuilderpublic MPGeneralConstraintProto getGeneralConstraint(int index)
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;getGeneralConstraint in interface MPModelProtoOrBuilderpublic MPGeneralConstraintProtoOrBuilder getGeneralConstraintOrBuilder(int index)
All the general constraints appearing in the model. Note that not all solvers support all types of general constraints.
repeated .operations_research.MPGeneralConstraintProto general_constraint = 7;getGeneralConstraintOrBuilder in interface MPModelProtoOrBuilderpublic boolean hasMaximize()
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];hasMaximize in interface MPModelProtoOrBuilderpublic boolean getMaximize()
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];getMaximize in interface MPModelProtoOrBuilderpublic boolean hasObjectiveOffset()
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];hasObjectiveOffset in interface MPModelProtoOrBuilderpublic double getObjectiveOffset()
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];getObjectiveOffset in interface MPModelProtoOrBuilderpublic boolean hasQuadraticObjective()
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;hasQuadraticObjective in interface MPModelProtoOrBuilderpublic MPQuadraticObjective getQuadraticObjective()
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;getQuadraticObjective in interface MPModelProtoOrBuilderpublic MPQuadraticObjectiveOrBuilder getQuadraticObjectiveOrBuilder()
Optionally, a quadratic objective. As of 2019/06, only SCIP and Gurobi support quadratic objectives.
optional .operations_research.MPQuadraticObjective quadratic_objective = 8;getQuadraticObjectiveOrBuilder in interface MPModelProtoOrBuilderpublic boolean hasName()
Name of the model.
optional string name = 5 [default = ""];hasName in interface MPModelProtoOrBuilderpublic java.lang.String getName()
Name of the model.
optional string name = 5 [default = ""];getName in interface MPModelProtoOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Name of the model.
optional string name = 5 [default = ""];getNameBytes in interface MPModelProtoOrBuilderpublic boolean hasSolutionHint()
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions.
optional .operations_research.PartialVariableAssignment solution_hint = 6;hasSolutionHint in interface MPModelProtoOrBuilderpublic PartialVariableAssignment getSolutionHint()
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions.
optional .operations_research.PartialVariableAssignment solution_hint = 6;getSolutionHint in interface MPModelProtoOrBuilderpublic PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
Solution hint. If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution. Note that it may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions.
optional .operations_research.PartialVariableAssignment solution_hint = 6;getSolutionHintOrBuilder in interface MPModelProtoOrBuilderpublic java.util.List<MPModelProto.Annotation> getAnnotationList()
repeated .operations_research.MPModelProto.Annotation annotation = 9;getAnnotationList in interface MPModelProtoOrBuilderpublic java.util.List<? extends MPModelProto.AnnotationOrBuilder> getAnnotationOrBuilderList()
repeated .operations_research.MPModelProto.Annotation annotation = 9;getAnnotationOrBuilderList in interface MPModelProtoOrBuilderpublic int getAnnotationCount()
repeated .operations_research.MPModelProto.Annotation annotation = 9;getAnnotationCount in interface MPModelProtoOrBuilderpublic MPModelProto.Annotation getAnnotation(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9;getAnnotation in interface MPModelProtoOrBuilderpublic MPModelProto.AnnotationOrBuilder getAnnotationOrBuilder(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9;getAnnotationOrBuilder in interface MPModelProtoOrBuilderpublic 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 MPModelProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MPModelProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPModelProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static MPModelProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static MPModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic MPModelProto.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MPModelProto.Builder newBuilder()
public static MPModelProto.Builder newBuilder(MPModelProto prototype)
public MPModelProto.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MPModelProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static MPModelProto getDefaultInstance()
public static com.google.protobuf.Parser<MPModelProto> parser()
public com.google.protobuf.Parser<MPModelProto> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic MPModelProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.