6package com.google.ortools.sat;
17@com.google.protobuf.Generated
18public final class CpSolverResponse
extends
19 com.google.protobuf.GeneratedMessage implements
22private static final long serialVersionUID = 0L;
24 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
25 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
30 CpSolverResponse.class.getName());
33 private CpSolverResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
36 private CpSolverResponse() {
38 solution_ = emptyLongList();
39 additionalSolutions_ = java.util.Collections.emptyList();
40 tightenedVariables_ = java.util.Collections.emptyList();
41 sufficientAssumptionsForInfeasibility_ = emptyIntList();
46 public static final com.google.protobuf.Descriptors.Descriptor
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
52 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
54 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
55 .ensureFieldAccessorsInitialized(
56 com.google.ortools.sat.CpSolverResponse.class, com.google.ortools.sat.CpSolverResponse.Builder.class);
59 private int bitField0_;
61 private int status_ = 0;
87 @SuppressWarnings(
"serial")
88 private com.google.protobuf.Internal.LongList solution_ =
102 public java.
util.List<java.lang.Long>
118 return solution_.size();
133 return solution_.getLong(index);
135 private int solutionMemoizedSerializedSize = -1;
138 private double objectiveValue_ = 0D;
152 return objectiveValue_;
156 private double bestObjectiveBound_ = 0D;
169 return bestObjectiveBound_;
173 @SuppressWarnings(
"serial")
189 return additionalSolutions_;
204 public java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder>
206 return additionalSolutions_;
222 return additionalSolutions_.size();
238 return additionalSolutions_.get(index);
255 return additionalSolutions_.get(index);
259 @SuppressWarnings(
"serial")
285 return tightenedVariables_;
310 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
312 return tightenedVariables_;
338 return tightenedVariables_.size();
364 return tightenedVariables_.get(index);
391 return tightenedVariables_.get(index);
395 @SuppressWarnings(
"serial")
396 private com.google.protobuf.Internal.IntList sufficientAssumptionsForInfeasibility_ =
425 public java.
util.List<java.lang.Integer>
427 return sufficientAssumptionsForInfeasibility_;
456 return sufficientAssumptionsForInfeasibility_.size();
486 return sufficientAssumptionsForInfeasibility_.getInt(index);
488 private int sufficientAssumptionsForInfeasibilityMemoizedSerializedSize = -1;
504 return ((bitField0_ & 0x00000001) != 0);
518 return integerObjective_ ==
null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
531 return integerObjective_ ==
null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
535 private long innerObjectiveLowerBound_ = 0L;
553 return innerObjectiveLowerBound_;
557 private long numIntegers_ = 0L;
576 private long numBooleans_ = 0L;
587 private long numFixedBooleans_ = 0L;
594 return numFixedBooleans_;
598 private long numConflicts_ = 0L;
605 return numConflicts_;
609 private long numBranches_ = 0L;
620 private long numBinaryPropagations_ = 0L;
627 return numBinaryPropagations_;
631 private long numIntegerPropagations_ = 0L;
638 return numIntegerPropagations_;
642 private long numRestarts_ = 0L;
653 private long numLpIterations_ = 0L;
660 return numLpIterations_;
664 private double wallTime_ = 0D;
679 private double userTime_ = 0D;
690 private double deterministicTime_ = 0D;
697 return deterministicTime_;
701 private double gapIntegral_ = 0D;
716 @SuppressWarnings(
"serial")
717 private volatile java.lang.Object solutionInfo_ =
"";
729 java.lang.Object ref = solutionInfo_;
730 if (ref instanceof java.lang.String) {
731 return (java.lang.String) ref;
733 com.google.protobuf.ByteString bs =
734 (com.google.protobuf.ByteString) ref;
735 java.lang.String s = bs.toStringUtf8();
750 public com.google.protobuf.ByteString
752 java.lang.Object ref = solutionInfo_;
753 if (ref instanceof java.lang.String) {
754 com.google.protobuf.ByteString b =
755 com.google.protobuf.ByteString.copyFromUtf8(
756 (java.lang.String) ref);
760 return (com.google.protobuf.ByteString) ref;
765 @SuppressWarnings(
"serial")
766 private volatile java.lang.Object solveLog_ =
"";
778 java.lang.Object ref = solveLog_;
779 if (ref instanceof java.lang.String) {
780 return (java.lang.String) ref;
782 com.google.protobuf.ByteString bs =
783 (com.google.protobuf.ByteString) ref;
784 java.lang.String s = bs.toStringUtf8();
799 public com.google.protobuf.ByteString
801 java.lang.Object ref = solveLog_;
802 if (ref instanceof java.lang.String) {
803 com.google.protobuf.ByteString b =
804 com.google.protobuf.ByteString.copyFromUtf8(
805 (java.lang.String) ref);
809 return (com.google.protobuf.ByteString) ref;
813 private byte memoizedIsInitialized = -1;
820 memoizedIsInitialized = 1;
825 public void writeTo(com.google.protobuf.CodedOutputStream output)
826 throws java.io.IOException {
828 if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
829 output.writeEnum(1, status_);
832 output.writeUInt32NoTag(18);
833 output.writeUInt32NoTag(solutionMemoizedSerializedSize);
835 for (
int i = 0; i < solution_.size(); i++) {
836 output.writeInt64NoTag(solution_.getLong(i));
838 if (java.lang.Double.doubleToRawLongBits(objectiveValue_) != 0) {
839 output.writeDouble(3, objectiveValue_);
841 if (java.lang.Double.doubleToRawLongBits(bestObjectiveBound_) != 0) {
842 output.writeDouble(4, bestObjectiveBound_);
844 if (numBooleans_ != 0L) {
845 output.writeInt64(10, numBooleans_);
847 if (numConflicts_ != 0L) {
848 output.writeInt64(11, numConflicts_);
850 if (numBranches_ != 0L) {
851 output.writeInt64(12, numBranches_);
853 if (numBinaryPropagations_ != 0L) {
854 output.writeInt64(13, numBinaryPropagations_);
856 if (numIntegerPropagations_ != 0L) {
857 output.writeInt64(14, numIntegerPropagations_);
859 if (java.lang.Double.doubleToRawLongBits(wallTime_) != 0) {
860 output.writeDouble(15, wallTime_);
862 if (java.lang.Double.doubleToRawLongBits(userTime_) != 0) {
863 output.writeDouble(16, userTime_);
865 if (java.lang.Double.doubleToRawLongBits(deterministicTime_) != 0) {
866 output.writeDouble(17, deterministicTime_);
868 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solutionInfo_)) {
869 com.google.protobuf.GeneratedMessage.writeString(output, 20, solutionInfo_);
871 for (
int i = 0; i < tightenedVariables_.size(); i++) {
872 output.writeMessage(21, tightenedVariables_.get(i));
874 if (java.lang.Double.doubleToRawLongBits(gapIntegral_) != 0) {
875 output.writeDouble(22, gapIntegral_);
878 output.writeUInt32NoTag(186);
879 output.writeUInt32NoTag(sufficientAssumptionsForInfeasibilityMemoizedSerializedSize);
881 for (
int i = 0; i < sufficientAssumptionsForInfeasibility_.size(); i++) {
882 output.writeInt32NoTag(sufficientAssumptionsForInfeasibility_.getInt(i));
884 if (numRestarts_ != 0L) {
885 output.writeInt64(24, numRestarts_);
887 if (numLpIterations_ != 0L) {
888 output.writeInt64(25, numLpIterations_);
890 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solveLog_)) {
891 com.google.protobuf.GeneratedMessage.writeString(output, 26, solveLog_);
893 for (
int i = 0; i < additionalSolutions_.size(); i++) {
894 output.writeMessage(27, additionalSolutions_.get(i));
896 if (((bitField0_ & 0x00000001) != 0)) {
899 if (innerObjectiveLowerBound_ != 0L) {
900 output.writeInt64(29, innerObjectiveLowerBound_);
902 if (numIntegers_ != 0L) {
903 output.writeInt64(30, numIntegers_);
905 if (numFixedBooleans_ != 0L) {
906 output.writeInt64(31, numFixedBooleans_);
908 getUnknownFields().writeTo(output);
913 int size = memoizedSize;
914 if (size != -1)
return size;
917 if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
918 size += com.google.protobuf.CodedOutputStream
919 .computeEnumSize(1, status_);
923 for (
int i = 0; i < solution_.size(); i++) {
924 dataSize += com.google.protobuf.CodedOutputStream
925 .computeInt64SizeNoTag(solution_.getLong(i));
930 size += com.google.protobuf.CodedOutputStream
931 .computeInt32SizeNoTag(dataSize);
933 solutionMemoizedSerializedSize = dataSize;
935 if (java.lang.Double.doubleToRawLongBits(objectiveValue_) != 0) {
936 size += com.google.protobuf.CodedOutputStream
937 .computeDoubleSize(3, objectiveValue_);
939 if (java.lang.Double.doubleToRawLongBits(bestObjectiveBound_) != 0) {
940 size += com.google.protobuf.CodedOutputStream
941 .computeDoubleSize(4, bestObjectiveBound_);
943 if (numBooleans_ != 0L) {
944 size += com.google.protobuf.CodedOutputStream
945 .computeInt64Size(10, numBooleans_);
947 if (numConflicts_ != 0L) {
948 size += com.google.protobuf.CodedOutputStream
949 .computeInt64Size(11, numConflicts_);
951 if (numBranches_ != 0L) {
952 size += com.google.protobuf.CodedOutputStream
953 .computeInt64Size(12, numBranches_);
955 if (numBinaryPropagations_ != 0L) {
956 size += com.google.protobuf.CodedOutputStream
957 .computeInt64Size(13, numBinaryPropagations_);
959 if (numIntegerPropagations_ != 0L) {
960 size += com.google.protobuf.CodedOutputStream
961 .computeInt64Size(14, numIntegerPropagations_);
963 if (java.lang.Double.doubleToRawLongBits(wallTime_) != 0) {
964 size += com.google.protobuf.CodedOutputStream
965 .computeDoubleSize(15, wallTime_);
967 if (java.lang.Double.doubleToRawLongBits(userTime_) != 0) {
968 size += com.google.protobuf.CodedOutputStream
969 .computeDoubleSize(16, userTime_);
971 if (java.lang.Double.doubleToRawLongBits(deterministicTime_) != 0) {
972 size += com.google.protobuf.CodedOutputStream
973 .computeDoubleSize(17, deterministicTime_);
975 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solutionInfo_)) {
976 size += com.google.protobuf.GeneratedMessage.computeStringSize(20, solutionInfo_);
978 for (
int i = 0; i < tightenedVariables_.size(); i++) {
979 size += com.google.protobuf.CodedOutputStream
980 .computeMessageSize(21, tightenedVariables_.get(i));
982 if (java.lang.Double.doubleToRawLongBits(gapIntegral_) != 0) {
983 size += com.google.protobuf.CodedOutputStream
984 .computeDoubleSize(22, gapIntegral_);
988 for (
int i = 0; i < sufficientAssumptionsForInfeasibility_.size(); i++) {
989 dataSize += com.google.protobuf.CodedOutputStream
990 .computeInt32SizeNoTag(sufficientAssumptionsForInfeasibility_.getInt(i));
995 size += com.google.protobuf.CodedOutputStream
996 .computeInt32SizeNoTag(dataSize);
998 sufficientAssumptionsForInfeasibilityMemoizedSerializedSize = dataSize;
1000 if (numRestarts_ != 0L) {
1001 size += com.google.protobuf.CodedOutputStream
1002 .computeInt64Size(24, numRestarts_);
1004 if (numLpIterations_ != 0L) {
1005 size += com.google.protobuf.CodedOutputStream
1006 .computeInt64Size(25, numLpIterations_);
1008 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solveLog_)) {
1009 size += com.google.protobuf.GeneratedMessage.computeStringSize(26, solveLog_);
1011 for (
int i = 0; i < additionalSolutions_.size(); i++) {
1012 size += com.google.protobuf.CodedOutputStream
1013 .computeMessageSize(27, additionalSolutions_.get(i));
1015 if (((bitField0_ & 0x00000001) != 0)) {
1016 size += com.google.protobuf.CodedOutputStream
1019 if (innerObjectiveLowerBound_ != 0L) {
1020 size += com.google.protobuf.CodedOutputStream
1021 .computeInt64Size(29, innerObjectiveLowerBound_);
1023 if (numIntegers_ != 0L) {
1024 size += com.google.protobuf.CodedOutputStream
1025 .computeInt64Size(30, numIntegers_);
1027 if (numFixedBooleans_ != 0L) {
1028 size += com.google.protobuf.CodedOutputStream
1029 .computeInt64Size(31, numFixedBooleans_);
1031 size += getUnknownFields().getSerializedSize();
1032 memoizedSize = size;
1037 public boolean equals(
final java.lang.Object obj) {
1041 if (!(obj instanceof com.google.ortools.sat.CpSolverResponse)) {
1042 return super.equals(obj);
1046 if (status_ != other.status_)
return false;
1050 != java.lang.Double.doubleToLongBits(
1053 != java.lang.Double.doubleToLongBits(
1086 if (java.lang.Double.doubleToLongBits(
getWallTime())
1087 != java.lang.Double.doubleToLongBits(
1089 if (java.lang.Double.doubleToLongBits(
getUserTime())
1090 != java.lang.Double.doubleToLongBits(
1093 != java.lang.Double.doubleToLongBits(
1096 != java.lang.Double.doubleToLongBits(
1102 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
1108 if (memoizedHashCode != 0) {
1109 return memoizedHashCode;
1114 hash = (53 * hash) + status_;
1120 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1123 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1142 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1145 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1148 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1151 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1154 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1157 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1160 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1163 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1166 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1169 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1172 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1173 java.lang.Double.doubleToLongBits(
getWallTime()));
1175 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1176 java.lang.Double.doubleToLongBits(
getUserTime()));
1178 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1181 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1187 hash = (29 * hash) + getUnknownFields().hashCode();
1188 memoizedHashCode = hash;
1193 java.nio.ByteBuffer data)
1194 throws com.google.protobuf.InvalidProtocolBufferException {
1195 return PARSER.parseFrom(data);
1198 java.nio.ByteBuffer data,
1199 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1200 throws com.google.protobuf.InvalidProtocolBufferException {
1201 return PARSER.parseFrom(data, extensionRegistry);
1204 com.google.protobuf.ByteString data)
1205 throws com.google.protobuf.InvalidProtocolBufferException {
1206 return PARSER.parseFrom(data);
1209 com.google.protobuf.ByteString data,
1210 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1211 throws com.google.protobuf.InvalidProtocolBufferException {
1212 return PARSER.parseFrom(data, extensionRegistry);
1215 throws com.google.protobuf.InvalidProtocolBufferException {
1216 return PARSER.parseFrom(data);
1220 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1221 throws com.google.protobuf.InvalidProtocolBufferException {
1222 return PARSER.parseFrom(data, extensionRegistry);
1225 throws java.io.IOException {
1226 return com.google.protobuf.GeneratedMessage
1227 .parseWithIOException(PARSER, input);
1230 java.io.InputStream input,
1231 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1232 throws java.io.IOException {
1233 return com.google.protobuf.GeneratedMessage
1234 .parseWithIOException(PARSER, input, extensionRegistry);
1238 throws java.io.IOException {
1239 return com.google.protobuf.GeneratedMessage
1240 .parseDelimitedWithIOException(PARSER, input);
1244 java.io.InputStream input,
1245 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1246 throws java.io.IOException {
1247 return com.google.protobuf.GeneratedMessage
1248 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1251 com.google.protobuf.CodedInputStream input)
1252 throws java.io.IOException {
1253 return com.google.protobuf.GeneratedMessage
1254 .parseWithIOException(PARSER, input);
1257 com.google.protobuf.CodedInputStream input,
1258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1259 throws java.io.IOException {
1260 return com.google.protobuf.GeneratedMessage
1261 .parseWithIOException(PARSER, input, extensionRegistry);
1267 return DEFAULT_INSTANCE.toBuilder();
1270 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
1274 return this == DEFAULT_INSTANCE
1280 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1293 public static final class Builder
extends
1294 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
1297 public static final com.google.protobuf.Descriptors.Descriptor
1299 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1303 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1305 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
1306 .ensureFieldAccessorsInitialized(
1307 com.google.ortools.sat.CpSolverResponse.class, com.google.ortools.sat.CpSolverResponse.Builder.class);
1312 maybeForceBuilderInitialization();
1316 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1318 maybeForceBuilderInitialization();
1320 private void maybeForceBuilderInitialization() {
1321 if (com.google.protobuf.GeneratedMessage
1322 .alwaysUseFieldBuilders) {
1323 internalGetAdditionalSolutionsFieldBuilder();
1324 internalGetTightenedVariablesFieldBuilder();
1325 internalGetIntegerObjectiveFieldBuilder();
1333 solution_ = emptyLongList();
1334 objectiveValue_ = 0D;
1335 bestObjectiveBound_ = 0D;
1336 if (additionalSolutionsBuilder_ ==
null) {
1337 additionalSolutions_ = java.util.Collections.emptyList();
1339 additionalSolutions_ =
null;
1340 additionalSolutionsBuilder_.clear();
1342 bitField0_ = (bitField0_ & ~0x00000010);
1343 if (tightenedVariablesBuilder_ ==
null) {
1344 tightenedVariables_ = java.util.Collections.emptyList();
1346 tightenedVariables_ =
null;
1347 tightenedVariablesBuilder_.clear();
1349 bitField0_ = (bitField0_ & ~0x00000020);
1350 sufficientAssumptionsForInfeasibility_ = emptyIntList();
1351 integerObjective_ =
null;
1352 if (integerObjectiveBuilder_ !=
null) {
1353 integerObjectiveBuilder_.dispose();
1354 integerObjectiveBuilder_ =
null;
1356 innerObjectiveLowerBound_ = 0L;
1359 numFixedBooleans_ = 0L;
1362 numBinaryPropagations_ = 0L;
1363 numIntegerPropagations_ = 0L;
1365 numLpIterations_ = 0L;
1368 deterministicTime_ = 0D;
1376 public com.google.protobuf.Descriptors.Descriptor
1378 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1383 return com.google.ortools.sat.CpSolverResponse.getDefaultInstance();
1390 throw newUninitializedMessageException(result);
1398 buildPartialRepeatedFields(result);
1399 if (bitField0_ != 0) { buildPartial0(result); }
1404 private void buildPartialRepeatedFields(com.google.ortools.sat.CpSolverResponse result) {
1405 if (additionalSolutionsBuilder_ ==
null) {
1406 if (((bitField0_ & 0x00000010) != 0)) {
1407 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
1408 bitField0_ = (bitField0_ & ~0x00000010);
1410 result.additionalSolutions_ = additionalSolutions_;
1412 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
1414 if (tightenedVariablesBuilder_ ==
null) {
1415 if (((bitField0_ & 0x00000020) != 0)) {
1416 tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
1417 bitField0_ = (bitField0_ & ~0x00000020);
1419 result.tightenedVariables_ = tightenedVariables_;
1421 result.tightenedVariables_ = tightenedVariablesBuilder_.build();
1425 private void buildPartial0(com.google.ortools.sat.CpSolverResponse result) {
1426 int from_bitField0_ = bitField0_;
1427 if (((from_bitField0_ & 0x00000001) != 0)) {
1428 result.status_ = status_;
1430 if (((from_bitField0_ & 0x00000002) != 0)) {
1431 solution_.makeImmutable();
1432 result.solution_ = solution_;
1434 if (((from_bitField0_ & 0x00000004) != 0)) {
1435 result.objectiveValue_ = objectiveValue_;
1437 if (((from_bitField0_ & 0x00000008) != 0)) {
1438 result.bestObjectiveBound_ = bestObjectiveBound_;
1440 if (((from_bitField0_ & 0x00000040) != 0)) {
1441 sufficientAssumptionsForInfeasibility_.makeImmutable();
1442 result.sufficientAssumptionsForInfeasibility_ = sufficientAssumptionsForInfeasibility_;
1444 int to_bitField0_ = 0;
1445 if (((from_bitField0_ & 0x00000080) != 0)) {
1446 result.integerObjective_ = integerObjectiveBuilder_ ==
null
1448 : integerObjectiveBuilder_.build();
1449 to_bitField0_ |= 0x00000001;
1451 if (((from_bitField0_ & 0x00000100) != 0)) {
1452 result.innerObjectiveLowerBound_ = innerObjectiveLowerBound_;
1454 if (((from_bitField0_ & 0x00000200) != 0)) {
1455 result.numIntegers_ = numIntegers_;
1457 if (((from_bitField0_ & 0x00000400) != 0)) {
1458 result.numBooleans_ = numBooleans_;
1460 if (((from_bitField0_ & 0x00000800) != 0)) {
1461 result.numFixedBooleans_ = numFixedBooleans_;
1463 if (((from_bitField0_ & 0x00001000) != 0)) {
1464 result.numConflicts_ = numConflicts_;
1466 if (((from_bitField0_ & 0x00002000) != 0)) {
1467 result.numBranches_ = numBranches_;
1469 if (((from_bitField0_ & 0x00004000) != 0)) {
1470 result.numBinaryPropagations_ = numBinaryPropagations_;
1472 if (((from_bitField0_ & 0x00008000) != 0)) {
1473 result.numIntegerPropagations_ = numIntegerPropagations_;
1475 if (((from_bitField0_ & 0x00010000) != 0)) {
1476 result.numRestarts_ = numRestarts_;
1478 if (((from_bitField0_ & 0x00020000) != 0)) {
1479 result.numLpIterations_ = numLpIterations_;
1481 if (((from_bitField0_ & 0x00040000) != 0)) {
1482 result.wallTime_ = wallTime_;
1484 if (((from_bitField0_ & 0x00080000) != 0)) {
1485 result.userTime_ = userTime_;
1487 if (((from_bitField0_ & 0x00100000) != 0)) {
1488 result.deterministicTime_ = deterministicTime_;
1490 if (((from_bitField0_ & 0x00200000) != 0)) {
1491 result.gapIntegral_ = gapIntegral_;
1493 if (((from_bitField0_ & 0x00400000) != 0)) {
1494 result.solutionInfo_ = solutionInfo_;
1496 if (((from_bitField0_ & 0x00800000) != 0)) {
1497 result.solveLog_ = solveLog_;
1499 result.bitField0_ |= to_bitField0_;
1503 public Builder
mergeFrom(com.google.protobuf.Message other) {
1504 if (other instanceof com.google.ortools.sat.CpSolverResponse) {
1505 return mergeFrom((com.google.ortools.sat.CpSolverResponse)other);
1507 super.mergeFrom(other);
1512 public Builder
mergeFrom(com.google.ortools.sat.CpSolverResponse other) {
1513 if (other == com.google.ortools.sat.CpSolverResponse.getDefaultInstance())
return this;
1514 if (other.status_ != 0) {
1517 if (!other.solution_.isEmpty()) {
1518 if (solution_.isEmpty()) {
1519 solution_ = other.solution_;
1520 solution_.makeImmutable();
1521 bitField0_ |= 0x00000002;
1523 ensureSolutionIsMutable();
1524 solution_.addAll(other.solution_);
1528 if (java.lang.Double.doubleToRawLongBits(other.getObjectiveValue()) != 0) {
1531 if (java.lang.Double.doubleToRawLongBits(other.getBestObjectiveBound()) != 0) {
1534 if (additionalSolutionsBuilder_ ==
null) {
1535 if (!other.additionalSolutions_.isEmpty()) {
1536 if (additionalSolutions_.isEmpty()) {
1537 additionalSolutions_ = other.additionalSolutions_;
1538 bitField0_ = (bitField0_ & ~0x00000010);
1540 ensureAdditionalSolutionsIsMutable();
1541 additionalSolutions_.addAll(other.additionalSolutions_);
1546 if (!other.additionalSolutions_.isEmpty()) {
1547 if (additionalSolutionsBuilder_.isEmpty()) {
1548 additionalSolutionsBuilder_.dispose();
1549 additionalSolutionsBuilder_ =
null;
1550 additionalSolutions_ = other.additionalSolutions_;
1551 bitField0_ = (bitField0_ & ~0x00000010);
1552 additionalSolutionsBuilder_ =
1553 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1554 internalGetAdditionalSolutionsFieldBuilder() :
null;
1556 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1560 if (tightenedVariablesBuilder_ ==
null) {
1561 if (!other.tightenedVariables_.isEmpty()) {
1562 if (tightenedVariables_.isEmpty()) {
1563 tightenedVariables_ = other.tightenedVariables_;
1564 bitField0_ = (bitField0_ & ~0x00000020);
1566 ensureTightenedVariablesIsMutable();
1567 tightenedVariables_.addAll(other.tightenedVariables_);
1572 if (!other.tightenedVariables_.isEmpty()) {
1573 if (tightenedVariablesBuilder_.isEmpty()) {
1574 tightenedVariablesBuilder_.dispose();
1575 tightenedVariablesBuilder_ =
null;
1576 tightenedVariables_ = other.tightenedVariables_;
1577 bitField0_ = (bitField0_ & ~0x00000020);
1578 tightenedVariablesBuilder_ =
1579 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1580 internalGetTightenedVariablesFieldBuilder() :
null;
1582 tightenedVariablesBuilder_.addAllMessages(other.tightenedVariables_);
1586 if (!other.sufficientAssumptionsForInfeasibility_.isEmpty()) {
1587 if (sufficientAssumptionsForInfeasibility_.isEmpty()) {
1588 sufficientAssumptionsForInfeasibility_ = other.sufficientAssumptionsForInfeasibility_;
1589 sufficientAssumptionsForInfeasibility_.makeImmutable();
1590 bitField0_ |= 0x00000040;
1592 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1593 sufficientAssumptionsForInfeasibility_.addAll(other.sufficientAssumptionsForInfeasibility_);
1597 if (other.hasIntegerObjective()) {
1600 if (other.getInnerObjectiveLowerBound() != 0L) {
1603 if (other.getNumIntegers() != 0L) {
1606 if (other.getNumBooleans() != 0L) {
1609 if (other.getNumFixedBooleans() != 0L) {
1612 if (other.getNumConflicts() != 0L) {
1615 if (other.getNumBranches() != 0L) {
1618 if (other.getNumBinaryPropagations() != 0L) {
1621 if (other.getNumIntegerPropagations() != 0L) {
1624 if (other.getNumRestarts() != 0L) {
1627 if (other.getNumLpIterations() != 0L) {
1630 if (java.lang.Double.doubleToRawLongBits(other.getWallTime()) != 0) {
1633 if (java.lang.Double.doubleToRawLongBits(other.getUserTime()) != 0) {
1636 if (java.lang.Double.doubleToRawLongBits(other.getDeterministicTime()) != 0) {
1639 if (java.lang.Double.doubleToRawLongBits(other.getGapIntegral()) != 0) {
1642 if (!other.getSolutionInfo().isEmpty()) {
1643 solutionInfo_ = other.solutionInfo_;
1644 bitField0_ |= 0x00400000;
1647 if (!other.getSolveLog().isEmpty()) {
1648 solveLog_ = other.solveLog_;
1649 bitField0_ |= 0x00800000;
1652 this.mergeUnknownFields(other.getUnknownFields());
1664 com.google.protobuf.CodedInputStream input,
1665 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1666 throws java.io.IOException {
1667 if (extensionRegistry ==
null) {
1668 throw new java.lang.NullPointerException();
1671 boolean done =
false;
1673 int tag = input.readTag();
1679 status_ = input.readEnum();
1680 bitField0_ |= 0x00000001;
1684 long v = input.readInt64();
1685 ensureSolutionIsMutable();
1686 solution_.addLong(v);
1690 int length = input.readRawVarint32();
1691 int limit = input.pushLimit(length);
1692 ensureSolutionIsMutable();
1693 while (input.getBytesUntilLimit() > 0) {
1694 solution_.addLong(input.readInt64());
1696 input.popLimit(limit);
1700 objectiveValue_ = input.readDouble();
1701 bitField0_ |= 0x00000004;
1705 bestObjectiveBound_ = input.readDouble();
1706 bitField0_ |= 0x00000008;
1710 numBooleans_ = input.readInt64();
1711 bitField0_ |= 0x00000400;
1715 numConflicts_ = input.readInt64();
1716 bitField0_ |= 0x00001000;
1720 numBranches_ = input.readInt64();
1721 bitField0_ |= 0x00002000;
1725 numBinaryPropagations_ = input.readInt64();
1726 bitField0_ |= 0x00004000;
1730 numIntegerPropagations_ = input.readInt64();
1731 bitField0_ |= 0x00008000;
1735 wallTime_ = input.readDouble();
1736 bitField0_ |= 0x00040000;
1740 userTime_ = input.readDouble();
1741 bitField0_ |= 0x00080000;
1745 deterministicTime_ = input.readDouble();
1746 bitField0_ |= 0x00100000;
1750 solutionInfo_ = input.readStringRequireUtf8();
1751 bitField0_ |= 0x00400000;
1757 com.google.ortools.sat.IntegerVariableProto.parser(),
1759 if (tightenedVariablesBuilder_ ==
null) {
1760 ensureTightenedVariablesIsMutable();
1761 tightenedVariables_.add(m);
1763 tightenedVariablesBuilder_.addMessage(m);
1768 gapIntegral_ = input.readDouble();
1769 bitField0_ |= 0x00200000;
1773 int v = input.readInt32();
1774 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1775 sufficientAssumptionsForInfeasibility_.addInt(v);
1779 int length = input.readRawVarint32();
1780 int limit = input.pushLimit(length);
1781 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1782 while (input.getBytesUntilLimit() > 0) {
1783 sufficientAssumptionsForInfeasibility_.addInt(input.readInt32());
1785 input.popLimit(limit);
1789 numRestarts_ = input.readInt64();
1790 bitField0_ |= 0x00010000;
1794 numLpIterations_ = input.readInt64();
1795 bitField0_ |= 0x00020000;
1799 solveLog_ = input.readStringRequireUtf8();
1800 bitField0_ |= 0x00800000;
1806 com.google.ortools.sat.CpSolverSolution.parser(),
1808 if (additionalSolutionsBuilder_ ==
null) {
1809 ensureAdditionalSolutionsIsMutable();
1810 additionalSolutions_.add(m);
1812 additionalSolutionsBuilder_.addMessage(m);
1818 internalGetIntegerObjectiveFieldBuilder().getBuilder(),
1820 bitField0_ |= 0x00000080;
1824 innerObjectiveLowerBound_ = input.readInt64();
1825 bitField0_ |= 0x00000100;
1829 numIntegers_ = input.readInt64();
1830 bitField0_ |= 0x00000200;
1834 numFixedBooleans_ = input.readInt64();
1835 bitField0_ |= 0x00000800;
1839 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1846 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1847 throw e.unwrapIOException();
1853 private int bitField0_;
1855 private int status_ = 0;
1878 bitField0_ |= 0x00000001;
1904 public Builder
setStatus(com.google.ortools.sat.CpSolverStatus value) {
1905 if (value ==
null) {
throw new NullPointerException(); }
1906 bitField0_ |= 0x00000001;
1907 status_ = value.getNumber();
1920 bitField0_ = (bitField0_ & ~0x00000001);
1926 private com.google.protobuf.Internal.LongList solution_ = emptyLongList();
1927 private void ensureSolutionIsMutable() {
1928 if (!solution_.isModifiable()) {
1929 solution_ = makeMutableCopy(solution_);
1931 bitField0_ |= 0x00000002;
1944 public java.util.List<java.lang.Long>
1946 solution_.makeImmutable();
1961 return solution_.size();
1976 return solution_.getLong(index);
1992 int index,
long value) {
1994 ensureSolutionIsMutable();
1995 solution_.setLong(index, value);
1996 bitField0_ |= 0x00000002;
2014 ensureSolutionIsMutable();
2015 solution_.addLong(value);
2016 bitField0_ |= 0x00000002;
2033 java.lang.Iterable<? extends java.lang.Long> values) {
2034 ensureSolutionIsMutable();
2035 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2037 bitField0_ |= 0x00000002;
2053 solution_ = emptyLongList();
2054 bitField0_ = (bitField0_ & ~0x00000002);
2059 private double objectiveValue_ ;
2073 return objectiveValue_;
2089 objectiveValue_ = value;
2090 bitField0_ |= 0x00000004;
2106 bitField0_ = (bitField0_ & ~0x00000004);
2107 objectiveValue_ = 0D;
2112 private double bestObjectiveBound_ ;
2125 return bestObjectiveBound_;
2140 bestObjectiveBound_ = value;
2141 bitField0_ |= 0x00000008;
2156 bitField0_ = (bitField0_ & ~0x00000008);
2157 bestObjectiveBound_ = 0D;
2162 private java.util.List<com.google.ortools.sat.CpSolverSolution> additionalSolutions_ =
2163 java.util.Collections.emptyList();
2164 private void ensureAdditionalSolutionsIsMutable() {
2165 if (!((bitField0_ & 0x00000010) != 0)) {
2166 additionalSolutions_ =
new java.util.ArrayList<com.google.ortools.sat.CpSolverSolution>(additionalSolutions_);
2167 bitField0_ |= 0x00000010;
2171 private com.google.protobuf.RepeatedFieldBuilder<
2172 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder> additionalSolutionsBuilder_;
2187 if (additionalSolutionsBuilder_ ==
null) {
2188 return java.util.Collections.unmodifiableList(additionalSolutions_);
2190 return additionalSolutionsBuilder_.getMessageList();
2206 if (additionalSolutionsBuilder_ ==
null) {
2207 return additionalSolutions_.size();
2209 return additionalSolutionsBuilder_.getCount();
2225 if (additionalSolutionsBuilder_ ==
null) {
2226 return additionalSolutions_.get(index);
2228 return additionalSolutionsBuilder_.getMessage(index);
2244 int index, com.google.ortools.sat.CpSolverSolution value) {
2245 if (additionalSolutionsBuilder_ ==
null) {
2246 if (value ==
null) {
2247 throw new NullPointerException();
2249 ensureAdditionalSolutionsIsMutable();
2250 additionalSolutions_.set(index, value);
2253 additionalSolutionsBuilder_.setMessage(index, value);
2270 int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2271 if (additionalSolutionsBuilder_ ==
null) {
2272 ensureAdditionalSolutionsIsMutable();
2273 additionalSolutions_.set(index, builderForValue.build());
2276 additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2293 if (additionalSolutionsBuilder_ ==
null) {
2294 if (value ==
null) {
2295 throw new NullPointerException();
2297 ensureAdditionalSolutionsIsMutable();
2298 additionalSolutions_.add(value);
2301 additionalSolutionsBuilder_.addMessage(value);
2318 int index, com.google.ortools.sat.CpSolverSolution value) {
2319 if (additionalSolutionsBuilder_ ==
null) {
2320 if (value ==
null) {
2321 throw new NullPointerException();
2323 ensureAdditionalSolutionsIsMutable();
2324 additionalSolutions_.add(index, value);
2327 additionalSolutionsBuilder_.addMessage(index, value);
2344 com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2345 if (additionalSolutionsBuilder_ ==
null) {
2346 ensureAdditionalSolutionsIsMutable();
2347 additionalSolutions_.add(builderForValue.build());
2350 additionalSolutionsBuilder_.addMessage(builderForValue.build());
2367 int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2368 if (additionalSolutionsBuilder_ ==
null) {
2369 ensureAdditionalSolutionsIsMutable();
2370 additionalSolutions_.add(index, builderForValue.build());
2373 additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2390 java.lang.Iterable<? extends com.google.ortools.sat.CpSolverSolution> values) {
2391 if (additionalSolutionsBuilder_ ==
null) {
2392 ensureAdditionalSolutionsIsMutable();
2393 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2394 values, additionalSolutions_);
2397 additionalSolutionsBuilder_.addAllMessages(values);
2414 if (additionalSolutionsBuilder_ ==
null) {
2415 additionalSolutions_ = java.util.Collections.emptyList();
2416 bitField0_ = (bitField0_ & ~0x00000010);
2419 additionalSolutionsBuilder_.clear();
2436 if (additionalSolutionsBuilder_ ==
null) {
2437 ensureAdditionalSolutionsIsMutable();
2438 additionalSolutions_.remove(index);
2441 additionalSolutionsBuilder_.remove(index);
2459 return internalGetAdditionalSolutionsFieldBuilder().getBuilder(index);
2475 if (additionalSolutionsBuilder_ ==
null) {
2476 return additionalSolutions_.get(index); }
else {
2477 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2492 public java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder>
2494 if (additionalSolutionsBuilder_ !=
null) {
2495 return additionalSolutionsBuilder_.getMessageOrBuilderList();
2497 return java.util.Collections.unmodifiableList(additionalSolutions_);
2513 return internalGetAdditionalSolutionsFieldBuilder().addBuilder(
2514 com.google.ortools.sat.CpSolverSolution.getDefaultInstance());
2530 return internalGetAdditionalSolutionsFieldBuilder().addBuilder(
2531 index, com.google.ortools.sat.CpSolverSolution.getDefaultInstance());
2545 public java.util.List<com.google.ortools.sat.CpSolverSolution.Builder>
2547 return internalGetAdditionalSolutionsFieldBuilder().getBuilderList();
2549 private com.google.protobuf.RepeatedFieldBuilder<
2550 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder>
2551 internalGetAdditionalSolutionsFieldBuilder() {
2552 if (additionalSolutionsBuilder_ ==
null) {
2553 additionalSolutionsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
2554 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder>(
2555 additionalSolutions_,
2556 ((bitField0_ & 0x00000010) != 0),
2557 getParentForChildren(),
2559 additionalSolutions_ =
null;
2561 return additionalSolutionsBuilder_;
2564 private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_ =
2565 java.util.Collections.emptyList();
2566 private void ensureTightenedVariablesIsMutable() {
2567 if (!((bitField0_ & 0x00000020) != 0)) {
2568 tightenedVariables_ =
new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(tightenedVariables_);
2569 bitField0_ |= 0x00000020;
2573 private com.google.protobuf.RepeatedFieldBuilder<
2574 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> tightenedVariablesBuilder_;
2599 if (tightenedVariablesBuilder_ ==
null) {
2600 return java.util.Collections.unmodifiableList(tightenedVariables_);
2602 return tightenedVariablesBuilder_.getMessageList();
2628 if (tightenedVariablesBuilder_ ==
null) {
2629 return tightenedVariables_.size();
2631 return tightenedVariablesBuilder_.getCount();
2657 if (tightenedVariablesBuilder_ ==
null) {
2658 return tightenedVariables_.get(index);
2660 return tightenedVariablesBuilder_.getMessage(index);
2686 int index, com.google.ortools.sat.IntegerVariableProto value) {
2687 if (tightenedVariablesBuilder_ ==
null) {
2688 if (value ==
null) {
2689 throw new NullPointerException();
2691 ensureTightenedVariablesIsMutable();
2692 tightenedVariables_.set(index, value);
2695 tightenedVariablesBuilder_.setMessage(index, value);
2722 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2723 if (tightenedVariablesBuilder_ ==
null) {
2724 ensureTightenedVariablesIsMutable();
2725 tightenedVariables_.set(index, builderForValue.build());
2728 tightenedVariablesBuilder_.setMessage(index, builderForValue.build());
2755 if (tightenedVariablesBuilder_ ==
null) {
2756 if (value ==
null) {
2757 throw new NullPointerException();
2759 ensureTightenedVariablesIsMutable();
2760 tightenedVariables_.add(value);
2763 tightenedVariablesBuilder_.addMessage(value);
2790 int index, com.google.ortools.sat.IntegerVariableProto value) {
2791 if (tightenedVariablesBuilder_ ==
null) {
2792 if (value ==
null) {
2793 throw new NullPointerException();
2795 ensureTightenedVariablesIsMutable();
2796 tightenedVariables_.add(index, value);
2799 tightenedVariablesBuilder_.addMessage(index, value);
2826 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2827 if (tightenedVariablesBuilder_ ==
null) {
2828 ensureTightenedVariablesIsMutable();
2829 tightenedVariables_.add(builderForValue.build());
2832 tightenedVariablesBuilder_.addMessage(builderForValue.build());
2859 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2860 if (tightenedVariablesBuilder_ ==
null) {
2861 ensureTightenedVariablesIsMutable();
2862 tightenedVariables_.add(index, builderForValue.build());
2865 tightenedVariablesBuilder_.addMessage(index, builderForValue.build());
2892 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
2893 if (tightenedVariablesBuilder_ ==
null) {
2894 ensureTightenedVariablesIsMutable();
2895 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2896 values, tightenedVariables_);
2899 tightenedVariablesBuilder_.addAllMessages(values);
2926 if (tightenedVariablesBuilder_ ==
null) {
2927 tightenedVariables_ = java.util.Collections.emptyList();
2928 bitField0_ = (bitField0_ & ~0x00000020);
2931 tightenedVariablesBuilder_.clear();
2958 if (tightenedVariablesBuilder_ ==
null) {
2959 ensureTightenedVariablesIsMutable();
2960 tightenedVariables_.remove(index);
2963 tightenedVariablesBuilder_.remove(index);
2991 return internalGetTightenedVariablesFieldBuilder().getBuilder(index);
3017 if (tightenedVariablesBuilder_ ==
null) {
3018 return tightenedVariables_.get(index); }
else {
3019 return tightenedVariablesBuilder_.getMessageOrBuilder(index);
3044 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
3046 if (tightenedVariablesBuilder_ !=
null) {
3047 return tightenedVariablesBuilder_.getMessageOrBuilderList();
3049 return java.util.Collections.unmodifiableList(tightenedVariables_);
3075 return internalGetTightenedVariablesFieldBuilder().addBuilder(
3076 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
3102 return internalGetTightenedVariablesFieldBuilder().addBuilder(
3103 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
3127 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
3129 return internalGetTightenedVariablesFieldBuilder().getBuilderList();
3131 private com.google.protobuf.RepeatedFieldBuilder<
3132 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
3133 internalGetTightenedVariablesFieldBuilder() {
3134 if (tightenedVariablesBuilder_ ==
null) {
3135 tightenedVariablesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
3136 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
3137 tightenedVariables_,
3138 ((bitField0_ & 0x00000020) != 0),
3139 getParentForChildren(),
3141 tightenedVariables_ =
null;
3143 return tightenedVariablesBuilder_;
3146 private com.google.protobuf.Internal.IntList sufficientAssumptionsForInfeasibility_ = emptyIntList();
3147 private void ensureSufficientAssumptionsForInfeasibilityIsMutable() {
3148 if (!sufficientAssumptionsForInfeasibility_.isModifiable()) {
3149 sufficientAssumptionsForInfeasibility_ = makeMutableCopy(sufficientAssumptionsForInfeasibility_);
3151 bitField0_ |= 0x00000040;
3179 public java.util.List<java.lang.Integer>
3181 sufficientAssumptionsForInfeasibility_.makeImmutable();
3182 return sufficientAssumptionsForInfeasibility_;
3211 return sufficientAssumptionsForInfeasibility_.size();
3241 return sufficientAssumptionsForInfeasibility_.getInt(index);
3272 int index,
int value) {
3274 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3275 sufficientAssumptionsForInfeasibility_.setInt(index, value);
3276 bitField0_ |= 0x00000040;
3309 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3310 sufficientAssumptionsForInfeasibility_.addInt(value);
3311 bitField0_ |= 0x00000040;
3343 java.lang.Iterable<? extends java.lang.Integer> values) {
3344 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3345 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3346 values, sufficientAssumptionsForInfeasibility_);
3347 bitField0_ |= 0x00000040;
3378 sufficientAssumptionsForInfeasibility_ = emptyIntList();
3379 bitField0_ = (bitField0_ & ~0x00000040);
3385 private com.google.protobuf.SingleFieldBuilder<
3386 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> integerObjectiveBuilder_;
3398 return ((bitField0_ & 0x00000080) != 0);
3411 if (integerObjectiveBuilder_ ==
null) {
3412 return integerObjective_ ==
null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
3414 return integerObjectiveBuilder_.getMessage();
3427 if (integerObjectiveBuilder_ ==
null) {
3428 if (value ==
null) {
3429 throw new NullPointerException();
3431 integerObjective_ = value;
3433 integerObjectiveBuilder_.setMessage(value);
3435 bitField0_ |= 0x00000080;
3449 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
3450 if (integerObjectiveBuilder_ ==
null) {
3451 integerObjective_ = builderForValue.build();
3453 integerObjectiveBuilder_.setMessage(builderForValue.build());
3455 bitField0_ |= 0x00000080;
3469 if (integerObjectiveBuilder_ ==
null) {
3470 if (((bitField0_ & 0x00000080) != 0) &&
3471 integerObjective_ !=
null &&
3472 integerObjective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
3475 integerObjective_ = value;
3478 integerObjectiveBuilder_.mergeFrom(value);
3480 if (integerObjective_ !=
null) {
3481 bitField0_ |= 0x00000080;
3496 bitField0_ = (bitField0_ & ~0x00000080);
3497 integerObjective_ =
null;
3498 if (integerObjectiveBuilder_ !=
null) {
3499 integerObjectiveBuilder_.dispose();
3500 integerObjectiveBuilder_ =
null;
3515 bitField0_ |= 0x00000080;
3517 return internalGetIntegerObjectiveFieldBuilder().getBuilder();
3529 if (integerObjectiveBuilder_ !=
null) {
3530 return integerObjectiveBuilder_.getMessageOrBuilder();
3532 return integerObjective_ ==
null ?
3533 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
3545 private com.google.protobuf.SingleFieldBuilder<
3546 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
3547 internalGetIntegerObjectiveFieldBuilder() {
3548 if (integerObjectiveBuilder_ ==
null) {
3549 integerObjectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
3550 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
3552 getParentForChildren(),
3554 integerObjective_ =
null;
3556 return integerObjectiveBuilder_;
3559 private long innerObjectiveLowerBound_ ;
3577 return innerObjectiveLowerBound_;
3597 innerObjectiveLowerBound_ = value;
3598 bitField0_ |= 0x00000100;
3618 bitField0_ = (bitField0_ & ~0x00000100);
3619 innerObjectiveLowerBound_ = 0L;
3624 private long numIntegers_ ;
3639 return numIntegers_;
3656 numIntegers_ = value;
3657 bitField0_ |= 0x00000200;
3674 bitField0_ = (bitField0_ & ~0x00000200);
3680 private long numBooleans_ ;
3687 return numBooleans_;
3696 numBooleans_ = value;
3697 bitField0_ |= 0x00000400;
3706 bitField0_ = (bitField0_ & ~0x00000400);
3712 private long numFixedBooleans_ ;
3719 return numFixedBooleans_;
3728 numFixedBooleans_ = value;
3729 bitField0_ |= 0x00000800;
3738 bitField0_ = (bitField0_ & ~0x00000800);
3739 numFixedBooleans_ = 0L;
3744 private long numConflicts_ ;
3751 return numConflicts_;
3760 numConflicts_ = value;
3761 bitField0_ |= 0x00001000;
3770 bitField0_ = (bitField0_ & ~0x00001000);
3776 private long numBranches_ ;
3783 return numBranches_;
3792 numBranches_ = value;
3793 bitField0_ |= 0x00002000;
3802 bitField0_ = (bitField0_ & ~0x00002000);
3808 private long numBinaryPropagations_ ;
3815 return numBinaryPropagations_;
3824 numBinaryPropagations_ = value;
3825 bitField0_ |= 0x00004000;
3834 bitField0_ = (bitField0_ & ~0x00004000);
3835 numBinaryPropagations_ = 0L;
3840 private long numIntegerPropagations_ ;
3847 return numIntegerPropagations_;
3856 numIntegerPropagations_ = value;
3857 bitField0_ |= 0x00008000;
3866 bitField0_ = (bitField0_ & ~0x00008000);
3867 numIntegerPropagations_ = 0L;
3872 private long numRestarts_ ;
3879 return numRestarts_;
3888 numRestarts_ = value;
3889 bitField0_ |= 0x00010000;
3898 bitField0_ = (bitField0_ & ~0x00010000);
3904 private long numLpIterations_ ;
3911 return numLpIterations_;
3920 numLpIterations_ = value;
3921 bitField0_ |= 0x00020000;
3930 bitField0_ = (bitField0_ & ~0x00020000);
3931 numLpIterations_ = 0L;
3936 private double wallTime_ ;
3961 bitField0_ |= 0x00040000;
3974 bitField0_ = (bitField0_ & ~0x00040000);
3980 private double userTime_ ;
3997 bitField0_ |= 0x00080000;
4006 bitField0_ = (bitField0_ & ~0x00080000);
4012 private double deterministicTime_ ;
4019 return deterministicTime_;
4028 deterministicTime_ = value;
4029 bitField0_ |= 0x00100000;
4038 bitField0_ = (bitField0_ & ~0x00100000);
4039 deterministicTime_ = 0D;
4044 private double gapIntegral_ ;
4055 return gapIntegral_;
4068 gapIntegral_ = value;
4069 bitField0_ |= 0x00200000;
4082 bitField0_ = (bitField0_ & ~0x00200000);
4088 private java.lang.Object solutionInfo_ =
"";
4099 java.lang.Object ref = solutionInfo_;
4100 if (!(ref instanceof java.lang.String)) {
4101 com.google.protobuf.ByteString bs =
4102 (com.google.protobuf.ByteString) ref;
4103 java.lang.String s = bs.toStringUtf8();
4107 return (java.lang.String) ref;
4119 public com.google.protobuf.ByteString
4121 java.lang.Object ref = solutionInfo_;
4122 if (ref instanceof String) {
4123 com.google.protobuf.ByteString b =
4124 com.google.protobuf.ByteString.copyFromUtf8(
4125 (java.lang.String) ref);
4129 return (com.google.protobuf.ByteString) ref;
4143 java.lang.String value) {
4144 if (value ==
null) {
throw new NullPointerException(); }
4145 solutionInfo_ = value;
4146 bitField0_ |= 0x00400000;
4161 bitField0_ = (bitField0_ & ~0x00400000);
4176 com.google.protobuf.ByteString value) {
4177 if (value ==
null) {
throw new NullPointerException(); }
4178 checkByteStringIsUtf8(value);
4179 solutionInfo_ = value;
4180 bitField0_ |= 0x00400000;
4185 private java.lang.Object solveLog_ =
"";
4196 java.lang.Object ref = solveLog_;
4197 if (!(ref instanceof java.lang.String)) {
4198 com.google.protobuf.ByteString bs =
4199 (com.google.protobuf.ByteString) ref;
4200 java.lang.String s = bs.toStringUtf8();
4204 return (java.lang.String) ref;
4216 public com.google.protobuf.ByteString
4218 java.lang.Object ref = solveLog_;
4219 if (ref instanceof String) {
4220 com.google.protobuf.ByteString b =
4221 com.google.protobuf.ByteString.copyFromUtf8(
4222 (java.lang.String) ref);
4226 return (com.google.protobuf.ByteString) ref;
4240 java.lang.String value) {
4241 if (value ==
null) {
throw new NullPointerException(); }
4243 bitField0_ |= 0x00800000;
4258 bitField0_ = (bitField0_ & ~0x00800000);
4273 com.google.protobuf.ByteString value) {
4274 if (value ==
null) {
throw new NullPointerException(); }
4275 checkByteStringIsUtf8(value);
4277 bitField0_ |= 0x00800000;
4288 DEFAULT_INSTANCE =
new com.google.ortools.sat.CpSolverResponse();
4292 return DEFAULT_INSTANCE;
4299 com.google.protobuf.CodedInputStream input,
4300 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4301 throws com.google.protobuf.InvalidProtocolBufferException {
4304 builder.mergeFrom(input, extensionRegistry);
4305 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
4306 throw e.setUnfinishedMessage(builder.buildPartial());
4307 }
catch (com.google.protobuf.UninitializedMessageException e) {
4308 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4309 }
catch (java.io.IOException e) {
4310 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4311 .setUnfinishedMessage(builder.buildPartial());
4313 return builder.buildPartial();
4317 public static com.google.protobuf.Parser<CpSolverResponse>
parser() {
4328 return DEFAULT_INSTANCE;