Java Reference

Java Reference

MPSolverCommonParameters

Detailed Description

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 type

operations_research.MPSolverCommonParameters

Definition at line 18 of file MPSolverCommonParameters.java.

Classes

class  Builder
 
enum  LPAlgorithmValues
 Protobuf enum. More...
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override boolean hasRelativeMipGap ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDouble getRelativeMipGap ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getRelativeMipGapOrBuilder ()
 
.lang.Override boolean hasPrimalTolerance ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDouble getPrimalTolerance ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getPrimalToleranceOrBuilder ()
 
.lang.Override boolean hasDualTolerance ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDouble getDualTolerance ()
 
.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getDualToleranceOrBuilder ()
 
.lang.Override boolean hasLpAlgorithm ()
 
.lang.Override com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues getLpAlgorithm ()
 
.lang.Override boolean hasPresolve ()
 
.lang.Override com.google.ortools.util.OptionalBoolean getPresolve ()
 
.lang.Override boolean hasScaling ()
 
.lang.Override com.google.ortools.util.OptionalBoolean getScaling ()
 
.lang.Override final boolean isInitialized ()
 
.lang.Override void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
.lang.Override int getSerializedSize ()
 
.lang.Override boolean equals (final java.lang.Object obj)
 
.lang.Override int hashCode ()
 
.lang.Override Builder newBuilderForType ()
 
.lang.Override Builder toBuilder ()
 
.lang.Override com.google.protobuf.Parser< MPSolverCommonParametersgetParserForType ()
 
.lang.Override com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstanceForType ()
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static Builder newBuilder ()
 
static Builder newBuilder (com.google.ortools.linearsolver.MPSolverCommonParameters prototype)
 
static com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstance ()
 
static com.google.protobuf.Parser< MPSolverCommonParametersparser ()
 

Static Public Attributes

static final int RELATIVE_MIP_GAP_FIELD_NUMBER = 1
 
static final int PRIMAL_TOLERANCE_FIELD_NUMBER = 2
 
static final int DUAL_TOLERANCE_FIELD_NUMBER = 3
 
static final int LP_ALGORITHM_FIELD_NUMBER = 4
 
static final int PRESOLVE_FIELD_NUMBER = 5
 
static final int SCALING_FIELD_NUMBER = 7
 
.lang.Deprecated static final com.google.protobuf.Parser< MPSolverCommonParametersPARSER
 

Protected Member Functions

.lang.Override java.lang.Object newInstance (UnusedPrivateParameter unused)
 
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 
.lang.Override Builder newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
 

Member Function Documentation

◆ equals()

.lang.Override boolean equals ( final java.lang.Object  obj)
inline

Definition at line 641 of file MPSolverCommonParameters.java.

◆ getDefaultInstance()

static com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstance ( )
inlinestatic

Definition at line 1895 of file MPSolverCommonParameters.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstanceForType ( )
inline

Definition at line 1920 of file MPSolverCommonParameters.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
inlinestatic

Definition at line 159 of file MPSolverCommonParameters.java.

◆ getDualTolerance()

.lang.Override com.google.ortools.linearsolver.OptionalDouble getDualTolerance ( )
inline
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;

Returns
The dualTolerance.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 462 of file MPSolverCommonParameters.java.

◆ getDualToleranceOrBuilder()

.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getDualToleranceOrBuilder ( )
inline
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;

Implements MPSolverCommonParametersOrBuilder.

Definition at line 477 of file MPSolverCommonParameters.java.

◆ getLpAlgorithm()

Algorithm to solve linear programs.
Ask or-core-team&#64; if you want to know what this does exactly.

optional .operations_research.MPSolverCommonParameters.LPAlgorithmValues lp_algorithm = 4 [default = LP_ALGO_UNSPECIFIED];

Returns
The lpAlgorithm.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 504 of file MPSolverCommonParameters.java.

◆ getParserForType()

.lang.Override com.google.protobuf.Parser<MPSolverCommonParameters> getParserForType ( )
inline

Definition at line 1915 of file MPSolverCommonParameters.java.

◆ getPresolve()

.lang.Override com.google.ortools.util.OptionalBoolean getPresolve ( )
inline
Gurobi and SCIP enable presolve by default.
Ask or-core-team&#64; for other solvers.

optional .operations_research.OptionalBoolean presolve = 5 [default = BOOL_UNSPECIFIED];

Returns
The presolve.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 533 of file MPSolverCommonParameters.java.

◆ getPrimalTolerance()

.lang.Override com.google.ortools.linearsolver.OptionalDouble getPrimalTolerance ( )
inline
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;

Returns
The primalTolerance.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 413 of file MPSolverCommonParameters.java.

◆ getPrimalToleranceOrBuilder()

.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getPrimalToleranceOrBuilder ( )
inline
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;

Implements MPSolverCommonParametersOrBuilder.

Definition at line 427 of file MPSolverCommonParameters.java.

◆ getRelativeMipGap()

.lang.Override com.google.ortools.linearsolver.OptionalDouble getRelativeMipGap ( )
inline
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&#64; for other solvers.

optional .operations_research.OptionalDouble relative_mip_gap = 1;

Returns
The relativeMipGap.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 357 of file MPSolverCommonParameters.java.

◆ getRelativeMipGapOrBuilder()

.lang.Override com.google.ortools.linearsolver.OptionalDoubleOrBuilder getRelativeMipGapOrBuilder ( )
inline
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&#64; for other solvers.

optional .operations_research.OptionalDouble relative_mip_gap = 1;

Implements MPSolverCommonParametersOrBuilder.

Definition at line 380 of file MPSolverCommonParameters.java.

◆ getScaling()

.lang.Override com.google.ortools.util.OptionalBoolean getScaling ( )
inline
Enable automatic scaling of matrix coefficients and objective. Available
for Gurobi and GLOP.
Ask or-core-team&#64; if you want more details.

optional .operations_research.OptionalBoolean scaling = 7 [default = BOOL_UNSPECIFIED];

Returns
The scaling.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 564 of file MPSolverCommonParameters.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )
inline

Definition at line 606 of file MPSolverCommonParameters.java.

◆ getUnknownFields()

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ( )
inline

Definition at line 42 of file MPSolverCommonParameters.java.

◆ hasDualTolerance()

.lang.Override boolean hasDualTolerance ( )
inline
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;

Returns
Whether the dualTolerance field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 446 of file MPSolverCommonParameters.java.

◆ hashCode()

.lang.Override int hashCode ( )
inline

Definition at line 682 of file MPSolverCommonParameters.java.

◆ hasLpAlgorithm()

.lang.Override boolean hasLpAlgorithm ( )
inline
Algorithm to solve linear programs.
Ask or-core-team&#64; if you want to know what this does exactly.

optional .operations_research.MPSolverCommonParameters.LPAlgorithmValues lp_algorithm = 4 [default = LP_ALGO_UNSPECIFIED];

Returns
Whether the lpAlgorithm field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 492 of file MPSolverCommonParameters.java.

◆ hasPresolve()

.lang.Override boolean hasPresolve ( )
inline
Gurobi and SCIP enable presolve by default.
Ask or-core-team&#64; for other solvers.

optional .operations_research.OptionalBoolean presolve = 5 [default = BOOL_UNSPECIFIED];

Returns
Whether the presolve field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 521 of file MPSolverCommonParameters.java.

◆ hasPrimalTolerance()

.lang.Override boolean hasPrimalTolerance ( )
inline
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;

Returns
Whether the primalTolerance field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 398 of file MPSolverCommonParameters.java.

◆ hasRelativeMipGap()

.lang.Override boolean hasRelativeMipGap ( )
inline
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&#64; for other solvers.

optional .operations_research.OptionalDouble relative_mip_gap = 1;

Returns
Whether the relativeMipGap field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 333 of file MPSolverCommonParameters.java.

◆ hasScaling()

.lang.Override boolean hasScaling ( )
inline
Enable automatic scaling of matrix coefficients and objective. Available
for Gurobi and GLOP.
Ask or-core-team&#64; if you want more details.

optional .operations_research.OptionalBoolean scaling = 7 [default = BOOL_UNSPECIFIED];

Returns
Whether the scaling field is set.

Implements MPSolverCommonParametersOrBuilder.

Definition at line 551 of file MPSolverCommonParameters.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
inlineprotected

Definition at line 165 of file MPSolverCommonParameters.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 572 of file MPSolverCommonParameters.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
inlinestatic

Definition at line 789 of file MPSolverCommonParameters.java.

◆ newBuilder() [2/2]

static Builder newBuilder ( com.google.ortools.linearsolver.MPSolverCommonParameters  prototype)
inlinestatic

Definition at line 792 of file MPSolverCommonParameters.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )
inline

Definition at line 788 of file MPSolverCommonParameters.java.

◆ newBuilderForType() [2/2]

.lang.Override Builder newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent  parent)
inlineprotected

Definition at line 802 of file MPSolverCommonParameters.java.

◆ newInstance()

.lang.Override java.lang.Object newInstance ( UnusedPrivateParameter  unused)
inlineprotected

Definition at line 35 of file MPSolverCommonParameters.java.

◆ parseDelimitedFrom() [1/2]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom ( java.io.InputStream  input) throws java.io.IOException
inlinestatic

Definition at line 761 of file MPSolverCommonParameters.java.

◆ parseDelimitedFrom() [2/2]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom ( java.io.InputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 766 of file MPSolverCommonParameters.java.

◆ parseFrom() [1/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( byte[]  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 739 of file MPSolverCommonParameters.java.

◆ parseFrom() [2/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( byte[]  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 743 of file MPSolverCommonParameters.java.

◆ parseFrom() [3/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( com.google.protobuf.ByteString  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 728 of file MPSolverCommonParameters.java.

◆ parseFrom() [4/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( com.google.protobuf.ByteString  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 733 of file MPSolverCommonParameters.java.

◆ parseFrom() [5/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( com.google.protobuf.CodedInputStream  input) throws java.io.IOException
inlinestatic

Definition at line 773 of file MPSolverCommonParameters.java.

◆ parseFrom() [6/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( com.google.protobuf.CodedInputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 779 of file MPSolverCommonParameters.java.

◆ parseFrom() [7/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( java.io.InputStream  input) throws java.io.IOException
inlinestatic

Definition at line 749 of file MPSolverCommonParameters.java.

◆ parseFrom() [8/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( java.io.InputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 754 of file MPSolverCommonParameters.java.

◆ parseFrom() [9/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( java.nio.ByteBuffer  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 717 of file MPSolverCommonParameters.java.

◆ parseFrom() [10/10]

static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom ( java.nio.ByteBuffer  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 722 of file MPSolverCommonParameters.java.

◆ parser()

static com.google.protobuf.Parser<MPSolverCommonParameters> parser ( )
inlinestatic

Definition at line 1910 of file MPSolverCommonParameters.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )
inline

Definition at line 796 of file MPSolverCommonParameters.java.

◆ writeTo()

.lang.Override void writeTo ( com.google.protobuf.CodedOutputStream  output) throws java.io.IOException
inline

Definition at line 582 of file MPSolverCommonParameters.java.

Member Data Documentation

◆ DUAL_TOLERANCE_FIELD_NUMBER

final int DUAL_TOLERANCE_FIELD_NUMBER = 3
static

Definition at line 431 of file MPSolverCommonParameters.java.

◆ LP_ALGORITHM_FIELD_NUMBER

final int LP_ALGORITHM_FIELD_NUMBER = 4
static

Definition at line 481 of file MPSolverCommonParameters.java.

◆ PARSER

.lang.Deprecated static final com.google.protobuf.Parser<MPSolverCommonParameters> PARSER
static
Initial value:
= new com.google.protobuf.AbstractParser<MPSolverCommonParameters>() {
@java.lang.Override
public MPSolverCommonParameters parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MPSolverCommonParameters(input, extensionRegistry);
}
}

Definition at line 1900 of file MPSolverCommonParameters.java.

◆ PRESOLVE_FIELD_NUMBER

final int PRESOLVE_FIELD_NUMBER = 5
static

Definition at line 510 of file MPSolverCommonParameters.java.

◆ PRIMAL_TOLERANCE_FIELD_NUMBER

final int PRIMAL_TOLERANCE_FIELD_NUMBER = 2
static

Definition at line 384 of file MPSolverCommonParameters.java.

◆ RELATIVE_MIP_GAP_FIELD_NUMBER

final int RELATIVE_MIP_GAP_FIELD_NUMBER = 1
static

Definition at line 310 of file MPSolverCommonParameters.java.

◆ SCALING_FIELD_NUMBER

final int SCALING_FIELD_NUMBER = 7
static

Definition at line 539 of file MPSolverCommonParameters.java.


The documentation for this class was generated from the following file: