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 package com.google.ortools.sat;
5 
15 public final class CpSolverResponse extends
16  com.google.protobuf.GeneratedMessageV3 implements
17  // @@protoc_insertion_point(message_implements:operations_research.sat.CpSolverResponse)
19 private static final long serialVersionUID = 0L;
20  // Use CpSolverResponse.newBuilder() to construct.
21  private CpSolverResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
22  super(builder);
23  }
24  private CpSolverResponse() {
25  status_ = 0;
26  solution_ = emptyLongList();
27  solutionLowerBounds_ = emptyLongList();
28  solutionUpperBounds_ = emptyLongList();
29  tightenedVariables_ = java.util.Collections.emptyList();
30  solutionInfo_ = "";
31  }
32 
33  @java.lang.Override
34  public final com.google.protobuf.UnknownFieldSet
36  return this.unknownFields;
37  }
38  private CpSolverResponse(
39  com.google.protobuf.CodedInputStream input,
40  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41  throws com.google.protobuf.InvalidProtocolBufferException {
42  this();
43  if (extensionRegistry == null) {
44  throw new java.lang.NullPointerException();
45  }
46  int mutable_bitField0_ = 0;
47  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
48  com.google.protobuf.UnknownFieldSet.newBuilder();
49  try {
50  boolean done = false;
51  while (!done) {
52  int tag = input.readTag();
53  switch (tag) {
54  case 0:
55  done = true;
56  break;
57  case 8: {
58  int rawValue = input.readEnum();
59 
60  status_ = rawValue;
61  break;
62  }
63  case 16: {
64  if (!((mutable_bitField0_ & 0x00000002) != 0)) {
65  solution_ = newLongList();
66  mutable_bitField0_ |= 0x00000002;
67  }
68  solution_.addLong(input.readInt64());
69  break;
70  }
71  case 18: {
72  int length = input.readRawVarint32();
73  int limit = input.pushLimit(length);
74  if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
75  solution_ = newLongList();
76  mutable_bitField0_ |= 0x00000002;
77  }
78  while (input.getBytesUntilLimit() > 0) {
79  solution_.addLong(input.readInt64());
80  }
81  input.popLimit(limit);
82  break;
83  }
84  case 25: {
85 
86  objectiveValue_ = input.readDouble();
87  break;
88  }
89  case 33: {
90 
91  bestObjectiveBound_ = input.readDouble();
92  break;
93  }
94  case 40: {
95 
96  allSolutionsWereFound_ = input.readBool();
97  break;
98  }
99  case 80: {
100 
101  numBooleans_ = input.readInt64();
102  break;
103  }
104  case 88: {
105 
106  numConflicts_ = input.readInt64();
107  break;
108  }
109  case 96: {
110 
111  numBranches_ = input.readInt64();
112  break;
113  }
114  case 104: {
115 
116  numBinaryPropagations_ = input.readInt64();
117  break;
118  }
119  case 112: {
120 
121  numIntegerPropagations_ = input.readInt64();
122  break;
123  }
124  case 121: {
125 
126  wallTime_ = input.readDouble();
127  break;
128  }
129  case 129: {
130 
131  userTime_ = input.readDouble();
132  break;
133  }
134  case 137: {
135 
136  deterministicTime_ = input.readDouble();
137  break;
138  }
139  case 144: {
140  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
141  solutionLowerBounds_ = newLongList();
142  mutable_bitField0_ |= 0x00000010;
143  }
144  solutionLowerBounds_.addLong(input.readInt64());
145  break;
146  }
147  case 146: {
148  int length = input.readRawVarint32();
149  int limit = input.pushLimit(length);
150  if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
151  solutionLowerBounds_ = newLongList();
152  mutable_bitField0_ |= 0x00000010;
153  }
154  while (input.getBytesUntilLimit() > 0) {
155  solutionLowerBounds_.addLong(input.readInt64());
156  }
157  input.popLimit(limit);
158  break;
159  }
160  case 152: {
161  if (!((mutable_bitField0_ & 0x00000020) != 0)) {
162  solutionUpperBounds_ = newLongList();
163  mutable_bitField0_ |= 0x00000020;
164  }
165  solutionUpperBounds_.addLong(input.readInt64());
166  break;
167  }
168  case 154: {
169  int length = input.readRawVarint32();
170  int limit = input.pushLimit(length);
171  if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
172  solutionUpperBounds_ = newLongList();
173  mutable_bitField0_ |= 0x00000020;
174  }
175  while (input.getBytesUntilLimit() > 0) {
176  solutionUpperBounds_.addLong(input.readInt64());
177  }
178  input.popLimit(limit);
179  break;
180  }
181  case 162: {
182  java.lang.String s = input.readStringRequireUtf8();
183 
184  solutionInfo_ = s;
185  break;
186  }
187  case 170: {
188  if (!((mutable_bitField0_ & 0x00000040) != 0)) {
189  tightenedVariables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>();
190  mutable_bitField0_ |= 0x00000040;
191  }
192  tightenedVariables_.add(
193  input.readMessage(com.google.ortools.sat.IntegerVariableProto.parser(), extensionRegistry));
194  break;
195  }
196  default: {
197  if (!parseUnknownField(
198  input, unknownFields, extensionRegistry, tag)) {
199  done = true;
200  }
201  break;
202  }
203  }
204  }
205  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
206  throw e.setUnfinishedMessage(this);
207  } catch (java.io.IOException e) {
208  throw new com.google.protobuf.InvalidProtocolBufferException(
209  e).setUnfinishedMessage(this);
210  } finally {
211  if (((mutable_bitField0_ & 0x00000002) != 0)) {
212  solution_.makeImmutable(); // C
213  }
214  if (((mutable_bitField0_ & 0x00000010) != 0)) {
215  solutionLowerBounds_.makeImmutable(); // C
216  }
217  if (((mutable_bitField0_ & 0x00000020) != 0)) {
218  solutionUpperBounds_.makeImmutable(); // C
219  }
220  if (((mutable_bitField0_ & 0x00000040) != 0)) {
221  tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
222  }
223  this.unknownFields = unknownFields.build();
224  makeExtensionsImmutable();
225  }
226  }
227  public static final com.google.protobuf.Descriptors.Descriptor
229  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
230  }
231 
232  @java.lang.Override
233  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
235  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
236  .ensureFieldAccessorsInitialized(
238  }
239 
240  private int bitField0_;
241  public static final int STATUS_FIELD_NUMBER = 1;
242  private int status_;
250  public int getStatusValue() {
251  return status_;
252  }
261  @SuppressWarnings("deprecation")
263  return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
264  }
265 
266  public static final int SOLUTION_FIELD_NUMBER = 2;
267  private com.google.protobuf.Internal.LongList solution_;
278  public java.util.List<java.lang.Long>
280  return solution_;
281  }
292  public int getSolutionCount() {
293  return solution_.size();
294  }
305  public long getSolution(int index) {
306  return solution_.getLong(index);
307  }
308  private int solutionMemoizedSerializedSize = -1;
309 
310  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 3;
311  private double objectiveValue_;
322  public double getObjectiveValue() {
323  return objectiveValue_;
324  }
325 
326  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 4;
327  private double bestObjectiveBound_;
337  public double getBestObjectiveBound() {
338  return bestObjectiveBound_;
339  }
340 
341  public static final int SOLUTION_LOWER_BOUNDS_FIELD_NUMBER = 18;
342  private com.google.protobuf.Internal.LongList solutionLowerBounds_;
355  public java.util.List<java.lang.Long>
357  return solutionLowerBounds_;
358  }
372  return solutionLowerBounds_.size();
373  }
386  public long getSolutionLowerBounds(int index) {
387  return solutionLowerBounds_.getLong(index);
388  }
389  private int solutionLowerBoundsMemoizedSerializedSize = -1;
390 
391  public static final int SOLUTION_UPPER_BOUNDS_FIELD_NUMBER = 19;
392  private com.google.protobuf.Internal.LongList solutionUpperBounds_;
396  public java.util.List<java.lang.Long>
398  return solutionUpperBounds_;
399  }
404  return solutionUpperBounds_.size();
405  }
409  public long getSolutionUpperBounds(int index) {
410  return solutionUpperBounds_.getLong(index);
411  }
412  private int solutionUpperBoundsMemoizedSerializedSize = -1;
413 
414  public static final int TIGHTENED_VARIABLES_FIELD_NUMBER = 21;
415  private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_;
433  return tightenedVariables_;
434  }
451  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
453  return tightenedVariables_;
454  }
472  return tightenedVariables_.size();
473  }
491  return tightenedVariables_.get(index);
492  }
510  int index) {
511  return tightenedVariables_.get(index);
512  }
513 
514  public static final int ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER = 5;
515  private boolean allSolutionsWereFound_;
526  public boolean getAllSolutionsWereFound() {
527  return allSolutionsWereFound_;
528  }
529 
530  public static final int NUM_BOOLEANS_FIELD_NUMBER = 10;
531  private long numBooleans_;
539  public long getNumBooleans() {
540  return numBooleans_;
541  }
542 
543  public static final int NUM_CONFLICTS_FIELD_NUMBER = 11;
544  private long numConflicts_;
548  public long getNumConflicts() {
549  return numConflicts_;
550  }
551 
552  public static final int NUM_BRANCHES_FIELD_NUMBER = 12;
553  private long numBranches_;
557  public long getNumBranches() {
558  return numBranches_;
559  }
560 
561  public static final int NUM_BINARY_PROPAGATIONS_FIELD_NUMBER = 13;
562  private long numBinaryPropagations_;
566  public long getNumBinaryPropagations() {
567  return numBinaryPropagations_;
568  }
569 
570  public static final int NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER = 14;
571  private long numIntegerPropagations_;
576  return numIntegerPropagations_;
577  }
578 
579  public static final int WALL_TIME_FIELD_NUMBER = 15;
580  private double wallTime_;
584  public double getWallTime() {
585  return wallTime_;
586  }
587 
588  public static final int USER_TIME_FIELD_NUMBER = 16;
589  private double userTime_;
593  public double getUserTime() {
594  return userTime_;
595  }
596 
597  public static final int DETERMINISTIC_TIME_FIELD_NUMBER = 17;
598  private double deterministicTime_;
602  public double getDeterministicTime() {
603  return deterministicTime_;
604  }
605 
606  public static final int SOLUTION_INFO_FIELD_NUMBER = 20;
607  private volatile java.lang.Object solutionInfo_;
615  public java.lang.String getSolutionInfo() {
616  java.lang.Object ref = solutionInfo_;
617  if (ref instanceof java.lang.String) {
618  return (java.lang.String) ref;
619  } else {
620  com.google.protobuf.ByteString bs =
621  (com.google.protobuf.ByteString) ref;
622  java.lang.String s = bs.toStringUtf8();
623  solutionInfo_ = s;
624  return s;
625  }
626  }
634  public com.google.protobuf.ByteString
636  java.lang.Object ref = solutionInfo_;
637  if (ref instanceof java.lang.String) {
638  com.google.protobuf.ByteString b =
639  com.google.protobuf.ByteString.copyFromUtf8(
640  (java.lang.String) ref);
641  solutionInfo_ = b;
642  return b;
643  } else {
644  return (com.google.protobuf.ByteString) ref;
645  }
646  }
647 
648  private byte memoizedIsInitialized = -1;
649  @java.lang.Override
650  public final boolean isInitialized() {
651  byte isInitialized = memoizedIsInitialized;
652  if (isInitialized == 1) return true;
653  if (isInitialized == 0) return false;
654 
655  memoizedIsInitialized = 1;
656  return true;
657  }
658 
659  @java.lang.Override
660  public void writeTo(com.google.protobuf.CodedOutputStream output)
661  throws java.io.IOException {
663  if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
664  output.writeEnum(1, status_);
665  }
666  if (getSolutionList().size() > 0) {
667  output.writeUInt32NoTag(18);
668  output.writeUInt32NoTag(solutionMemoizedSerializedSize);
669  }
670  for (int i = 0; i < solution_.size(); i++) {
671  output.writeInt64NoTag(solution_.getLong(i));
672  }
673  if (objectiveValue_ != 0D) {
674  output.writeDouble(3, objectiveValue_);
675  }
676  if (bestObjectiveBound_ != 0D) {
677  output.writeDouble(4, bestObjectiveBound_);
678  }
679  if (allSolutionsWereFound_ != false) {
680  output.writeBool(5, allSolutionsWereFound_);
681  }
682  if (numBooleans_ != 0L) {
683  output.writeInt64(10, numBooleans_);
684  }
685  if (numConflicts_ != 0L) {
686  output.writeInt64(11, numConflicts_);
687  }
688  if (numBranches_ != 0L) {
689  output.writeInt64(12, numBranches_);
690  }
691  if (numBinaryPropagations_ != 0L) {
692  output.writeInt64(13, numBinaryPropagations_);
693  }
694  if (numIntegerPropagations_ != 0L) {
695  output.writeInt64(14, numIntegerPropagations_);
696  }
697  if (wallTime_ != 0D) {
698  output.writeDouble(15, wallTime_);
699  }
700  if (userTime_ != 0D) {
701  output.writeDouble(16, userTime_);
702  }
703  if (deterministicTime_ != 0D) {
704  output.writeDouble(17, deterministicTime_);
705  }
706  if (getSolutionLowerBoundsList().size() > 0) {
707  output.writeUInt32NoTag(146);
708  output.writeUInt32NoTag(solutionLowerBoundsMemoizedSerializedSize);
709  }
710  for (int i = 0; i < solutionLowerBounds_.size(); i++) {
711  output.writeInt64NoTag(solutionLowerBounds_.getLong(i));
712  }
713  if (getSolutionUpperBoundsList().size() > 0) {
714  output.writeUInt32NoTag(154);
715  output.writeUInt32NoTag(solutionUpperBoundsMemoizedSerializedSize);
716  }
717  for (int i = 0; i < solutionUpperBounds_.size(); i++) {
718  output.writeInt64NoTag(solutionUpperBounds_.getLong(i));
719  }
720  if (!getSolutionInfoBytes().isEmpty()) {
721  com.google.protobuf.GeneratedMessageV3.writeString(output, 20, solutionInfo_);
722  }
723  for (int i = 0; i < tightenedVariables_.size(); i++) {
724  output.writeMessage(21, tightenedVariables_.get(i));
725  }
726  unknownFields.writeTo(output);
727  }
728 
729  @java.lang.Override
730  public int getSerializedSize() {
731  int size = memoizedSize;
732  if (size != -1) return size;
733 
734  size = 0;
735  if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
736  size += com.google.protobuf.CodedOutputStream
737  .computeEnumSize(1, status_);
738  }
739  {
740  int dataSize = 0;
741  for (int i = 0; i < solution_.size(); i++) {
742  dataSize += com.google.protobuf.CodedOutputStream
743  .computeInt64SizeNoTag(solution_.getLong(i));
744  }
745  size += dataSize;
746  if (!getSolutionList().isEmpty()) {
747  size += 1;
748  size += com.google.protobuf.CodedOutputStream
749  .computeInt32SizeNoTag(dataSize);
750  }
751  solutionMemoizedSerializedSize = dataSize;
752  }
753  if (objectiveValue_ != 0D) {
754  size += com.google.protobuf.CodedOutputStream
755  .computeDoubleSize(3, objectiveValue_);
756  }
757  if (bestObjectiveBound_ != 0D) {
758  size += com.google.protobuf.CodedOutputStream
759  .computeDoubleSize(4, bestObjectiveBound_);
760  }
761  if (allSolutionsWereFound_ != false) {
762  size += com.google.protobuf.CodedOutputStream
763  .computeBoolSize(5, allSolutionsWereFound_);
764  }
765  if (numBooleans_ != 0L) {
766  size += com.google.protobuf.CodedOutputStream
767  .computeInt64Size(10, numBooleans_);
768  }
769  if (numConflicts_ != 0L) {
770  size += com.google.protobuf.CodedOutputStream
771  .computeInt64Size(11, numConflicts_);
772  }
773  if (numBranches_ != 0L) {
774  size += com.google.protobuf.CodedOutputStream
775  .computeInt64Size(12, numBranches_);
776  }
777  if (numBinaryPropagations_ != 0L) {
778  size += com.google.protobuf.CodedOutputStream
779  .computeInt64Size(13, numBinaryPropagations_);
780  }
781  if (numIntegerPropagations_ != 0L) {
782  size += com.google.protobuf.CodedOutputStream
783  .computeInt64Size(14, numIntegerPropagations_);
784  }
785  if (wallTime_ != 0D) {
786  size += com.google.protobuf.CodedOutputStream
787  .computeDoubleSize(15, wallTime_);
788  }
789  if (userTime_ != 0D) {
790  size += com.google.protobuf.CodedOutputStream
791  .computeDoubleSize(16, userTime_);
792  }
793  if (deterministicTime_ != 0D) {
794  size += com.google.protobuf.CodedOutputStream
795  .computeDoubleSize(17, deterministicTime_);
796  }
797  {
798  int dataSize = 0;
799  for (int i = 0; i < solutionLowerBounds_.size(); i++) {
800  dataSize += com.google.protobuf.CodedOutputStream
801  .computeInt64SizeNoTag(solutionLowerBounds_.getLong(i));
802  }
803  size += dataSize;
804  if (!getSolutionLowerBoundsList().isEmpty()) {
805  size += 2;
806  size += com.google.protobuf.CodedOutputStream
807  .computeInt32SizeNoTag(dataSize);
808  }
809  solutionLowerBoundsMemoizedSerializedSize = dataSize;
810  }
811  {
812  int dataSize = 0;
813  for (int i = 0; i < solutionUpperBounds_.size(); i++) {
814  dataSize += com.google.protobuf.CodedOutputStream
815  .computeInt64SizeNoTag(solutionUpperBounds_.getLong(i));
816  }
817  size += dataSize;
818  if (!getSolutionUpperBoundsList().isEmpty()) {
819  size += 2;
820  size += com.google.protobuf.CodedOutputStream
821  .computeInt32SizeNoTag(dataSize);
822  }
823  solutionUpperBoundsMemoizedSerializedSize = dataSize;
824  }
825  if (!getSolutionInfoBytes().isEmpty()) {
826  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, solutionInfo_);
827  }
828  for (int i = 0; i < tightenedVariables_.size(); i++) {
829  size += com.google.protobuf.CodedOutputStream
830  .computeMessageSize(21, tightenedVariables_.get(i));
831  }
832  size += unknownFields.getSerializedSize();
833  memoizedSize = size;
834  return size;
835  }
836 
837  @java.lang.Override
838  public boolean equals(final java.lang.Object obj) {
839  if (obj == this) {
840  return true;
841  }
842  if (!(obj instanceof com.google.ortools.sat.CpSolverResponse)) {
843  return super.equals(obj);
844  }
846 
847  if (status_ != other.status_) return false;
848  if (!getSolutionList()
849  .equals(other.getSolutionList())) return false;
850  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
851  != java.lang.Double.doubleToLongBits(
852  other.getObjectiveValue())) return false;
853  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
854  != java.lang.Double.doubleToLongBits(
855  other.getBestObjectiveBound())) return false;
857  .equals(other.getSolutionLowerBoundsList())) return false;
859  .equals(other.getSolutionUpperBoundsList())) return false;
861  .equals(other.getTightenedVariablesList())) return false;
863  != other.getAllSolutionsWereFound()) return false;
864  if (getNumBooleans()
865  != other.getNumBooleans()) return false;
866  if (getNumConflicts()
867  != other.getNumConflicts()) return false;
868  if (getNumBranches()
869  != other.getNumBranches()) return false;
871  != other.getNumBinaryPropagations()) return false;
873  != other.getNumIntegerPropagations()) return false;
874  if (java.lang.Double.doubleToLongBits(getWallTime())
875  != java.lang.Double.doubleToLongBits(
876  other.getWallTime())) return false;
877  if (java.lang.Double.doubleToLongBits(getUserTime())
878  != java.lang.Double.doubleToLongBits(
879  other.getUserTime())) return false;
880  if (java.lang.Double.doubleToLongBits(getDeterministicTime())
881  != java.lang.Double.doubleToLongBits(
882  other.getDeterministicTime())) return false;
883  if (!getSolutionInfo()
884  .equals(other.getSolutionInfo())) return false;
885  if (!unknownFields.equals(other.unknownFields)) return false;
886  return true;
887  }
888 
889  @java.lang.Override
890  public int hashCode() {
891  if (memoizedHashCode != 0) {
892  return memoizedHashCode;
893  }
894  int hash = 41;
895  hash = (19 * hash) + getDescriptor().hashCode();
896  hash = (37 * hash) + STATUS_FIELD_NUMBER;
897  hash = (53 * hash) + status_;
898  if (getSolutionCount() > 0) {
899  hash = (37 * hash) + SOLUTION_FIELD_NUMBER;
900  hash = (53 * hash) + getSolutionList().hashCode();
901  }
902  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
903  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
904  java.lang.Double.doubleToLongBits(getObjectiveValue()));
905  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
906  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
907  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
908  if (getSolutionLowerBoundsCount() > 0) {
909  hash = (37 * hash) + SOLUTION_LOWER_BOUNDS_FIELD_NUMBER;
910  hash = (53 * hash) + getSolutionLowerBoundsList().hashCode();
911  }
912  if (getSolutionUpperBoundsCount() > 0) {
913  hash = (37 * hash) + SOLUTION_UPPER_BOUNDS_FIELD_NUMBER;
914  hash = (53 * hash) + getSolutionUpperBoundsList().hashCode();
915  }
916  if (getTightenedVariablesCount() > 0) {
917  hash = (37 * hash) + TIGHTENED_VARIABLES_FIELD_NUMBER;
918  hash = (53 * hash) + getTightenedVariablesList().hashCode();
919  }
920  hash = (37 * hash) + ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER;
921  hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
923  hash = (37 * hash) + NUM_BOOLEANS_FIELD_NUMBER;
924  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
925  getNumBooleans());
926  hash = (37 * hash) + NUM_CONFLICTS_FIELD_NUMBER;
927  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
928  getNumConflicts());
929  hash = (37 * hash) + NUM_BRANCHES_FIELD_NUMBER;
930  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
931  getNumBranches());
932  hash = (37 * hash) + NUM_BINARY_PROPAGATIONS_FIELD_NUMBER;
933  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
935  hash = (37 * hash) + NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER;
936  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
938  hash = (37 * hash) + WALL_TIME_FIELD_NUMBER;
939  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
940  java.lang.Double.doubleToLongBits(getWallTime()));
941  hash = (37 * hash) + USER_TIME_FIELD_NUMBER;
942  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
943  java.lang.Double.doubleToLongBits(getUserTime()));
944  hash = (37 * hash) + DETERMINISTIC_TIME_FIELD_NUMBER;
945  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
946  java.lang.Double.doubleToLongBits(getDeterministicTime()));
947  hash = (37 * hash) + SOLUTION_INFO_FIELD_NUMBER;
948  hash = (53 * hash) + getSolutionInfo().hashCode();
949  hash = (29 * hash) + unknownFields.hashCode();
950  memoizedHashCode = hash;
951  return hash;
952  }
953 
955  java.nio.ByteBuffer data)
956  throws com.google.protobuf.InvalidProtocolBufferException {
957  return PARSER.parseFrom(data);
958  }
960  java.nio.ByteBuffer data,
961  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
962  throws com.google.protobuf.InvalidProtocolBufferException {
963  return PARSER.parseFrom(data, extensionRegistry);
964  }
966  com.google.protobuf.ByteString data)
967  throws com.google.protobuf.InvalidProtocolBufferException {
968  return PARSER.parseFrom(data);
969  }
971  com.google.protobuf.ByteString data,
972  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
973  throws com.google.protobuf.InvalidProtocolBufferException {
974  return PARSER.parseFrom(data, extensionRegistry);
975  }
976  public static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data)
977  throws com.google.protobuf.InvalidProtocolBufferException {
978  return PARSER.parseFrom(data);
979  }
981  byte[] data,
982  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
983  throws com.google.protobuf.InvalidProtocolBufferException {
984  return PARSER.parseFrom(data, extensionRegistry);
985  }
986  public static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input)
987  throws java.io.IOException {
988  return com.google.protobuf.GeneratedMessageV3
989  .parseWithIOException(PARSER, input);
990  }
992  java.io.InputStream input,
993  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
994  throws java.io.IOException {
995  return com.google.protobuf.GeneratedMessageV3
996  .parseWithIOException(PARSER, input, extensionRegistry);
997  }
998  public static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input)
999  throws java.io.IOException {
1000  return com.google.protobuf.GeneratedMessageV3
1001  .parseDelimitedWithIOException(PARSER, input);
1002  }
1004  java.io.InputStream input,
1005  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1006  throws java.io.IOException {
1007  return com.google.protobuf.GeneratedMessageV3
1008  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1009  }
1011  com.google.protobuf.CodedInputStream input)
1012  throws java.io.IOException {
1013  return com.google.protobuf.GeneratedMessageV3
1014  .parseWithIOException(PARSER, input);
1015  }
1017  com.google.protobuf.CodedInputStream input,
1018  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1019  throws java.io.IOException {
1020  return com.google.protobuf.GeneratedMessageV3
1021  .parseWithIOException(PARSER, input, extensionRegistry);
1022  }
1023 
1024  @java.lang.Override
1025  public Builder newBuilderForType() { return newBuilder(); }
1026  public static Builder newBuilder() {
1027  return DEFAULT_INSTANCE.toBuilder();
1028  }
1030  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1031  }
1032  @java.lang.Override
1033  public Builder toBuilder() {
1034  return this == DEFAULT_INSTANCE
1035  ? new Builder() : new Builder().mergeFrom(this);
1036  }
1037 
1038  @java.lang.Override
1040  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1041  Builder builder = new Builder(parent);
1042  return builder;
1043  }
1053  public static final class Builder extends
1054  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
1055  // @@protoc_insertion_point(builder_implements:operations_research.sat.CpSolverResponse)
1056  com.google.ortools.sat.CpSolverResponseOrBuilder {
1057  public static final com.google.protobuf.Descriptors.Descriptor
1059  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1060  }
1061 
1062  @java.lang.Override
1063  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1065  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
1066  .ensureFieldAccessorsInitialized(
1068  }
1069 
1070  // Construct using com.google.ortools.sat.CpSolverResponse.newBuilder()
1071  private Builder() {
1072  maybeForceBuilderInitialization();
1073  }
1074 
1075  private Builder(
1076  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1077  super(parent);
1078  maybeForceBuilderInitialization();
1079  }
1080  private void maybeForceBuilderInitialization() {
1081  if (com.google.protobuf.GeneratedMessageV3
1082  .alwaysUseFieldBuilders) {
1083  getTightenedVariablesFieldBuilder();
1084  }
1085  }
1086  @java.lang.Override
1087  public Builder clear() {
1088  super.clear();
1089  status_ = 0;
1090 
1091  solution_ = emptyLongList();
1092  bitField0_ = (bitField0_ & ~0x00000002);
1093  objectiveValue_ = 0D;
1094 
1095  bestObjectiveBound_ = 0D;
1096 
1097  solutionLowerBounds_ = emptyLongList();
1098  bitField0_ = (bitField0_ & ~0x00000010);
1099  solutionUpperBounds_ = emptyLongList();
1100  bitField0_ = (bitField0_ & ~0x00000020);
1101  if (tightenedVariablesBuilder_ == null) {
1102  tightenedVariables_ = java.util.Collections.emptyList();
1103  bitField0_ = (bitField0_ & ~0x00000040);
1104  } else {
1105  tightenedVariablesBuilder_.clear();
1106  }
1107  allSolutionsWereFound_ = false;
1108 
1109  numBooleans_ = 0L;
1110 
1111  numConflicts_ = 0L;
1112 
1113  numBranches_ = 0L;
1114 
1115  numBinaryPropagations_ = 0L;
1116 
1117  numIntegerPropagations_ = 0L;
1118 
1119  wallTime_ = 0D;
1120 
1121  userTime_ = 0D;
1122 
1123  deterministicTime_ = 0D;
1124 
1125  solutionInfo_ = "";
1126 
1127  return this;
1128  }
1129 
1130  @java.lang.Override
1131  public com.google.protobuf.Descriptors.Descriptor
1133  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1134  }
1135 
1136  @java.lang.Override
1139  }
1140 
1141  @java.lang.Override
1144  if (!result.isInitialized()) {
1145  throw newUninitializedMessageException(result);
1146  }
1147  return result;
1148  }
1149 
1150  @java.lang.Override
1153  int from_bitField0_ = bitField0_;
1154  int to_bitField0_ = 0;
1155  result.status_ = status_;
1156  if (((bitField0_ & 0x00000002) != 0)) {
1157  solution_.makeImmutable();
1158  bitField0_ = (bitField0_ & ~0x00000002);
1159  }
1160  result.solution_ = solution_;
1161  result.objectiveValue_ = objectiveValue_;
1162  result.bestObjectiveBound_ = bestObjectiveBound_;
1163  if (((bitField0_ & 0x00000010) != 0)) {
1164  solutionLowerBounds_.makeImmutable();
1165  bitField0_ = (bitField0_ & ~0x00000010);
1166  }
1167  result.solutionLowerBounds_ = solutionLowerBounds_;
1168  if (((bitField0_ & 0x00000020) != 0)) {
1169  solutionUpperBounds_.makeImmutable();
1170  bitField0_ = (bitField0_ & ~0x00000020);
1171  }
1172  result.solutionUpperBounds_ = solutionUpperBounds_;
1173  if (tightenedVariablesBuilder_ == null) {
1174  if (((bitField0_ & 0x00000040) != 0)) {
1175  tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
1176  bitField0_ = (bitField0_ & ~0x00000040);
1177  }
1178  result.tightenedVariables_ = tightenedVariables_;
1179  } else {
1180  result.tightenedVariables_ = tightenedVariablesBuilder_.build();
1181  }
1182  result.allSolutionsWereFound_ = allSolutionsWereFound_;
1183  result.numBooleans_ = numBooleans_;
1184  result.numConflicts_ = numConflicts_;
1185  result.numBranches_ = numBranches_;
1186  result.numBinaryPropagations_ = numBinaryPropagations_;
1187  result.numIntegerPropagations_ = numIntegerPropagations_;
1188  result.wallTime_ = wallTime_;
1189  result.userTime_ = userTime_;
1190  result.deterministicTime_ = deterministicTime_;
1191  result.solutionInfo_ = solutionInfo_;
1192  result.bitField0_ = to_bitField0_;
1193  onBuilt();
1194  return result;
1195  }
1196 
1197  @java.lang.Override
1198  public Builder clone() {
1199  return super.clone();
1200  }
1201  @java.lang.Override
1203  com.google.protobuf.Descriptors.FieldDescriptor field,
1204  java.lang.Object value) {
1205  return super.setField(field, value);
1206  }
1207  @java.lang.Override
1209  com.google.protobuf.Descriptors.FieldDescriptor field) {
1210  return super.clearField(field);
1211  }
1212  @java.lang.Override
1214  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1215  return super.clearOneof(oneof);
1216  }
1217  @java.lang.Override
1219  com.google.protobuf.Descriptors.FieldDescriptor field,
1220  int index, java.lang.Object value) {
1221  return super.setRepeatedField(field, index, value);
1222  }
1223  @java.lang.Override
1225  com.google.protobuf.Descriptors.FieldDescriptor field,
1226  java.lang.Object value) {
1227  return super.addRepeatedField(field, value);
1228  }
1229  @java.lang.Override
1230  public Builder mergeFrom(com.google.protobuf.Message other) {
1231  if (other instanceof com.google.ortools.sat.CpSolverResponse) {
1233  } else {
1234  super.mergeFrom(other);
1235  return this;
1236  }
1237  }
1238 
1240  if (other == com.google.ortools.sat.CpSolverResponse.getDefaultInstance()) return this;
1241  if (other.status_ != 0) {
1242  setStatusValue(other.getStatusValue());
1243  }
1244  if (!other.solution_.isEmpty()) {
1245  if (solution_.isEmpty()) {
1246  solution_ = other.solution_;
1247  bitField0_ = (bitField0_ & ~0x00000002);
1248  } else {
1249  ensureSolutionIsMutable();
1250  solution_.addAll(other.solution_);
1251  }
1252  onChanged();
1253  }
1254  if (other.getObjectiveValue() != 0D) {
1255  setObjectiveValue(other.getObjectiveValue());
1256  }
1257  if (other.getBestObjectiveBound() != 0D) {
1258  setBestObjectiveBound(other.getBestObjectiveBound());
1259  }
1260  if (!other.solutionLowerBounds_.isEmpty()) {
1261  if (solutionLowerBounds_.isEmpty()) {
1262  solutionLowerBounds_ = other.solutionLowerBounds_;
1263  bitField0_ = (bitField0_ & ~0x00000010);
1264  } else {
1265  ensureSolutionLowerBoundsIsMutable();
1266  solutionLowerBounds_.addAll(other.solutionLowerBounds_);
1267  }
1268  onChanged();
1269  }
1270  if (!other.solutionUpperBounds_.isEmpty()) {
1271  if (solutionUpperBounds_.isEmpty()) {
1272  solutionUpperBounds_ = other.solutionUpperBounds_;
1273  bitField0_ = (bitField0_ & ~0x00000020);
1274  } else {
1275  ensureSolutionUpperBoundsIsMutable();
1276  solutionUpperBounds_.addAll(other.solutionUpperBounds_);
1277  }
1278  onChanged();
1279  }
1280  if (tightenedVariablesBuilder_ == null) {
1281  if (!other.tightenedVariables_.isEmpty()) {
1282  if (tightenedVariables_.isEmpty()) {
1283  tightenedVariables_ = other.tightenedVariables_;
1284  bitField0_ = (bitField0_ & ~0x00000040);
1285  } else {
1286  ensureTightenedVariablesIsMutable();
1287  tightenedVariables_.addAll(other.tightenedVariables_);
1288  }
1289  onChanged();
1290  }
1291  } else {
1292  if (!other.tightenedVariables_.isEmpty()) {
1293  if (tightenedVariablesBuilder_.isEmpty()) {
1294  tightenedVariablesBuilder_.dispose();
1295  tightenedVariablesBuilder_ = null;
1296  tightenedVariables_ = other.tightenedVariables_;
1297  bitField0_ = (bitField0_ & ~0x00000040);
1298  tightenedVariablesBuilder_ =
1299  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1300  getTightenedVariablesFieldBuilder() : null;
1301  } else {
1302  tightenedVariablesBuilder_.addAllMessages(other.tightenedVariables_);
1303  }
1304  }
1305  }
1306  if (other.getAllSolutionsWereFound() != false) {
1307  setAllSolutionsWereFound(other.getAllSolutionsWereFound());
1308  }
1309  if (other.getNumBooleans() != 0L) {
1310  setNumBooleans(other.getNumBooleans());
1311  }
1312  if (other.getNumConflicts() != 0L) {
1313  setNumConflicts(other.getNumConflicts());
1314  }
1315  if (other.getNumBranches() != 0L) {
1316  setNumBranches(other.getNumBranches());
1317  }
1318  if (other.getNumBinaryPropagations() != 0L) {
1319  setNumBinaryPropagations(other.getNumBinaryPropagations());
1320  }
1321  if (other.getNumIntegerPropagations() != 0L) {
1322  setNumIntegerPropagations(other.getNumIntegerPropagations());
1323  }
1324  if (other.getWallTime() != 0D) {
1325  setWallTime(other.getWallTime());
1326  }
1327  if (other.getUserTime() != 0D) {
1328  setUserTime(other.getUserTime());
1329  }
1330  if (other.getDeterministicTime() != 0D) {
1331  setDeterministicTime(other.getDeterministicTime());
1332  }
1333  if (!other.getSolutionInfo().isEmpty()) {
1334  solutionInfo_ = other.solutionInfo_;
1335  onChanged();
1336  }
1337  this.mergeUnknownFields(other.unknownFields);
1338  onChanged();
1339  return this;
1340  }
1341 
1342  @java.lang.Override
1343  public final boolean isInitialized() {
1344  return true;
1345  }
1346 
1347  @java.lang.Override
1349  com.google.protobuf.CodedInputStream input,
1350  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1351  throws java.io.IOException {
1352  com.google.ortools.sat.CpSolverResponse parsedMessage = null;
1353  try {
1354  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1355  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1356  parsedMessage = (com.google.ortools.sat.CpSolverResponse) e.getUnfinishedMessage();
1357  throw e.unwrapIOException();
1358  } finally {
1359  if (parsedMessage != null) {
1360  mergeFrom(parsedMessage);
1361  }
1362  }
1363  return this;
1364  }
1365  private int bitField0_;
1366 
1367  private int status_ = 0;
1375  public int getStatusValue() {
1376  return status_;
1377  }
1385  public Builder setStatusValue(int value) {
1386  status_ = value;
1387  onChanged();
1388  return this;
1389  }
1398  @SuppressWarnings("deprecation")
1400  return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
1401  }
1410  if (value == null) {
1411  throw new NullPointerException();
1412  }
1413 
1414  status_ = value.getNumber();
1415  onChanged();
1416  return this;
1417  }
1426 
1427  status_ = 0;
1428  onChanged();
1429  return this;
1430  }
1431 
1432  private com.google.protobuf.Internal.LongList solution_ = emptyLongList();
1433  private void ensureSolutionIsMutable() {
1434  if (!((bitField0_ & 0x00000002) != 0)) {
1435  solution_ = mutableCopy(solution_);
1436  bitField0_ |= 0x00000002;
1437  }
1438  }
1449  public java.util.List<java.lang.Long>
1451  return ((bitField0_ & 0x00000002) != 0) ?
1452  java.util.Collections.unmodifiableList(solution_) : solution_;
1453  }
1464  public int getSolutionCount() {
1465  return solution_.size();
1466  }
1477  public long getSolution(int index) {
1478  return solution_.getLong(index);
1479  }
1491  int index, long value) {
1492  ensureSolutionIsMutable();
1493  solution_.setLong(index, value);
1494  onChanged();
1495  return this;
1496  }
1507  public Builder addSolution(long value) {
1508  ensureSolutionIsMutable();
1509  solution_.addLong(value);
1510  onChanged();
1511  return this;
1512  }
1524  java.lang.Iterable<? extends java.lang.Long> values) {
1525  ensureSolutionIsMutable();
1526  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1527  values, solution_);
1528  onChanged();
1529  return this;
1530  }
1542  solution_ = emptyLongList();
1543  bitField0_ = (bitField0_ & ~0x00000002);
1544  onChanged();
1545  return this;
1546  }
1547 
1548  private double objectiveValue_ ;
1559  public double getObjectiveValue() {
1560  return objectiveValue_;
1561  }
1572  public Builder setObjectiveValue(double value) {
1573 
1574  objectiveValue_ = value;
1575  onChanged();
1576  return this;
1577  }
1589 
1590  objectiveValue_ = 0D;
1591  onChanged();
1592  return this;
1593  }
1594 
1595  private double bestObjectiveBound_ ;
1605  public double getBestObjectiveBound() {
1606  return bestObjectiveBound_;
1607  }
1617  public Builder setBestObjectiveBound(double value) {
1618 
1619  bestObjectiveBound_ = value;
1620  onChanged();
1621  return this;
1622  }
1633 
1634  bestObjectiveBound_ = 0D;
1635  onChanged();
1636  return this;
1637  }
1638 
1639  private com.google.protobuf.Internal.LongList solutionLowerBounds_ = emptyLongList();
1640  private void ensureSolutionLowerBoundsIsMutable() {
1641  if (!((bitField0_ & 0x00000010) != 0)) {
1642  solutionLowerBounds_ = mutableCopy(solutionLowerBounds_);
1643  bitField0_ |= 0x00000010;
1644  }
1645  }
1658  public java.util.List<java.lang.Long>
1660  return ((bitField0_ & 0x00000010) != 0) ?
1661  java.util.Collections.unmodifiableList(solutionLowerBounds_) : solutionLowerBounds_;
1662  }
1676  return solutionLowerBounds_.size();
1677  }
1690  public long getSolutionLowerBounds(int index) {
1691  return solutionLowerBounds_.getLong(index);
1692  }
1706  int index, long value) {
1707  ensureSolutionLowerBoundsIsMutable();
1708  solutionLowerBounds_.setLong(index, value);
1709  onChanged();
1710  return this;
1711  }
1724  public Builder addSolutionLowerBounds(long value) {
1725  ensureSolutionLowerBoundsIsMutable();
1726  solutionLowerBounds_.addLong(value);
1727  onChanged();
1728  return this;
1729  }
1743  java.lang.Iterable<? extends java.lang.Long> values) {
1744  ensureSolutionLowerBoundsIsMutable();
1745  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1746  values, solutionLowerBounds_);
1747  onChanged();
1748  return this;
1749  }
1763  solutionLowerBounds_ = emptyLongList();
1764  bitField0_ = (bitField0_ & ~0x00000010);
1765  onChanged();
1766  return this;
1767  }
1768 
1769  private com.google.protobuf.Internal.LongList solutionUpperBounds_ = emptyLongList();
1770  private void ensureSolutionUpperBoundsIsMutable() {
1771  if (!((bitField0_ & 0x00000020) != 0)) {
1772  solutionUpperBounds_ = mutableCopy(solutionUpperBounds_);
1773  bitField0_ |= 0x00000020;
1774  }
1775  }
1779  public java.util.List<java.lang.Long>
1781  return ((bitField0_ & 0x00000020) != 0) ?
1782  java.util.Collections.unmodifiableList(solutionUpperBounds_) : solutionUpperBounds_;
1783  }
1788  return solutionUpperBounds_.size();
1789  }
1793  public long getSolutionUpperBounds(int index) {
1794  return solutionUpperBounds_.getLong(index);
1795  }
1800  int index, long value) {
1801  ensureSolutionUpperBoundsIsMutable();
1802  solutionUpperBounds_.setLong(index, value);
1803  onChanged();
1804  return this;
1805  }
1809  public Builder addSolutionUpperBounds(long value) {
1810  ensureSolutionUpperBoundsIsMutable();
1811  solutionUpperBounds_.addLong(value);
1812  onChanged();
1813  return this;
1814  }
1819  java.lang.Iterable<? extends java.lang.Long> values) {
1820  ensureSolutionUpperBoundsIsMutable();
1821  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1822  values, solutionUpperBounds_);
1823  onChanged();
1824  return this;
1825  }
1830  solutionUpperBounds_ = emptyLongList();
1831  bitField0_ = (bitField0_ & ~0x00000020);
1832  onChanged();
1833  return this;
1834  }
1835 
1836  private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_ =
1837  java.util.Collections.emptyList();
1838  private void ensureTightenedVariablesIsMutable() {
1839  if (!((bitField0_ & 0x00000040) != 0)) {
1840  tightenedVariables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(tightenedVariables_);
1841  bitField0_ |= 0x00000040;
1842  }
1843  }
1844 
1845  private com.google.protobuf.RepeatedFieldBuilderV3<
1847 
1865  if (tightenedVariablesBuilder_ == null) {
1866  return java.util.Collections.unmodifiableList(tightenedVariables_);
1867  } else {
1868  return tightenedVariablesBuilder_.getMessageList();
1869  }
1870  }
1888  if (tightenedVariablesBuilder_ == null) {
1889  return tightenedVariables_.size();
1890  } else {
1891  return tightenedVariablesBuilder_.getCount();
1892  }
1893  }
1911  if (tightenedVariablesBuilder_ == null) {
1912  return tightenedVariables_.get(index);
1913  } else {
1914  return tightenedVariablesBuilder_.getMessage(index);
1915  }
1916  }
1934  int index, com.google.ortools.sat.IntegerVariableProto value) {
1935  if (tightenedVariablesBuilder_ == null) {
1936  if (value == null) {
1937  throw new NullPointerException();
1938  }
1939  ensureTightenedVariablesIsMutable();
1940  tightenedVariables_.set(index, value);
1941  onChanged();
1942  } else {
1943  tightenedVariablesBuilder_.setMessage(index, value);
1944  }
1945  return this;
1946  }
1964  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1965  if (tightenedVariablesBuilder_ == null) {
1966  ensureTightenedVariablesIsMutable();
1967  tightenedVariables_.set(index, builderForValue.build());
1968  onChanged();
1969  } else {
1970  tightenedVariablesBuilder_.setMessage(index, builderForValue.build());
1971  }
1972  return this;
1973  }
1991  if (tightenedVariablesBuilder_ == null) {
1992  if (value == null) {
1993  throw new NullPointerException();
1994  }
1995  ensureTightenedVariablesIsMutable();
1996  tightenedVariables_.add(value);
1997  onChanged();
1998  } else {
1999  tightenedVariablesBuilder_.addMessage(value);
2000  }
2001  return this;
2002  }
2020  int index, com.google.ortools.sat.IntegerVariableProto value) {
2021  if (tightenedVariablesBuilder_ == null) {
2022  if (value == null) {
2023  throw new NullPointerException();
2024  }
2025  ensureTightenedVariablesIsMutable();
2026  tightenedVariables_.add(index, value);
2027  onChanged();
2028  } else {
2029  tightenedVariablesBuilder_.addMessage(index, value);
2030  }
2031  return this;
2032  }
2050  com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2051  if (tightenedVariablesBuilder_ == null) {
2052  ensureTightenedVariablesIsMutable();
2053  tightenedVariables_.add(builderForValue.build());
2054  onChanged();
2055  } else {
2056  tightenedVariablesBuilder_.addMessage(builderForValue.build());
2057  }
2058  return this;
2059  }
2077  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2078  if (tightenedVariablesBuilder_ == null) {
2079  ensureTightenedVariablesIsMutable();
2080  tightenedVariables_.add(index, builderForValue.build());
2081  onChanged();
2082  } else {
2083  tightenedVariablesBuilder_.addMessage(index, builderForValue.build());
2084  }
2085  return this;
2086  }
2104  java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
2105  if (tightenedVariablesBuilder_ == null) {
2106  ensureTightenedVariablesIsMutable();
2107  com.google.protobuf.AbstractMessageLite.Builder.addAll(
2108  values, tightenedVariables_);
2109  onChanged();
2110  } else {
2111  tightenedVariablesBuilder_.addAllMessages(values);
2112  }
2113  return this;
2114  }
2132  if (tightenedVariablesBuilder_ == null) {
2133  tightenedVariables_ = java.util.Collections.emptyList();
2134  bitField0_ = (bitField0_ & ~0x00000040);
2135  onChanged();
2136  } else {
2137  tightenedVariablesBuilder_.clear();
2138  }
2139  return this;
2140  }
2157  public Builder removeTightenedVariables(int index) {
2158  if (tightenedVariablesBuilder_ == null) {
2159  ensureTightenedVariablesIsMutable();
2160  tightenedVariables_.remove(index);
2161  onChanged();
2162  } else {
2163  tightenedVariablesBuilder_.remove(index);
2164  }
2165  return this;
2166  }
2184  int index) {
2185  return getTightenedVariablesFieldBuilder().getBuilder(index);
2186  }
2204  int index) {
2205  if (tightenedVariablesBuilder_ == null) {
2206  return tightenedVariables_.get(index); } else {
2207  return tightenedVariablesBuilder_.getMessageOrBuilder(index);
2208  }
2209  }
2226  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
2228  if (tightenedVariablesBuilder_ != null) {
2229  return tightenedVariablesBuilder_.getMessageOrBuilderList();
2230  } else {
2231  return java.util.Collections.unmodifiableList(tightenedVariables_);
2232  }
2233  }
2251  return getTightenedVariablesFieldBuilder().addBuilder(
2253  }
2271  int index) {
2272  return getTightenedVariablesFieldBuilder().addBuilder(
2274  }
2291  public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
2293  return getTightenedVariablesFieldBuilder().getBuilderList();
2294  }
2295  private com.google.protobuf.RepeatedFieldBuilderV3<
2297  getTightenedVariablesFieldBuilder() {
2298  if (tightenedVariablesBuilder_ == null) {
2299  tightenedVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2301  tightenedVariables_,
2302  ((bitField0_ & 0x00000040) != 0),
2303  getParentForChildren(),
2304  isClean());
2305  tightenedVariables_ = null;
2306  }
2307  return tightenedVariablesBuilder_;
2308  }
2309 
2310  private boolean allSolutionsWereFound_ ;
2321  public boolean getAllSolutionsWereFound() {
2322  return allSolutionsWereFound_;
2323  }
2334  public Builder setAllSolutionsWereFound(boolean value) {
2335 
2336  allSolutionsWereFound_ = value;
2337  onChanged();
2338  return this;
2339  }
2351 
2352  allSolutionsWereFound_ = false;
2353  onChanged();
2354  return this;
2355  }
2356 
2357  private long numBooleans_ ;
2365  public long getNumBooleans() {
2366  return numBooleans_;
2367  }
2375  public Builder setNumBooleans(long value) {
2376 
2377  numBooleans_ = value;
2378  onChanged();
2379  return this;
2380  }
2389 
2390  numBooleans_ = 0L;
2391  onChanged();
2392  return this;
2393  }
2394 
2395  private long numConflicts_ ;
2399  public long getNumConflicts() {
2400  return numConflicts_;
2401  }
2405  public Builder setNumConflicts(long value) {
2406 
2407  numConflicts_ = value;
2408  onChanged();
2409  return this;
2410  }
2415 
2416  numConflicts_ = 0L;
2417  onChanged();
2418  return this;
2419  }
2420 
2421  private long numBranches_ ;
2425  public long getNumBranches() {
2426  return numBranches_;
2427  }
2431  public Builder setNumBranches(long value) {
2432 
2433  numBranches_ = value;
2434  onChanged();
2435  return this;
2436  }
2441 
2442  numBranches_ = 0L;
2443  onChanged();
2444  return this;
2445  }
2446 
2447  private long numBinaryPropagations_ ;
2452  return numBinaryPropagations_;
2453  }
2457  public Builder setNumBinaryPropagations(long value) {
2458 
2459  numBinaryPropagations_ = value;
2460  onChanged();
2461  return this;
2462  }
2467 
2468  numBinaryPropagations_ = 0L;
2469  onChanged();
2470  return this;
2471  }
2472 
2473  private long numIntegerPropagations_ ;
2478  return numIntegerPropagations_;
2479  }
2483  public Builder setNumIntegerPropagations(long value) {
2484 
2485  numIntegerPropagations_ = value;
2486  onChanged();
2487  return this;
2488  }
2493 
2494  numIntegerPropagations_ = 0L;
2495  onChanged();
2496  return this;
2497  }
2498 
2499  private double wallTime_ ;
2503  public double getWallTime() {
2504  return wallTime_;
2505  }
2509  public Builder setWallTime(double value) {
2510 
2511  wallTime_ = value;
2512  onChanged();
2513  return this;
2514  }
2519 
2520  wallTime_ = 0D;
2521  onChanged();
2522  return this;
2523  }
2524 
2525  private double userTime_ ;
2529  public double getUserTime() {
2530  return userTime_;
2531  }
2535  public Builder setUserTime(double value) {
2536 
2537  userTime_ = value;
2538  onChanged();
2539  return this;
2540  }
2545 
2546  userTime_ = 0D;
2547  onChanged();
2548  return this;
2549  }
2550 
2551  private double deterministicTime_ ;
2555  public double getDeterministicTime() {
2556  return deterministicTime_;
2557  }
2561  public Builder setDeterministicTime(double value) {
2562 
2563  deterministicTime_ = value;
2564  onChanged();
2565  return this;
2566  }
2571 
2572  deterministicTime_ = 0D;
2573  onChanged();
2574  return this;
2575  }
2576 
2577  private java.lang.Object solutionInfo_ = "";
2585  public java.lang.String getSolutionInfo() {
2586  java.lang.Object ref = solutionInfo_;
2587  if (!(ref instanceof java.lang.String)) {
2588  com.google.protobuf.ByteString bs =
2589  (com.google.protobuf.ByteString) ref;
2590  java.lang.String s = bs.toStringUtf8();
2591  solutionInfo_ = s;
2592  return s;
2593  } else {
2594  return (java.lang.String) ref;
2595  }
2596  }
2604  public com.google.protobuf.ByteString
2606  java.lang.Object ref = solutionInfo_;
2607  if (ref instanceof String) {
2608  com.google.protobuf.ByteString b =
2609  com.google.protobuf.ByteString.copyFromUtf8(
2610  (java.lang.String) ref);
2611  solutionInfo_ = b;
2612  return b;
2613  } else {
2614  return (com.google.protobuf.ByteString) ref;
2615  }
2616  }
2625  java.lang.String value) {
2626  if (value == null) {
2627  throw new NullPointerException();
2628  }
2629 
2630  solutionInfo_ = value;
2631  onChanged();
2632  return this;
2633  }
2642 
2643  solutionInfo_ = getDefaultInstance().getSolutionInfo();
2644  onChanged();
2645  return this;
2646  }
2655  com.google.protobuf.ByteString value) {
2656  if (value == null) {
2657  throw new NullPointerException();
2658  }
2659  checkByteStringIsUtf8(value);
2660 
2661  solutionInfo_ = value;
2662  onChanged();
2663  return this;
2664  }
2665  @java.lang.Override
2667  final com.google.protobuf.UnknownFieldSet unknownFields) {
2668  return super.setUnknownFields(unknownFields);
2669  }
2670 
2671  @java.lang.Override
2673  final com.google.protobuf.UnknownFieldSet unknownFields) {
2674  return super.mergeUnknownFields(unknownFields);
2675  }
2676 
2677 
2678  // @@protoc_insertion_point(builder_scope:operations_research.sat.CpSolverResponse)
2679  }
2680 
2681  // @@protoc_insertion_point(class_scope:operations_research.sat.CpSolverResponse)
2682  private static final com.google.ortools.sat.CpSolverResponse DEFAULT_INSTANCE;
2683  static {
2684  DEFAULT_INSTANCE = new com.google.ortools.sat.CpSolverResponse();
2685  }
2686 
2688  return DEFAULT_INSTANCE;
2689  }
2690 
2691  private static final com.google.protobuf.Parser<CpSolverResponse>
2692  PARSER = new com.google.protobuf.AbstractParser<CpSolverResponse>() {
2693  @java.lang.Override
2694  public CpSolverResponse parsePartialFrom(
2695  com.google.protobuf.CodedInputStream input,
2696  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2697  throws com.google.protobuf.InvalidProtocolBufferException {
2698  return new CpSolverResponse(input, extensionRegistry);
2699  }
2700  };
2701 
2702  public static com.google.protobuf.Parser<CpSolverResponse> parser() {
2703  return PARSER;
2704  }
2705 
2706  @java.lang.Override
2707  public com.google.protobuf.Parser<CpSolverResponse> getParserForType() {
2708  return PARSER;
2709  }
2710 
2711  @java.lang.Override
2713  return DEFAULT_INSTANCE;
2714  }
2715 
2716 }
2717 
java.util.List< java.lang.Long > getSolutionLowerBoundsList()
static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input)
long getNumIntegerPropagations()
int64 num_integer_propagations = 14;
Builder clearSolutionUpperBounds()
repeated int64 solution_upper_bounds = 19;
com.google.ortools.sat.IntegerVariableProtoOrBuilder getTightenedVariablesOrBuilder(int index)
Builder setSolutionLowerBounds(int index, long value)
static Builder newBuilder(com.google.ortools.sat.CpSolverResponse prototype)
Builder clearDeterministicTime()
double deterministic_time = 17;
double getUserTime()
double user_time = 16;
com.google.ortools.sat.IntegerVariableProto getTightenedVariables(int index)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addAllTightenedVariables(java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getTightenedVariablesOrBuilderList()
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getTightenedVariablesOrBuilderList()
Builder addAllSolutionLowerBounds(java.lang.Iterable<? extends java.lang.Long > values)
Builder mergeFrom(com.google.ortools.sat.CpSolverResponse other)
java.util.List< java.lang.Long > getSolutionUpperBoundsList()
repeated int64 solution_upper_bounds = 19;
com.google.protobuf.ByteString getSolutionInfoBytes()
long getNumConflicts()
int64 num_conflicts = 11;
long getNumBranches()
int64 num_branches = 12;
.lang.Deprecated static CpSolverStatus valueOf(int value)
Builder setUserTime(double value)
double user_time = 16;
java.util.List< com.google.ortools.sat.IntegerVariableProto > getTightenedVariablesList()
static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setNumBinaryPropagations(long value)
int64 num_binary_propagations = 13;
int getSolutionUpperBoundsCount()
repeated int64 solution_upper_bounds = 19;
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
java.util.List< com.google.ortools.sat.IntegerVariableProto > getTightenedVariablesList()
Builder setSolutionInfoBytes(com.google.protobuf.ByteString value)
java.util.List< com.google.ortools.sat.IntegerVariableProto.Builder > getTightenedVariablesBuilderList()
.lang.Override com.google.ortools.sat.CpSolverResponse buildPartial()
com.google.ortools.sat.IntegerVariableProto.Builder addTightenedVariablesBuilder(int index)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
static com.google.ortools.sat.CpSolverResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
long getSolutionUpperBounds(int index)
repeated int64 solution_upper_bounds = 19;
java.util.List< java.lang.Long > getSolutionList()
Builder clearNumConflicts()
int64 num_conflicts = 11;
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
com.google.ortools.sat.IntegerVariableProtoOrBuilder getTightenedVariablesOrBuilder(int index)
double getDeterministicTime()
double deterministic_time = 17;
static com.google.ortools.sat.IntegerVariableProto getDefaultInstance()
long getNumBinaryPropagations()
int64 num_binary_propagations = 13;
Builder setTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
Builder clearNumBranches()
int64 num_branches = 12;
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.ByteString data)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input)
Builder setNumConflicts(long value)
int64 num_conflicts = 11;
com.google.protobuf.ByteString getSolutionInfoBytes()
Builder clearNumIntegerPropagations()
int64 num_integer_propagations = 14;
Builder addTightenedVariables(com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
Builder addTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
double getWallTime()
double wall_time = 15;
Builder clearNumBinaryPropagations()
int64 num_binary_propagations = 13;
Builder setDeterministicTime(double value)
double deterministic_time = 17;
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
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)
static com.google.protobuf.Parser< CpSolverResponse > parser()
Builder addAllSolution(java.lang.Iterable<? extends java.lang.Long > values)
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
double getDeterministicTime()
double deterministic_time = 17;
.lang.Override com.google.protobuf.Parser< CpSolverResponse > getParserForType()
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
Builder setNumIntegerPropagations(long value)
int64 num_integer_propagations = 14;
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override com.google.ortools.sat.CpSolverResponse getDefaultInstanceForType()
.lang.Override final boolean isInitialized()
Builder setTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
long getNumBinaryPropagations()
int64 num_binary_propagations = 13;
.lang.Override com.google.ortools.sat.CpSolverResponse build()
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder addTightenedVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
static com.google.ortools.sat.CpSolverResponse getDefaultInstance()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder addTightenedVariables(com.google.ortools.sat.IntegerVariableProto value)
com.google.ortools.sat.IntegerVariableProto getTightenedVariables(int index)
long getSolutionUpperBounds(int index)
repeated int64 solution_upper_bounds = 19;
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Builder setWallTime(double value)
double wall_time = 15;
java.util.List< java.lang.Long > getSolutionList()
com.google.ortools.sat.IntegerVariableProto.Builder addTightenedVariablesBuilder()
Builder setNumBranches(long value)
int64 num_branches = 12;
static com.google.protobuf.Parser< IntegerVariableProto > parser()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder addSolutionUpperBounds(long value)
repeated int64 solution_upper_bounds = 19;
static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.IntegerVariableProto.Builder getTightenedVariablesBuilder(int index)
com.google.ortools.sat.CpSolverStatus getStatus()
.lang.Override boolean equals(final java.lang.Object obj)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.sat.CpSolverResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< java.lang.Long > getSolutionUpperBoundsList()
repeated int64 solution_upper_bounds = 19;
Builder setStatus(com.google.ortools.sat.CpSolverStatus value)
java.util.List< java.lang.Long > getSolutionLowerBoundsList()
.lang.Override com.google.ortools.sat.CpSolverResponse getDefaultInstanceForType()
int getSolutionUpperBoundsCount()
repeated int64 solution_upper_bounds = 19;
long getNumIntegerPropagations()
int64 num_integer_propagations = 14;
Builder setSolutionUpperBounds(int index, long value)
repeated int64 solution_upper_bounds = 19;
static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data)
Builder addAllSolutionUpperBounds(java.lang.Iterable<? extends java.lang.Long > values)
repeated int64 solution_upper_bounds = 19;
static com.google.ortools.sat.CpSolverResponse parseFrom(java.nio.ByteBuffer data)