Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.linearsolver.MPSolverResponseStatus Enum Reference
Inheritance diagram for com.google.ortools.linearsolver.MPSolverResponseStatus:

Public Member Functions

final int getNumber ()
 
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor ()
 
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType ()
 

Static Public Member Functions

static MPSolverResponseStatus valueOf (int value)
 
static MPSolverResponseStatus forNumber (int value)
 
static com.google.protobuf.Internal.EnumLiteMap< MPSolverResponseStatusinternalGetValueMap ()
 
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor ()
 
static MPSolverResponseStatus valueOf (com.google.protobuf.Descriptors.EnumValueDescriptor desc)
 

Public Attributes

 MPSOLVER_OPTIMAL =(0)
 
 MPSOLVER_FEASIBLE =(1)
 
 MPSOLVER_INFEASIBLE =(2)
 
 MPSOLVER_UNBOUNDED =(3)
 
 MPSOLVER_ABNORMAL =(4)
 
 MPSOLVER_NOT_SOLVED =(6)
 
 MPSOLVER_MODEL_IS_VALID =(97)
 
 MPSOLVER_CANCELLED_BY_USER =(98)
 
 MPSOLVER_UNKNOWN_STATUS =(99)
 
 MPSOLVER_MODEL_INVALID =(5)
 
 MPSOLVER_MODEL_INVALID_SOLUTION_HINT =(84)
 
 MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS =(85)
 
 MPSOLVER_SOLVER_TYPE_UNAVAILABLE =(7)
 
 MPSOLVER_INCOMPATIBLE_OPTIONS =(113)
 

Static Public Attributes

static final int MPSOLVER_OPTIMAL_VALUE = 0
 
static final int MPSOLVER_FEASIBLE_VALUE = 1
 
static final int MPSOLVER_INFEASIBLE_VALUE = 2
 
static final int MPSOLVER_UNBOUNDED_VALUE = 3
 
static final int MPSOLVER_ABNORMAL_VALUE = 4
 
static final int MPSOLVER_NOT_SOLVED_VALUE = 6
 
static final int MPSOLVER_MODEL_IS_VALID_VALUE = 97
 
static final int MPSOLVER_CANCELLED_BY_USER_VALUE = 98
 
static final int MPSOLVER_UNKNOWN_STATUS_VALUE = 99
 
static final int MPSOLVER_MODEL_INVALID_VALUE = 5
 
static final int MPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUE = 84
 
static final int MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUE = 85
 
static final int MPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUE = 7
 
static final int MPSOLVER_INCOMPATIBLE_OPTIONS_VALUE = 113
 

Detailed Description

Status returned by the solver. They follow a hierarchical nomenclature, to
allow us to add more enum values in the future. Clients should use
InCategory() to match these enums, with the following C++ pseudo-code:

bool InCategory(MPSolverResponseStatus status, MPSolverResponseStatus cat) {
  if (cat == MPSOLVER_OPTIMAL) return status == MPSOLVER_OPTIMAL;
  while (status > cat) status >>= 4;
  return status == cat;
}

Protobuf enum operations_research.MPSolverResponseStatus

Definition at line 22 of file MPSolverResponseStatus.java.

Member Function Documentation

◆ forNumber()

static MPSolverResponseStatus com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.

Definition at line 332 of file MPSolverResponseStatus.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.linearsolver.MPSolverResponseStatus.getDescriptor ( )
static

Definition at line 373 of file MPSolverResponseStatus.java.

◆ getDescriptorForType()

final com.google.protobuf.Descriptors.EnumDescriptor com.google.ortools.linearsolver.MPSolverResponseStatus.getDescriptorForType ( )

Definition at line 369 of file MPSolverResponseStatus.java.

◆ getNumber()

final int com.google.ortools.linearsolver.MPSolverResponseStatus.getNumber ( )

Definition at line 314 of file MPSolverResponseStatus.java.

◆ getValueDescriptor()

final com.google.protobuf.Descriptors.EnumValueDescriptor com.google.ortools.linearsolver.MPSolverResponseStatus.getValueDescriptor ( )

Definition at line 365 of file MPSolverResponseStatus.java.

◆ internalGetValueMap()

static com.google.protobuf.Internal.EnumLiteMap< MPSolverResponseStatus > com.google.ortools.linearsolver.MPSolverResponseStatus.internalGetValueMap ( )
static

Definition at line 353 of file MPSolverResponseStatus.java.

◆ valueOf() [1/2]

static MPSolverResponseStatus com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf ( com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static

Definition at line 379 of file MPSolverResponseStatus.java.

◆ valueOf() [2/2]

static MPSolverResponseStatus com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf ( int value)
static
Parameters
valueThe numeric wire value of the corresponding enum entry.
Returns
The enum associated with the given numeric wire value.
Deprecated
Use forNumber(int) instead.

Definition at line 324 of file MPSolverResponseStatus.java.

Member Data Documentation

◆ MPSOLVER_ABNORMAL

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_ABNORMAL =(4)
An error (most probably numerical) occurred.
One likely cause for such errors is a large numerical range among variable
coefficients (eg. 1e-16, 1e20), in which case one should try to shrink it.

MPSOLVER_ABNORMAL = 4;

Definition at line 82 of file MPSolverResponseStatus.java.

◆ MPSOLVER_ABNORMAL_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_ABNORMAL_VALUE = 4
static
An error (most probably numerical) occurred.
One likely cause for such errors is a large numerical range among variable
coefficients (eg. 1e-16, 1e20), in which case one should try to shrink it.

MPSOLVER_ABNORMAL = 4;

Definition at line 227 of file MPSolverResponseStatus.java.

◆ MPSOLVER_CANCELLED_BY_USER

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_CANCELLED_BY_USER =(98)
The solve was interrupted by the user, and the solver didn't have time to
return a proper status.

MPSOLVER_CANCELLED_BY_USER = 98;

Definition at line 109 of file MPSolverResponseStatus.java.

◆ MPSOLVER_CANCELLED_BY_USER_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_CANCELLED_BY_USER_VALUE = 98
static
The solve was interrupted by the user, and the solver didn't have time to
return a proper status.

MPSOLVER_CANCELLED_BY_USER = 98;

Definition at line 254 of file MPSolverResponseStatus.java.

◆ MPSOLVER_FEASIBLE

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_FEASIBLE =(1)
The solver had enough time to find some solution that satisfies all
constraints, but it did not prove optimality (which means it may or may
not have reached the optimal).

This can happen for large LP models (Linear Programming), and is a frequent
response for time-limited MIPs (Mixed Integer Programming). In the MIP
case, the difference between the solution 'objective_value' and
'best_objective_bound' fields of the MPSolutionResponse will give an
indication of how far this solution is from the optimal one.

MPSOLVER_FEASIBLE = 1;

Definition at line 51 of file MPSolverResponseStatus.java.

◆ MPSOLVER_FEASIBLE_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_FEASIBLE_VALUE = 1
static
The solver had enough time to find some solution that satisfies all
constraints, but it did not prove optimality (which means it may or may
not have reached the optimal).

This can happen for large LP models (Linear Programming), and is a frequent
response for time-limited MIPs (Mixed Integer Programming). In the MIP
case, the difference between the solution 'objective_value' and
'best_objective_bound' fields of the MPSolutionResponse will give an
indication of how far this solution is from the optimal one.

MPSOLVER_FEASIBLE = 1;

Definition at line 196 of file MPSolverResponseStatus.java.

◆ MPSOLVER_INCOMPATIBLE_OPTIONS

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_INCOMPATIBLE_OPTIONS =(113)
Some of the selected options were incompatible, e.g. a cancellable solve
was requested via SolverClient::SolveMipRemotely() with an underlying
solver that doesn't support cancellation. status_str should contain a
description of the issue.

MPSOLVER_INCOMPATIBLE_OPTIONS = 113;

Definition at line 166 of file MPSolverResponseStatus.java.

◆ MPSOLVER_INCOMPATIBLE_OPTIONS_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_INCOMPATIBLE_OPTIONS_VALUE = 113
static
Some of the selected options were incompatible, e.g. a cancellable solve
was requested via SolverClient::SolveMipRemotely() with an underlying
solver that doesn't support cancellation. status_str should contain a
description of the issue.

MPSOLVER_INCOMPATIBLE_OPTIONS = 113;

Definition at line 311 of file MPSolverResponseStatus.java.

◆ MPSOLVER_INFEASIBLE

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_INFEASIBLE =(2)
The model does not have any solution, according to the solver (which
"proved" it, with the caveat that numerical proofs aren't actual proofs),
or based on trivial considerations (eg. a variable whose lower bound is
strictly greater than its upper bound).

MPSOLVER_INFEASIBLE = 2;

Definition at line 62 of file MPSolverResponseStatus.java.

◆ MPSOLVER_INFEASIBLE_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_INFEASIBLE_VALUE = 2
static
The model does not have any solution, according to the solver (which
"proved" it, with the caveat that numerical proofs aren't actual proofs),
or based on trivial considerations (eg. a variable whose lower bound is
strictly greater than its upper bound).

MPSOLVER_INFEASIBLE = 2;

Definition at line 207 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID =(5)
Model errors. These are always deterministic and repeatable.
They should be accompanied with a string description of the error.

MPSOLVER_MODEL_INVALID = 5;

Definition at line 127 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID_SOLUTION_HINT

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID_SOLUTION_HINT =(84)
Something is wrong with the fields "solution_hint_var_index" and/or
"solution_hint_var_value".

MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84;

Definition at line 136 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUE = 84
static
Something is wrong with the fields "solution_hint_var_index" and/or
"solution_hint_var_value".

MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84;

Definition at line 281 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS =(85)
Something is wrong with the solver_specific_parameters request field.

MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85;

Definition at line 144 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUE = 85
static
Something is wrong with the solver_specific_parameters request field.

MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85;

Definition at line 289 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_INVALID_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_INVALID_VALUE = 5
static
Model errors. These are always deterministic and repeatable.
They should be accompanied with a string description of the error.

MPSOLVER_MODEL_INVALID = 5;

Definition at line 272 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_IS_VALID

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_IS_VALID =(97)
Like "NOT_SOLVED", but typically used by model validation functions
returning a "model status", to enhance readability of the client code.

MPSOLVER_MODEL_IS_VALID = 97;

Definition at line 100 of file MPSolverResponseStatus.java.

◆ MPSOLVER_MODEL_IS_VALID_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_MODEL_IS_VALID_VALUE = 97
static
Like "NOT_SOLVED", but typically used by model validation functions
returning a "model status", to enhance readability of the client code.

MPSOLVER_MODEL_IS_VALID = 97;

Definition at line 245 of file MPSolverResponseStatus.java.

◆ MPSOLVER_NOT_SOLVED

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_NOT_SOLVED =(6)
The solver did not have a chance to diagnose the model in one of the
categories above.

MPSOLVER_NOT_SOLVED = 6;

Definition at line 91 of file MPSolverResponseStatus.java.

◆ MPSOLVER_NOT_SOLVED_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_NOT_SOLVED_VALUE = 6
static
The solver did not have a chance to diagnose the model in one of the
categories above.

MPSOLVER_NOT_SOLVED = 6;

Definition at line 236 of file MPSolverResponseStatus.java.

◆ MPSOLVER_OPTIMAL

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_OPTIMAL =(0)
The solver found the proven optimal solution. This is what should be
returned in most cases.

WARNING: for historical reason, the value is zero, which means that this
value can't have any subcategories.

MPSOLVER_OPTIMAL = 0;

Definition at line 35 of file MPSolverResponseStatus.java.

◆ MPSOLVER_OPTIMAL_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_OPTIMAL_VALUE = 0
static
The solver found the proven optimal solution. This is what should be
returned in most cases.

WARNING: for historical reason, the value is zero, which means that this
value can't have any subcategories.

MPSOLVER_OPTIMAL = 0;

Definition at line 180 of file MPSolverResponseStatus.java.

◆ MPSOLVER_SOLVER_TYPE_UNAVAILABLE

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_SOLVER_TYPE_UNAVAILABLE =(7)
Implementation error: the requested solver implementation is not
available (see MPModelRequest.solver_type).
The linear solver binary was probably not linked with the required library,
eg //ortools/linear_solver:linear_solver_scip for SCIP.

MPSOLVER_SOLVER_TYPE_UNAVAILABLE = 7;

Definition at line 155 of file MPSolverResponseStatus.java.

◆ MPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUE = 7
static
Implementation error: the requested solver implementation is not
available (see MPModelRequest.solver_type).
The linear solver binary was probably not linked with the required library,
eg //ortools/linear_solver:linear_solver_scip for SCIP.

MPSOLVER_SOLVER_TYPE_UNAVAILABLE = 7;

Definition at line 300 of file MPSolverResponseStatus.java.

◆ MPSOLVER_UNBOUNDED

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNBOUNDED =(3)
There exist solutions that make the magnitude of the objective value
as large as wanted (i.e. -infinity (resp. +infinity) for a minimization
(resp. maximization) problem.

MPSOLVER_UNBOUNDED = 3;

Definition at line 72 of file MPSolverResponseStatus.java.

◆ MPSOLVER_UNBOUNDED_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNBOUNDED_VALUE = 3
static
There exist solutions that make the magnitude of the objective value
as large as wanted (i.e. -infinity (resp. +infinity) for a minimization
(resp. maximization) problem.

MPSOLVER_UNBOUNDED = 3;

Definition at line 217 of file MPSolverResponseStatus.java.

◆ MPSOLVER_UNKNOWN_STATUS

com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS =(99)
Special value: the solver status could not be properly translated and is
unknown.

MPSOLVER_UNKNOWN_STATUS = 99;

Definition at line 118 of file MPSolverResponseStatus.java.

◆ MPSOLVER_UNKNOWN_STATUS_VALUE

final int com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS_VALUE = 99
static
Special value: the solver status could not be properly translated and is
unknown.

MPSOLVER_UNKNOWN_STATUS = 99;

Definition at line 263 of file MPSolverResponseStatus.java.


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