Package com.google.ortools.linearsolver
Class MPSolverCommonParameters
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.ortools.linearsolver.MPSolverCommonParameters
-
- All Implemented Interfaces:
MPSolverCommonParametersOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable
public final class MPSolverCommonParameters extends com.google.protobuf.GeneratedMessageV3 implements MPSolverCommonParametersOrBuilder
MPSolverCommonParameters holds advanced usage parameters that apply to any of the solvers we support. All of the fields in this proto can have a value of unspecified. In this case each inner solver will use their own safe defaults. Some values won't be supported by some solvers. The behavior in that case is not defined yet.
Protobuf typeoperations_research.MPSolverCommonParameters- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMPSolverCommonParameters.BuilderMPSolverCommonParameters holds advanced usage parameters that apply to any of the solvers we support.static classMPSolverCommonParameters.LPAlgorithmValuesProtobuf enumoperations_research.MPSolverCommonParameters.LPAlgorithmValues-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDUAL_TOLERANCE_FIELD_NUMBERstatic intLP_ALGORITHM_FIELD_NUMBERstatic com.google.protobuf.Parser<MPSolverCommonParameters>PARSERDeprecated.static intPRESOLVE_FIELD_NUMBERstatic intPRIMAL_TOLERANCE_FIELD_NUMBERstatic intRELATIVE_MIP_GAP_FIELD_NUMBERstatic intSCALING_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static MPSolverCommonParametersgetDefaultInstance()MPSolverCommonParametersgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()OptionalDoublegetDualTolerance()Tolerance for dual feasibility.OptionalDoubleOrBuildergetDualToleranceOrBuilder()Tolerance for dual feasibility.MPSolverCommonParameters.LPAlgorithmValuesgetLpAlgorithm()Algorithm to solve linear programs.com.google.protobuf.Parser<MPSolverCommonParameters>getParserForType()OptionalBooleangetPresolve()Gurobi and SCIP enable presolve by default.OptionalDoublegetPrimalTolerance()Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability.OptionalDoubleOrBuildergetPrimalToleranceOrBuilder()Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability.OptionalDoublegetRelativeMipGap()The solver stops if the relative MIP gap reaches this value or below.OptionalDoubleOrBuildergetRelativeMipGapOrBuilder()The solver stops if the relative MIP gap reaches this value or below.OptionalBooleangetScaling()Enable automatic scaling of matrix coefficients and objective.intgetSerializedSize()booleanhasDualTolerance()Tolerance for dual feasibility.inthashCode()booleanhasLpAlgorithm()Algorithm to solve linear programs.booleanhasPresolve()Gurobi and SCIP enable presolve by default.booleanhasPrimalTolerance()Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability.booleanhasRelativeMipGap()The solver stops if the relative MIP gap reaches this value or below.booleanhasScaling()Enable automatic scaling of matrix coefficients and objective.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static MPSolverCommonParameters.BuildernewBuilder()static MPSolverCommonParameters.BuildernewBuilder(MPSolverCommonParameters prototype)MPSolverCommonParameters.BuildernewBuilderForType()protected MPSolverCommonParameters.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static MPSolverCommonParametersparseDelimitedFrom(java.io.InputStream input)static MPSolverCommonParametersparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolverCommonParametersparseFrom(byte[] data)static MPSolverCommonParametersparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolverCommonParametersparseFrom(com.google.protobuf.ByteString data)static MPSolverCommonParametersparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolverCommonParametersparseFrom(com.google.protobuf.CodedInputStream input)static MPSolverCommonParametersparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolverCommonParametersparseFrom(java.io.InputStream input)static MPSolverCommonParametersparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MPSolverCommonParametersparseFrom(java.nio.ByteBuffer data)static MPSolverCommonParametersparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<MPSolverCommonParameters>parser()MPSolverCommonParameters.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
RELATIVE_MIP_GAP_FIELD_NUMBER
public static final int RELATIVE_MIP_GAP_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRIMAL_TOLERANCE_FIELD_NUMBER
public static final int PRIMAL_TOLERANCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DUAL_TOLERANCE_FIELD_NUMBER
public static final int DUAL_TOLERANCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LP_ALGORITHM_FIELD_NUMBER
public static final int LP_ALGORITHM_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRESOLVE_FIELD_NUMBER
public static final int PRESOLVE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCALING_FIELD_NUMBER
public static final int SCALING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<MPSolverCommonParameters> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasRelativeMipGap
public boolean hasRelativeMipGap()
The solver stops if the relative MIP gap reaches this value or below. The relative MIP gap is an upper bound of the relative distance to the optimum, and it is defined as: abs(best_bound - incumbent) / abs(incumbent) [Gurobi] abs(best_bound - incumbent) / min(abs(best_bound), abs(incumbent)) [SCIP] where "incumbent" is the objective value of the best solution found so far (i.e., lowest when minimizing, highest when maximizing), and "best_bound" is the tightest bound of the objective determined so far (i.e., highest when minimizing, and lowest when maximizing). The MIP Gap is sensitive to objective offset. If the denominator is 0 the MIP Gap is INFINITY for SCIP and Gurobi. Of note, "incumbent" and "best bound" are called "primal bound" and "dual bound" in SCIP, respectively. Ask or-core-team@ for other solvers.
optional .operations_research.OptionalDouble relative_mip_gap = 1;- Specified by:
hasRelativeMipGapin interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the relativeMipGap field is set.
-
getRelativeMipGap
public OptionalDouble getRelativeMipGap()
The solver stops if the relative MIP gap reaches this value or below. The relative MIP gap is an upper bound of the relative distance to the optimum, and it is defined as: abs(best_bound - incumbent) / abs(incumbent) [Gurobi] abs(best_bound - incumbent) / min(abs(best_bound), abs(incumbent)) [SCIP] where "incumbent" is the objective value of the best solution found so far (i.e., lowest when minimizing, highest when maximizing), and "best_bound" is the tightest bound of the objective determined so far (i.e., highest when minimizing, and lowest when maximizing). The MIP Gap is sensitive to objective offset. If the denominator is 0 the MIP Gap is INFINITY for SCIP and Gurobi. Of note, "incumbent" and "best bound" are called "primal bound" and "dual bound" in SCIP, respectively. Ask or-core-team@ for other solvers.
optional .operations_research.OptionalDouble relative_mip_gap = 1;- Specified by:
getRelativeMipGapin interfaceMPSolverCommonParametersOrBuilder- Returns:
- The relativeMipGap.
-
getRelativeMipGapOrBuilder
public OptionalDoubleOrBuilder getRelativeMipGapOrBuilder()
The solver stops if the relative MIP gap reaches this value or below. The relative MIP gap is an upper bound of the relative distance to the optimum, and it is defined as: abs(best_bound - incumbent) / abs(incumbent) [Gurobi] abs(best_bound - incumbent) / min(abs(best_bound), abs(incumbent)) [SCIP] where "incumbent" is the objective value of the best solution found so far (i.e., lowest when minimizing, highest when maximizing), and "best_bound" is the tightest bound of the objective determined so far (i.e., highest when minimizing, and lowest when maximizing). The MIP Gap is sensitive to objective offset. If the denominator is 0 the MIP Gap is INFINITY for SCIP and Gurobi. Of note, "incumbent" and "best bound" are called "primal bound" and "dual bound" in SCIP, respectively. Ask or-core-team@ for other solvers.
optional .operations_research.OptionalDouble relative_mip_gap = 1;- Specified by:
getRelativeMipGapOrBuilderin interfaceMPSolverCommonParametersOrBuilder
-
hasPrimalTolerance
public boolean hasPrimalTolerance()
Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability. For SCIP this includes integrality constraints. For Gurobi it does not, you need to set the custom parameter IntFeasTol.
optional .operations_research.OptionalDouble primal_tolerance = 2;- Specified by:
hasPrimalTolerancein interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the primalTolerance field is set.
-
getPrimalTolerance
public OptionalDouble getPrimalTolerance()
Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability. For SCIP this includes integrality constraints. For Gurobi it does not, you need to set the custom parameter IntFeasTol.
optional .operations_research.OptionalDouble primal_tolerance = 2;- Specified by:
getPrimalTolerancein interfaceMPSolverCommonParametersOrBuilder- Returns:
- The primalTolerance.
-
getPrimalToleranceOrBuilder
public OptionalDoubleOrBuilder getPrimalToleranceOrBuilder()
Tolerance for primal feasibility of basic solutions: this is the maximum allowed error in constraint satisfiability. For SCIP this includes integrality constraints. For Gurobi it does not, you need to set the custom parameter IntFeasTol.
optional .operations_research.OptionalDouble primal_tolerance = 2;- Specified by:
getPrimalToleranceOrBuilderin interfaceMPSolverCommonParametersOrBuilder
-
hasDualTolerance
public boolean hasDualTolerance()
Tolerance for dual feasibility. For SCIP and Gurobi this is the feasibility tolerance for reduced costs in LP solution: reduced costs must all be smaller than this value in the improving direction in order for a model to be declared optimal. Not supported for other solvers.
optional .operations_research.OptionalDouble dual_tolerance = 3;- Specified by:
hasDualTolerancein interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the dualTolerance field is set.
-
getDualTolerance
public OptionalDouble getDualTolerance()
Tolerance for dual feasibility. For SCIP and Gurobi this is the feasibility tolerance for reduced costs in LP solution: reduced costs must all be smaller than this value in the improving direction in order for a model to be declared optimal. Not supported for other solvers.
optional .operations_research.OptionalDouble dual_tolerance = 3;- Specified by:
getDualTolerancein interfaceMPSolverCommonParametersOrBuilder- Returns:
- The dualTolerance.
-
getDualToleranceOrBuilder
public OptionalDoubleOrBuilder getDualToleranceOrBuilder()
Tolerance for dual feasibility. For SCIP and Gurobi this is the feasibility tolerance for reduced costs in LP solution: reduced costs must all be smaller than this value in the improving direction in order for a model to be declared optimal. Not supported for other solvers.
optional .operations_research.OptionalDouble dual_tolerance = 3;- Specified by:
getDualToleranceOrBuilderin interfaceMPSolverCommonParametersOrBuilder
-
hasLpAlgorithm
public boolean hasLpAlgorithm()
Algorithm to solve linear programs. Ask or-core-team@ if you want to know what this does exactly.
optional .operations_research.MPSolverCommonParameters.LPAlgorithmValues lp_algorithm = 4 [default = LP_ALGO_UNSPECIFIED];- Specified by:
hasLpAlgorithmin interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the lpAlgorithm field is set.
-
getLpAlgorithm
public MPSolverCommonParameters.LPAlgorithmValues getLpAlgorithm()
Algorithm to solve linear programs. Ask or-core-team@ if you want to know what this does exactly.
optional .operations_research.MPSolverCommonParameters.LPAlgorithmValues lp_algorithm = 4 [default = LP_ALGO_UNSPECIFIED];- Specified by:
getLpAlgorithmin interfaceMPSolverCommonParametersOrBuilder- Returns:
- The lpAlgorithm.
-
hasPresolve
public boolean hasPresolve()
Gurobi and SCIP enable presolve by default. Ask or-core-team@ for other solvers.
optional .operations_research.OptionalBoolean presolve = 5 [default = BOOL_UNSPECIFIED];- Specified by:
hasPresolvein interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the presolve field is set.
-
getPresolve
public OptionalBoolean getPresolve()
Gurobi and SCIP enable presolve by default. Ask or-core-team@ for other solvers.
optional .operations_research.OptionalBoolean presolve = 5 [default = BOOL_UNSPECIFIED];- Specified by:
getPresolvein interfaceMPSolverCommonParametersOrBuilder- Returns:
- The presolve.
-
hasScaling
public boolean hasScaling()
Enable automatic scaling of matrix coefficients and objective. Available for Gurobi and GLOP. Ask or-core-team@ if you want more details.
optional .operations_research.OptionalBoolean scaling = 7 [default = BOOL_UNSPECIFIED];- Specified by:
hasScalingin interfaceMPSolverCommonParametersOrBuilder- Returns:
- Whether the scaling field is set.
-
getScaling
public OptionalBoolean getScaling()
Enable automatic scaling of matrix coefficients and objective. Available for Gurobi and GLOP. Ask or-core-team@ if you want more details.
optional .operations_research.OptionalBoolean scaling = 7 [default = BOOL_UNSPECIFIED];- Specified by:
getScalingin interfaceMPSolverCommonParametersOrBuilder- Returns:
- The scaling.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static MPSolverCommonParameters parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MPSolverCommonParameters parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPSolverCommonParameters parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static MPSolverCommonParameters parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static MPSolverCommonParameters parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPSolverCommonParameters parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static MPSolverCommonParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public MPSolverCommonParameters.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static MPSolverCommonParameters.Builder newBuilder()
-
newBuilder
public static MPSolverCommonParameters.Builder newBuilder(MPSolverCommonParameters prototype)
-
toBuilder
public MPSolverCommonParameters.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected MPSolverCommonParameters.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static MPSolverCommonParameters getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<MPSolverCommonParameters> parser()
-
getParserForType
public com.google.protobuf.Parser<MPSolverCommonParameters> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public MPSolverCommonParameters getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-