Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
CpSolverStatus.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/cp_model.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.sat;
7
15public enum CpSolverStatus
16 implements com.google.protobuf.ProtocolMessageEnum {
69 ;
70
71 static {
72 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
73 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
74 /* major= */ 4,
75 /* minor= */ 29,
76 /* patch= */ 3,
77 /* suffix= */ "",
78 CpSolverStatus.class.getName());
79 }
80
88 public static final int UNKNOWN_VALUE = 0;
97 public static final int MODEL_INVALID_VALUE = 1;
107 public static final int FEASIBLE_VALUE = 2;
115 public static final int INFEASIBLE_VALUE = 3;
130 public static final int OPTIMAL_VALUE = 4;
131
132
133 public final int getNumber() {
134 if (this == UNRECOGNIZED) {
135 throw new java.lang.IllegalArgumentException(
136 "Can't get the number of an unknown enum value.");
137 }
138 return value;
139 }
140
146 @java.lang.Deprecated
147 public static CpSolverStatus valueOf(int value) {
148 return forNumber(value);
149 }
150
155 public static CpSolverStatus forNumber(int value) {
156 switch (value) {
157 case 0: return UNKNOWN;
158 case 1: return MODEL_INVALID;
159 case 2: return FEASIBLE;
160 case 3: return INFEASIBLE;
161 case 4: return OPTIMAL;
162 default: return null;
163 }
164 }
165
166 public static com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>
168 return internalValueMap;
169 }
170 private static final com.google.protobuf.Internal.EnumLiteMap<
171 CpSolverStatus> internalValueMap =
172 new com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>() {
173 public CpSolverStatus findValueByNumber(int number) {
174 return CpSolverStatus.forNumber(number);
175 }
176 };
177
178 public final com.google.protobuf.Descriptors.EnumValueDescriptor
180 if (this == UNRECOGNIZED) {
181 throw new java.lang.IllegalStateException(
182 "Can't get the descriptor of an unrecognized enum value.");
183 }
184 return getDescriptor().getValues().get(ordinal());
185 }
186 public final com.google.protobuf.Descriptors.EnumDescriptor
188 return getDescriptor();
189 }
190 public static final com.google.protobuf.Descriptors.EnumDescriptor
192 return com.google.ortools.sat.CpModelProtobuf.getDescriptor().getEnumTypes().get(0);
193 }
194
195 private static final CpSolverStatus[] VALUES = values();
196
197 public static CpSolverStatus valueOf(
198 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
199 if (desc.getType() != getDescriptor()) {
200 throw new java.lang.IllegalArgumentException(
201 "EnumValueDescriptor is not for this type.");
202 }
203 if (desc.getIndex() == -1) {
204 return UNRECOGNIZED;
205 }
206 return VALUES[desc.getIndex()];
207 }
208
209 private final int value;
210
211 private CpSolverStatus(int value) {
212 this.value = value;
213 }
214
215 // @@protoc_insertion_point(enum_scope:operations_research.sat.CpSolverStatus)
216}
217
static CpSolverStatus valueOf(int value)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static CpSolverStatus forNumber(int value)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< CpSolverStatus > internalGetValueMap()
static CpSolverStatus valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)