Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
CpSolverResponse.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
16public final class CpSolverResponse extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.sat.CpSolverResponse)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 26,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 CpSolverResponse.class.getName());
29 }
30 // Use CpSolverResponse.newBuilder() to construct.
31 private CpSolverResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private CpSolverResponse() {
35 status_ = 0;
36 solution_ = emptyLongList();
37 additionalSolutions_ = java.util.Collections.emptyList();
38 tightenedVariables_ = java.util.Collections.emptyList();
39 sufficientAssumptionsForInfeasibility_ = emptyIntList();
40 solutionInfo_ = "";
41 solveLog_ = "";
42 }
43
44 public static final com.google.protobuf.Descriptors.Descriptor
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
47 }
48
49 @java.lang.Override
50 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
52 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
53 .ensureFieldAccessorsInitialized(
54 com.google.ortools.sat.CpSolverResponse.class, com.google.ortools.sat.CpSolverResponse.Builder.class);
55 }
56
57 private int bitField0_;
58 public static final int STATUS_FIELD_NUMBER = 1;
59 private int status_ = 0;
68 @java.lang.Override public int getStatusValue() {
69 return status_;
70 }
79 @java.lang.Override public com.google.ortools.sat.CpSolverStatus getStatus() {
80 com.google.ortools.sat.CpSolverStatus result = com.google.ortools.sat.CpSolverStatus.forNumber(status_);
81 return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
82 }
83
84 public static final int SOLUTION_FIELD_NUMBER = 2;
85 @SuppressWarnings("serial")
86 private com.google.protobuf.Internal.LongList solution_ =
87 emptyLongList();
99 @java.lang.Override
100 public java.util.List<java.lang.Long>
102 return solution_;
103 }
115 public int getSolutionCount() {
116 return solution_.size();
117 }
130 public long getSolution(int index) {
131 return solution_.getLong(index);
132 }
133 private int solutionMemoizedSerializedSize = -1;
134
135 public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 3;
136 private double objectiveValue_ = 0D;
148 @java.lang.Override
149 public double getObjectiveValue() {
150 return objectiveValue_;
151 }
152
153 public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 4;
154 private double bestObjectiveBound_ = 0D;
165 @java.lang.Override
166 public double getBestObjectiveBound() {
167 return bestObjectiveBound_;
168 }
169
170 public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 27;
171 @SuppressWarnings("serial")
172 private java.util.List<com.google.ortools.sat.CpSolverSolution> additionalSolutions_;
185 @java.lang.Override
186 public java.util.List<com.google.ortools.sat.CpSolverSolution> getAdditionalSolutionsList() {
187 return additionalSolutions_;
188 }
201 @java.lang.Override
202 public java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder>
204 return additionalSolutions_;
205 }
218 @java.lang.Override
220 return additionalSolutions_.size();
221 }
234 @java.lang.Override
236 return additionalSolutions_.get(index);
237 }
250 @java.lang.Override
252 int index) {
253 return additionalSolutions_.get(index);
254 }
255
256 public static final int TIGHTENED_VARIABLES_FIELD_NUMBER = 21;
257 @SuppressWarnings("serial")
258 private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_;
281 @java.lang.Override
282 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getTightenedVariablesList() {
283 return tightenedVariables_;
284 }
307 @java.lang.Override
308 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
310 return tightenedVariables_;
311 }
334 @java.lang.Override
336 return tightenedVariables_.size();
337 }
360 @java.lang.Override
362 return tightenedVariables_.get(index);
363 }
386 @java.lang.Override
388 int index) {
389 return tightenedVariables_.get(index);
390 }
391
393 @SuppressWarnings("serial")
394 private com.google.protobuf.Internal.IntList sufficientAssumptionsForInfeasibility_ =
395 emptyIntList();
422 @java.lang.Override
423 public java.util.List<java.lang.Integer>
425 return sufficientAssumptionsForInfeasibility_;
426 }
454 return sufficientAssumptionsForInfeasibility_.size();
455 }
484 return sufficientAssumptionsForInfeasibility_.getInt(index);
485 }
486 private int sufficientAssumptionsForInfeasibilityMemoizedSerializedSize = -1;
487
488 public static final int INTEGER_OBJECTIVE_FIELD_NUMBER = 28;
489 private com.google.ortools.sat.CpObjectiveProto integerObjective_;
500 @java.lang.Override
501 public boolean hasIntegerObjective() {
502 return ((bitField0_ & 0x00000001) != 0);
503 }
514 @java.lang.Override
516 return integerObjective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
517 }
527 @java.lang.Override
529 return integerObjective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
530 }
531
532 public static final int INNER_OBJECTIVE_LOWER_BOUND_FIELD_NUMBER = 29;
533 private long innerObjectiveLowerBound_ = 0L;
547 @java.lang.Override
549 return innerObjectiveLowerBound_;
550 }
551
552 public static final int NUM_INTEGERS_FIELD_NUMBER = 30;
553 private long numIntegers_ = 0L;
566 @java.lang.Override
567 public long getNumIntegers() {
568 return numIntegers_;
569 }
570
571 public static final int NUM_BOOLEANS_FIELD_NUMBER = 10;
572 private long numBooleans_ = 0L;
577 @java.lang.Override
578 public long getNumBooleans() {
579 return numBooleans_;
580 }
581
582 public static final int NUM_CONFLICTS_FIELD_NUMBER = 11;
583 private long numConflicts_ = 0L;
588 @java.lang.Override
589 public long getNumConflicts() {
590 return numConflicts_;
591 }
592
593 public static final int NUM_BRANCHES_FIELD_NUMBER = 12;
594 private long numBranches_ = 0L;
599 @java.lang.Override
600 public long getNumBranches() {
601 return numBranches_;
602 }
603
604 public static final int NUM_BINARY_PROPAGATIONS_FIELD_NUMBER = 13;
605 private long numBinaryPropagations_ = 0L;
610 @java.lang.Override
612 return numBinaryPropagations_;
613 }
614
615 public static final int NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER = 14;
616 private long numIntegerPropagations_ = 0L;
621 @java.lang.Override
623 return numIntegerPropagations_;
624 }
625
626 public static final int NUM_RESTARTS_FIELD_NUMBER = 24;
627 private long numRestarts_ = 0L;
632 @java.lang.Override
633 public long getNumRestarts() {
634 return numRestarts_;
635 }
636
637 public static final int NUM_LP_ITERATIONS_FIELD_NUMBER = 25;
638 private long numLpIterations_ = 0L;
643 @java.lang.Override
644 public long getNumLpIterations() {
645 return numLpIterations_;
646 }
647
648 public static final int WALL_TIME_FIELD_NUMBER = 15;
649 private double wallTime_ = 0D;
658 @java.lang.Override
659 public double getWallTime() {
660 return wallTime_;
661 }
662
663 public static final int USER_TIME_FIELD_NUMBER = 16;
664 private double userTime_ = 0D;
669 @java.lang.Override
670 public double getUserTime() {
671 return userTime_;
672 }
673
674 public static final int DETERMINISTIC_TIME_FIELD_NUMBER = 17;
675 private double deterministicTime_ = 0D;
680 @java.lang.Override
681 public double getDeterministicTime() {
682 return deterministicTime_;
683 }
684
685 public static final int GAP_INTEGRAL_FIELD_NUMBER = 22;
686 private double gapIntegral_ = 0D;
695 @java.lang.Override
696 public double getGapIntegral() {
697 return gapIntegral_;
698 }
699
700 public static final int SOLUTION_INFO_FIELD_NUMBER = 20;
701 @SuppressWarnings("serial")
702 private volatile java.lang.Object solutionInfo_ = "";
712 @java.lang.Override
713 public java.lang.String getSolutionInfo() {
714 java.lang.Object ref = solutionInfo_;
715 if (ref instanceof java.lang.String) {
716 return (java.lang.String) ref;
717 } else {
718 com.google.protobuf.ByteString bs =
719 (com.google.protobuf.ByteString) ref;
720 java.lang.String s = bs.toStringUtf8();
721 solutionInfo_ = s;
722 return s;
723 }
724 }
734 @java.lang.Override
735 public com.google.protobuf.ByteString
737 java.lang.Object ref = solutionInfo_;
738 if (ref instanceof java.lang.String) {
739 com.google.protobuf.ByteString b =
740 com.google.protobuf.ByteString.copyFromUtf8(
741 (java.lang.String) ref);
742 solutionInfo_ = b;
743 return b;
744 } else {
745 return (com.google.protobuf.ByteString) ref;
746 }
747 }
748
749 public static final int SOLVE_LOG_FIELD_NUMBER = 26;
750 @SuppressWarnings("serial")
751 private volatile java.lang.Object solveLog_ = "";
761 @java.lang.Override
762 public java.lang.String getSolveLog() {
763 java.lang.Object ref = solveLog_;
764 if (ref instanceof java.lang.String) {
765 return (java.lang.String) ref;
766 } else {
767 com.google.protobuf.ByteString bs =
768 (com.google.protobuf.ByteString) ref;
769 java.lang.String s = bs.toStringUtf8();
770 solveLog_ = s;
771 return s;
772 }
773 }
783 @java.lang.Override
784 public com.google.protobuf.ByteString
786 java.lang.Object ref = solveLog_;
787 if (ref instanceof java.lang.String) {
788 com.google.protobuf.ByteString b =
789 com.google.protobuf.ByteString.copyFromUtf8(
790 (java.lang.String) ref);
791 solveLog_ = b;
792 return b;
793 } else {
794 return (com.google.protobuf.ByteString) ref;
795 }
796 }
797
798 private byte memoizedIsInitialized = -1;
799 @java.lang.Override
800 public final boolean isInitialized() {
801 byte isInitialized = memoizedIsInitialized;
802 if (isInitialized == 1) return true;
803 if (isInitialized == 0) return false;
804
805 memoizedIsInitialized = 1;
806 return true;
807 }
808
809 @java.lang.Override
810 public void writeTo(com.google.protobuf.CodedOutputStream output)
811 throws java.io.IOException {
813 if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
814 output.writeEnum(1, status_);
815 }
816 if (getSolutionList().size() > 0) {
817 output.writeUInt32NoTag(18);
818 output.writeUInt32NoTag(solutionMemoizedSerializedSize);
819 }
820 for (int i = 0; i < solution_.size(); i++) {
821 output.writeInt64NoTag(solution_.getLong(i));
822 }
823 if (java.lang.Double.doubleToRawLongBits(objectiveValue_) != 0) {
824 output.writeDouble(3, objectiveValue_);
825 }
826 if (java.lang.Double.doubleToRawLongBits(bestObjectiveBound_) != 0) {
827 output.writeDouble(4, bestObjectiveBound_);
828 }
829 if (numBooleans_ != 0L) {
830 output.writeInt64(10, numBooleans_);
831 }
832 if (numConflicts_ != 0L) {
833 output.writeInt64(11, numConflicts_);
834 }
835 if (numBranches_ != 0L) {
836 output.writeInt64(12, numBranches_);
837 }
838 if (numBinaryPropagations_ != 0L) {
839 output.writeInt64(13, numBinaryPropagations_);
840 }
841 if (numIntegerPropagations_ != 0L) {
842 output.writeInt64(14, numIntegerPropagations_);
843 }
844 if (java.lang.Double.doubleToRawLongBits(wallTime_) != 0) {
845 output.writeDouble(15, wallTime_);
846 }
847 if (java.lang.Double.doubleToRawLongBits(userTime_) != 0) {
848 output.writeDouble(16, userTime_);
849 }
850 if (java.lang.Double.doubleToRawLongBits(deterministicTime_) != 0) {
851 output.writeDouble(17, deterministicTime_);
852 }
853 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solutionInfo_)) {
854 com.google.protobuf.GeneratedMessage.writeString(output, 20, solutionInfo_);
855 }
856 for (int i = 0; i < tightenedVariables_.size(); i++) {
857 output.writeMessage(21, tightenedVariables_.get(i));
858 }
859 if (java.lang.Double.doubleToRawLongBits(gapIntegral_) != 0) {
860 output.writeDouble(22, gapIntegral_);
861 }
863 output.writeUInt32NoTag(186);
864 output.writeUInt32NoTag(sufficientAssumptionsForInfeasibilityMemoizedSerializedSize);
865 }
866 for (int i = 0; i < sufficientAssumptionsForInfeasibility_.size(); i++) {
867 output.writeInt32NoTag(sufficientAssumptionsForInfeasibility_.getInt(i));
868 }
869 if (numRestarts_ != 0L) {
870 output.writeInt64(24, numRestarts_);
871 }
872 if (numLpIterations_ != 0L) {
873 output.writeInt64(25, numLpIterations_);
874 }
875 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solveLog_)) {
876 com.google.protobuf.GeneratedMessage.writeString(output, 26, solveLog_);
877 }
878 for (int i = 0; i < additionalSolutions_.size(); i++) {
879 output.writeMessage(27, additionalSolutions_.get(i));
880 }
881 if (((bitField0_ & 0x00000001) != 0)) {
882 output.writeMessage(28, getIntegerObjective());
883 }
884 if (innerObjectiveLowerBound_ != 0L) {
885 output.writeInt64(29, innerObjectiveLowerBound_);
886 }
887 if (numIntegers_ != 0L) {
888 output.writeInt64(30, numIntegers_);
889 }
890 getUnknownFields().writeTo(output);
891 }
892
893 @java.lang.Override
894 public int getSerializedSize() {
895 int size = memoizedSize;
896 if (size != -1) return size;
897
898 size = 0;
899 if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
900 size += com.google.protobuf.CodedOutputStream
901 .computeEnumSize(1, status_);
902 }
903 {
904 int dataSize = 0;
905 for (int i = 0; i < solution_.size(); i++) {
906 dataSize += com.google.protobuf.CodedOutputStream
907 .computeInt64SizeNoTag(solution_.getLong(i));
908 }
909 size += dataSize;
910 if (!getSolutionList().isEmpty()) {
911 size += 1;
912 size += com.google.protobuf.CodedOutputStream
913 .computeInt32SizeNoTag(dataSize);
914 }
915 solutionMemoizedSerializedSize = dataSize;
916 }
917 if (java.lang.Double.doubleToRawLongBits(objectiveValue_) != 0) {
918 size += com.google.protobuf.CodedOutputStream
919 .computeDoubleSize(3, objectiveValue_);
920 }
921 if (java.lang.Double.doubleToRawLongBits(bestObjectiveBound_) != 0) {
922 size += com.google.protobuf.CodedOutputStream
923 .computeDoubleSize(4, bestObjectiveBound_);
924 }
925 if (numBooleans_ != 0L) {
926 size += com.google.protobuf.CodedOutputStream
927 .computeInt64Size(10, numBooleans_);
928 }
929 if (numConflicts_ != 0L) {
930 size += com.google.protobuf.CodedOutputStream
931 .computeInt64Size(11, numConflicts_);
932 }
933 if (numBranches_ != 0L) {
934 size += com.google.protobuf.CodedOutputStream
935 .computeInt64Size(12, numBranches_);
936 }
937 if (numBinaryPropagations_ != 0L) {
938 size += com.google.protobuf.CodedOutputStream
939 .computeInt64Size(13, numBinaryPropagations_);
940 }
941 if (numIntegerPropagations_ != 0L) {
942 size += com.google.protobuf.CodedOutputStream
943 .computeInt64Size(14, numIntegerPropagations_);
944 }
945 if (java.lang.Double.doubleToRawLongBits(wallTime_) != 0) {
946 size += com.google.protobuf.CodedOutputStream
947 .computeDoubleSize(15, wallTime_);
948 }
949 if (java.lang.Double.doubleToRawLongBits(userTime_) != 0) {
950 size += com.google.protobuf.CodedOutputStream
951 .computeDoubleSize(16, userTime_);
952 }
953 if (java.lang.Double.doubleToRawLongBits(deterministicTime_) != 0) {
954 size += com.google.protobuf.CodedOutputStream
955 .computeDoubleSize(17, deterministicTime_);
956 }
957 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solutionInfo_)) {
958 size += com.google.protobuf.GeneratedMessage.computeStringSize(20, solutionInfo_);
959 }
960 for (int i = 0; i < tightenedVariables_.size(); i++) {
961 size += com.google.protobuf.CodedOutputStream
962 .computeMessageSize(21, tightenedVariables_.get(i));
963 }
964 if (java.lang.Double.doubleToRawLongBits(gapIntegral_) != 0) {
965 size += com.google.protobuf.CodedOutputStream
966 .computeDoubleSize(22, gapIntegral_);
967 }
968 {
969 int dataSize = 0;
970 for (int i = 0; i < sufficientAssumptionsForInfeasibility_.size(); i++) {
971 dataSize += com.google.protobuf.CodedOutputStream
972 .computeInt32SizeNoTag(sufficientAssumptionsForInfeasibility_.getInt(i));
973 }
974 size += dataSize;
976 size += 2;
977 size += com.google.protobuf.CodedOutputStream
978 .computeInt32SizeNoTag(dataSize);
979 }
980 sufficientAssumptionsForInfeasibilityMemoizedSerializedSize = dataSize;
981 }
982 if (numRestarts_ != 0L) {
983 size += com.google.protobuf.CodedOutputStream
984 .computeInt64Size(24, numRestarts_);
985 }
986 if (numLpIterations_ != 0L) {
987 size += com.google.protobuf.CodedOutputStream
988 .computeInt64Size(25, numLpIterations_);
989 }
990 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(solveLog_)) {
991 size += com.google.protobuf.GeneratedMessage.computeStringSize(26, solveLog_);
992 }
993 for (int i = 0; i < additionalSolutions_.size(); i++) {
994 size += com.google.protobuf.CodedOutputStream
995 .computeMessageSize(27, additionalSolutions_.get(i));
996 }
997 if (((bitField0_ & 0x00000001) != 0)) {
998 size += com.google.protobuf.CodedOutputStream
999 .computeMessageSize(28, getIntegerObjective());
1000 }
1001 if (innerObjectiveLowerBound_ != 0L) {
1002 size += com.google.protobuf.CodedOutputStream
1003 .computeInt64Size(29, innerObjectiveLowerBound_);
1004 }
1005 if (numIntegers_ != 0L) {
1006 size += com.google.protobuf.CodedOutputStream
1007 .computeInt64Size(30, numIntegers_);
1008 }
1009 size += getUnknownFields().getSerializedSize();
1010 memoizedSize = size;
1011 return size;
1012 }
1013
1014 @java.lang.Override
1015 public boolean equals(final java.lang.Object obj) {
1016 if (obj == this) {
1017 return true;
1018 }
1019 if (!(obj instanceof com.google.ortools.sat.CpSolverResponse)) {
1020 return super.equals(obj);
1021 }
1022 com.google.ortools.sat.CpSolverResponse other = (com.google.ortools.sat.CpSolverResponse) obj;
1023
1024 if (status_ != other.status_) return false;
1025 if (!getSolutionList()
1026 .equals(other.getSolutionList())) return false;
1027 if (java.lang.Double.doubleToLongBits(getObjectiveValue())
1028 != java.lang.Double.doubleToLongBits(
1029 other.getObjectiveValue())) return false;
1030 if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
1031 != java.lang.Double.doubleToLongBits(
1032 other.getBestObjectiveBound())) return false;
1034 .equals(other.getAdditionalSolutionsList())) return false;
1036 .equals(other.getTightenedVariablesList())) return false;
1039 if (hasIntegerObjective() != other.hasIntegerObjective()) return false;
1040 if (hasIntegerObjective()) {
1041 if (!getIntegerObjective()
1042 .equals(other.getIntegerObjective())) return false;
1043 }
1045 != other.getInnerObjectiveLowerBound()) return false;
1046 if (getNumIntegers()
1047 != other.getNumIntegers()) return false;
1048 if (getNumBooleans()
1049 != other.getNumBooleans()) return false;
1050 if (getNumConflicts()
1051 != other.getNumConflicts()) return false;
1052 if (getNumBranches()
1053 != other.getNumBranches()) return false;
1055 != other.getNumBinaryPropagations()) return false;
1057 != other.getNumIntegerPropagations()) return false;
1058 if (getNumRestarts()
1059 != other.getNumRestarts()) return false;
1060 if (getNumLpIterations()
1061 != other.getNumLpIterations()) return false;
1062 if (java.lang.Double.doubleToLongBits(getWallTime())
1063 != java.lang.Double.doubleToLongBits(
1064 other.getWallTime())) return false;
1065 if (java.lang.Double.doubleToLongBits(getUserTime())
1066 != java.lang.Double.doubleToLongBits(
1067 other.getUserTime())) return false;
1068 if (java.lang.Double.doubleToLongBits(getDeterministicTime())
1069 != java.lang.Double.doubleToLongBits(
1070 other.getDeterministicTime())) return false;
1071 if (java.lang.Double.doubleToLongBits(getGapIntegral())
1072 != java.lang.Double.doubleToLongBits(
1073 other.getGapIntegral())) return false;
1074 if (!getSolutionInfo()
1075 .equals(other.getSolutionInfo())) return false;
1076 if (!getSolveLog()
1077 .equals(other.getSolveLog())) return false;
1078 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1079 return true;
1080 }
1081
1082 @java.lang.Override
1083 public int hashCode() {
1084 if (memoizedHashCode != 0) {
1085 return memoizedHashCode;
1086 }
1087 int hash = 41;
1088 hash = (19 * hash) + getDescriptor().hashCode();
1089 hash = (37 * hash) + STATUS_FIELD_NUMBER;
1090 hash = (53 * hash) + status_;
1091 if (getSolutionCount() > 0) {
1092 hash = (37 * hash) + SOLUTION_FIELD_NUMBER;
1093 hash = (53 * hash) + getSolutionList().hashCode();
1094 }
1095 hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
1096 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1097 java.lang.Double.doubleToLongBits(getObjectiveValue()));
1098 hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
1099 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1100 java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
1101 if (getAdditionalSolutionsCount() > 0) {
1102 hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
1103 hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
1104 }
1105 if (getTightenedVariablesCount() > 0) {
1106 hash = (37 * hash) + TIGHTENED_VARIABLES_FIELD_NUMBER;
1107 hash = (53 * hash) + getTightenedVariablesList().hashCode();
1108 }
1111 hash = (53 * hash) + getSufficientAssumptionsForInfeasibilityList().hashCode();
1112 }
1113 if (hasIntegerObjective()) {
1114 hash = (37 * hash) + INTEGER_OBJECTIVE_FIELD_NUMBER;
1115 hash = (53 * hash) + getIntegerObjective().hashCode();
1116 }
1117 hash = (37 * hash) + INNER_OBJECTIVE_LOWER_BOUND_FIELD_NUMBER;
1118 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1120 hash = (37 * hash) + NUM_INTEGERS_FIELD_NUMBER;
1121 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1122 getNumIntegers());
1123 hash = (37 * hash) + NUM_BOOLEANS_FIELD_NUMBER;
1124 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1125 getNumBooleans());
1126 hash = (37 * hash) + NUM_CONFLICTS_FIELD_NUMBER;
1127 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1128 getNumConflicts());
1129 hash = (37 * hash) + NUM_BRANCHES_FIELD_NUMBER;
1130 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1131 getNumBranches());
1132 hash = (37 * hash) + NUM_BINARY_PROPAGATIONS_FIELD_NUMBER;
1133 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1135 hash = (37 * hash) + NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER;
1136 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1138 hash = (37 * hash) + NUM_RESTARTS_FIELD_NUMBER;
1139 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1140 getNumRestarts());
1141 hash = (37 * hash) + NUM_LP_ITERATIONS_FIELD_NUMBER;
1142 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1144 hash = (37 * hash) + WALL_TIME_FIELD_NUMBER;
1145 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1146 java.lang.Double.doubleToLongBits(getWallTime()));
1147 hash = (37 * hash) + USER_TIME_FIELD_NUMBER;
1148 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1149 java.lang.Double.doubleToLongBits(getUserTime()));
1150 hash = (37 * hash) + DETERMINISTIC_TIME_FIELD_NUMBER;
1151 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1152 java.lang.Double.doubleToLongBits(getDeterministicTime()));
1153 hash = (37 * hash) + GAP_INTEGRAL_FIELD_NUMBER;
1154 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
1155 java.lang.Double.doubleToLongBits(getGapIntegral()));
1156 hash = (37 * hash) + SOLUTION_INFO_FIELD_NUMBER;
1157 hash = (53 * hash) + getSolutionInfo().hashCode();
1158 hash = (37 * hash) + SOLVE_LOG_FIELD_NUMBER;
1159 hash = (53 * hash) + getSolveLog().hashCode();
1160 hash = (29 * hash) + getUnknownFields().hashCode();
1161 memoizedHashCode = hash;
1162 return hash;
1163 }
1164
1166 java.nio.ByteBuffer data)
1167 throws com.google.protobuf.InvalidProtocolBufferException {
1168 return PARSER.parseFrom(data);
1169 }
1171 java.nio.ByteBuffer data,
1172 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1173 throws com.google.protobuf.InvalidProtocolBufferException {
1174 return PARSER.parseFrom(data, extensionRegistry);
1175 }
1177 com.google.protobuf.ByteString data)
1178 throws com.google.protobuf.InvalidProtocolBufferException {
1179 return PARSER.parseFrom(data);
1180 }
1182 com.google.protobuf.ByteString data,
1183 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1184 throws com.google.protobuf.InvalidProtocolBufferException {
1185 return PARSER.parseFrom(data, extensionRegistry);
1186 }
1188 throws com.google.protobuf.InvalidProtocolBufferException {
1189 return PARSER.parseFrom(data);
1190 }
1192 byte[] data,
1193 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1194 throws com.google.protobuf.InvalidProtocolBufferException {
1195 return PARSER.parseFrom(data, extensionRegistry);
1196 }
1197 public static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input)
1198 throws java.io.IOException {
1199 return com.google.protobuf.GeneratedMessage
1200 .parseWithIOException(PARSER, input);
1201 }
1203 java.io.InputStream input,
1204 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1205 throws java.io.IOException {
1206 return com.google.protobuf.GeneratedMessage
1207 .parseWithIOException(PARSER, input, extensionRegistry);
1208 }
1209
1210 public static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input)
1211 throws java.io.IOException {
1212 return com.google.protobuf.GeneratedMessage
1213 .parseDelimitedWithIOException(PARSER, input);
1214 }
1215
1217 java.io.InputStream input,
1218 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1219 throws java.io.IOException {
1220 return com.google.protobuf.GeneratedMessage
1221 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1222 }
1224 com.google.protobuf.CodedInputStream input)
1225 throws java.io.IOException {
1226 return com.google.protobuf.GeneratedMessage
1227 .parseWithIOException(PARSER, input);
1228 }
1230 com.google.protobuf.CodedInputStream input,
1231 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1232 throws java.io.IOException {
1233 return com.google.protobuf.GeneratedMessage
1234 .parseWithIOException(PARSER, input, extensionRegistry);
1235 }
1236
1237 @java.lang.Override
1238 public Builder newBuilderForType() { return newBuilder(); }
1239 public static Builder newBuilder() {
1240 return DEFAULT_INSTANCE.toBuilder();
1241 }
1242 public static Builder newBuilder(com.google.ortools.sat.CpSolverResponse prototype) {
1243 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1244 }
1245 @java.lang.Override
1247 return this == DEFAULT_INSTANCE
1248 ? new Builder() : new Builder().mergeFrom(this);
1249 }
1250
1251 @java.lang.Override
1253 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1254 Builder builder = new Builder(parent);
1255 return builder;
1256 }
1266 public static final class Builder extends
1267 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
1268 // @@protoc_insertion_point(builder_implements:operations_research.sat.CpSolverResponse)
1269 com.google.ortools.sat.CpSolverResponseOrBuilder {
1270 public static final com.google.protobuf.Descriptors.Descriptor
1272 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1273 }
1274
1275 @java.lang.Override
1276 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1278 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
1279 .ensureFieldAccessorsInitialized(
1280 com.google.ortools.sat.CpSolverResponse.class, com.google.ortools.sat.CpSolverResponse.Builder.class);
1281 }
1282
1283 // Construct using com.google.ortools.sat.CpSolverResponse.newBuilder()
1284 private Builder() {
1285 maybeForceBuilderInitialization();
1286 }
1287
1288 private Builder(
1289 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1290 super(parent);
1291 maybeForceBuilderInitialization();
1292 }
1293 private void maybeForceBuilderInitialization() {
1294 if (com.google.protobuf.GeneratedMessage
1295 .alwaysUseFieldBuilders) {
1296 getAdditionalSolutionsFieldBuilder();
1297 getTightenedVariablesFieldBuilder();
1298 getIntegerObjectiveFieldBuilder();
1299 }
1300 }
1301 @java.lang.Override
1302 public Builder clear() {
1303 super.clear();
1304 bitField0_ = 0;
1305 status_ = 0;
1306 solution_ = emptyLongList();
1307 objectiveValue_ = 0D;
1308 bestObjectiveBound_ = 0D;
1309 if (additionalSolutionsBuilder_ == null) {
1310 additionalSolutions_ = java.util.Collections.emptyList();
1311 } else {
1312 additionalSolutions_ = null;
1313 additionalSolutionsBuilder_.clear();
1314 }
1315 bitField0_ = (bitField0_ & ~0x00000010);
1316 if (tightenedVariablesBuilder_ == null) {
1317 tightenedVariables_ = java.util.Collections.emptyList();
1318 } else {
1319 tightenedVariables_ = null;
1320 tightenedVariablesBuilder_.clear();
1321 }
1322 bitField0_ = (bitField0_ & ~0x00000020);
1323 sufficientAssumptionsForInfeasibility_ = emptyIntList();
1324 integerObjective_ = null;
1325 if (integerObjectiveBuilder_ != null) {
1326 integerObjectiveBuilder_.dispose();
1327 integerObjectiveBuilder_ = null;
1328 }
1329 innerObjectiveLowerBound_ = 0L;
1330 numIntegers_ = 0L;
1331 numBooleans_ = 0L;
1332 numConflicts_ = 0L;
1333 numBranches_ = 0L;
1334 numBinaryPropagations_ = 0L;
1335 numIntegerPropagations_ = 0L;
1336 numRestarts_ = 0L;
1337 numLpIterations_ = 0L;
1338 wallTime_ = 0D;
1339 userTime_ = 0D;
1340 deterministicTime_ = 0D;
1341 gapIntegral_ = 0D;
1342 solutionInfo_ = "";
1343 solveLog_ = "";
1344 return this;
1345 }
1346
1347 @java.lang.Override
1348 public com.google.protobuf.Descriptors.Descriptor
1350 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1351 }
1352
1353 @java.lang.Override
1355 return com.google.ortools.sat.CpSolverResponse.getDefaultInstance();
1356 }
1357
1358 @java.lang.Override
1361 if (!result.isInitialized()) {
1362 throw newUninitializedMessageException(result);
1363 }
1364 return result;
1365 }
1366
1367 @java.lang.Override
1369 com.google.ortools.sat.CpSolverResponse result = new com.google.ortools.sat.CpSolverResponse(this);
1370 buildPartialRepeatedFields(result);
1371 if (bitField0_ != 0) { buildPartial0(result); }
1372 onBuilt();
1373 return result;
1374 }
1375
1376 private void buildPartialRepeatedFields(com.google.ortools.sat.CpSolverResponse result) {
1377 if (additionalSolutionsBuilder_ == null) {
1378 if (((bitField0_ & 0x00000010) != 0)) {
1379 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
1380 bitField0_ = (bitField0_ & ~0x00000010);
1381 }
1382 result.additionalSolutions_ = additionalSolutions_;
1383 } else {
1384 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
1385 }
1386 if (tightenedVariablesBuilder_ == null) {
1387 if (((bitField0_ & 0x00000020) != 0)) {
1388 tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
1389 bitField0_ = (bitField0_ & ~0x00000020);
1390 }
1391 result.tightenedVariables_ = tightenedVariables_;
1392 } else {
1393 result.tightenedVariables_ = tightenedVariablesBuilder_.build();
1394 }
1395 }
1396
1397 private void buildPartial0(com.google.ortools.sat.CpSolverResponse result) {
1398 int from_bitField0_ = bitField0_;
1399 if (((from_bitField0_ & 0x00000001) != 0)) {
1400 result.status_ = status_;
1401 }
1402 if (((from_bitField0_ & 0x00000002) != 0)) {
1403 solution_.makeImmutable();
1404 result.solution_ = solution_;
1405 }
1406 if (((from_bitField0_ & 0x00000004) != 0)) {
1407 result.objectiveValue_ = objectiveValue_;
1408 }
1409 if (((from_bitField0_ & 0x00000008) != 0)) {
1410 result.bestObjectiveBound_ = bestObjectiveBound_;
1411 }
1412 if (((from_bitField0_ & 0x00000040) != 0)) {
1413 sufficientAssumptionsForInfeasibility_.makeImmutable();
1414 result.sufficientAssumptionsForInfeasibility_ = sufficientAssumptionsForInfeasibility_;
1415 }
1416 int to_bitField0_ = 0;
1417 if (((from_bitField0_ & 0x00000080) != 0)) {
1418 result.integerObjective_ = integerObjectiveBuilder_ == null
1419 ? integerObjective_
1420 : integerObjectiveBuilder_.build();
1421 to_bitField0_ |= 0x00000001;
1422 }
1423 if (((from_bitField0_ & 0x00000100) != 0)) {
1424 result.innerObjectiveLowerBound_ = innerObjectiveLowerBound_;
1425 }
1426 if (((from_bitField0_ & 0x00000200) != 0)) {
1427 result.numIntegers_ = numIntegers_;
1428 }
1429 if (((from_bitField0_ & 0x00000400) != 0)) {
1430 result.numBooleans_ = numBooleans_;
1431 }
1432 if (((from_bitField0_ & 0x00000800) != 0)) {
1433 result.numConflicts_ = numConflicts_;
1434 }
1435 if (((from_bitField0_ & 0x00001000) != 0)) {
1436 result.numBranches_ = numBranches_;
1437 }
1438 if (((from_bitField0_ & 0x00002000) != 0)) {
1439 result.numBinaryPropagations_ = numBinaryPropagations_;
1440 }
1441 if (((from_bitField0_ & 0x00004000) != 0)) {
1442 result.numIntegerPropagations_ = numIntegerPropagations_;
1443 }
1444 if (((from_bitField0_ & 0x00008000) != 0)) {
1445 result.numRestarts_ = numRestarts_;
1446 }
1447 if (((from_bitField0_ & 0x00010000) != 0)) {
1448 result.numLpIterations_ = numLpIterations_;
1449 }
1450 if (((from_bitField0_ & 0x00020000) != 0)) {
1451 result.wallTime_ = wallTime_;
1452 }
1453 if (((from_bitField0_ & 0x00040000) != 0)) {
1454 result.userTime_ = userTime_;
1455 }
1456 if (((from_bitField0_ & 0x00080000) != 0)) {
1457 result.deterministicTime_ = deterministicTime_;
1458 }
1459 if (((from_bitField0_ & 0x00100000) != 0)) {
1460 result.gapIntegral_ = gapIntegral_;
1461 }
1462 if (((from_bitField0_ & 0x00200000) != 0)) {
1463 result.solutionInfo_ = solutionInfo_;
1464 }
1465 if (((from_bitField0_ & 0x00400000) != 0)) {
1466 result.solveLog_ = solveLog_;
1467 }
1468 result.bitField0_ |= to_bitField0_;
1469 }
1470
1471 @java.lang.Override
1472 public Builder mergeFrom(com.google.protobuf.Message other) {
1473 if (other instanceof com.google.ortools.sat.CpSolverResponse) {
1474 return mergeFrom((com.google.ortools.sat.CpSolverResponse)other);
1475 } else {
1476 super.mergeFrom(other);
1477 return this;
1478 }
1479 }
1480
1481 public Builder mergeFrom(com.google.ortools.sat.CpSolverResponse other) {
1482 if (other == com.google.ortools.sat.CpSolverResponse.getDefaultInstance()) return this;
1483 if (other.status_ != 0) {
1484 setStatusValue(other.getStatusValue());
1485 }
1486 if (!other.solution_.isEmpty()) {
1487 if (solution_.isEmpty()) {
1488 solution_ = other.solution_;
1489 solution_.makeImmutable();
1490 bitField0_ |= 0x00000002;
1491 } else {
1492 ensureSolutionIsMutable();
1493 solution_.addAll(other.solution_);
1494 }
1495 onChanged();
1496 }
1497 if (other.getObjectiveValue() != 0D) {
1498 setObjectiveValue(other.getObjectiveValue());
1499 }
1500 if (other.getBestObjectiveBound() != 0D) {
1501 setBestObjectiveBound(other.getBestObjectiveBound());
1502 }
1503 if (additionalSolutionsBuilder_ == null) {
1504 if (!other.additionalSolutions_.isEmpty()) {
1505 if (additionalSolutions_.isEmpty()) {
1506 additionalSolutions_ = other.additionalSolutions_;
1507 bitField0_ = (bitField0_ & ~0x00000010);
1508 } else {
1509 ensureAdditionalSolutionsIsMutable();
1510 additionalSolutions_.addAll(other.additionalSolutions_);
1511 }
1512 onChanged();
1513 }
1514 } else {
1515 if (!other.additionalSolutions_.isEmpty()) {
1516 if (additionalSolutionsBuilder_.isEmpty()) {
1517 additionalSolutionsBuilder_.dispose();
1518 additionalSolutionsBuilder_ = null;
1519 additionalSolutions_ = other.additionalSolutions_;
1520 bitField0_ = (bitField0_ & ~0x00000010);
1521 additionalSolutionsBuilder_ =
1522 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1523 getAdditionalSolutionsFieldBuilder() : null;
1524 } else {
1525 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1526 }
1527 }
1528 }
1529 if (tightenedVariablesBuilder_ == null) {
1530 if (!other.tightenedVariables_.isEmpty()) {
1531 if (tightenedVariables_.isEmpty()) {
1532 tightenedVariables_ = other.tightenedVariables_;
1533 bitField0_ = (bitField0_ & ~0x00000020);
1534 } else {
1535 ensureTightenedVariablesIsMutable();
1536 tightenedVariables_.addAll(other.tightenedVariables_);
1537 }
1538 onChanged();
1539 }
1540 } else {
1541 if (!other.tightenedVariables_.isEmpty()) {
1542 if (tightenedVariablesBuilder_.isEmpty()) {
1543 tightenedVariablesBuilder_.dispose();
1544 tightenedVariablesBuilder_ = null;
1545 tightenedVariables_ = other.tightenedVariables_;
1546 bitField0_ = (bitField0_ & ~0x00000020);
1547 tightenedVariablesBuilder_ =
1548 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1549 getTightenedVariablesFieldBuilder() : null;
1550 } else {
1551 tightenedVariablesBuilder_.addAllMessages(other.tightenedVariables_);
1552 }
1553 }
1554 }
1555 if (!other.sufficientAssumptionsForInfeasibility_.isEmpty()) {
1556 if (sufficientAssumptionsForInfeasibility_.isEmpty()) {
1557 sufficientAssumptionsForInfeasibility_ = other.sufficientAssumptionsForInfeasibility_;
1558 sufficientAssumptionsForInfeasibility_.makeImmutable();
1559 bitField0_ |= 0x00000040;
1560 } else {
1561 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1562 sufficientAssumptionsForInfeasibility_.addAll(other.sufficientAssumptionsForInfeasibility_);
1563 }
1564 onChanged();
1565 }
1566 if (other.hasIntegerObjective()) {
1567 mergeIntegerObjective(other.getIntegerObjective());
1568 }
1569 if (other.getInnerObjectiveLowerBound() != 0L) {
1570 setInnerObjectiveLowerBound(other.getInnerObjectiveLowerBound());
1571 }
1572 if (other.getNumIntegers() != 0L) {
1573 setNumIntegers(other.getNumIntegers());
1574 }
1575 if (other.getNumBooleans() != 0L) {
1576 setNumBooleans(other.getNumBooleans());
1577 }
1578 if (other.getNumConflicts() != 0L) {
1579 setNumConflicts(other.getNumConflicts());
1580 }
1581 if (other.getNumBranches() != 0L) {
1582 setNumBranches(other.getNumBranches());
1583 }
1584 if (other.getNumBinaryPropagations() != 0L) {
1585 setNumBinaryPropagations(other.getNumBinaryPropagations());
1586 }
1587 if (other.getNumIntegerPropagations() != 0L) {
1588 setNumIntegerPropagations(other.getNumIntegerPropagations());
1589 }
1590 if (other.getNumRestarts() != 0L) {
1591 setNumRestarts(other.getNumRestarts());
1592 }
1593 if (other.getNumLpIterations() != 0L) {
1594 setNumLpIterations(other.getNumLpIterations());
1595 }
1596 if (other.getWallTime() != 0D) {
1597 setWallTime(other.getWallTime());
1598 }
1599 if (other.getUserTime() != 0D) {
1600 setUserTime(other.getUserTime());
1601 }
1602 if (other.getDeterministicTime() != 0D) {
1603 setDeterministicTime(other.getDeterministicTime());
1604 }
1605 if (other.getGapIntegral() != 0D) {
1606 setGapIntegral(other.getGapIntegral());
1607 }
1608 if (!other.getSolutionInfo().isEmpty()) {
1609 solutionInfo_ = other.solutionInfo_;
1610 bitField0_ |= 0x00200000;
1611 onChanged();
1612 }
1613 if (!other.getSolveLog().isEmpty()) {
1614 solveLog_ = other.solveLog_;
1615 bitField0_ |= 0x00400000;
1616 onChanged();
1617 }
1618 this.mergeUnknownFields(other.getUnknownFields());
1619 onChanged();
1620 return this;
1621 }
1622
1623 @java.lang.Override
1624 public final boolean isInitialized() {
1625 return true;
1626 }
1627
1628 @java.lang.Override
1630 com.google.protobuf.CodedInputStream input,
1631 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1632 throws java.io.IOException {
1633 if (extensionRegistry == null) {
1634 throw new java.lang.NullPointerException();
1635 }
1636 try {
1637 boolean done = false;
1638 while (!done) {
1639 int tag = input.readTag();
1640 switch (tag) {
1641 case 0:
1642 done = true;
1643 break;
1644 case 8: {
1645 status_ = input.readEnum();
1646 bitField0_ |= 0x00000001;
1647 break;
1648 } // case 8
1649 case 16: {
1650 long v = input.readInt64();
1651 ensureSolutionIsMutable();
1652 solution_.addLong(v);
1653 break;
1654 } // case 16
1655 case 18: {
1656 int length = input.readRawVarint32();
1657 int limit = input.pushLimit(length);
1658 ensureSolutionIsMutable();
1659 while (input.getBytesUntilLimit() > 0) {
1660 solution_.addLong(input.readInt64());
1661 }
1662 input.popLimit(limit);
1663 break;
1664 } // case 18
1665 case 25: {
1666 objectiveValue_ = input.readDouble();
1667 bitField0_ |= 0x00000004;
1668 break;
1669 } // case 25
1670 case 33: {
1671 bestObjectiveBound_ = input.readDouble();
1672 bitField0_ |= 0x00000008;
1673 break;
1674 } // case 33
1675 case 80: {
1676 numBooleans_ = input.readInt64();
1677 bitField0_ |= 0x00000400;
1678 break;
1679 } // case 80
1680 case 88: {
1681 numConflicts_ = input.readInt64();
1682 bitField0_ |= 0x00000800;
1683 break;
1684 } // case 88
1685 case 96: {
1686 numBranches_ = input.readInt64();
1687 bitField0_ |= 0x00001000;
1688 break;
1689 } // case 96
1690 case 104: {
1691 numBinaryPropagations_ = input.readInt64();
1692 bitField0_ |= 0x00002000;
1693 break;
1694 } // case 104
1695 case 112: {
1696 numIntegerPropagations_ = input.readInt64();
1697 bitField0_ |= 0x00004000;
1698 break;
1699 } // case 112
1700 case 121: {
1701 wallTime_ = input.readDouble();
1702 bitField0_ |= 0x00020000;
1703 break;
1704 } // case 121
1705 case 129: {
1706 userTime_ = input.readDouble();
1707 bitField0_ |= 0x00040000;
1708 break;
1709 } // case 129
1710 case 137: {
1711 deterministicTime_ = input.readDouble();
1712 bitField0_ |= 0x00080000;
1713 break;
1714 } // case 137
1715 case 162: {
1716 solutionInfo_ = input.readStringRequireUtf8();
1717 bitField0_ |= 0x00200000;
1718 break;
1719 } // case 162
1720 case 170: {
1722 input.readMessage(
1723 com.google.ortools.sat.IntegerVariableProto.parser(),
1724 extensionRegistry);
1725 if (tightenedVariablesBuilder_ == null) {
1726 ensureTightenedVariablesIsMutable();
1727 tightenedVariables_.add(m);
1728 } else {
1729 tightenedVariablesBuilder_.addMessage(m);
1730 }
1731 break;
1732 } // case 170
1733 case 177: {
1734 gapIntegral_ = input.readDouble();
1735 bitField0_ |= 0x00100000;
1736 break;
1737 } // case 177
1738 case 184: {
1739 int v = input.readInt32();
1740 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1741 sufficientAssumptionsForInfeasibility_.addInt(v);
1742 break;
1743 } // case 184
1744 case 186: {
1745 int length = input.readRawVarint32();
1746 int limit = input.pushLimit(length);
1747 ensureSufficientAssumptionsForInfeasibilityIsMutable();
1748 while (input.getBytesUntilLimit() > 0) {
1749 sufficientAssumptionsForInfeasibility_.addInt(input.readInt32());
1750 }
1751 input.popLimit(limit);
1752 break;
1753 } // case 186
1754 case 192: {
1755 numRestarts_ = input.readInt64();
1756 bitField0_ |= 0x00008000;
1757 break;
1758 } // case 192
1759 case 200: {
1760 numLpIterations_ = input.readInt64();
1761 bitField0_ |= 0x00010000;
1762 break;
1763 } // case 200
1764 case 210: {
1765 solveLog_ = input.readStringRequireUtf8();
1766 bitField0_ |= 0x00400000;
1767 break;
1768 } // case 210
1769 case 218: {
1771 input.readMessage(
1772 com.google.ortools.sat.CpSolverSolution.parser(),
1773 extensionRegistry);
1774 if (additionalSolutionsBuilder_ == null) {
1775 ensureAdditionalSolutionsIsMutable();
1776 additionalSolutions_.add(m);
1777 } else {
1778 additionalSolutionsBuilder_.addMessage(m);
1779 }
1780 break;
1781 } // case 218
1782 case 226: {
1783 input.readMessage(
1784 getIntegerObjectiveFieldBuilder().getBuilder(),
1785 extensionRegistry);
1786 bitField0_ |= 0x00000080;
1787 break;
1788 } // case 226
1789 case 232: {
1790 innerObjectiveLowerBound_ = input.readInt64();
1791 bitField0_ |= 0x00000100;
1792 break;
1793 } // case 232
1794 case 240: {
1795 numIntegers_ = input.readInt64();
1796 bitField0_ |= 0x00000200;
1797 break;
1798 } // case 240
1799 default: {
1800 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1801 done = true; // was an endgroup tag
1802 }
1803 break;
1804 } // default:
1805 } // switch (tag)
1806 } // while (!done)
1807 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1808 throw e.unwrapIOException();
1809 } finally {
1810 onChanged();
1811 } // finally
1812 return this;
1813 }
1814 private int bitField0_;
1815
1816 private int status_ = 0;
1825 @java.lang.Override public int getStatusValue() {
1826 return status_;
1827 }
1837 public Builder setStatusValue(int value) {
1838 status_ = value;
1839 bitField0_ |= 0x00000001;
1840 onChanged();
1841 return this;
1842 }
1851 @java.lang.Override
1853 com.google.ortools.sat.CpSolverStatus result = com.google.ortools.sat.CpSolverStatus.forNumber(status_);
1854 return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
1855 }
1865 public Builder setStatus(com.google.ortools.sat.CpSolverStatus value) {
1866 if (value == null) {
1867 throw new NullPointerException();
1868 }
1869 bitField0_ |= 0x00000001;
1870 status_ = value.getNumber();
1871 onChanged();
1872 return this;
1873 }
1883 bitField0_ = (bitField0_ & ~0x00000001);
1884 status_ = 0;
1885 onChanged();
1886 return this;
1887 }
1888
1889 private com.google.protobuf.Internal.LongList solution_ = emptyLongList();
1890 private void ensureSolutionIsMutable() {
1891 if (!solution_.isModifiable()) {
1892 solution_ = makeMutableCopy(solution_);
1893 }
1894 bitField0_ |= 0x00000002;
1895 }
1907 public java.util.List<java.lang.Long>
1909 solution_.makeImmutable();
1910 return solution_;
1911 }
1923 public int getSolutionCount() {
1924 return solution_.size();
1925 }
1938 public long getSolution(int index) {
1939 return solution_.getLong(index);
1940 }
1955 int index, long value) {
1956
1957 ensureSolutionIsMutable();
1958 solution_.setLong(index, value);
1959 bitField0_ |= 0x00000002;
1960 onChanged();
1961 return this;
1962 }
1975 public Builder addSolution(long value) {
1976
1977 ensureSolutionIsMutable();
1978 solution_.addLong(value);
1979 bitField0_ |= 0x00000002;
1980 onChanged();
1981 return this;
1982 }
1996 java.lang.Iterable<? extends java.lang.Long> values) {
1997 ensureSolutionIsMutable();
1998 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1999 values, solution_);
2000 bitField0_ |= 0x00000002;
2001 onChanged();
2002 return this;
2003 }
2016 solution_ = emptyLongList();
2017 bitField0_ = (bitField0_ & ~0x00000002);
2018 onChanged();
2019 return this;
2020 }
2021
2022 private double objectiveValue_ ;
2034 @java.lang.Override
2035 public double getObjectiveValue() {
2036 return objectiveValue_;
2037 }
2050 public Builder setObjectiveValue(double value) {
2051
2052 objectiveValue_ = value;
2053 bitField0_ |= 0x00000004;
2054 onChanged();
2055 return this;
2056 }
2069 bitField0_ = (bitField0_ & ~0x00000004);
2070 objectiveValue_ = 0D;
2071 onChanged();
2072 return this;
2073 }
2074
2075 private double bestObjectiveBound_ ;
2086 @java.lang.Override
2087 public double getBestObjectiveBound() {
2088 return bestObjectiveBound_;
2089 }
2101 public Builder setBestObjectiveBound(double value) {
2102
2103 bestObjectiveBound_ = value;
2104 bitField0_ |= 0x00000008;
2105 onChanged();
2106 return this;
2107 }
2119 bitField0_ = (bitField0_ & ~0x00000008);
2120 bestObjectiveBound_ = 0D;
2121 onChanged();
2122 return this;
2123 }
2124
2125 private java.util.List<com.google.ortools.sat.CpSolverSolution> additionalSolutions_ =
2126 java.util.Collections.emptyList();
2127 private void ensureAdditionalSolutionsIsMutable() {
2128 if (!((bitField0_ & 0x00000010) != 0)) {
2129 additionalSolutions_ = new java.util.ArrayList<com.google.ortools.sat.CpSolverSolution>(additionalSolutions_);
2130 bitField0_ |= 0x00000010;
2131 }
2132 }
2133
2134 private com.google.protobuf.RepeatedFieldBuilder<
2135 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder> additionalSolutionsBuilder_;
2136
2149 public java.util.List<com.google.ortools.sat.CpSolverSolution> getAdditionalSolutionsList() {
2150 if (additionalSolutionsBuilder_ == null) {
2151 return java.util.Collections.unmodifiableList(additionalSolutions_);
2152 } else {
2153 return additionalSolutionsBuilder_.getMessageList();
2154 }
2155 }
2169 if (additionalSolutionsBuilder_ == null) {
2170 return additionalSolutions_.size();
2171 } else {
2172 return additionalSolutionsBuilder_.getCount();
2173 }
2174 }
2188 if (additionalSolutionsBuilder_ == null) {
2189 return additionalSolutions_.get(index);
2190 } else {
2191 return additionalSolutionsBuilder_.getMessage(index);
2192 }
2193 }
2207 int index, com.google.ortools.sat.CpSolverSolution value) {
2208 if (additionalSolutionsBuilder_ == null) {
2209 if (value == null) {
2210 throw new NullPointerException();
2211 }
2212 ensureAdditionalSolutionsIsMutable();
2213 additionalSolutions_.set(index, value);
2214 onChanged();
2215 } else {
2216 additionalSolutionsBuilder_.setMessage(index, value);
2217 }
2218 return this;
2219 }
2233 int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2234 if (additionalSolutionsBuilder_ == null) {
2235 ensureAdditionalSolutionsIsMutable();
2236 additionalSolutions_.set(index, builderForValue.build());
2237 onChanged();
2238 } else {
2239 additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2240 }
2241 return this;
2242 }
2255 public Builder addAdditionalSolutions(com.google.ortools.sat.CpSolverSolution value) {
2256 if (additionalSolutionsBuilder_ == null) {
2257 if (value == null) {
2258 throw new NullPointerException();
2259 }
2260 ensureAdditionalSolutionsIsMutable();
2261 additionalSolutions_.add(value);
2262 onChanged();
2263 } else {
2264 additionalSolutionsBuilder_.addMessage(value);
2265 }
2266 return this;
2267 }
2281 int index, com.google.ortools.sat.CpSolverSolution value) {
2282 if (additionalSolutionsBuilder_ == null) {
2283 if (value == null) {
2284 throw new NullPointerException();
2285 }
2286 ensureAdditionalSolutionsIsMutable();
2287 additionalSolutions_.add(index, value);
2288 onChanged();
2289 } else {
2290 additionalSolutionsBuilder_.addMessage(index, value);
2291 }
2292 return this;
2293 }
2307 com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2308 if (additionalSolutionsBuilder_ == null) {
2309 ensureAdditionalSolutionsIsMutable();
2310 additionalSolutions_.add(builderForValue.build());
2311 onChanged();
2312 } else {
2313 additionalSolutionsBuilder_.addMessage(builderForValue.build());
2314 }
2315 return this;
2316 }
2330 int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue) {
2331 if (additionalSolutionsBuilder_ == null) {
2332 ensureAdditionalSolutionsIsMutable();
2333 additionalSolutions_.add(index, builderForValue.build());
2334 onChanged();
2335 } else {
2336 additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2337 }
2338 return this;
2339 }
2353 java.lang.Iterable<? extends com.google.ortools.sat.CpSolverSolution> values) {
2354 if (additionalSolutionsBuilder_ == null) {
2355 ensureAdditionalSolutionsIsMutable();
2356 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2357 values, additionalSolutions_);
2358 onChanged();
2359 } else {
2360 additionalSolutionsBuilder_.addAllMessages(values);
2361 }
2362 return this;
2363 }
2377 if (additionalSolutionsBuilder_ == null) {
2378 additionalSolutions_ = java.util.Collections.emptyList();
2379 bitField0_ = (bitField0_ & ~0x00000010);
2380 onChanged();
2381 } else {
2382 additionalSolutionsBuilder_.clear();
2383 }
2384 return this;
2385 }
2399 if (additionalSolutionsBuilder_ == null) {
2400 ensureAdditionalSolutionsIsMutable();
2401 additionalSolutions_.remove(index);
2402 onChanged();
2403 } else {
2404 additionalSolutionsBuilder_.remove(index);
2405 }
2406 return this;
2407 }
2421 int index) {
2422 return getAdditionalSolutionsFieldBuilder().getBuilder(index);
2423 }
2437 int index) {
2438 if (additionalSolutionsBuilder_ == null) {
2439 return additionalSolutions_.get(index); } else {
2440 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2441 }
2442 }
2455 public java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder>
2457 if (additionalSolutionsBuilder_ != null) {
2458 return additionalSolutionsBuilder_.getMessageOrBuilderList();
2459 } else {
2460 return java.util.Collections.unmodifiableList(additionalSolutions_);
2461 }
2462 }
2476 return getAdditionalSolutionsFieldBuilder().addBuilder(
2477 com.google.ortools.sat.CpSolverSolution.getDefaultInstance());
2478 }
2492 int index) {
2493 return getAdditionalSolutionsFieldBuilder().addBuilder(
2494 index, com.google.ortools.sat.CpSolverSolution.getDefaultInstance());
2495 }
2508 public java.util.List<com.google.ortools.sat.CpSolverSolution.Builder>
2510 return getAdditionalSolutionsFieldBuilder().getBuilderList();
2511 }
2512 private com.google.protobuf.RepeatedFieldBuilder<
2513 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder>
2514 getAdditionalSolutionsFieldBuilder() {
2515 if (additionalSolutionsBuilder_ == null) {
2516 additionalSolutionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2517 com.google.ortools.sat.CpSolverSolution, com.google.ortools.sat.CpSolverSolution.Builder, com.google.ortools.sat.CpSolverSolutionOrBuilder>(
2518 additionalSolutions_,
2519 ((bitField0_ & 0x00000010) != 0),
2520 getParentForChildren(),
2521 isClean());
2522 additionalSolutions_ = null;
2523 }
2524 return additionalSolutionsBuilder_;
2525 }
2526
2527 private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_ =
2528 java.util.Collections.emptyList();
2529 private void ensureTightenedVariablesIsMutable() {
2530 if (!((bitField0_ & 0x00000020) != 0)) {
2531 tightenedVariables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(tightenedVariables_);
2532 bitField0_ |= 0x00000020;
2533 }
2534 }
2535
2536 private com.google.protobuf.RepeatedFieldBuilder<
2537 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> tightenedVariablesBuilder_;
2538
2561 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getTightenedVariablesList() {
2562 if (tightenedVariablesBuilder_ == null) {
2563 return java.util.Collections.unmodifiableList(tightenedVariables_);
2564 } else {
2565 return tightenedVariablesBuilder_.getMessageList();
2566 }
2567 }
2591 if (tightenedVariablesBuilder_ == null) {
2592 return tightenedVariables_.size();
2593 } else {
2594 return tightenedVariablesBuilder_.getCount();
2595 }
2596 }
2620 if (tightenedVariablesBuilder_ == null) {
2621 return tightenedVariables_.get(index);
2622 } else {
2623 return tightenedVariablesBuilder_.getMessage(index);
2624 }
2625 }
2649 int index, com.google.ortools.sat.IntegerVariableProto value) {
2650 if (tightenedVariablesBuilder_ == null) {
2651 if (value == null) {
2652 throw new NullPointerException();
2653 }
2654 ensureTightenedVariablesIsMutable();
2655 tightenedVariables_.set(index, value);
2656 onChanged();
2657 } else {
2658 tightenedVariablesBuilder_.setMessage(index, value);
2659 }
2660 return this;
2661 }
2685 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2686 if (tightenedVariablesBuilder_ == null) {
2687 ensureTightenedVariablesIsMutable();
2688 tightenedVariables_.set(index, builderForValue.build());
2689 onChanged();
2690 } else {
2691 tightenedVariablesBuilder_.setMessage(index, builderForValue.build());
2692 }
2693 return this;
2694 }
2717 public Builder addTightenedVariables(com.google.ortools.sat.IntegerVariableProto value) {
2718 if (tightenedVariablesBuilder_ == null) {
2719 if (value == null) {
2720 throw new NullPointerException();
2721 }
2722 ensureTightenedVariablesIsMutable();
2723 tightenedVariables_.add(value);
2724 onChanged();
2725 } else {
2726 tightenedVariablesBuilder_.addMessage(value);
2727 }
2728 return this;
2729 }
2753 int index, com.google.ortools.sat.IntegerVariableProto value) {
2754 if (tightenedVariablesBuilder_ == null) {
2755 if (value == null) {
2756 throw new NullPointerException();
2757 }
2758 ensureTightenedVariablesIsMutable();
2759 tightenedVariables_.add(index, value);
2760 onChanged();
2761 } else {
2762 tightenedVariablesBuilder_.addMessage(index, value);
2763 }
2764 return this;
2765 }
2789 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2790 if (tightenedVariablesBuilder_ == null) {
2791 ensureTightenedVariablesIsMutable();
2792 tightenedVariables_.add(builderForValue.build());
2793 onChanged();
2794 } else {
2795 tightenedVariablesBuilder_.addMessage(builderForValue.build());
2796 }
2797 return this;
2798 }
2822 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2823 if (tightenedVariablesBuilder_ == null) {
2824 ensureTightenedVariablesIsMutable();
2825 tightenedVariables_.add(index, builderForValue.build());
2826 onChanged();
2827 } else {
2828 tightenedVariablesBuilder_.addMessage(index, builderForValue.build());
2829 }
2830 return this;
2831 }
2855 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
2856 if (tightenedVariablesBuilder_ == null) {
2857 ensureTightenedVariablesIsMutable();
2858 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2859 values, tightenedVariables_);
2860 onChanged();
2861 } else {
2862 tightenedVariablesBuilder_.addAllMessages(values);
2863 }
2864 return this;
2865 }
2889 if (tightenedVariablesBuilder_ == null) {
2890 tightenedVariables_ = java.util.Collections.emptyList();
2891 bitField0_ = (bitField0_ & ~0x00000020);
2892 onChanged();
2893 } else {
2894 tightenedVariablesBuilder_.clear();
2895 }
2896 return this;
2897 }
2921 if (tightenedVariablesBuilder_ == null) {
2922 ensureTightenedVariablesIsMutable();
2923 tightenedVariables_.remove(index);
2924 onChanged();
2925 } else {
2926 tightenedVariablesBuilder_.remove(index);
2927 }
2928 return this;
2929 }
2953 int index) {
2954 return getTightenedVariablesFieldBuilder().getBuilder(index);
2955 }
2979 int index) {
2980 if (tightenedVariablesBuilder_ == null) {
2981 return tightenedVariables_.get(index); } else {
2982 return tightenedVariablesBuilder_.getMessageOrBuilder(index);
2983 }
2984 }
3007 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
3009 if (tightenedVariablesBuilder_ != null) {
3010 return tightenedVariablesBuilder_.getMessageOrBuilderList();
3011 } else {
3012 return java.util.Collections.unmodifiableList(tightenedVariables_);
3013 }
3014 }
3038 return getTightenedVariablesFieldBuilder().addBuilder(
3039 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
3040 }
3064 int index) {
3065 return getTightenedVariablesFieldBuilder().addBuilder(
3066 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
3067 }
3090 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
3092 return getTightenedVariablesFieldBuilder().getBuilderList();
3093 }
3094 private com.google.protobuf.RepeatedFieldBuilder<
3095 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
3096 getTightenedVariablesFieldBuilder() {
3097 if (tightenedVariablesBuilder_ == null) {
3098 tightenedVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
3099 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
3100 tightenedVariables_,
3101 ((bitField0_ & 0x00000020) != 0),
3102 getParentForChildren(),
3103 isClean());
3104 tightenedVariables_ = null;
3105 }
3106 return tightenedVariablesBuilder_;
3107 }
3108
3109 private com.google.protobuf.Internal.IntList sufficientAssumptionsForInfeasibility_ = emptyIntList();
3110 private void ensureSufficientAssumptionsForInfeasibilityIsMutable() {
3111 if (!sufficientAssumptionsForInfeasibility_.isModifiable()) {
3112 sufficientAssumptionsForInfeasibility_ = makeMutableCopy(sufficientAssumptionsForInfeasibility_);
3113 }
3114 bitField0_ |= 0x00000040;
3115 }
3142 public java.util.List<java.lang.Integer>
3144 sufficientAssumptionsForInfeasibility_.makeImmutable();
3145 return sufficientAssumptionsForInfeasibility_;
3146 }
3174 return sufficientAssumptionsForInfeasibility_.size();
3175 }
3204 return sufficientAssumptionsForInfeasibility_.getInt(index);
3205 }
3235 int index, int value) {
3236
3237 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3238 sufficientAssumptionsForInfeasibility_.setInt(index, value);
3239 bitField0_ |= 0x00000040;
3240 onChanged();
3241 return this;
3242 }
3271
3272 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3273 sufficientAssumptionsForInfeasibility_.addInt(value);
3274 bitField0_ |= 0x00000040;
3275 onChanged();
3276 return this;
3277 }
3306 java.lang.Iterable<? extends java.lang.Integer> values) {
3307 ensureSufficientAssumptionsForInfeasibilityIsMutable();
3308 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3309 values, sufficientAssumptionsForInfeasibility_);
3310 bitField0_ |= 0x00000040;
3311 onChanged();
3312 return this;
3313 }
3341 sufficientAssumptionsForInfeasibility_ = emptyIntList();
3342 bitField0_ = (bitField0_ & ~0x00000040);
3343 onChanged();
3344 return this;
3345 }
3346
3347 private com.google.ortools.sat.CpObjectiveProto integerObjective_;
3348 private com.google.protobuf.SingleFieldBuilder<
3349 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> integerObjectiveBuilder_;
3360 public boolean hasIntegerObjective() {
3361 return ((bitField0_ & 0x00000080) != 0);
3362 }
3374 if (integerObjectiveBuilder_ == null) {
3375 return integerObjective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
3376 } else {
3377 return integerObjectiveBuilder_.getMessage();
3378 }
3379 }
3389 public Builder setIntegerObjective(com.google.ortools.sat.CpObjectiveProto value) {
3390 if (integerObjectiveBuilder_ == null) {
3391 if (value == null) {
3392 throw new NullPointerException();
3393 }
3394 integerObjective_ = value;
3395 } else {
3396 integerObjectiveBuilder_.setMessage(value);
3397 }
3398 bitField0_ |= 0x00000080;
3399 onChanged();
3400 return this;
3401 }
3412 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
3413 if (integerObjectiveBuilder_ == null) {
3414 integerObjective_ = builderForValue.build();
3415 } else {
3416 integerObjectiveBuilder_.setMessage(builderForValue.build());
3417 }
3418 bitField0_ |= 0x00000080;
3419 onChanged();
3420 return this;
3421 }
3431 public Builder mergeIntegerObjective(com.google.ortools.sat.CpObjectiveProto value) {
3432 if (integerObjectiveBuilder_ == null) {
3433 if (((bitField0_ & 0x00000080) != 0) &&
3434 integerObjective_ != null &&
3435 integerObjective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
3436 getIntegerObjectiveBuilder().mergeFrom(value);
3437 } else {
3438 integerObjective_ = value;
3439 }
3440 } else {
3441 integerObjectiveBuilder_.mergeFrom(value);
3442 }
3443 if (integerObjective_ != null) {
3444 bitField0_ |= 0x00000080;
3445 onChanged();
3446 }
3447 return this;
3448 }
3459 bitField0_ = (bitField0_ & ~0x00000080);
3460 integerObjective_ = null;
3461 if (integerObjectiveBuilder_ != null) {
3462 integerObjectiveBuilder_.dispose();
3463 integerObjectiveBuilder_ = null;
3464 }
3465 onChanged();
3466 return this;
3467 }
3478 bitField0_ |= 0x00000080;
3479 onChanged();
3480 return getIntegerObjectiveFieldBuilder().getBuilder();
3481 }
3492 if (integerObjectiveBuilder_ != null) {
3493 return integerObjectiveBuilder_.getMessageOrBuilder();
3494 } else {
3495 return integerObjective_ == null ?
3496 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : integerObjective_;
3497 }
3498 }
3508 private com.google.protobuf.SingleFieldBuilder<
3509 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
3510 getIntegerObjectiveFieldBuilder() {
3511 if (integerObjectiveBuilder_ == null) {
3512 integerObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3513 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
3515 getParentForChildren(),
3516 isClean());
3517 integerObjective_ = null;
3518 }
3519 return integerObjectiveBuilder_;
3520 }
3521
3522 private long innerObjectiveLowerBound_ ;
3536 @java.lang.Override
3538 return innerObjectiveLowerBound_;
3539 }
3555
3556 innerObjectiveLowerBound_ = value;
3557 bitField0_ |= 0x00000100;
3558 onChanged();
3559 return this;
3560 }
3575 bitField0_ = (bitField0_ & ~0x00000100);
3576 innerObjectiveLowerBound_ = 0L;
3577 onChanged();
3578 return this;
3579 }
3580
3581 private long numIntegers_ ;
3594 @java.lang.Override
3595 public long getNumIntegers() {
3596 return numIntegers_;
3597 }
3611 public Builder setNumIntegers(long value) {
3612
3613 numIntegers_ = value;
3614 bitField0_ |= 0x00000200;
3615 onChanged();
3616 return this;
3617 }
3631 bitField0_ = (bitField0_ & ~0x00000200);
3632 numIntegers_ = 0L;
3633 onChanged();
3634 return this;
3635 }
3636
3637 private long numBooleans_ ;
3642 @java.lang.Override
3643 public long getNumBooleans() {
3644 return numBooleans_;
3645 }
3651 public Builder setNumBooleans(long value) {
3652
3653 numBooleans_ = value;
3654 bitField0_ |= 0x00000400;
3655 onChanged();
3656 return this;
3657 }
3663 bitField0_ = (bitField0_ & ~0x00000400);
3664 numBooleans_ = 0L;
3665 onChanged();
3666 return this;
3667 }
3668
3669 private long numConflicts_ ;
3674 @java.lang.Override
3675 public long getNumConflicts() {
3676 return numConflicts_;
3677 }
3683 public Builder setNumConflicts(long value) {
3684
3685 numConflicts_ = value;
3686 bitField0_ |= 0x00000800;
3687 onChanged();
3688 return this;
3689 }
3695 bitField0_ = (bitField0_ & ~0x00000800);
3696 numConflicts_ = 0L;
3697 onChanged();
3698 return this;
3699 }
3700
3701 private long numBranches_ ;
3706 @java.lang.Override
3707 public long getNumBranches() {
3708 return numBranches_;
3709 }
3715 public Builder setNumBranches(long value) {
3716
3717 numBranches_ = value;
3718 bitField0_ |= 0x00001000;
3719 onChanged();
3720 return this;
3721 }
3727 bitField0_ = (bitField0_ & ~0x00001000);
3728 numBranches_ = 0L;
3729 onChanged();
3730 return this;
3731 }
3732
3733 private long numBinaryPropagations_ ;
3738 @java.lang.Override
3740 return numBinaryPropagations_;
3741 }
3748
3749 numBinaryPropagations_ = value;
3750 bitField0_ |= 0x00002000;
3751 onChanged();
3752 return this;
3753 }
3759 bitField0_ = (bitField0_ & ~0x00002000);
3760 numBinaryPropagations_ = 0L;
3761 onChanged();
3762 return this;
3763 }
3764
3765 private long numIntegerPropagations_ ;
3770 @java.lang.Override
3772 return numIntegerPropagations_;
3773 }
3780
3781 numIntegerPropagations_ = value;
3782 bitField0_ |= 0x00004000;
3783 onChanged();
3784 return this;
3785 }
3791 bitField0_ = (bitField0_ & ~0x00004000);
3792 numIntegerPropagations_ = 0L;
3793 onChanged();
3794 return this;
3795 }
3796
3797 private long numRestarts_ ;
3802 @java.lang.Override
3803 public long getNumRestarts() {
3804 return numRestarts_;
3805 }
3811 public Builder setNumRestarts(long value) {
3812
3813 numRestarts_ = value;
3814 bitField0_ |= 0x00008000;
3815 onChanged();
3816 return this;
3817 }
3823 bitField0_ = (bitField0_ & ~0x00008000);
3824 numRestarts_ = 0L;
3825 onChanged();
3826 return this;
3827 }
3828
3829 private long numLpIterations_ ;
3834 @java.lang.Override
3835 public long getNumLpIterations() {
3836 return numLpIterations_;
3837 }
3843 public Builder setNumLpIterations(long value) {
3844
3845 numLpIterations_ = value;
3846 bitField0_ |= 0x00010000;
3847 onChanged();
3848 return this;
3849 }
3855 bitField0_ = (bitField0_ & ~0x00010000);
3856 numLpIterations_ = 0L;
3857 onChanged();
3858 return this;
3859 }
3860
3861 private double wallTime_ ;
3870 @java.lang.Override
3871 public double getWallTime() {
3872 return wallTime_;
3873 }
3883 public Builder setWallTime(double value) {
3884
3885 wallTime_ = value;
3886 bitField0_ |= 0x00020000;
3887 onChanged();
3888 return this;
3889 }
3899 bitField0_ = (bitField0_ & ~0x00020000);
3900 wallTime_ = 0D;
3901 onChanged();
3902 return this;
3903 }
3904
3905 private double userTime_ ;
3910 @java.lang.Override
3911 public double getUserTime() {
3912 return userTime_;
3913 }
3919 public Builder setUserTime(double value) {
3920
3921 userTime_ = value;
3922 bitField0_ |= 0x00040000;
3923 onChanged();
3924 return this;
3925 }
3931 bitField0_ = (bitField0_ & ~0x00040000);
3932 userTime_ = 0D;
3933 onChanged();
3934 return this;
3935 }
3936
3937 private double deterministicTime_ ;
3942 @java.lang.Override
3943 public double getDeterministicTime() {
3944 return deterministicTime_;
3945 }
3951 public Builder setDeterministicTime(double value) {
3952
3953 deterministicTime_ = value;
3954 bitField0_ |= 0x00080000;
3955 onChanged();
3956 return this;
3957 }
3963 bitField0_ = (bitField0_ & ~0x00080000);
3964 deterministicTime_ = 0D;
3965 onChanged();
3966 return this;
3967 }
3968
3969 private double gapIntegral_ ;
3978 @java.lang.Override
3979 public double getGapIntegral() {
3980 return gapIntegral_;
3981 }
3991 public Builder setGapIntegral(double value) {
3992
3993 gapIntegral_ = value;
3994 bitField0_ |= 0x00100000;
3995 onChanged();
3996 return this;
3997 }
4007 bitField0_ = (bitField0_ & ~0x00100000);
4008 gapIntegral_ = 0D;
4009 onChanged();
4010 return this;
4011 }
4012
4013 private java.lang.Object solutionInfo_ = "";
4023 public java.lang.String getSolutionInfo() {
4024 java.lang.Object ref = solutionInfo_;
4025 if (!(ref instanceof java.lang.String)) {
4026 com.google.protobuf.ByteString bs =
4027 (com.google.protobuf.ByteString) ref;
4028 java.lang.String s = bs.toStringUtf8();
4029 solutionInfo_ = s;
4030 return s;
4031 } else {
4032 return (java.lang.String) ref;
4033 }
4034 }
4044 public com.google.protobuf.ByteString
4046 java.lang.Object ref = solutionInfo_;
4047 if (ref instanceof String) {
4048 com.google.protobuf.ByteString b =
4049 com.google.protobuf.ByteString.copyFromUtf8(
4050 (java.lang.String) ref);
4051 solutionInfo_ = b;
4052 return b;
4053 } else {
4054 return (com.google.protobuf.ByteString) ref;
4055 }
4056 }
4068 java.lang.String value) {
4069 if (value == null) { throw new NullPointerException(); }
4070 solutionInfo_ = value;
4071 bitField0_ |= 0x00200000;
4072 onChanged();
4073 return this;
4074 }
4085 solutionInfo_ = getDefaultInstance().getSolutionInfo();
4086 bitField0_ = (bitField0_ & ~0x00200000);
4087 onChanged();
4088 return this;
4089 }
4101 com.google.protobuf.ByteString value) {
4102 if (value == null) { throw new NullPointerException(); }
4103 checkByteStringIsUtf8(value);
4104 solutionInfo_ = value;
4105 bitField0_ |= 0x00200000;
4106 onChanged();
4107 return this;
4108 }
4109
4110 private java.lang.Object solveLog_ = "";
4120 public java.lang.String getSolveLog() {
4121 java.lang.Object ref = solveLog_;
4122 if (!(ref instanceof java.lang.String)) {
4123 com.google.protobuf.ByteString bs =
4124 (com.google.protobuf.ByteString) ref;
4125 java.lang.String s = bs.toStringUtf8();
4126 solveLog_ = s;
4127 return s;
4128 } else {
4129 return (java.lang.String) ref;
4130 }
4131 }
4141 public com.google.protobuf.ByteString
4143 java.lang.Object ref = solveLog_;
4144 if (ref instanceof String) {
4145 com.google.protobuf.ByteString b =
4146 com.google.protobuf.ByteString.copyFromUtf8(
4147 (java.lang.String) ref);
4148 solveLog_ = b;
4149 return b;
4150 } else {
4151 return (com.google.protobuf.ByteString) ref;
4152 }
4153 }
4165 java.lang.String value) {
4166 if (value == null) { throw new NullPointerException(); }
4167 solveLog_ = value;
4168 bitField0_ |= 0x00400000;
4169 onChanged();
4170 return this;
4171 }
4182 solveLog_ = getDefaultInstance().getSolveLog();
4183 bitField0_ = (bitField0_ & ~0x00400000);
4184 onChanged();
4185 return this;
4186 }
4198 com.google.protobuf.ByteString value) {
4199 if (value == null) { throw new NullPointerException(); }
4200 checkByteStringIsUtf8(value);
4201 solveLog_ = value;
4202 bitField0_ |= 0x00400000;
4203 onChanged();
4204 return this;
4205 }
4206
4207 // @@protoc_insertion_point(builder_scope:operations_research.sat.CpSolverResponse)
4208 }
4209
4210 // @@protoc_insertion_point(class_scope:operations_research.sat.CpSolverResponse)
4211 private static final com.google.ortools.sat.CpSolverResponse DEFAULT_INSTANCE;
4212 static {
4213 DEFAULT_INSTANCE = new com.google.ortools.sat.CpSolverResponse();
4214 }
4215
4217 return DEFAULT_INSTANCE;
4218 }
4219
4220 private static final com.google.protobuf.Parser<CpSolverResponse>
4221 PARSER = new com.google.protobuf.AbstractParser<CpSolverResponse>() {
4222 @java.lang.Override
4223 public CpSolverResponse parsePartialFrom(
4224 com.google.protobuf.CodedInputStream input,
4225 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4226 throws com.google.protobuf.InvalidProtocolBufferException {
4227 Builder builder = newBuilder();
4228 try {
4229 builder.mergeFrom(input, extensionRegistry);
4230 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4231 throw e.setUnfinishedMessage(builder.buildPartial());
4232 } catch (com.google.protobuf.UninitializedMessageException e) {
4233 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4234 } catch (java.io.IOException e) {
4235 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4236 .setUnfinishedMessage(builder.buildPartial());
4237 }
4238 return builder.buildPartial();
4239 }
4240 };
4241
4242 public static com.google.protobuf.Parser<CpSolverResponse> parser() {
4243 return PARSER;
4244 }
4245
4246 @java.lang.Override
4247 public com.google.protobuf.Parser<CpSolverResponse> getParserForType() {
4248 return PARSER;
4249 }
4250
4251 @java.lang.Override
4253 return DEFAULT_INSTANCE;
4254 }
4255
4256}
4257
com.google.ortools.sat.CpSolverSolution getAdditionalSolutions(int index)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder setStatus(com.google.ortools.sat.CpSolverStatus value)
java.util.List< java.lang.Long > getSolutionList()
Builder addTightenedVariables(com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
Builder setSolveLogBytes(com.google.protobuf.ByteString value)
Builder addTightenedVariables(com.google.ortools.sat.IntegerVariableProto value)
com.google.ortools.sat.CpSolverSolution.Builder getAdditionalSolutionsBuilder(int index)
Builder mergeFrom(com.google.ortools.sat.CpSolverResponse other)
com.google.ortools.sat.CpSolverSolution.Builder addAdditionalSolutionsBuilder()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getTightenedVariablesOrBuilderList()
java.util.List< com.google.ortools.sat.IntegerVariableProto.Builder > getTightenedVariablesBuilderList()
com.google.ortools.sat.CpSolverResponse buildPartial()
Builder addAllSufficientAssumptionsForInfeasibility(java.lang.Iterable<? extends java.lang.Integer > values)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.IntegerVariableProto.Builder addTightenedVariablesBuilder()
java.util.List< com.google.ortools.sat.CpSolverSolution > getAdditionalSolutionsList()
com.google.ortools.sat.CpObjectiveProto.Builder getIntegerObjectiveBuilder()
java.util.List< com.google.ortools.sat.IntegerVariableProto > getTightenedVariablesList()
java.util.List< com.google.ortools.sat.CpSolverSolution.Builder > getAdditionalSolutionsBuilderList()
Builder addTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
com.google.ortools.sat.CpObjectiveProto getIntegerObjective()
Builder addAdditionalSolutions(int index, com.google.ortools.sat.CpSolverSolution value)
Builder setSufficientAssumptionsForInfeasibility(int index, int value)
com.google.ortools.sat.CpSolverResponse getDefaultInstanceForType()
Builder addAdditionalSolutions(int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue)
com.google.ortools.sat.CpSolverSolution.Builder addAdditionalSolutionsBuilder(int index)
Builder setAdditionalSolutions(int index, com.google.ortools.sat.CpSolverSolution.Builder builderForValue)
com.google.protobuf.ByteString getSolveLogBytes()
Builder setAdditionalSolutions(int index, com.google.ortools.sat.CpSolverSolution value)
Builder addAllAdditionalSolutions(java.lang.Iterable<? extends com.google.ortools.sat.CpSolverSolution > values)
Builder mergeFrom(com.google.protobuf.Message other)
Builder addAllTightenedVariables(java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.sat.CpSolverStatus getStatus()
com.google.ortools.sat.IntegerVariableProtoOrBuilder getTightenedVariablesOrBuilder(int index)
java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
Builder addAdditionalSolutions(com.google.ortools.sat.CpSolverSolution.Builder builderForValue)
com.google.ortools.sat.IntegerVariableProto.Builder addTightenedVariablesBuilder(int index)
Builder addAdditionalSolutions(com.google.ortools.sat.CpSolverSolution value)
Builder setIntegerObjective(com.google.ortools.sat.CpObjectiveProto.Builder builderForValue)
Builder addTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
Builder setSolutionInfoBytes(com.google.protobuf.ByteString value)
Builder setIntegerObjective(com.google.ortools.sat.CpObjectiveProto value)
com.google.ortools.sat.CpSolverSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
Builder mergeIntegerObjective(com.google.ortools.sat.CpObjectiveProto value)
com.google.ortools.sat.IntegerVariableProto getTightenedVariables(int index)
java.util.List< java.lang.Integer > getSufficientAssumptionsForInfeasibilityList()
Builder addAllSolution(java.lang.Iterable<? extends java.lang.Long > values)
com.google.ortools.sat.IntegerVariableProto.Builder getTightenedVariablesBuilder(int index)
com.google.ortools.sat.CpSolverResponse build()
Builder setTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
com.google.ortools.sat.CpObjectiveProtoOrBuilder getIntegerObjectiveOrBuilder()
com.google.protobuf.ByteString getSolutionInfoBytes()
static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data)
java.util.List< java.lang.Long > getSolutionList()
com.google.ortools.sat.IntegerVariableProtoOrBuilder getTightenedVariablesOrBuilder(int index)
java.util.List< com.google.ortools.sat.IntegerVariableProto > getTightenedVariablesList()
com.google.protobuf.ByteString getSolutionInfoBytes()
static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input)
static com.google.ortools.sat.CpSolverResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< CpSolverResponse > parser()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static Builder newBuilder(com.google.ortools.sat.CpSolverResponse prototype)
java.util.List< com.google.ortools.sat.CpSolverSolution > getAdditionalSolutionsList()
com.google.ortools.sat.CpSolverResponse getDefaultInstanceForType()
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getTightenedVariablesOrBuilderList()
com.google.ortools.sat.CpObjectiveProto getIntegerObjective()
static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List<? extends com.google.ortools.sat.CpSolverSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
java.util.List< java.lang.Integer > getSufficientAssumptionsForInfeasibilityList()
static final int SUFFICIENT_ASSUMPTIONS_FOR_INFEASIBILITY_FIELD_NUMBER
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.sat.IntegerVariableProto getTightenedVariables(int index)
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.CpSolverStatus getStatus()
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.CpSolverResponse parseFrom(java.nio.ByteBuffer data)
com.google.ortools.sat.CpSolverSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input)
com.google.ortools.sat.CpObjectiveProtoOrBuilder getIntegerObjectiveOrBuilder()
boolean equals(final java.lang.Object obj)
com.google.ortools.sat.CpSolverSolution getAdditionalSolutions(int index)
com.google.protobuf.Parser< CpSolverResponse > getParserForType()
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.sat.CpSolverResponse getDefaultInstance()
com.google.protobuf.ByteString getSolveLogBytes()