MPSolutionResponse.java
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ortools/linear_solver/linear_solver.proto
3 
4 package com.google.ortools.linearsolver;
5 
9 public final class MPSolutionResponse extends
10  com.google.protobuf.GeneratedMessageV3 implements
11  // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
13 private static final long serialVersionUID = 0L;
14  // Use MPSolutionResponse.newBuilder() to construct.
15  private MPSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
16  super(builder);
17  }
18  private MPSolutionResponse() {
19  status_ = 99;
20  variableValue_ = emptyDoubleList();
21  dualValue_ = emptyDoubleList();
22  reducedCost_ = emptyDoubleList();
23  }
24 
25  @java.lang.Override
26  @SuppressWarnings({"unused"})
27  protected java.lang.Object newInstance(
28  UnusedPrivateParameter unused) {
29  return new MPSolutionResponse();
30  }
31 
32  @java.lang.Override
33  public final com.google.protobuf.UnknownFieldSet
35  return this.unknownFields;
36  }
37  private MPSolutionResponse(
38  com.google.protobuf.CodedInputStream input,
39  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
40  throws com.google.protobuf.InvalidProtocolBufferException {
41  this();
42  if (extensionRegistry == null) {
43  throw new java.lang.NullPointerException();
44  }
45  int mutable_bitField0_ = 0;
46  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
47  com.google.protobuf.UnknownFieldSet.newBuilder();
48  try {
49  boolean done = false;
50  while (!done) {
51  int tag = input.readTag();
52  switch (tag) {
53  case 0:
54  done = true;
55  break;
56  case 8: {
57  int rawValue = input.readEnum();
58  @SuppressWarnings("deprecation")
59  com.google.ortools.linearsolver.MPSolverResponseStatus value = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
60  if (value == null) {
61  unknownFields.mergeVarintField(1, rawValue);
62  } else {
63  bitField0_ |= 0x00000001;
64  status_ = rawValue;
65  }
66  break;
67  }
68  case 17: {
69  bitField0_ |= 0x00000002;
70  objectiveValue_ = input.readDouble();
71  break;
72  }
73  case 25: {
74  if (!((mutable_bitField0_ & 0x00000008) != 0)) {
75  variableValue_ = newDoubleList();
76  mutable_bitField0_ |= 0x00000008;
77  }
78  variableValue_.addDouble(input.readDouble());
79  break;
80  }
81  case 26: {
82  int length = input.readRawVarint32();
83  int limit = input.pushLimit(length);
84  if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
85  variableValue_ = newDoubleList();
86  mutable_bitField0_ |= 0x00000008;
87  }
88  while (input.getBytesUntilLimit() > 0) {
89  variableValue_.addDouble(input.readDouble());
90  }
91  input.popLimit(limit);
92  break;
93  }
94  case 33: {
95  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
96  dualValue_ = newDoubleList();
97  mutable_bitField0_ |= 0x00000010;
98  }
99  dualValue_.addDouble(input.readDouble());
100  break;
101  }
102  case 34: {
103  int length = input.readRawVarint32();
104  int limit = input.pushLimit(length);
105  if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
106  dualValue_ = newDoubleList();
107  mutable_bitField0_ |= 0x00000010;
108  }
109  while (input.getBytesUntilLimit() > 0) {
110  dualValue_.addDouble(input.readDouble());
111  }
112  input.popLimit(limit);
113  break;
114  }
115  case 41: {
116  bitField0_ |= 0x00000004;
117  bestObjectiveBound_ = input.readDouble();
118  break;
119  }
120  case 49: {
121  if (!((mutable_bitField0_ & 0x00000020) != 0)) {
122  reducedCost_ = newDoubleList();
123  mutable_bitField0_ |= 0x00000020;
124  }
125  reducedCost_.addDouble(input.readDouble());
126  break;
127  }
128  case 50: {
129  int length = input.readRawVarint32();
130  int limit = input.pushLimit(length);
131  if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
132  reducedCost_ = newDoubleList();
133  mutable_bitField0_ |= 0x00000020;
134  }
135  while (input.getBytesUntilLimit() > 0) {
136  reducedCost_.addDouble(input.readDouble());
137  }
138  input.popLimit(limit);
139  break;
140  }
141  default: {
142  if (!parseUnknownField(
143  input, unknownFields, extensionRegistry, tag)) {
144  done = true;
145  }
146  break;
147  }
148  }
149  }
150  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
151  throw e.setUnfinishedMessage(this);
152  } catch (java.io.IOException e) {
153  throw new com.google.protobuf.InvalidProtocolBufferException(
154  e).setUnfinishedMessage(this);
155  } finally {
156  if (((mutable_bitField0_ & 0x00000008) != 0)) {
157  variableValue_.makeImmutable(); // C
158  }
159  if (((mutable_bitField0_ & 0x00000010) != 0)) {
160  dualValue_.makeImmutable(); // C
161  }
162  if (((mutable_bitField0_ & 0x00000020) != 0)) {
163  reducedCost_.makeImmutable(); // C
164  }
165  this.unknownFields = unknownFields.build();
166  makeExtensionsImmutable();
167  }
168  }
169  public static final com.google.protobuf.Descriptors.Descriptor
171  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
172  }
173 
174  @java.lang.Override
175  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
177  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
178  .ensureFieldAccessorsInitialized(
180  }
181 
182  private int bitField0_;
183  public static final int STATUS_FIELD_NUMBER = 1;
184  private int status_;
192  public boolean hasStatus() {
193  return ((bitField0_ & 0x00000001) != 0);
194  }
203  @SuppressWarnings("deprecation")
206  }
207 
208  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
209  private double objectiveValue_;
219  public boolean hasObjectiveValue() {
220  return ((bitField0_ & 0x00000002) != 0);
221  }
231  public double getObjectiveValue() {
232  return objectiveValue_;
233  }
234 
235  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
236  private double bestObjectiveBound_;
248  public boolean hasBestObjectiveBound() {
249  return ((bitField0_ & 0x00000004) != 0);
250  }
262  public double getBestObjectiveBound() {
263  return bestObjectiveBound_;
264  }
265 
266  public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
267  private com.google.protobuf.Internal.DoubleList variableValue_;
277  public java.util.List<java.lang.Double>
279  return variableValue_;
280  }
290  public int getVariableValueCount() {
291  return variableValue_.size();
292  }
302  public double getVariableValue(int index) {
303  return variableValue_.getDouble(index);
304  }
305  private int variableValueMemoizedSerializedSize = -1;
306 
307  public static final int DUAL_VALUE_FIELD_NUMBER = 4;
308  private com.google.protobuf.Internal.DoubleList dualValue_;
321  public java.util.List<java.lang.Double>
323  return dualValue_;
324  }
337  public int getDualValueCount() {
338  return dualValue_.size();
339  }
352  public double getDualValue(int index) {
353  return dualValue_.getDouble(index);
354  }
355  private int dualValueMemoizedSerializedSize = -1;
356 
357  public static final int REDUCED_COST_FIELD_NUMBER = 6;
358  private com.google.protobuf.Internal.DoubleList reducedCost_;
371  public java.util.List<java.lang.Double>
373  return reducedCost_;
374  }
387  public int getReducedCostCount() {
388  return reducedCost_.size();
389  }
402  public double getReducedCost(int index) {
403  return reducedCost_.getDouble(index);
404  }
405  private int reducedCostMemoizedSerializedSize = -1;
406 
407  private byte memoizedIsInitialized = -1;
408  @java.lang.Override
409  public final boolean isInitialized() {
410  byte isInitialized = memoizedIsInitialized;
411  if (isInitialized == 1) return true;
412  if (isInitialized == 0) return false;
413 
414  memoizedIsInitialized = 1;
415  return true;
416  }
417 
418  @java.lang.Override
419  public void writeTo(com.google.protobuf.CodedOutputStream output)
420  throws java.io.IOException {
422  if (((bitField0_ & 0x00000001) != 0)) {
423  output.writeEnum(1, status_);
424  }
425  if (((bitField0_ & 0x00000002) != 0)) {
426  output.writeDouble(2, objectiveValue_);
427  }
428  if (getVariableValueList().size() > 0) {
429  output.writeUInt32NoTag(26);
430  output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
431  }
432  for (int i = 0; i < variableValue_.size(); i++) {
433  output.writeDoubleNoTag(variableValue_.getDouble(i));
434  }
435  if (getDualValueList().size() > 0) {
436  output.writeUInt32NoTag(34);
437  output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
438  }
439  for (int i = 0; i < dualValue_.size(); i++) {
440  output.writeDoubleNoTag(dualValue_.getDouble(i));
441  }
442  if (((bitField0_ & 0x00000004) != 0)) {
443  output.writeDouble(5, bestObjectiveBound_);
444  }
445  if (getReducedCostList().size() > 0) {
446  output.writeUInt32NoTag(50);
447  output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
448  }
449  for (int i = 0; i < reducedCost_.size(); i++) {
450  output.writeDoubleNoTag(reducedCost_.getDouble(i));
451  }
452  unknownFields.writeTo(output);
453  }
454 
455  @java.lang.Override
456  public int getSerializedSize() {
457  int size = memoizedSize;
458  if (size != -1) return size;
459 
460  size = 0;
461  if (((bitField0_ & 0x00000001) != 0)) {
462  size += com.google.protobuf.CodedOutputStream
463  .computeEnumSize(1, status_);
464  }
465  if (((bitField0_ & 0x00000002) != 0)) {
466  size += com.google.protobuf.CodedOutputStream
467  .computeDoubleSize(2, objectiveValue_);
468  }
469  {
470  int dataSize = 0;
471  dataSize = 8 * getVariableValueList().size();
472  size += dataSize;
473  if (!getVariableValueList().isEmpty()) {
474  size += 1;
475  size += com.google.protobuf.CodedOutputStream
476  .computeInt32SizeNoTag(dataSize);
477  }
478  variableValueMemoizedSerializedSize = dataSize;
479  }
480  {
481  int dataSize = 0;
482  dataSize = 8 * getDualValueList().size();
483  size += dataSize;
484  if (!getDualValueList().isEmpty()) {
485  size += 1;
486  size += com.google.protobuf.CodedOutputStream
487  .computeInt32SizeNoTag(dataSize);
488  }
489  dualValueMemoizedSerializedSize = dataSize;
490  }
491  if (((bitField0_ & 0x00000004) != 0)) {
492  size += com.google.protobuf.CodedOutputStream
493  .computeDoubleSize(5, bestObjectiveBound_);
494  }
495  {
496  int dataSize = 0;
497  dataSize = 8 * getReducedCostList().size();
498  size += dataSize;
499  if (!getReducedCostList().isEmpty()) {
500  size += 1;
501  size += com.google.protobuf.CodedOutputStream
502  .computeInt32SizeNoTag(dataSize);
503  }
504  reducedCostMemoizedSerializedSize = dataSize;
505  }
506  size += unknownFields.getSerializedSize();
507  memoizedSize = size;
508  return size;
509  }
510 
511  @java.lang.Override
512  public boolean equals(final java.lang.Object obj) {
513  if (obj == this) {
514  return true;
515  }
516  if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
517  return super.equals(obj);
518  }
520 
521  if (hasStatus() != other.hasStatus()) return false;
522  if (hasStatus()) {
523  if (status_ != other.status_) return false;
524  }
525  if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
526  if (hasObjectiveValue()) {
527  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
528  != java.lang.Double.doubleToLongBits(
529  other.getObjectiveValue())) return false;
530  }
531  if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
532  if (hasBestObjectiveBound()) {
533  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
534  != java.lang.Double.doubleToLongBits(
535  other.getBestObjectiveBound())) return false;
536  }
537  if (!getVariableValueList()
538  .equals(other.getVariableValueList())) return false;
539  if (!getDualValueList()
540  .equals(other.getDualValueList())) return false;
541  if (!getReducedCostList()
542  .equals(other.getReducedCostList())) return false;
543  if (!unknownFields.equals(other.unknownFields)) return false;
544  return true;
545  }
546 
547  @java.lang.Override
548  public int hashCode() {
549  if (memoizedHashCode != 0) {
550  return memoizedHashCode;
551  }
552  int hash = 41;
553  hash = (19 * hash) + getDescriptor().hashCode();
554  if (hasStatus()) {
555  hash = (37 * hash) + STATUS_FIELD_NUMBER;
556  hash = (53 * hash) + status_;
557  }
558  if (hasObjectiveValue()) {
559  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
560  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
561  java.lang.Double.doubleToLongBits(getObjectiveValue()));
562  }
563  if (hasBestObjectiveBound()) {
564  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
565  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
566  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
567  }
568  if (getVariableValueCount() > 0) {
569  hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
570  hash = (53 * hash) + getVariableValueList().hashCode();
571  }
572  if (getDualValueCount() > 0) {
573  hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
574  hash = (53 * hash) + getDualValueList().hashCode();
575  }
576  if (getReducedCostCount() > 0) {
577  hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
578  hash = (53 * hash) + getReducedCostList().hashCode();
579  }
580  hash = (29 * hash) + unknownFields.hashCode();
581  memoizedHashCode = hash;
582  return hash;
583  }
584 
586  java.nio.ByteBuffer data)
587  throws com.google.protobuf.InvalidProtocolBufferException {
588  return PARSER.parseFrom(data);
589  }
591  java.nio.ByteBuffer data,
592  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
593  throws com.google.protobuf.InvalidProtocolBufferException {
594  return PARSER.parseFrom(data, extensionRegistry);
595  }
597  com.google.protobuf.ByteString data)
598  throws com.google.protobuf.InvalidProtocolBufferException {
599  return PARSER.parseFrom(data);
600  }
602  com.google.protobuf.ByteString data,
603  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
604  throws com.google.protobuf.InvalidProtocolBufferException {
605  return PARSER.parseFrom(data, extensionRegistry);
606  }
608  throws com.google.protobuf.InvalidProtocolBufferException {
609  return PARSER.parseFrom(data);
610  }
612  byte[] data,
613  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
614  throws com.google.protobuf.InvalidProtocolBufferException {
615  return PARSER.parseFrom(data, extensionRegistry);
616  }
617  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
618  throws java.io.IOException {
619  return com.google.protobuf.GeneratedMessageV3
620  .parseWithIOException(PARSER, input);
621  }
623  java.io.InputStream input,
624  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
625  throws java.io.IOException {
626  return com.google.protobuf.GeneratedMessageV3
627  .parseWithIOException(PARSER, input, extensionRegistry);
628  }
629  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
630  throws java.io.IOException {
631  return com.google.protobuf.GeneratedMessageV3
632  .parseDelimitedWithIOException(PARSER, input);
633  }
635  java.io.InputStream input,
636  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
637  throws java.io.IOException {
638  return com.google.protobuf.GeneratedMessageV3
639  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
640  }
642  com.google.protobuf.CodedInputStream input)
643  throws java.io.IOException {
644  return com.google.protobuf.GeneratedMessageV3
645  .parseWithIOException(PARSER, input);
646  }
648  com.google.protobuf.CodedInputStream input,
649  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
650  throws java.io.IOException {
651  return com.google.protobuf.GeneratedMessageV3
652  .parseWithIOException(PARSER, input, extensionRegistry);
653  }
654 
655  @java.lang.Override
656  public Builder newBuilderForType() { return newBuilder(); }
657  public static Builder newBuilder() {
658  return DEFAULT_INSTANCE.toBuilder();
659  }
661  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
662  }
663  @java.lang.Override
664  public Builder toBuilder() {
665  return this == DEFAULT_INSTANCE
666  ? new Builder() : new Builder().mergeFrom(this);
667  }
668 
669  @java.lang.Override
671  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
672  Builder builder = new Builder(parent);
673  return builder;
674  }
678  public static final class Builder extends
679  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
680  // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
681  com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
682  public static final com.google.protobuf.Descriptors.Descriptor
684  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
685  }
686 
687  @java.lang.Override
688  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
690  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
691  .ensureFieldAccessorsInitialized(
693  }
694 
695  // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
696  private Builder() {
697  maybeForceBuilderInitialization();
698  }
699 
700  private Builder(
701  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
702  super(parent);
703  maybeForceBuilderInitialization();
704  }
705  private void maybeForceBuilderInitialization() {
706  if (com.google.protobuf.GeneratedMessageV3
707  .alwaysUseFieldBuilders) {
708  }
709  }
710  @java.lang.Override
711  public Builder clear() {
712  super.clear();
713  status_ = 99;
714  bitField0_ = (bitField0_ & ~0x00000001);
715  objectiveValue_ = 0D;
716  bitField0_ = (bitField0_ & ~0x00000002);
717  bestObjectiveBound_ = 0D;
718  bitField0_ = (bitField0_ & ~0x00000004);
719  variableValue_ = emptyDoubleList();
720  bitField0_ = (bitField0_ & ~0x00000008);
721  dualValue_ = emptyDoubleList();
722  bitField0_ = (bitField0_ & ~0x00000010);
723  reducedCost_ = emptyDoubleList();
724  bitField0_ = (bitField0_ & ~0x00000020);
725  return this;
726  }
727 
728  @java.lang.Override
729  public com.google.protobuf.Descriptors.Descriptor
731  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
732  }
733 
734  @java.lang.Override
737  }
738 
739  @java.lang.Override
742  if (!result.isInitialized()) {
743  throw newUninitializedMessageException(result);
744  }
745  return result;
746  }
747 
748  @java.lang.Override
751  int from_bitField0_ = bitField0_;
752  int to_bitField0_ = 0;
753  if (((from_bitField0_ & 0x00000001) != 0)) {
754  to_bitField0_ |= 0x00000001;
755  }
756  result.status_ = status_;
757  if (((from_bitField0_ & 0x00000002) != 0)) {
758  result.objectiveValue_ = objectiveValue_;
759  to_bitField0_ |= 0x00000002;
760  }
761  if (((from_bitField0_ & 0x00000004) != 0)) {
762  result.bestObjectiveBound_ = bestObjectiveBound_;
763  to_bitField0_ |= 0x00000004;
764  }
765  if (((bitField0_ & 0x00000008) != 0)) {
766  variableValue_.makeImmutable();
767  bitField0_ = (bitField0_ & ~0x00000008);
768  }
769  result.variableValue_ = variableValue_;
770  if (((bitField0_ & 0x00000010) != 0)) {
771  dualValue_.makeImmutable();
772  bitField0_ = (bitField0_ & ~0x00000010);
773  }
774  result.dualValue_ = dualValue_;
775  if (((bitField0_ & 0x00000020) != 0)) {
776  reducedCost_.makeImmutable();
777  bitField0_ = (bitField0_ & ~0x00000020);
778  }
779  result.reducedCost_ = reducedCost_;
780  result.bitField0_ = to_bitField0_;
781  onBuilt();
782  return result;
783  }
784 
785  @java.lang.Override
786  public Builder clone() {
787  return super.clone();
788  }
789  @java.lang.Override
791  com.google.protobuf.Descriptors.FieldDescriptor field,
792  java.lang.Object value) {
793  return super.setField(field, value);
794  }
795  @java.lang.Override
797  com.google.protobuf.Descriptors.FieldDescriptor field) {
798  return super.clearField(field);
799  }
800  @java.lang.Override
802  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
803  return super.clearOneof(oneof);
804  }
805  @java.lang.Override
807  com.google.protobuf.Descriptors.FieldDescriptor field,
808  int index, java.lang.Object value) {
809  return super.setRepeatedField(field, index, value);
810  }
811  @java.lang.Override
813  com.google.protobuf.Descriptors.FieldDescriptor field,
814  java.lang.Object value) {
815  return super.addRepeatedField(field, value);
816  }
817  @java.lang.Override
818  public Builder mergeFrom(com.google.protobuf.Message other) {
819  if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
821  } else {
822  super.mergeFrom(other);
823  return this;
824  }
825  }
826 
829  if (other.hasStatus()) {
830  setStatus(other.getStatus());
831  }
832  if (other.hasObjectiveValue()) {
833  setObjectiveValue(other.getObjectiveValue());
834  }
835  if (other.hasBestObjectiveBound()) {
836  setBestObjectiveBound(other.getBestObjectiveBound());
837  }
838  if (!other.variableValue_.isEmpty()) {
839  if (variableValue_.isEmpty()) {
840  variableValue_ = other.variableValue_;
841  bitField0_ = (bitField0_ & ~0x00000008);
842  } else {
843  ensureVariableValueIsMutable();
844  variableValue_.addAll(other.variableValue_);
845  }
846  onChanged();
847  }
848  if (!other.dualValue_.isEmpty()) {
849  if (dualValue_.isEmpty()) {
850  dualValue_ = other.dualValue_;
851  bitField0_ = (bitField0_ & ~0x00000010);
852  } else {
853  ensureDualValueIsMutable();
854  dualValue_.addAll(other.dualValue_);
855  }
856  onChanged();
857  }
858  if (!other.reducedCost_.isEmpty()) {
859  if (reducedCost_.isEmpty()) {
860  reducedCost_ = other.reducedCost_;
861  bitField0_ = (bitField0_ & ~0x00000020);
862  } else {
863  ensureReducedCostIsMutable();
864  reducedCost_.addAll(other.reducedCost_);
865  }
866  onChanged();
867  }
868  this.mergeUnknownFields(other.unknownFields);
869  onChanged();
870  return this;
871  }
872 
873  @java.lang.Override
874  public final boolean isInitialized() {
875  return true;
876  }
877 
878  @java.lang.Override
880  com.google.protobuf.CodedInputStream input,
881  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
882  throws java.io.IOException {
883  com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
884  try {
885  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
886  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
887  parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
888  throw e.unwrapIOException();
889  } finally {
890  if (parsedMessage != null) {
891  mergeFrom(parsedMessage);
892  }
893  }
894  return this;
895  }
896  private int bitField0_;
897 
898  private int status_ = 99;
906  public boolean hasStatus() {
907  return ((bitField0_ & 0x00000001) != 0);
908  }
917  @SuppressWarnings("deprecation")
920  }
929  if (value == null) {
930  throw new NullPointerException();
931  }
932  bitField0_ |= 0x00000001;
933  status_ = value.getNumber();
934  onChanged();
935  return this;
936  }
944  public Builder clearStatus() {
945  bitField0_ = (bitField0_ & ~0x00000001);
946  status_ = 99;
947  onChanged();
948  return this;
949  }
950 
951  private double objectiveValue_ ;
961  public boolean hasObjectiveValue() {
962  return ((bitField0_ & 0x00000002) != 0);
963  }
973  public double getObjectiveValue() {
974  return objectiveValue_;
975  }
985  public Builder setObjectiveValue(double value) {
986  bitField0_ |= 0x00000002;
987  objectiveValue_ = value;
988  onChanged();
989  return this;
990  }
1001  bitField0_ = (bitField0_ & ~0x00000002);
1002  objectiveValue_ = 0D;
1003  onChanged();
1004  return this;
1005  }
1006 
1007  private double bestObjectiveBound_ ;
1019  public boolean hasBestObjectiveBound() {
1020  return ((bitField0_ & 0x00000004) != 0);
1021  }
1033  public double getBestObjectiveBound() {
1034  return bestObjectiveBound_;
1035  }
1047  public Builder setBestObjectiveBound(double value) {
1048  bitField0_ |= 0x00000004;
1049  bestObjectiveBound_ = value;
1050  onChanged();
1051  return this;
1052  }
1065  bitField0_ = (bitField0_ & ~0x00000004);
1066  bestObjectiveBound_ = 0D;
1067  onChanged();
1068  return this;
1069  }
1070 
1071  private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1072  private void ensureVariableValueIsMutable() {
1073  if (!((bitField0_ & 0x00000008) != 0)) {
1074  variableValue_ = mutableCopy(variableValue_);
1075  bitField0_ |= 0x00000008;
1076  }
1077  }
1087  public java.util.List<java.lang.Double>
1089  return ((bitField0_ & 0x00000008) != 0) ?
1090  java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1091  }
1101  public int getVariableValueCount() {
1102  return variableValue_.size();
1103  }
1113  public double getVariableValue(int index) {
1114  return variableValue_.getDouble(index);
1115  }
1126  int index, double value) {
1127  ensureVariableValueIsMutable();
1128  variableValue_.setDouble(index, value);
1129  onChanged();
1130  return this;
1131  }
1141  public Builder addVariableValue(double value) {
1142  ensureVariableValueIsMutable();
1143  variableValue_.addDouble(value);
1144  onChanged();
1145  return this;
1146  }
1157  java.lang.Iterable<? extends java.lang.Double> values) {
1158  ensureVariableValueIsMutable();
1159  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1160  values, variableValue_);
1161  onChanged();
1162  return this;
1163  }
1174  variableValue_ = emptyDoubleList();
1175  bitField0_ = (bitField0_ & ~0x00000008);
1176  onChanged();
1177  return this;
1178  }
1179 
1180  private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1181  private void ensureDualValueIsMutable() {
1182  if (!((bitField0_ & 0x00000010) != 0)) {
1183  dualValue_ = mutableCopy(dualValue_);
1184  bitField0_ |= 0x00000010;
1185  }
1186  }
1199  public java.util.List<java.lang.Double>
1201  return ((bitField0_ & 0x00000010) != 0) ?
1202  java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1203  }
1216  public int getDualValueCount() {
1217  return dualValue_.size();
1218  }
1231  public double getDualValue(int index) {
1232  return dualValue_.getDouble(index);
1233  }
1247  int index, double value) {
1248  ensureDualValueIsMutable();
1249  dualValue_.setDouble(index, value);
1250  onChanged();
1251  return this;
1252  }
1265  public Builder addDualValue(double value) {
1266  ensureDualValueIsMutable();
1267  dualValue_.addDouble(value);
1268  onChanged();
1269  return this;
1270  }
1284  java.lang.Iterable<? extends java.lang.Double> values) {
1285  ensureDualValueIsMutable();
1286  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1287  values, dualValue_);
1288  onChanged();
1289  return this;
1290  }
1304  dualValue_ = emptyDoubleList();
1305  bitField0_ = (bitField0_ & ~0x00000010);
1306  onChanged();
1307  return this;
1308  }
1309 
1310  private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1311  private void ensureReducedCostIsMutable() {
1312  if (!((bitField0_ & 0x00000020) != 0)) {
1313  reducedCost_ = mutableCopy(reducedCost_);
1314  bitField0_ |= 0x00000020;
1315  }
1316  }
1329  public java.util.List<java.lang.Double>
1331  return ((bitField0_ & 0x00000020) != 0) ?
1332  java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1333  }
1346  public int getReducedCostCount() {
1347  return reducedCost_.size();
1348  }
1361  public double getReducedCost(int index) {
1362  return reducedCost_.getDouble(index);
1363  }
1377  int index, double value) {
1378  ensureReducedCostIsMutable();
1379  reducedCost_.setDouble(index, value);
1380  onChanged();
1381  return this;
1382  }
1395  public Builder addReducedCost(double value) {
1396  ensureReducedCostIsMutable();
1397  reducedCost_.addDouble(value);
1398  onChanged();
1399  return this;
1400  }
1414  java.lang.Iterable<? extends java.lang.Double> values) {
1415  ensureReducedCostIsMutable();
1416  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1417  values, reducedCost_);
1418  onChanged();
1419  return this;
1420  }
1434  reducedCost_ = emptyDoubleList();
1435  bitField0_ = (bitField0_ & ~0x00000020);
1436  onChanged();
1437  return this;
1438  }
1439  @java.lang.Override
1441  final com.google.protobuf.UnknownFieldSet unknownFields) {
1442  return super.setUnknownFields(unknownFields);
1443  }
1444 
1445  @java.lang.Override
1447  final com.google.protobuf.UnknownFieldSet unknownFields) {
1448  return super.mergeUnknownFields(unknownFields);
1449  }
1450 
1451 
1452  // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
1453  }
1454 
1455  // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
1456  private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
1457  static {
1458  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
1459  }
1460 
1462  return DEFAULT_INSTANCE;
1463  }
1464 
1465  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
1466  PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
1467  @java.lang.Override
1468  public MPSolutionResponse parsePartialFrom(
1469  com.google.protobuf.CodedInputStream input,
1470  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1471  throws com.google.protobuf.InvalidProtocolBufferException {
1472  return new MPSolutionResponse(input, extensionRegistry);
1473  }
1474  };
1475 
1476  public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
1477  return PARSER;
1478  }
1479 
1480  @java.lang.Override
1481  public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
1482  return PARSER;
1483  }
1484 
1485  @java.lang.Override
1487  return DEFAULT_INSTANCE;
1488  }
1489 
1490 }
1491 
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
.lang.Deprecated static MPSolverResponseStatus valueOf(int value)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< MPSolutionResponse > parser()
.lang.Deprecated static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse buildPartial()
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
java.util.List< java.lang.Double > getReducedCostList()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse build()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
java.util.List< java.lang.Double > getVariableValueList()
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
java.util.List< java.lang.Double > getDualValueList()
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)