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  @SuppressWarnings({"unused"})
35  protected java.lang.Object newInstance(
36  UnusedPrivateParameter unused) {
37  return new CpSolverResponse();
38  }
39 
40  @java.lang.Override
41  public final com.google.protobuf.UnknownFieldSet
43  return this.unknownFields;
44  }
45  private CpSolverResponse(
46  com.google.protobuf.CodedInputStream input,
47  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
48  throws com.google.protobuf.InvalidProtocolBufferException {
49  this();
50  if (extensionRegistry == null) {
51  throw new java.lang.NullPointerException();
52  }
53  int mutable_bitField0_ = 0;
54  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
55  com.google.protobuf.UnknownFieldSet.newBuilder();
56  try {
57  boolean done = false;
58  while (!done) {
59  int tag = input.readTag();
60  switch (tag) {
61  case 0:
62  done = true;
63  break;
64  case 8: {
65  int rawValue = input.readEnum();
66 
67  status_ = rawValue;
68  break;
69  }
70  case 16: {
71  if (!((mutable_bitField0_ & 0x00000001) != 0)) {
72  solution_ = newLongList();
73  mutable_bitField0_ |= 0x00000001;
74  }
75  solution_.addLong(input.readInt64());
76  break;
77  }
78  case 18: {
79  int length = input.readRawVarint32();
80  int limit = input.pushLimit(length);
81  if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
82  solution_ = newLongList();
83  mutable_bitField0_ |= 0x00000001;
84  }
85  while (input.getBytesUntilLimit() > 0) {
86  solution_.addLong(input.readInt64());
87  }
88  input.popLimit(limit);
89  break;
90  }
91  case 25: {
92 
93  objectiveValue_ = input.readDouble();
94  break;
95  }
96  case 33: {
97 
98  bestObjectiveBound_ = input.readDouble();
99  break;
100  }
101  case 40: {
102 
103  allSolutionsWereFound_ = input.readBool();
104  break;
105  }
106  case 80: {
107 
108  numBooleans_ = input.readInt64();
109  break;
110  }
111  case 88: {
112 
113  numConflicts_ = input.readInt64();
114  break;
115  }
116  case 96: {
117 
118  numBranches_ = input.readInt64();
119  break;
120  }
121  case 104: {
122 
123  numBinaryPropagations_ = input.readInt64();
124  break;
125  }
126  case 112: {
127 
128  numIntegerPropagations_ = input.readInt64();
129  break;
130  }
131  case 121: {
132 
133  wallTime_ = input.readDouble();
134  break;
135  }
136  case 129: {
137 
138  userTime_ = input.readDouble();
139  break;
140  }
141  case 137: {
142 
143  deterministicTime_ = input.readDouble();
144  break;
145  }
146  case 144: {
147  if (!((mutable_bitField0_ & 0x00000002) != 0)) {
148  solutionLowerBounds_ = newLongList();
149  mutable_bitField0_ |= 0x00000002;
150  }
151  solutionLowerBounds_.addLong(input.readInt64());
152  break;
153  }
154  case 146: {
155  int length = input.readRawVarint32();
156  int limit = input.pushLimit(length);
157  if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
158  solutionLowerBounds_ = newLongList();
159  mutable_bitField0_ |= 0x00000002;
160  }
161  while (input.getBytesUntilLimit() > 0) {
162  solutionLowerBounds_.addLong(input.readInt64());
163  }
164  input.popLimit(limit);
165  break;
166  }
167  case 152: {
168  if (!((mutable_bitField0_ & 0x00000004) != 0)) {
169  solutionUpperBounds_ = newLongList();
170  mutable_bitField0_ |= 0x00000004;
171  }
172  solutionUpperBounds_.addLong(input.readInt64());
173  break;
174  }
175  case 154: {
176  int length = input.readRawVarint32();
177  int limit = input.pushLimit(length);
178  if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
179  solutionUpperBounds_ = newLongList();
180  mutable_bitField0_ |= 0x00000004;
181  }
182  while (input.getBytesUntilLimit() > 0) {
183  solutionUpperBounds_.addLong(input.readInt64());
184  }
185  input.popLimit(limit);
186  break;
187  }
188  case 162: {
189  java.lang.String s = input.readStringRequireUtf8();
190 
191  solutionInfo_ = s;
192  break;
193  }
194  case 170: {
195  if (!((mutable_bitField0_ & 0x00000008) != 0)) {
196  tightenedVariables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>();
197  mutable_bitField0_ |= 0x00000008;
198  }
199  tightenedVariables_.add(
200  input.readMessage(com.google.ortools.sat.IntegerVariableProto.parser(), extensionRegistry));
201  break;
202  }
203  default: {
204  if (!parseUnknownField(
205  input, unknownFields, extensionRegistry, tag)) {
206  done = true;
207  }
208  break;
209  }
210  }
211  }
212  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
213  throw e.setUnfinishedMessage(this);
214  } catch (java.io.IOException e) {
215  throw new com.google.protobuf.InvalidProtocolBufferException(
216  e).setUnfinishedMessage(this);
217  } finally {
218  if (((mutable_bitField0_ & 0x00000001) != 0)) {
219  solution_.makeImmutable(); // C
220  }
221  if (((mutable_bitField0_ & 0x00000002) != 0)) {
222  solutionLowerBounds_.makeImmutable(); // C
223  }
224  if (((mutable_bitField0_ & 0x00000004) != 0)) {
225  solutionUpperBounds_.makeImmutable(); // C
226  }
227  if (((mutable_bitField0_ & 0x00000008) != 0)) {
228  tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
229  }
230  this.unknownFields = unknownFields.build();
231  makeExtensionsImmutable();
232  }
233  }
234  public static final com.google.protobuf.Descriptors.Descriptor
236  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
237  }
238 
239  @java.lang.Override
240  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
242  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
243  .ensureFieldAccessorsInitialized(
245  }
246 
247  public static final int STATUS_FIELD_NUMBER = 1;
248  private int status_;
256  public int getStatusValue() {
257  return status_;
258  }
267  @SuppressWarnings("deprecation")
269  return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
270  }
271 
272  public static final int SOLUTION_FIELD_NUMBER = 2;
273  private com.google.protobuf.Internal.LongList solution_;
284  public java.util.List<java.lang.Long>
286  return solution_;
287  }
298  public int getSolutionCount() {
299  return solution_.size();
300  }
311  public long getSolution(int index) {
312  return solution_.getLong(index);
313  }
314  private int solutionMemoizedSerializedSize = -1;
315 
316  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 3;
317  private double objectiveValue_;
328  public double getObjectiveValue() {
329  return objectiveValue_;
330  }
331 
332  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 4;
333  private double bestObjectiveBound_;
343  public double getBestObjectiveBound() {
344  return bestObjectiveBound_;
345  }
346 
347  public static final int SOLUTION_LOWER_BOUNDS_FIELD_NUMBER = 18;
348  private com.google.protobuf.Internal.LongList solutionLowerBounds_;
361  public java.util.List<java.lang.Long>
363  return solutionLowerBounds_;
364  }
378  return solutionLowerBounds_.size();
379  }
392  public long getSolutionLowerBounds(int index) {
393  return solutionLowerBounds_.getLong(index);
394  }
395  private int solutionLowerBoundsMemoizedSerializedSize = -1;
396 
397  public static final int SOLUTION_UPPER_BOUNDS_FIELD_NUMBER = 19;
398  private com.google.protobuf.Internal.LongList solutionUpperBounds_;
402  public java.util.List<java.lang.Long>
404  return solutionUpperBounds_;
405  }
410  return solutionUpperBounds_.size();
411  }
415  public long getSolutionUpperBounds(int index) {
416  return solutionUpperBounds_.getLong(index);
417  }
418  private int solutionUpperBoundsMemoizedSerializedSize = -1;
419 
420  public static final int TIGHTENED_VARIABLES_FIELD_NUMBER = 21;
421  private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_;
439  return tightenedVariables_;
440  }
457  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
459  return tightenedVariables_;
460  }
478  return tightenedVariables_.size();
479  }
497  return tightenedVariables_.get(index);
498  }
516  int index) {
517  return tightenedVariables_.get(index);
518  }
519 
520  public static final int ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER = 5;
521  private boolean allSolutionsWereFound_;
532  public boolean getAllSolutionsWereFound() {
533  return allSolutionsWereFound_;
534  }
535 
536  public static final int NUM_BOOLEANS_FIELD_NUMBER = 10;
537  private long numBooleans_;
545  public long getNumBooleans() {
546  return numBooleans_;
547  }
548 
549  public static final int NUM_CONFLICTS_FIELD_NUMBER = 11;
550  private long numConflicts_;
554  public long getNumConflicts() {
555  return numConflicts_;
556  }
557 
558  public static final int NUM_BRANCHES_FIELD_NUMBER = 12;
559  private long numBranches_;
563  public long getNumBranches() {
564  return numBranches_;
565  }
566 
567  public static final int NUM_BINARY_PROPAGATIONS_FIELD_NUMBER = 13;
568  private long numBinaryPropagations_;
572  public long getNumBinaryPropagations() {
573  return numBinaryPropagations_;
574  }
575 
576  public static final int NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER = 14;
577  private long numIntegerPropagations_;
582  return numIntegerPropagations_;
583  }
584 
585  public static final int WALL_TIME_FIELD_NUMBER = 15;
586  private double wallTime_;
590  public double getWallTime() {
591  return wallTime_;
592  }
593 
594  public static final int USER_TIME_FIELD_NUMBER = 16;
595  private double userTime_;
599  public double getUserTime() {
600  return userTime_;
601  }
602 
603  public static final int DETERMINISTIC_TIME_FIELD_NUMBER = 17;
604  private double deterministicTime_;
608  public double getDeterministicTime() {
609  return deterministicTime_;
610  }
611 
612  public static final int SOLUTION_INFO_FIELD_NUMBER = 20;
613  private volatile java.lang.Object solutionInfo_;
621  public java.lang.String getSolutionInfo() {
622  java.lang.Object ref = solutionInfo_;
623  if (ref instanceof java.lang.String) {
624  return (java.lang.String) ref;
625  } else {
626  com.google.protobuf.ByteString bs =
627  (com.google.protobuf.ByteString) ref;
628  java.lang.String s = bs.toStringUtf8();
629  solutionInfo_ = s;
630  return s;
631  }
632  }
640  public com.google.protobuf.ByteString
642  java.lang.Object ref = solutionInfo_;
643  if (ref instanceof java.lang.String) {
644  com.google.protobuf.ByteString b =
645  com.google.protobuf.ByteString.copyFromUtf8(
646  (java.lang.String) ref);
647  solutionInfo_ = b;
648  return b;
649  } else {
650  return (com.google.protobuf.ByteString) ref;
651  }
652  }
653 
654  private byte memoizedIsInitialized = -1;
655  @java.lang.Override
656  public final boolean isInitialized() {
657  byte isInitialized = memoizedIsInitialized;
658  if (isInitialized == 1) return true;
659  if (isInitialized == 0) return false;
660 
661  memoizedIsInitialized = 1;
662  return true;
663  }
664 
665  @java.lang.Override
666  public void writeTo(com.google.protobuf.CodedOutputStream output)
667  throws java.io.IOException {
669  if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
670  output.writeEnum(1, status_);
671  }
672  if (getSolutionList().size() > 0) {
673  output.writeUInt32NoTag(18);
674  output.writeUInt32NoTag(solutionMemoizedSerializedSize);
675  }
676  for (int i = 0; i < solution_.size(); i++) {
677  output.writeInt64NoTag(solution_.getLong(i));
678  }
679  if (objectiveValue_ != 0D) {
680  output.writeDouble(3, objectiveValue_);
681  }
682  if (bestObjectiveBound_ != 0D) {
683  output.writeDouble(4, bestObjectiveBound_);
684  }
685  if (allSolutionsWereFound_ != false) {
686  output.writeBool(5, allSolutionsWereFound_);
687  }
688  if (numBooleans_ != 0L) {
689  output.writeInt64(10, numBooleans_);
690  }
691  if (numConflicts_ != 0L) {
692  output.writeInt64(11, numConflicts_);
693  }
694  if (numBranches_ != 0L) {
695  output.writeInt64(12, numBranches_);
696  }
697  if (numBinaryPropagations_ != 0L) {
698  output.writeInt64(13, numBinaryPropagations_);
699  }
700  if (numIntegerPropagations_ != 0L) {
701  output.writeInt64(14, numIntegerPropagations_);
702  }
703  if (wallTime_ != 0D) {
704  output.writeDouble(15, wallTime_);
705  }
706  if (userTime_ != 0D) {
707  output.writeDouble(16, userTime_);
708  }
709  if (deterministicTime_ != 0D) {
710  output.writeDouble(17, deterministicTime_);
711  }
712  if (getSolutionLowerBoundsList().size() > 0) {
713  output.writeUInt32NoTag(146);
714  output.writeUInt32NoTag(solutionLowerBoundsMemoizedSerializedSize);
715  }
716  for (int i = 0; i < solutionLowerBounds_.size(); i++) {
717  output.writeInt64NoTag(solutionLowerBounds_.getLong(i));
718  }
719  if (getSolutionUpperBoundsList().size() > 0) {
720  output.writeUInt32NoTag(154);
721  output.writeUInt32NoTag(solutionUpperBoundsMemoizedSerializedSize);
722  }
723  for (int i = 0; i < solutionUpperBounds_.size(); i++) {
724  output.writeInt64NoTag(solutionUpperBounds_.getLong(i));
725  }
726  if (!getSolutionInfoBytes().isEmpty()) {
727  com.google.protobuf.GeneratedMessageV3.writeString(output, 20, solutionInfo_);
728  }
729  for (int i = 0; i < tightenedVariables_.size(); i++) {
730  output.writeMessage(21, tightenedVariables_.get(i));
731  }
732  unknownFields.writeTo(output);
733  }
734 
735  @java.lang.Override
736  public int getSerializedSize() {
737  int size = memoizedSize;
738  if (size != -1) return size;
739 
740  size = 0;
741  if (status_ != com.google.ortools.sat.CpSolverStatus.UNKNOWN.getNumber()) {
742  size += com.google.protobuf.CodedOutputStream
743  .computeEnumSize(1, status_);
744  }
745  {
746  int dataSize = 0;
747  for (int i = 0; i < solution_.size(); i++) {
748  dataSize += com.google.protobuf.CodedOutputStream
749  .computeInt64SizeNoTag(solution_.getLong(i));
750  }
751  size += dataSize;
752  if (!getSolutionList().isEmpty()) {
753  size += 1;
754  size += com.google.protobuf.CodedOutputStream
755  .computeInt32SizeNoTag(dataSize);
756  }
757  solutionMemoizedSerializedSize = dataSize;
758  }
759  if (objectiveValue_ != 0D) {
760  size += com.google.protobuf.CodedOutputStream
761  .computeDoubleSize(3, objectiveValue_);
762  }
763  if (bestObjectiveBound_ != 0D) {
764  size += com.google.protobuf.CodedOutputStream
765  .computeDoubleSize(4, bestObjectiveBound_);
766  }
767  if (allSolutionsWereFound_ != false) {
768  size += com.google.protobuf.CodedOutputStream
769  .computeBoolSize(5, allSolutionsWereFound_);
770  }
771  if (numBooleans_ != 0L) {
772  size += com.google.protobuf.CodedOutputStream
773  .computeInt64Size(10, numBooleans_);
774  }
775  if (numConflicts_ != 0L) {
776  size += com.google.protobuf.CodedOutputStream
777  .computeInt64Size(11, numConflicts_);
778  }
779  if (numBranches_ != 0L) {
780  size += com.google.protobuf.CodedOutputStream
781  .computeInt64Size(12, numBranches_);
782  }
783  if (numBinaryPropagations_ != 0L) {
784  size += com.google.protobuf.CodedOutputStream
785  .computeInt64Size(13, numBinaryPropagations_);
786  }
787  if (numIntegerPropagations_ != 0L) {
788  size += com.google.protobuf.CodedOutputStream
789  .computeInt64Size(14, numIntegerPropagations_);
790  }
791  if (wallTime_ != 0D) {
792  size += com.google.protobuf.CodedOutputStream
793  .computeDoubleSize(15, wallTime_);
794  }
795  if (userTime_ != 0D) {
796  size += com.google.protobuf.CodedOutputStream
797  .computeDoubleSize(16, userTime_);
798  }
799  if (deterministicTime_ != 0D) {
800  size += com.google.protobuf.CodedOutputStream
801  .computeDoubleSize(17, deterministicTime_);
802  }
803  {
804  int dataSize = 0;
805  for (int i = 0; i < solutionLowerBounds_.size(); i++) {
806  dataSize += com.google.protobuf.CodedOutputStream
807  .computeInt64SizeNoTag(solutionLowerBounds_.getLong(i));
808  }
809  size += dataSize;
810  if (!getSolutionLowerBoundsList().isEmpty()) {
811  size += 2;
812  size += com.google.protobuf.CodedOutputStream
813  .computeInt32SizeNoTag(dataSize);
814  }
815  solutionLowerBoundsMemoizedSerializedSize = dataSize;
816  }
817  {
818  int dataSize = 0;
819  for (int i = 0; i < solutionUpperBounds_.size(); i++) {
820  dataSize += com.google.protobuf.CodedOutputStream
821  .computeInt64SizeNoTag(solutionUpperBounds_.getLong(i));
822  }
823  size += dataSize;
824  if (!getSolutionUpperBoundsList().isEmpty()) {
825  size += 2;
826  size += com.google.protobuf.CodedOutputStream
827  .computeInt32SizeNoTag(dataSize);
828  }
829  solutionUpperBoundsMemoizedSerializedSize = dataSize;
830  }
831  if (!getSolutionInfoBytes().isEmpty()) {
832  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, solutionInfo_);
833  }
834  for (int i = 0; i < tightenedVariables_.size(); i++) {
835  size += com.google.protobuf.CodedOutputStream
836  .computeMessageSize(21, tightenedVariables_.get(i));
837  }
838  size += unknownFields.getSerializedSize();
839  memoizedSize = size;
840  return size;
841  }
842 
843  @java.lang.Override
844  public boolean equals(final java.lang.Object obj) {
845  if (obj == this) {
846  return true;
847  }
848  if (!(obj instanceof com.google.ortools.sat.CpSolverResponse)) {
849  return super.equals(obj);
850  }
852 
853  if (status_ != other.status_) return false;
854  if (!getSolutionList()
855  .equals(other.getSolutionList())) return false;
856  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
857  != java.lang.Double.doubleToLongBits(
858  other.getObjectiveValue())) return false;
859  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
860  != java.lang.Double.doubleToLongBits(
861  other.getBestObjectiveBound())) return false;
863  .equals(other.getSolutionLowerBoundsList())) return false;
865  .equals(other.getSolutionUpperBoundsList())) return false;
867  .equals(other.getTightenedVariablesList())) return false;
869  != other.getAllSolutionsWereFound()) return false;
870  if (getNumBooleans()
871  != other.getNumBooleans()) return false;
872  if (getNumConflicts()
873  != other.getNumConflicts()) return false;
874  if (getNumBranches()
875  != other.getNumBranches()) return false;
877  != other.getNumBinaryPropagations()) return false;
879  != other.getNumIntegerPropagations()) return false;
880  if (java.lang.Double.doubleToLongBits(getWallTime())
881  != java.lang.Double.doubleToLongBits(
882  other.getWallTime())) return false;
883  if (java.lang.Double.doubleToLongBits(getUserTime())
884  != java.lang.Double.doubleToLongBits(
885  other.getUserTime())) return false;
886  if (java.lang.Double.doubleToLongBits(getDeterministicTime())
887  != java.lang.Double.doubleToLongBits(
888  other.getDeterministicTime())) return false;
889  if (!getSolutionInfo()
890  .equals(other.getSolutionInfo())) return false;
891  if (!unknownFields.equals(other.unknownFields)) return false;
892  return true;
893  }
894 
895  @java.lang.Override
896  public int hashCode() {
897  if (memoizedHashCode != 0) {
898  return memoizedHashCode;
899  }
900  int hash = 41;
901  hash = (19 * hash) + getDescriptor().hashCode();
902  hash = (37 * hash) + STATUS_FIELD_NUMBER;
903  hash = (53 * hash) + status_;
904  if (getSolutionCount() > 0) {
905  hash = (37 * hash) + SOLUTION_FIELD_NUMBER;
906  hash = (53 * hash) + getSolutionList().hashCode();
907  }
908  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
909  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
910  java.lang.Double.doubleToLongBits(getObjectiveValue()));
911  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
912  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
913  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
914  if (getSolutionLowerBoundsCount() > 0) {
915  hash = (37 * hash) + SOLUTION_LOWER_BOUNDS_FIELD_NUMBER;
916  hash = (53 * hash) + getSolutionLowerBoundsList().hashCode();
917  }
918  if (getSolutionUpperBoundsCount() > 0) {
919  hash = (37 * hash) + SOLUTION_UPPER_BOUNDS_FIELD_NUMBER;
920  hash = (53 * hash) + getSolutionUpperBoundsList().hashCode();
921  }
922  if (getTightenedVariablesCount() > 0) {
923  hash = (37 * hash) + TIGHTENED_VARIABLES_FIELD_NUMBER;
924  hash = (53 * hash) + getTightenedVariablesList().hashCode();
925  }
926  hash = (37 * hash) + ALL_SOLUTIONS_WERE_FOUND_FIELD_NUMBER;
927  hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
929  hash = (37 * hash) + NUM_BOOLEANS_FIELD_NUMBER;
930  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
931  getNumBooleans());
932  hash = (37 * hash) + NUM_CONFLICTS_FIELD_NUMBER;
933  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
934  getNumConflicts());
935  hash = (37 * hash) + NUM_BRANCHES_FIELD_NUMBER;
936  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
937  getNumBranches());
938  hash = (37 * hash) + NUM_BINARY_PROPAGATIONS_FIELD_NUMBER;
939  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
941  hash = (37 * hash) + NUM_INTEGER_PROPAGATIONS_FIELD_NUMBER;
942  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
944  hash = (37 * hash) + WALL_TIME_FIELD_NUMBER;
945  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
946  java.lang.Double.doubleToLongBits(getWallTime()));
947  hash = (37 * hash) + USER_TIME_FIELD_NUMBER;
948  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
949  java.lang.Double.doubleToLongBits(getUserTime()));
950  hash = (37 * hash) + DETERMINISTIC_TIME_FIELD_NUMBER;
951  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
952  java.lang.Double.doubleToLongBits(getDeterministicTime()));
953  hash = (37 * hash) + SOLUTION_INFO_FIELD_NUMBER;
954  hash = (53 * hash) + getSolutionInfo().hashCode();
955  hash = (29 * hash) + unknownFields.hashCode();
956  memoizedHashCode = hash;
957  return hash;
958  }
959 
961  java.nio.ByteBuffer data)
962  throws com.google.protobuf.InvalidProtocolBufferException {
963  return PARSER.parseFrom(data);
964  }
966  java.nio.ByteBuffer data,
967  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
968  throws com.google.protobuf.InvalidProtocolBufferException {
969  return PARSER.parseFrom(data, extensionRegistry);
970  }
972  com.google.protobuf.ByteString data)
973  throws com.google.protobuf.InvalidProtocolBufferException {
974  return PARSER.parseFrom(data);
975  }
977  com.google.protobuf.ByteString data,
978  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
979  throws com.google.protobuf.InvalidProtocolBufferException {
980  return PARSER.parseFrom(data, extensionRegistry);
981  }
982  public static com.google.ortools.sat.CpSolverResponse parseFrom(byte[] data)
983  throws com.google.protobuf.InvalidProtocolBufferException {
984  return PARSER.parseFrom(data);
985  }
987  byte[] data,
988  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
989  throws com.google.protobuf.InvalidProtocolBufferException {
990  return PARSER.parseFrom(data, extensionRegistry);
991  }
992  public static com.google.ortools.sat.CpSolverResponse parseFrom(java.io.InputStream input)
993  throws java.io.IOException {
994  return com.google.protobuf.GeneratedMessageV3
995  .parseWithIOException(PARSER, input);
996  }
998  java.io.InputStream input,
999  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1000  throws java.io.IOException {
1001  return com.google.protobuf.GeneratedMessageV3
1002  .parseWithIOException(PARSER, input, extensionRegistry);
1003  }
1004  public static com.google.ortools.sat.CpSolverResponse parseDelimitedFrom(java.io.InputStream input)
1005  throws java.io.IOException {
1006  return com.google.protobuf.GeneratedMessageV3
1007  .parseDelimitedWithIOException(PARSER, input);
1008  }
1010  java.io.InputStream input,
1011  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1012  throws java.io.IOException {
1013  return com.google.protobuf.GeneratedMessageV3
1014  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
1015  }
1017  com.google.protobuf.CodedInputStream input)
1018  throws java.io.IOException {
1019  return com.google.protobuf.GeneratedMessageV3
1020  .parseWithIOException(PARSER, input);
1021  }
1023  com.google.protobuf.CodedInputStream input,
1024  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1025  throws java.io.IOException {
1026  return com.google.protobuf.GeneratedMessageV3
1027  .parseWithIOException(PARSER, input, extensionRegistry);
1028  }
1029 
1030  @java.lang.Override
1031  public Builder newBuilderForType() { return newBuilder(); }
1032  public static Builder newBuilder() {
1033  return DEFAULT_INSTANCE.toBuilder();
1034  }
1036  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1037  }
1038  @java.lang.Override
1039  public Builder toBuilder() {
1040  return this == DEFAULT_INSTANCE
1041  ? new Builder() : new Builder().mergeFrom(this);
1042  }
1043 
1044  @java.lang.Override
1046  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1047  Builder builder = new Builder(parent);
1048  return builder;
1049  }
1059  public static final class Builder extends
1060  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
1061  // @@protoc_insertion_point(builder_implements:operations_research.sat.CpSolverResponse)
1062  com.google.ortools.sat.CpSolverResponseOrBuilder {
1063  public static final com.google.protobuf.Descriptors.Descriptor
1065  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1066  }
1067 
1068  @java.lang.Override
1069  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1071  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_fieldAccessorTable
1072  .ensureFieldAccessorsInitialized(
1074  }
1075 
1076  // Construct using com.google.ortools.sat.CpSolverResponse.newBuilder()
1077  private Builder() {
1078  maybeForceBuilderInitialization();
1079  }
1080 
1081  private Builder(
1082  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1083  super(parent);
1084  maybeForceBuilderInitialization();
1085  }
1086  private void maybeForceBuilderInitialization() {
1087  if (com.google.protobuf.GeneratedMessageV3
1088  .alwaysUseFieldBuilders) {
1089  getTightenedVariablesFieldBuilder();
1090  }
1091  }
1092  @java.lang.Override
1093  public Builder clear() {
1094  super.clear();
1095  status_ = 0;
1096 
1097  solution_ = emptyLongList();
1098  bitField0_ = (bitField0_ & ~0x00000001);
1099  objectiveValue_ = 0D;
1100 
1101  bestObjectiveBound_ = 0D;
1102 
1103  solutionLowerBounds_ = emptyLongList();
1104  bitField0_ = (bitField0_ & ~0x00000002);
1105  solutionUpperBounds_ = emptyLongList();
1106  bitField0_ = (bitField0_ & ~0x00000004);
1107  if (tightenedVariablesBuilder_ == null) {
1108  tightenedVariables_ = java.util.Collections.emptyList();
1109  bitField0_ = (bitField0_ & ~0x00000008);
1110  } else {
1111  tightenedVariablesBuilder_.clear();
1112  }
1113  allSolutionsWereFound_ = false;
1114 
1115  numBooleans_ = 0L;
1116 
1117  numConflicts_ = 0L;
1118 
1119  numBranches_ = 0L;
1120 
1121  numBinaryPropagations_ = 0L;
1122 
1123  numIntegerPropagations_ = 0L;
1124 
1125  wallTime_ = 0D;
1126 
1127  userTime_ = 0D;
1128 
1129  deterministicTime_ = 0D;
1130 
1131  solutionInfo_ = "";
1132 
1133  return this;
1134  }
1135 
1136  @java.lang.Override
1137  public com.google.protobuf.Descriptors.Descriptor
1139  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpSolverResponse_descriptor;
1140  }
1141 
1142  @java.lang.Override
1145  }
1146 
1147  @java.lang.Override
1150  if (!result.isInitialized()) {
1151  throw newUninitializedMessageException(result);
1152  }
1153  return result;
1154  }
1155 
1156  @java.lang.Override
1159  int from_bitField0_ = bitField0_;
1160  result.status_ = status_;
1161  if (((bitField0_ & 0x00000001) != 0)) {
1162  solution_.makeImmutable();
1163  bitField0_ = (bitField0_ & ~0x00000001);
1164  }
1165  result.solution_ = solution_;
1166  result.objectiveValue_ = objectiveValue_;
1167  result.bestObjectiveBound_ = bestObjectiveBound_;
1168  if (((bitField0_ & 0x00000002) != 0)) {
1169  solutionLowerBounds_.makeImmutable();
1170  bitField0_ = (bitField0_ & ~0x00000002);
1171  }
1172  result.solutionLowerBounds_ = solutionLowerBounds_;
1173  if (((bitField0_ & 0x00000004) != 0)) {
1174  solutionUpperBounds_.makeImmutable();
1175  bitField0_ = (bitField0_ & ~0x00000004);
1176  }
1177  result.solutionUpperBounds_ = solutionUpperBounds_;
1178  if (tightenedVariablesBuilder_ == null) {
1179  if (((bitField0_ & 0x00000008) != 0)) {
1180  tightenedVariables_ = java.util.Collections.unmodifiableList(tightenedVariables_);
1181  bitField0_ = (bitField0_ & ~0x00000008);
1182  }
1183  result.tightenedVariables_ = tightenedVariables_;
1184  } else {
1185  result.tightenedVariables_ = tightenedVariablesBuilder_.build();
1186  }
1187  result.allSolutionsWereFound_ = allSolutionsWereFound_;
1188  result.numBooleans_ = numBooleans_;
1189  result.numConflicts_ = numConflicts_;
1190  result.numBranches_ = numBranches_;
1191  result.numBinaryPropagations_ = numBinaryPropagations_;
1192  result.numIntegerPropagations_ = numIntegerPropagations_;
1193  result.wallTime_ = wallTime_;
1194  result.userTime_ = userTime_;
1195  result.deterministicTime_ = deterministicTime_;
1196  result.solutionInfo_ = solutionInfo_;
1197  onBuilt();
1198  return result;
1199  }
1200 
1201  @java.lang.Override
1202  public Builder clone() {
1203  return super.clone();
1204  }
1205  @java.lang.Override
1207  com.google.protobuf.Descriptors.FieldDescriptor field,
1208  java.lang.Object value) {
1209  return super.setField(field, value);
1210  }
1211  @java.lang.Override
1213  com.google.protobuf.Descriptors.FieldDescriptor field) {
1214  return super.clearField(field);
1215  }
1216  @java.lang.Override
1218  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1219  return super.clearOneof(oneof);
1220  }
1221  @java.lang.Override
1223  com.google.protobuf.Descriptors.FieldDescriptor field,
1224  int index, java.lang.Object value) {
1225  return super.setRepeatedField(field, index, value);
1226  }
1227  @java.lang.Override
1229  com.google.protobuf.Descriptors.FieldDescriptor field,
1230  java.lang.Object value) {
1231  return super.addRepeatedField(field, value);
1232  }
1233  @java.lang.Override
1234  public Builder mergeFrom(com.google.protobuf.Message other) {
1235  if (other instanceof com.google.ortools.sat.CpSolverResponse) {
1237  } else {
1238  super.mergeFrom(other);
1239  return this;
1240  }
1241  }
1242 
1244  if (other == com.google.ortools.sat.CpSolverResponse.getDefaultInstance()) return this;
1245  if (other.status_ != 0) {
1246  setStatusValue(other.getStatusValue());
1247  }
1248  if (!other.solution_.isEmpty()) {
1249  if (solution_.isEmpty()) {
1250  solution_ = other.solution_;
1251  bitField0_ = (bitField0_ & ~0x00000001);
1252  } else {
1253  ensureSolutionIsMutable();
1254  solution_.addAll(other.solution_);
1255  }
1256  onChanged();
1257  }
1258  if (other.getObjectiveValue() != 0D) {
1259  setObjectiveValue(other.getObjectiveValue());
1260  }
1261  if (other.getBestObjectiveBound() != 0D) {
1262  setBestObjectiveBound(other.getBestObjectiveBound());
1263  }
1264  if (!other.solutionLowerBounds_.isEmpty()) {
1265  if (solutionLowerBounds_.isEmpty()) {
1266  solutionLowerBounds_ = other.solutionLowerBounds_;
1267  bitField0_ = (bitField0_ & ~0x00000002);
1268  } else {
1269  ensureSolutionLowerBoundsIsMutable();
1270  solutionLowerBounds_.addAll(other.solutionLowerBounds_);
1271  }
1272  onChanged();
1273  }
1274  if (!other.solutionUpperBounds_.isEmpty()) {
1275  if (solutionUpperBounds_.isEmpty()) {
1276  solutionUpperBounds_ = other.solutionUpperBounds_;
1277  bitField0_ = (bitField0_ & ~0x00000004);
1278  } else {
1279  ensureSolutionUpperBoundsIsMutable();
1280  solutionUpperBounds_.addAll(other.solutionUpperBounds_);
1281  }
1282  onChanged();
1283  }
1284  if (tightenedVariablesBuilder_ == null) {
1285  if (!other.tightenedVariables_.isEmpty()) {
1286  if (tightenedVariables_.isEmpty()) {
1287  tightenedVariables_ = other.tightenedVariables_;
1288  bitField0_ = (bitField0_ & ~0x00000008);
1289  } else {
1290  ensureTightenedVariablesIsMutable();
1291  tightenedVariables_.addAll(other.tightenedVariables_);
1292  }
1293  onChanged();
1294  }
1295  } else {
1296  if (!other.tightenedVariables_.isEmpty()) {
1297  if (tightenedVariablesBuilder_.isEmpty()) {
1298  tightenedVariablesBuilder_.dispose();
1299  tightenedVariablesBuilder_ = null;
1300  tightenedVariables_ = other.tightenedVariables_;
1301  bitField0_ = (bitField0_ & ~0x00000008);
1302  tightenedVariablesBuilder_ =
1303  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1304  getTightenedVariablesFieldBuilder() : null;
1305  } else {
1306  tightenedVariablesBuilder_.addAllMessages(other.tightenedVariables_);
1307  }
1308  }
1309  }
1310  if (other.getAllSolutionsWereFound() != false) {
1311  setAllSolutionsWereFound(other.getAllSolutionsWereFound());
1312  }
1313  if (other.getNumBooleans() != 0L) {
1314  setNumBooleans(other.getNumBooleans());
1315  }
1316  if (other.getNumConflicts() != 0L) {
1317  setNumConflicts(other.getNumConflicts());
1318  }
1319  if (other.getNumBranches() != 0L) {
1320  setNumBranches(other.getNumBranches());
1321  }
1322  if (other.getNumBinaryPropagations() != 0L) {
1323  setNumBinaryPropagations(other.getNumBinaryPropagations());
1324  }
1325  if (other.getNumIntegerPropagations() != 0L) {
1326  setNumIntegerPropagations(other.getNumIntegerPropagations());
1327  }
1328  if (other.getWallTime() != 0D) {
1329  setWallTime(other.getWallTime());
1330  }
1331  if (other.getUserTime() != 0D) {
1332  setUserTime(other.getUserTime());
1333  }
1334  if (other.getDeterministicTime() != 0D) {
1335  setDeterministicTime(other.getDeterministicTime());
1336  }
1337  if (!other.getSolutionInfo().isEmpty()) {
1338  solutionInfo_ = other.solutionInfo_;
1339  onChanged();
1340  }
1341  this.mergeUnknownFields(other.unknownFields);
1342  onChanged();
1343  return this;
1344  }
1345 
1346  @java.lang.Override
1347  public final boolean isInitialized() {
1348  return true;
1349  }
1350 
1351  @java.lang.Override
1353  com.google.protobuf.CodedInputStream input,
1354  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1355  throws java.io.IOException {
1356  com.google.ortools.sat.CpSolverResponse parsedMessage = null;
1357  try {
1358  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1359  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1360  parsedMessage = (com.google.ortools.sat.CpSolverResponse) e.getUnfinishedMessage();
1361  throw e.unwrapIOException();
1362  } finally {
1363  if (parsedMessage != null) {
1364  mergeFrom(parsedMessage);
1365  }
1366  }
1367  return this;
1368  }
1369  private int bitField0_;
1370 
1371  private int status_ = 0;
1379  public int getStatusValue() {
1380  return status_;
1381  }
1389  public Builder setStatusValue(int value) {
1390  status_ = value;
1391  onChanged();
1392  return this;
1393  }
1402  @SuppressWarnings("deprecation")
1404  return result == null ? com.google.ortools.sat.CpSolverStatus.UNRECOGNIZED : result;
1405  }
1414  if (value == null) {
1415  throw new NullPointerException();
1416  }
1417 
1418  status_ = value.getNumber();
1419  onChanged();
1420  return this;
1421  }
1430 
1431  status_ = 0;
1432  onChanged();
1433  return this;
1434  }
1435 
1436  private com.google.protobuf.Internal.LongList solution_ = emptyLongList();
1437  private void ensureSolutionIsMutable() {
1438  if (!((bitField0_ & 0x00000001) != 0)) {
1439  solution_ = mutableCopy(solution_);
1440  bitField0_ |= 0x00000001;
1441  }
1442  }
1453  public java.util.List<java.lang.Long>
1455  return ((bitField0_ & 0x00000001) != 0) ?
1456  java.util.Collections.unmodifiableList(solution_) : solution_;
1457  }
1468  public int getSolutionCount() {
1469  return solution_.size();
1470  }
1481  public long getSolution(int index) {
1482  return solution_.getLong(index);
1483  }
1495  int index, long value) {
1496  ensureSolutionIsMutable();
1497  solution_.setLong(index, value);
1498  onChanged();
1499  return this;
1500  }
1511  public Builder addSolution(long value) {
1512  ensureSolutionIsMutable();
1513  solution_.addLong(value);
1514  onChanged();
1515  return this;
1516  }
1528  java.lang.Iterable<? extends java.lang.Long> values) {
1529  ensureSolutionIsMutable();
1530  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1531  values, solution_);
1532  onChanged();
1533  return this;
1534  }
1546  solution_ = emptyLongList();
1547  bitField0_ = (bitField0_ & ~0x00000001);
1548  onChanged();
1549  return this;
1550  }
1551 
1552  private double objectiveValue_ ;
1563  public double getObjectiveValue() {
1564  return objectiveValue_;
1565  }
1576  public Builder setObjectiveValue(double value) {
1577 
1578  objectiveValue_ = value;
1579  onChanged();
1580  return this;
1581  }
1593 
1594  objectiveValue_ = 0D;
1595  onChanged();
1596  return this;
1597  }
1598 
1599  private double bestObjectiveBound_ ;
1609  public double getBestObjectiveBound() {
1610  return bestObjectiveBound_;
1611  }
1621  public Builder setBestObjectiveBound(double value) {
1622 
1623  bestObjectiveBound_ = value;
1624  onChanged();
1625  return this;
1626  }
1637 
1638  bestObjectiveBound_ = 0D;
1639  onChanged();
1640  return this;
1641  }
1642 
1643  private com.google.protobuf.Internal.LongList solutionLowerBounds_ = emptyLongList();
1644  private void ensureSolutionLowerBoundsIsMutable() {
1645  if (!((bitField0_ & 0x00000002) != 0)) {
1646  solutionLowerBounds_ = mutableCopy(solutionLowerBounds_);
1647  bitField0_ |= 0x00000002;
1648  }
1649  }
1662  public java.util.List<java.lang.Long>
1664  return ((bitField0_ & 0x00000002) != 0) ?
1665  java.util.Collections.unmodifiableList(solutionLowerBounds_) : solutionLowerBounds_;
1666  }
1680  return solutionLowerBounds_.size();
1681  }
1694  public long getSolutionLowerBounds(int index) {
1695  return solutionLowerBounds_.getLong(index);
1696  }
1710  int index, long value) {
1711  ensureSolutionLowerBoundsIsMutable();
1712  solutionLowerBounds_.setLong(index, value);
1713  onChanged();
1714  return this;
1715  }
1728  public Builder addSolutionLowerBounds(long value) {
1729  ensureSolutionLowerBoundsIsMutable();
1730  solutionLowerBounds_.addLong(value);
1731  onChanged();
1732  return this;
1733  }
1747  java.lang.Iterable<? extends java.lang.Long> values) {
1748  ensureSolutionLowerBoundsIsMutable();
1749  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1750  values, solutionLowerBounds_);
1751  onChanged();
1752  return this;
1753  }
1767  solutionLowerBounds_ = emptyLongList();
1768  bitField0_ = (bitField0_ & ~0x00000002);
1769  onChanged();
1770  return this;
1771  }
1772 
1773  private com.google.protobuf.Internal.LongList solutionUpperBounds_ = emptyLongList();
1774  private void ensureSolutionUpperBoundsIsMutable() {
1775  if (!((bitField0_ & 0x00000004) != 0)) {
1776  solutionUpperBounds_ = mutableCopy(solutionUpperBounds_);
1777  bitField0_ |= 0x00000004;
1778  }
1779  }
1783  public java.util.List<java.lang.Long>
1785  return ((bitField0_ & 0x00000004) != 0) ?
1786  java.util.Collections.unmodifiableList(solutionUpperBounds_) : solutionUpperBounds_;
1787  }
1792  return solutionUpperBounds_.size();
1793  }
1797  public long getSolutionUpperBounds(int index) {
1798  return solutionUpperBounds_.getLong(index);
1799  }
1804  int index, long value) {
1805  ensureSolutionUpperBoundsIsMutable();
1806  solutionUpperBounds_.setLong(index, value);
1807  onChanged();
1808  return this;
1809  }
1813  public Builder addSolutionUpperBounds(long value) {
1814  ensureSolutionUpperBoundsIsMutable();
1815  solutionUpperBounds_.addLong(value);
1816  onChanged();
1817  return this;
1818  }
1823  java.lang.Iterable<? extends java.lang.Long> values) {
1824  ensureSolutionUpperBoundsIsMutable();
1825  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1826  values, solutionUpperBounds_);
1827  onChanged();
1828  return this;
1829  }
1834  solutionUpperBounds_ = emptyLongList();
1835  bitField0_ = (bitField0_ & ~0x00000004);
1836  onChanged();
1837  return this;
1838  }
1839 
1840  private java.util.List<com.google.ortools.sat.IntegerVariableProto> tightenedVariables_ =
1841  java.util.Collections.emptyList();
1842  private void ensureTightenedVariablesIsMutable() {
1843  if (!((bitField0_ & 0x00000008) != 0)) {
1844  tightenedVariables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(tightenedVariables_);
1845  bitField0_ |= 0x00000008;
1846  }
1847  }
1848 
1849  private com.google.protobuf.RepeatedFieldBuilderV3<
1851 
1869  if (tightenedVariablesBuilder_ == null) {
1870  return java.util.Collections.unmodifiableList(tightenedVariables_);
1871  } else {
1872  return tightenedVariablesBuilder_.getMessageList();
1873  }
1874  }
1892  if (tightenedVariablesBuilder_ == null) {
1893  return tightenedVariables_.size();
1894  } else {
1895  return tightenedVariablesBuilder_.getCount();
1896  }
1897  }
1915  if (tightenedVariablesBuilder_ == null) {
1916  return tightenedVariables_.get(index);
1917  } else {
1918  return tightenedVariablesBuilder_.getMessage(index);
1919  }
1920  }
1938  int index, com.google.ortools.sat.IntegerVariableProto value) {
1939  if (tightenedVariablesBuilder_ == null) {
1940  if (value == null) {
1941  throw new NullPointerException();
1942  }
1943  ensureTightenedVariablesIsMutable();
1944  tightenedVariables_.set(index, value);
1945  onChanged();
1946  } else {
1947  tightenedVariablesBuilder_.setMessage(index, value);
1948  }
1949  return this;
1950  }
1968  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1969  if (tightenedVariablesBuilder_ == null) {
1970  ensureTightenedVariablesIsMutable();
1971  tightenedVariables_.set(index, builderForValue.build());
1972  onChanged();
1973  } else {
1974  tightenedVariablesBuilder_.setMessage(index, builderForValue.build());
1975  }
1976  return this;
1977  }
1995  if (tightenedVariablesBuilder_ == null) {
1996  if (value == null) {
1997  throw new NullPointerException();
1998  }
1999  ensureTightenedVariablesIsMutable();
2000  tightenedVariables_.add(value);
2001  onChanged();
2002  } else {
2003  tightenedVariablesBuilder_.addMessage(value);
2004  }
2005  return this;
2006  }
2024  int index, com.google.ortools.sat.IntegerVariableProto value) {
2025  if (tightenedVariablesBuilder_ == null) {
2026  if (value == null) {
2027  throw new NullPointerException();
2028  }
2029  ensureTightenedVariablesIsMutable();
2030  tightenedVariables_.add(index, value);
2031  onChanged();
2032  } else {
2033  tightenedVariablesBuilder_.addMessage(index, value);
2034  }
2035  return this;
2036  }
2054  com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2055  if (tightenedVariablesBuilder_ == null) {
2056  ensureTightenedVariablesIsMutable();
2057  tightenedVariables_.add(builderForValue.build());
2058  onChanged();
2059  } else {
2060  tightenedVariablesBuilder_.addMessage(builderForValue.build());
2061  }
2062  return this;
2063  }
2081  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
2082  if (tightenedVariablesBuilder_ == null) {
2083  ensureTightenedVariablesIsMutable();
2084  tightenedVariables_.add(index, builderForValue.build());
2085  onChanged();
2086  } else {
2087  tightenedVariablesBuilder_.addMessage(index, builderForValue.build());
2088  }
2089  return this;
2090  }
2108  java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
2109  if (tightenedVariablesBuilder_ == null) {
2110  ensureTightenedVariablesIsMutable();
2111  com.google.protobuf.AbstractMessageLite.Builder.addAll(
2112  values, tightenedVariables_);
2113  onChanged();
2114  } else {
2115  tightenedVariablesBuilder_.addAllMessages(values);
2116  }
2117  return this;
2118  }
2136  if (tightenedVariablesBuilder_ == null) {
2137  tightenedVariables_ = java.util.Collections.emptyList();
2138  bitField0_ = (bitField0_ & ~0x00000008);
2139  onChanged();
2140  } else {
2141  tightenedVariablesBuilder_.clear();
2142  }
2143  return this;
2144  }
2161  public Builder removeTightenedVariables(int index) {
2162  if (tightenedVariablesBuilder_ == null) {
2163  ensureTightenedVariablesIsMutable();
2164  tightenedVariables_.remove(index);
2165  onChanged();
2166  } else {
2167  tightenedVariablesBuilder_.remove(index);
2168  }
2169  return this;
2170  }
2188  int index) {
2189  return getTightenedVariablesFieldBuilder().getBuilder(index);
2190  }
2208  int index) {
2209  if (tightenedVariablesBuilder_ == null) {
2210  return tightenedVariables_.get(index); } else {
2211  return tightenedVariablesBuilder_.getMessageOrBuilder(index);
2212  }
2213  }
2230  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
2232  if (tightenedVariablesBuilder_ != null) {
2233  return tightenedVariablesBuilder_.getMessageOrBuilderList();
2234  } else {
2235  return java.util.Collections.unmodifiableList(tightenedVariables_);
2236  }
2237  }
2255  return getTightenedVariablesFieldBuilder().addBuilder(
2257  }
2275  int index) {
2276  return getTightenedVariablesFieldBuilder().addBuilder(
2278  }
2295  public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
2297  return getTightenedVariablesFieldBuilder().getBuilderList();
2298  }
2299  private com.google.protobuf.RepeatedFieldBuilderV3<
2301  getTightenedVariablesFieldBuilder() {
2302  if (tightenedVariablesBuilder_ == null) {
2303  tightenedVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2305  tightenedVariables_,
2306  ((bitField0_ & 0x00000008) != 0),
2307  getParentForChildren(),
2308  isClean());
2309  tightenedVariables_ = null;
2310  }
2311  return tightenedVariablesBuilder_;
2312  }
2313 
2314  private boolean allSolutionsWereFound_ ;
2325  public boolean getAllSolutionsWereFound() {
2326  return allSolutionsWereFound_;
2327  }
2338  public Builder setAllSolutionsWereFound(boolean value) {
2339 
2340  allSolutionsWereFound_ = value;
2341  onChanged();
2342  return this;
2343  }
2355 
2356  allSolutionsWereFound_ = false;
2357  onChanged();
2358  return this;
2359  }
2360 
2361  private long numBooleans_ ;
2369  public long getNumBooleans() {
2370  return numBooleans_;
2371  }
2379  public Builder setNumBooleans(long value) {
2380 
2381  numBooleans_ = value;
2382  onChanged();
2383  return this;
2384  }
2393 
2394  numBooleans_ = 0L;
2395  onChanged();
2396  return this;
2397  }
2398 
2399  private long numConflicts_ ;
2403  public long getNumConflicts() {
2404  return numConflicts_;
2405  }
2409  public Builder setNumConflicts(long value) {
2410 
2411  numConflicts_ = value;
2412  onChanged();
2413  return this;
2414  }
2419 
2420  numConflicts_ = 0L;
2421  onChanged();
2422  return this;
2423  }
2424 
2425  private long numBranches_ ;
2429  public long getNumBranches() {
2430  return numBranches_;
2431  }
2435  public Builder setNumBranches(long value) {
2436 
2437  numBranches_ = value;
2438  onChanged();
2439  return this;
2440  }
2445 
2446  numBranches_ = 0L;
2447  onChanged();
2448  return this;
2449  }
2450 
2451  private long numBinaryPropagations_ ;
2456  return numBinaryPropagations_;
2457  }
2461  public Builder setNumBinaryPropagations(long value) {
2462 
2463  numBinaryPropagations_ = value;
2464  onChanged();
2465  return this;
2466  }
2471 
2472  numBinaryPropagations_ = 0L;
2473  onChanged();
2474  return this;
2475  }
2476 
2477  private long numIntegerPropagations_ ;
2482  return numIntegerPropagations_;
2483  }
2487  public Builder setNumIntegerPropagations(long value) {
2488 
2489  numIntegerPropagations_ = value;
2490  onChanged();
2491  return this;
2492  }
2497 
2498  numIntegerPropagations_ = 0L;
2499  onChanged();
2500  return this;
2501  }
2502 
2503  private double wallTime_ ;
2507  public double getWallTime() {
2508  return wallTime_;
2509  }
2513  public Builder setWallTime(double value) {
2514 
2515  wallTime_ = value;
2516  onChanged();
2517  return this;
2518  }
2523 
2524  wallTime_ = 0D;
2525  onChanged();
2526  return this;
2527  }
2528 
2529  private double userTime_ ;
2533  public double getUserTime() {
2534  return userTime_;
2535  }
2539  public Builder setUserTime(double value) {
2540 
2541  userTime_ = value;
2542  onChanged();
2543  return this;
2544  }
2549 
2550  userTime_ = 0D;
2551  onChanged();
2552  return this;
2553  }
2554 
2555  private double deterministicTime_ ;
2559  public double getDeterministicTime() {
2560  return deterministicTime_;
2561  }
2565  public Builder setDeterministicTime(double value) {
2566 
2567  deterministicTime_ = value;
2568  onChanged();
2569  return this;
2570  }
2575 
2576  deterministicTime_ = 0D;
2577  onChanged();
2578  return this;
2579  }
2580 
2581  private java.lang.Object solutionInfo_ = "";
2589  public java.lang.String getSolutionInfo() {
2590  java.lang.Object ref = solutionInfo_;
2591  if (!(ref instanceof java.lang.String)) {
2592  com.google.protobuf.ByteString bs =
2593  (com.google.protobuf.ByteString) ref;
2594  java.lang.String s = bs.toStringUtf8();
2595  solutionInfo_ = s;
2596  return s;
2597  } else {
2598  return (java.lang.String) ref;
2599  }
2600  }
2608  public com.google.protobuf.ByteString
2610  java.lang.Object ref = solutionInfo_;
2611  if (ref instanceof String) {
2612  com.google.protobuf.ByteString b =
2613  com.google.protobuf.ByteString.copyFromUtf8(
2614  (java.lang.String) ref);
2615  solutionInfo_ = b;
2616  return b;
2617  } else {
2618  return (com.google.protobuf.ByteString) ref;
2619  }
2620  }
2629  java.lang.String value) {
2630  if (value == null) {
2631  throw new NullPointerException();
2632  }
2633 
2634  solutionInfo_ = value;
2635  onChanged();
2636  return this;
2637  }
2646 
2647  solutionInfo_ = getDefaultInstance().getSolutionInfo();
2648  onChanged();
2649  return this;
2650  }
2659  com.google.protobuf.ByteString value) {
2660  if (value == null) {
2661  throw new NullPointerException();
2662  }
2663  checkByteStringIsUtf8(value);
2664 
2665  solutionInfo_ = value;
2666  onChanged();
2667  return this;
2668  }
2669  @java.lang.Override
2671  final com.google.protobuf.UnknownFieldSet unknownFields) {
2672  return super.setUnknownFields(unknownFields);
2673  }
2674 
2675  @java.lang.Override
2677  final com.google.protobuf.UnknownFieldSet unknownFields) {
2678  return super.mergeUnknownFields(unknownFields);
2679  }
2680 
2681 
2682  // @@protoc_insertion_point(builder_scope:operations_research.sat.CpSolverResponse)
2683  }
2684 
2685  // @@protoc_insertion_point(class_scope:operations_research.sat.CpSolverResponse)
2686  private static final com.google.ortools.sat.CpSolverResponse DEFAULT_INSTANCE;
2687  static {
2688  DEFAULT_INSTANCE = new com.google.ortools.sat.CpSolverResponse();
2689  }
2690 
2692  return DEFAULT_INSTANCE;
2693  }
2694 
2695  private static final com.google.protobuf.Parser<CpSolverResponse>
2696  PARSER = new com.google.protobuf.AbstractParser<CpSolverResponse>() {
2697  @java.lang.Override
2698  public CpSolverResponse parsePartialFrom(
2699  com.google.protobuf.CodedInputStream input,
2700  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2701  throws com.google.protobuf.InvalidProtocolBufferException {
2702  return new CpSolverResponse(input, extensionRegistry);
2703  }
2704  };
2705 
2706  public static com.google.protobuf.Parser<CpSolverResponse> parser() {
2707  return PARSER;
2708  }
2709 
2710  @java.lang.Override
2711  public com.google.protobuf.Parser<CpSolverResponse> getParserForType() {
2712  return PARSER;
2713  }
2714 
2715  @java.lang.Override
2717  return DEFAULT_INSTANCE;
2718  }
2719 
2720 }
2721 
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;
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
static com.google.ortools.sat.CpSolverResponse parseFrom(java.nio.ByteBuffer data)