Package com.google.ortools.linearsolver
Enum MPSolverResponseStatus
- java.lang.Object
-
- java.lang.Enum<MPSolverResponseStatus>
-
- com.google.ortools.linearsolver.MPSolverResponseStatus
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,java.io.Serializable,java.lang.Comparable<MPSolverResponseStatus>
public enum MPSolverResponseStatus extends java.lang.Enum<MPSolverResponseStatus> implements com.google.protobuf.ProtocolMessageEnum
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 enumoperations_research.MPSolverResponseStatus
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MPSOLVER_ABNORMALAn error (most probably numerical) occurred.MPSOLVER_CANCELLED_BY_USERThe solve was interrupted by the user, and the solver didn't have time to return a proper status.MPSOLVER_FEASIBLEThe 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).MPSOLVER_INCOMPATIBLE_OPTIONSSome of the selected options were incompatible, e.g.MPSOLVER_INFEASIBLEThe 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.MPSOLVER_MODEL_INVALIDModel errors.MPSOLVER_MODEL_INVALID_SOLUTION_HINTSomething is wrong with the fields "solution_hint_var_index" and/or "solution_hint_var_value".MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERSSomething is wrong with the solver_specific_parameters request field.MPSOLVER_MODEL_IS_VALIDLike "NOT_SOLVED", but typically used by model validation functions returning a "model status", to enhance readability of the client code.MPSOLVER_NOT_SOLVEDThe solver did not have a chance to diagnose the model in one of the categories above.MPSOLVER_OPTIMALThe solver found the proven optimal solution.MPSOLVER_SOLVER_TYPE_UNAVAILABLEImplementation error: the requested solver implementation is not available (see MPModelRequest.solver_type).MPSOLVER_UNBOUNDEDThere exist solutions that make the magnitude of the objective value as large as wanted (i.e.MPSOLVER_UNKNOWN_STATUSSpecial value: the solver status could not be properly translated and is unknown.
-
Field Summary
Fields Modifier and Type Field Description static intMPSOLVER_ABNORMAL_VALUEAn error (most probably numerical) occurred.static intMPSOLVER_CANCELLED_BY_USER_VALUEThe solve was interrupted by the user, and the solver didn't have time to return a proper status.static intMPSOLVER_FEASIBLE_VALUEThe 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).static intMPSOLVER_INCOMPATIBLE_OPTIONS_VALUESome of the selected options were incompatible, e.g.static intMPSOLVER_INFEASIBLE_VALUEThe 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.static intMPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUESomething is wrong with the fields "solution_hint_var_index" and/or "solution_hint_var_value".static intMPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUESomething is wrong with the solver_specific_parameters request field.static intMPSOLVER_MODEL_INVALID_VALUEModel errors.static intMPSOLVER_MODEL_IS_VALID_VALUELike "NOT_SOLVED", but typically used by model validation functions returning a "model status", to enhance readability of the client code.static intMPSOLVER_NOT_SOLVED_VALUEThe solver did not have a chance to diagnose the model in one of the categories above.static intMPSOLVER_OPTIMAL_VALUEThe solver found the proven optimal solution.static intMPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUEImplementation error: the requested solver implementation is not available (see MPModelRequest.solver_type).static intMPSOLVER_UNBOUNDED_VALUEThere exist solutions that make the magnitude of the objective value as large as wanted (i.e.static intMPSOLVER_UNKNOWN_STATUS_VALUESpecial value: the solver status could not be properly translated and is unknown.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MPSolverResponseStatusforNumber(int value)static com.google.protobuf.Descriptors.EnumDescriptorgetDescriptor()com.google.protobuf.Descriptors.EnumDescriptorgetDescriptorForType()intgetNumber()com.google.protobuf.Descriptors.EnumValueDescriptorgetValueDescriptor()static com.google.protobuf.Internal.EnumLiteMap<MPSolverResponseStatus>internalGetValueMap()static MPSolverResponseStatusvalueOf(int value)Deprecated.static MPSolverResponseStatusvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static MPSolverResponseStatusvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MPSolverResponseStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MPSOLVER_OPTIMAL
public static final MPSolverResponseStatus MPSOLVER_OPTIMAL
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;
-
MPSOLVER_FEASIBLE
public static final MPSolverResponseStatus MPSOLVER_FEASIBLE
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;
-
MPSOLVER_INFEASIBLE
public static final MPSolverResponseStatus MPSOLVER_INFEASIBLE
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;
-
MPSOLVER_UNBOUNDED
public static final MPSolverResponseStatus MPSOLVER_UNBOUNDED
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;
-
MPSOLVER_ABNORMAL
public static final MPSolverResponseStatus MPSOLVER_ABNORMAL
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;
-
MPSOLVER_NOT_SOLVED
public static final MPSolverResponseStatus MPSOLVER_NOT_SOLVED
The solver did not have a chance to diagnose the model in one of the categories above.
MPSOLVER_NOT_SOLVED = 6;
-
MPSOLVER_MODEL_IS_VALID
public static final MPSolverResponseStatus MPSOLVER_MODEL_IS_VALID
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;
-
MPSOLVER_CANCELLED_BY_USER
public static final MPSolverResponseStatus MPSOLVER_CANCELLED_BY_USER
The solve was interrupted by the user, and the solver didn't have time to return a proper status.
MPSOLVER_CANCELLED_BY_USER = 98;
-
MPSOLVER_UNKNOWN_STATUS
public static final MPSolverResponseStatus MPSOLVER_UNKNOWN_STATUS
Special value: the solver status could not be properly translated and is unknown.
MPSOLVER_UNKNOWN_STATUS = 99;
-
MPSOLVER_MODEL_INVALID
public static final MPSolverResponseStatus MPSOLVER_MODEL_INVALID
Model errors. These are always deterministic and repeatable. They should be accompanied with a string description of the error.
MPSOLVER_MODEL_INVALID = 5;
-
MPSOLVER_MODEL_INVALID_SOLUTION_HINT
public static final MPSolverResponseStatus MPSOLVER_MODEL_INVALID_SOLUTION_HINT
Something is wrong with the fields "solution_hint_var_index" and/or "solution_hint_var_value".
MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84;
-
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS
public static final MPSolverResponseStatus MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS
Something is wrong with the solver_specific_parameters request field.
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85;
-
MPSOLVER_SOLVER_TYPE_UNAVAILABLE
public static final MPSolverResponseStatus MPSOLVER_SOLVER_TYPE_UNAVAILABLE
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;
-
MPSOLVER_INCOMPATIBLE_OPTIONS
public static final MPSolverResponseStatus MPSOLVER_INCOMPATIBLE_OPTIONS
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;
-
-
Field Detail
-
MPSOLVER_OPTIMAL_VALUE
public static final int MPSOLVER_OPTIMAL_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_FEASIBLE_VALUE
public static final int MPSOLVER_FEASIBLE_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_INFEASIBLE_VALUE
public static final int MPSOLVER_INFEASIBLE_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_UNBOUNDED_VALUE
public static final int MPSOLVER_UNBOUNDED_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_ABNORMAL_VALUE
public static final int MPSOLVER_ABNORMAL_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_NOT_SOLVED_VALUE
public static final int MPSOLVER_NOT_SOLVED_VALUE
The solver did not have a chance to diagnose the model in one of the categories above.
MPSOLVER_NOT_SOLVED = 6;- See Also:
- Constant Field Values
-
MPSOLVER_MODEL_IS_VALID_VALUE
public static final int MPSOLVER_MODEL_IS_VALID_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_CANCELLED_BY_USER_VALUE
public static final int MPSOLVER_CANCELLED_BY_USER_VALUE
The solve was interrupted by the user, and the solver didn't have time to return a proper status.
MPSOLVER_CANCELLED_BY_USER = 98;- See Also:
- Constant Field Values
-
MPSOLVER_UNKNOWN_STATUS_VALUE
public static final int MPSOLVER_UNKNOWN_STATUS_VALUE
Special value: the solver status could not be properly translated and is unknown.
MPSOLVER_UNKNOWN_STATUS = 99;- See Also:
- Constant Field Values
-
MPSOLVER_MODEL_INVALID_VALUE
public static final int MPSOLVER_MODEL_INVALID_VALUE
Model errors. These are always deterministic and repeatable. They should be accompanied with a string description of the error.
MPSOLVER_MODEL_INVALID = 5;- See Also:
- Constant Field Values
-
MPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUE
public static final int MPSOLVER_MODEL_INVALID_SOLUTION_HINT_VALUE
Something is wrong with the fields "solution_hint_var_index" and/or "solution_hint_var_value".
MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84;- See Also:
- Constant Field Values
-
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUE
public static final int MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS_VALUE
Something is wrong with the solver_specific_parameters request field.
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85;- See Also:
- Constant Field Values
-
MPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUE
public static final int MPSOLVER_SOLVER_TYPE_UNAVAILABLE_VALUE
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;- See Also:
- Constant Field Values
-
MPSOLVER_INCOMPATIBLE_OPTIONS_VALUE
public static final int MPSOLVER_INCOMPATIBLE_OPTIONS_VALUE
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;- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static MPSolverResponseStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MPSolverResponseStatus c : MPSolverResponseStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MPSolverResponseStatus valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static MPSolverResponseStatus valueOf(int value)
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
forNumber
public static MPSolverResponseStatus forNumber(int value)
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<MPSolverResponseStatus> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static MPSolverResponseStatus valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-