Google OR-Tools v9.11
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// source: ortools/sat/cp_model.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.sat;
6
14public enum CpSolverStatus
15 implements com.google.protobuf.ProtocolMessageEnum {
68 ;
69
70 static {
71 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
72 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
73 /* major= */ 4,
74 /* minor= */ 26,
75 /* patch= */ 1,
76 /* suffix= */ "",
77 CpSolverStatus.class.getName());
78 }
87 public static final int UNKNOWN_VALUE = 0;
96 public static final int MODEL_INVALID_VALUE = 1;
106 public static final int FEASIBLE_VALUE = 2;
114 public static final int INFEASIBLE_VALUE = 3;
129 public static final int OPTIMAL_VALUE = 4;
130
131
132 public final int getNumber() {
133 if (this == UNRECOGNIZED) {
134 throw new java.lang.IllegalArgumentException(
135 "Can't get the number of an unknown enum value.");
136 }
137 return value;
138 }
139
145 @java.lang.Deprecated
146 public static CpSolverStatus valueOf(int value) {
147 return forNumber(value);
148 }
149
154 public static CpSolverStatus forNumber(int value) {
155 switch (value) {
156 case 0: return UNKNOWN;
157 case 1: return MODEL_INVALID;
158 case 2: return FEASIBLE;
159 case 3: return INFEASIBLE;
160 case 4: return OPTIMAL;
161 default: return null;
162 }
163 }
164
165 public static com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>
167 return internalValueMap;
168 }
169 private static final com.google.protobuf.Internal.EnumLiteMap<
170 CpSolverStatus> internalValueMap =
171 new com.google.protobuf.Internal.EnumLiteMap<CpSolverStatus>() {
172 public CpSolverStatus findValueByNumber(int number) {
173 return CpSolverStatus.forNumber(number);
174 }
175 };
176
177 public final com.google.protobuf.Descriptors.EnumValueDescriptor
179 if (this == UNRECOGNIZED) {
180 throw new java.lang.IllegalStateException(
181 "Can't get the descriptor of an unrecognized enum value.");
182 }
183 return getDescriptor().getValues().get(ordinal());
184 }
185 public final com.google.protobuf.Descriptors.EnumDescriptor
187 return getDescriptor();
188 }
189 public static final com.google.protobuf.Descriptors.EnumDescriptor
191 return com.google.ortools.sat.CpModelProtobuf.getDescriptor().getEnumTypes().get(0);
192 }
193
194 private static final CpSolverStatus[] VALUES = values();
195
196 public static CpSolverStatus valueOf(
197 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
198 if (desc.getType() != getDescriptor()) {
199 throw new java.lang.IllegalArgumentException(
200 "EnumValueDescriptor is not for this type.");
201 }
202 if (desc.getIndex() == -1) {
203 return UNRECOGNIZED;
204 }
205 return VALUES[desc.getIndex()];
206 }
207
208 private final int value;
209
210 private CpSolverStatus(int value) {
211 this.value = value;
212 }
213
214 // @@protoc_insertion_point(enum_scope:operations_research.sat.CpSolverStatus)
215}
216
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)