com.google.ortools.sat.CpSolverStatus Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ortools/sat/cp_model.proto
package com.google.ortools.sat;
/**
*
* The status returned by a solver trying to solve a CpModelProto.
*
*
* Protobuf enum {@code operations_research.sat.CpSolverStatus}
*/
public enum CpSolverStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* 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;
*/
UNKNOWN(0),
/**
*
* The given CpModelProto didn't pass the validation step. You can get a
* detailed error by calling ValidateCpModel(model_proto).
*
*
* MODEL_INVALID = 1;
*/
MODEL_INVALID(1),
/**
*
* A feasible solution as 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;
*/
FEASIBLE(2),
/**
*
* The problem has been proven infeasible.
*
*
* INFEASIBLE = 3;
*/
INFEASIBLE(3),
/**
*
* 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;
*/
OPTIMAL(4),
UNRECOGNIZED(-1),
;
/**
*
* 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;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* The given CpModelProto didn't pass the validation step. You can get a
* detailed error by calling ValidateCpModel(model_proto).
*
*
* MODEL_INVALID = 1;
*/
public static final int MODEL_INVALID_VALUE = 1;
/**
*
* A feasible solution as 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;
*/
public static final int FEASIBLE_VALUE = 2;
/**
*
* The problem has been proven infeasible.
*
*
* INFEASIBLE = 3;
*/
public static final int INFEASIBLE_VALUE = 3;
/**
*
* 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;
*/
public static final int OPTIMAL_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CpSolverStatus valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CpSolverStatus forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return MODEL_INVALID;
case 2: return FEASIBLE;
case 3: return INFEASIBLE;
case 4: return OPTIMAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CpSolverStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CpSolverStatus findValueByNumber(int number) {
return CpSolverStatus.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.ortools.sat.CpModelProtobuf.getDescriptor().getEnumTypes().get(0);
}
private static final CpSolverStatus[] VALUES = values();
public static CpSolverStatus valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private CpSolverStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:operations_research.sat.CpSolverStatus)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy