Package com.google.ortools.sat
Enum CpSolverStatus
- java.lang.Object
-
- java.lang.Enum<CpSolverStatus>
-
- com.google.ortools.sat.CpSolverStatus
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,java.io.Serializable,java.lang.Comparable<CpSolverStatus>
public enum CpSolverStatus extends java.lang.Enum<CpSolverStatus> implements com.google.protobuf.ProtocolMessageEnum
The status returned by a solver trying to solve a CpModelProto.
Protobuf enumoperations_research.sat.CpSolverStatus
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FEASIBLEA feasible solution has been found.INFEASIBLEThe problem has been proven infeasible.MODEL_INVALIDThe given CpModelProto didn't pass the validation step.OPTIMALAn optimal feasible solution has been found.UNKNOWNThe status of the model is still unknown.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static intFEASIBLE_VALUEA feasible solution has been found.static intINFEASIBLE_VALUEThe problem has been proven infeasible.static intMODEL_INVALID_VALUEThe given CpModelProto didn't pass the validation step.static intOPTIMAL_VALUEAn optimal feasible solution has been found.static intUNKNOWN_VALUEThe status of the model is still unknown.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CpSolverStatusforNumber(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<CpSolverStatus>internalGetValueMap()static CpSolverStatusvalueOf(int value)Deprecated.static CpSolverStatusvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static CpSolverStatusvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CpSolverStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final CpSolverStatus UNKNOWN
The status of the model is still unknown. A search limit has been reached before any of the statuses below could be determined.
UNKNOWN = 0;
-
MODEL_INVALID
public static final CpSolverStatus MODEL_INVALID
The given CpModelProto didn't pass the validation step. You can get a detailed error by calling ValidateCpModel(model_proto).
MODEL_INVALID = 1;
-
FEASIBLE
public static final CpSolverStatus FEASIBLE
A feasible solution has been found. But the search was stopped before we could prove optimality or before we enumerated all solutions of a feasibility problem (if asked).
FEASIBLE = 2;
-
INFEASIBLE
public static final CpSolverStatus INFEASIBLE
The problem has been proven infeasible.
INFEASIBLE = 3;
-
OPTIMAL
public static final CpSolverStatus OPTIMAL
An optimal feasible solution has been found. More generally, this status represent a success. So we also return OPTIMAL if we find a solution for a pure feasiblity problem or if a gap limit has been specified and we return a solution within this limit. In the case where we need to return all the feasible solution, this status will only be returned if we enumerated all of them; If we stopped before, we will return FEASIBLE.
OPTIMAL = 4;
-
UNRECOGNIZED
public static final CpSolverStatus UNRECOGNIZED
-
-
Field Detail
-
UNKNOWN_VALUE
public static final int UNKNOWN_VALUE
The status of the model is still unknown. A search limit has been reached before any of the statuses below could be determined.
UNKNOWN = 0;- See Also:
- Constant Field Values
-
MODEL_INVALID_VALUE
public static final int MODEL_INVALID_VALUE
The given CpModelProto didn't pass the validation step. You can get a detailed error by calling ValidateCpModel(model_proto).
MODEL_INVALID = 1;- See Also:
- Constant Field Values
-
FEASIBLE_VALUE
public static final int FEASIBLE_VALUE
A feasible solution has been found. But the search was stopped before we could prove optimality or before we enumerated all solutions of a feasibility problem (if asked).
FEASIBLE = 2;- See Also:
- Constant Field Values
-
INFEASIBLE_VALUE
public static final int INFEASIBLE_VALUE
The problem has been proven infeasible.
INFEASIBLE = 3;- See Also:
- Constant Field Values
-
OPTIMAL_VALUE
public static final int OPTIMAL_VALUE
An optimal feasible solution has been found. More generally, this status represent a success. So we also return OPTIMAL if we find a solution for a pure feasiblity problem or if a gap limit has been specified and we return a solution within this limit. In the case where we need to return all the feasible solution, this status will only be returned if we enumerated all of them; If we stopped before, we will return FEASIBLE.
OPTIMAL = 4;- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static CpSolverStatus[] 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 (CpSolverStatus c : CpSolverStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CpSolverStatus 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 CpSolverStatus 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 CpSolverStatus 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<CpSolverStatus> 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 CpSolverStatus 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
-
-