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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public 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.GeneratedMessage
public java.util.List<MPVariableProto> getVariableList()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
getVariableList
in interface MPModelProtoOrBuilder
public java.util.List<? extends MPVariableProtoOrBuilder> getVariableOrBuilderList()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
getVariableOrBuilderList
in interface MPModelProtoOrBuilder
public int getVariableCount()
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
getVariableCount
in interface MPModelProtoOrBuilder
public MPVariableProto getVariable(int index)
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
getVariable
in interface MPModelProtoOrBuilder
public MPVariableProtoOrBuilder getVariableOrBuilder(int index)
All the variables appearing in the model.
repeated .operations_research.MPVariableProto variable = 3;
getVariableOrBuilder
in interface MPModelProtoOrBuilder
public java.util.List<MPConstraintProto> getConstraintList()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
getConstraintList
in interface MPModelProtoOrBuilder
public java.util.List<? extends MPConstraintProtoOrBuilder> getConstraintOrBuilderList()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
getConstraintOrBuilderList
in interface MPModelProtoOrBuilder
public int getConstraintCount()
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
getConstraintCount
in interface MPModelProtoOrBuilder
public MPConstraintProto getConstraint(int index)
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
getConstraint
in interface MPModelProtoOrBuilder
public MPConstraintProtoOrBuilder getConstraintOrBuilder(int index)
All the constraints appearing in the model.
repeated .operations_research.MPConstraintProto constraint = 4;
getConstraintOrBuilder
in interface MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public boolean hasMaximize()
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];
hasMaximize
in interface MPModelProtoOrBuilder
public boolean getMaximize()
True if the problem is a maximization problem. Minimize by default.
optional bool maximize = 1 [default = false];
getMaximize
in interface MPModelProtoOrBuilder
public boolean hasObjectiveOffset()
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];
hasObjectiveOffset
in interface MPModelProtoOrBuilder
public double getObjectiveOffset()
Offset for the objective function. Must be finite.
optional double objective_offset = 2 [default = 0];
getObjectiveOffset
in interface MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public boolean hasName()
Name of the model.
optional string name = 5 [default = ""];
hasName
in interface MPModelProtoOrBuilder
public java.lang.String getName()
Name of the model.
optional string name = 5 [default = ""];
getName
in interface MPModelProtoOrBuilder
public com.google.protobuf.ByteString getNameBytes()
Name of the model.
optional string name = 5 [default = ""];
getNameBytes
in interface MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public 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 MPModelProtoOrBuilder
public java.util.List<MPModelProto.Annotation> getAnnotationList()
repeated .operations_research.MPModelProto.Annotation annotation = 9;
getAnnotationList
in interface MPModelProtoOrBuilder
public java.util.List<? extends MPModelProto.AnnotationOrBuilder> getAnnotationOrBuilderList()
repeated .operations_research.MPModelProto.Annotation annotation = 9;
getAnnotationOrBuilderList
in interface MPModelProtoOrBuilder
public int getAnnotationCount()
repeated .operations_research.MPModelProto.Annotation annotation = 9;
getAnnotationCount
in interface MPModelProtoOrBuilder
public MPModelProto.Annotation getAnnotation(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9;
getAnnotation
in interface MPModelProtoOrBuilder
public MPModelProto.AnnotationOrBuilder getAnnotationOrBuilder(int index)
repeated .operations_research.MPModelProto.Annotation annotation = 9;
getAnnotationOrBuilder
in interface MPModelProtoOrBuilder
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 MPModelProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPModelProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPModelProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPModelProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static MPModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public MPModelProto.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static MPModelProto.Builder newBuilder()
public static MPModelProto.Builder newBuilder(MPModelProto prototype)
public MPModelProto.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected MPModelProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static MPModelProto getDefaultInstance()
public static com.google.protobuf.Parser<MPModelProto> parser()
public com.google.protobuf.Parser<MPModelProto> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public MPModelProto getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2025. All rights reserved.