Java Reference

Java Reference

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  statusStr_ = "";
21  variableValue_ = emptyDoubleList();
22  dualValue_ = emptyDoubleList();
23  reducedCost_ = emptyDoubleList();
24  }
25 
26  @java.lang.Override
27  @SuppressWarnings({"unused"})
28  protected java.lang.Object newInstance(
29  UnusedPrivateParameter unused) {
30  return new MPSolutionResponse();
31  }
32 
33  @java.lang.Override
34  public final com.google.protobuf.UnknownFieldSet
36  return this.unknownFields;
37  }
38  private MPSolutionResponse(
39  com.google.protobuf.CodedInputStream input,
40  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
41  throws com.google.protobuf.InvalidProtocolBufferException {
42  this();
43  if (extensionRegistry == null) {
44  throw new java.lang.NullPointerException();
45  }
46  int mutable_bitField0_ = 0;
47  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
48  com.google.protobuf.UnknownFieldSet.newBuilder();
49  try {
50  boolean done = false;
51  while (!done) {
52  int tag = input.readTag();
53  switch (tag) {
54  case 0:
55  done = true;
56  break;
57  case 8: {
58  int rawValue = input.readEnum();
59  @SuppressWarnings("deprecation")
60  com.google.ortools.linearsolver.MPSolverResponseStatus value = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
61  if (value == null) {
62  unknownFields.mergeVarintField(1, rawValue);
63  } else {
64  bitField0_ |= 0x00000001;
65  status_ = rawValue;
66  }
67  break;
68  }
69  case 17: {
70  bitField0_ |= 0x00000004;
71  objectiveValue_ = input.readDouble();
72  break;
73  }
74  case 25: {
75  if (!((mutable_bitField0_ & 0x00000010) != 0)) {
76  variableValue_ = newDoubleList();
77  mutable_bitField0_ |= 0x00000010;
78  }
79  variableValue_.addDouble(input.readDouble());
80  break;
81  }
82  case 26: {
83  int length = input.readRawVarint32();
84  int limit = input.pushLimit(length);
85  if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
86  variableValue_ = newDoubleList();
87  mutable_bitField0_ |= 0x00000010;
88  }
89  while (input.getBytesUntilLimit() > 0) {
90  variableValue_.addDouble(input.readDouble());
91  }
92  input.popLimit(limit);
93  break;
94  }
95  case 33: {
96  if (!((mutable_bitField0_ & 0x00000020) != 0)) {
97  dualValue_ = newDoubleList();
98  mutable_bitField0_ |= 0x00000020;
99  }
100  dualValue_.addDouble(input.readDouble());
101  break;
102  }
103  case 34: {
104  int length = input.readRawVarint32();
105  int limit = input.pushLimit(length);
106  if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
107  dualValue_ = newDoubleList();
108  mutable_bitField0_ |= 0x00000020;
109  }
110  while (input.getBytesUntilLimit() > 0) {
111  dualValue_.addDouble(input.readDouble());
112  }
113  input.popLimit(limit);
114  break;
115  }
116  case 41: {
117  bitField0_ |= 0x00000008;
118  bestObjectiveBound_ = input.readDouble();
119  break;
120  }
121  case 49: {
122  if (!((mutable_bitField0_ & 0x00000040) != 0)) {
123  reducedCost_ = newDoubleList();
124  mutable_bitField0_ |= 0x00000040;
125  }
126  reducedCost_.addDouble(input.readDouble());
127  break;
128  }
129  case 50: {
130  int length = input.readRawVarint32();
131  int limit = input.pushLimit(length);
132  if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
133  reducedCost_ = newDoubleList();
134  mutable_bitField0_ |= 0x00000040;
135  }
136  while (input.getBytesUntilLimit() > 0) {
137  reducedCost_.addDouble(input.readDouble());
138  }
139  input.popLimit(limit);
140  break;
141  }
142  case 58: {
143  com.google.protobuf.ByteString bs = input.readBytes();
144  bitField0_ |= 0x00000002;
145  statusStr_ = bs;
146  break;
147  }
148  default: {
149  if (!parseUnknownField(
150  input, unknownFields, extensionRegistry, tag)) {
151  done = true;
152  }
153  break;
154  }
155  }
156  }
157  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
158  throw e.setUnfinishedMessage(this);
159  } catch (java.io.IOException e) {
160  throw new com.google.protobuf.InvalidProtocolBufferException(
161  e).setUnfinishedMessage(this);
162  } finally {
163  if (((mutable_bitField0_ & 0x00000010) != 0)) {
164  variableValue_.makeImmutable(); // C
165  }
166  if (((mutable_bitField0_ & 0x00000020) != 0)) {
167  dualValue_.makeImmutable(); // C
168  }
169  if (((mutable_bitField0_ & 0x00000040) != 0)) {
170  reducedCost_.makeImmutable(); // C
171  }
172  this.unknownFields = unknownFields.build();
173  makeExtensionsImmutable();
174  }
175  }
176  public static final com.google.protobuf.Descriptors.Descriptor
178  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
179  }
180 
181  @java.lang.Override
182  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
184  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
185  .ensureFieldAccessorsInitialized(
187  }
188 
189  private int bitField0_;
190  public static final int STATUS_FIELD_NUMBER = 1;
191  private int status_;
200  @java.lang.Override public boolean hasStatus() {
201  return ((bitField0_ & 0x00000001) != 0);
202  }
212  @SuppressWarnings("deprecation")
215  }
216 
217  public static final int STATUS_STR_FIELD_NUMBER = 7;
218  private volatile java.lang.Object statusStr_;
230  @java.lang.Override
231  public boolean hasStatusStr() {
232  return ((bitField0_ & 0x00000002) != 0);
233  }
245  @java.lang.Override
246  public java.lang.String getStatusStr() {
247  java.lang.Object ref = statusStr_;
248  if (ref instanceof java.lang.String) {
249  return (java.lang.String) ref;
250  } else {
251  com.google.protobuf.ByteString bs =
252  (com.google.protobuf.ByteString) ref;
253  java.lang.String s = bs.toStringUtf8();
254  if (bs.isValidUtf8()) {
255  statusStr_ = s;
256  }
257  return s;
258  }
259  }
271  @java.lang.Override
272  public com.google.protobuf.ByteString
274  java.lang.Object ref = statusStr_;
275  if (ref instanceof java.lang.String) {
276  com.google.protobuf.ByteString b =
277  com.google.protobuf.ByteString.copyFromUtf8(
278  (java.lang.String) ref);
279  statusStr_ = b;
280  return b;
281  } else {
282  return (com.google.protobuf.ByteString) ref;
283  }
284  }
285 
286  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
287  private double objectiveValue_;
298  @java.lang.Override
299  public boolean hasObjectiveValue() {
300  return ((bitField0_ & 0x00000004) != 0);
301  }
312  @java.lang.Override
313  public double getObjectiveValue() {
314  return objectiveValue_;
315  }
316 
317  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
318  private double bestObjectiveBound_;
331  @java.lang.Override
332  public boolean hasBestObjectiveBound() {
333  return ((bitField0_ & 0x00000008) != 0);
334  }
347  @java.lang.Override
348  public double getBestObjectiveBound() {
349  return bestObjectiveBound_;
350  }
351 
352  public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
353  private com.google.protobuf.Internal.DoubleList variableValue_;
364  @java.lang.Override
365  public java.util.List<java.lang.Double>
367  return variableValue_;
368  }
379  public int getVariableValueCount() {
380  return variableValue_.size();
381  }
393  public double getVariableValue(int index) {
394  return variableValue_.getDouble(index);
395  }
396  private int variableValueMemoizedSerializedSize = -1;
397 
398  public static final int DUAL_VALUE_FIELD_NUMBER = 4;
399  private com.google.protobuf.Internal.DoubleList dualValue_;
413  @java.lang.Override
414  public java.util.List<java.lang.Double>
416  return dualValue_;
417  }
431  public int getDualValueCount() {
432  return dualValue_.size();
433  }
448  public double getDualValue(int index) {
449  return dualValue_.getDouble(index);
450  }
451  private int dualValueMemoizedSerializedSize = -1;
452 
453  public static final int REDUCED_COST_FIELD_NUMBER = 6;
454  private com.google.protobuf.Internal.DoubleList reducedCost_;
468  @java.lang.Override
469  public java.util.List<java.lang.Double>
471  return reducedCost_;
472  }
486  public int getReducedCostCount() {
487  return reducedCost_.size();
488  }
503  public double getReducedCost(int index) {
504  return reducedCost_.getDouble(index);
505  }
506  private int reducedCostMemoizedSerializedSize = -1;
507 
508  private byte memoizedIsInitialized = -1;
509  @java.lang.Override
510  public final boolean isInitialized() {
511  byte isInitialized = memoizedIsInitialized;
512  if (isInitialized == 1) return true;
513  if (isInitialized == 0) return false;
514 
515  memoizedIsInitialized = 1;
516  return true;
517  }
518 
519  @java.lang.Override
520  public void writeTo(com.google.protobuf.CodedOutputStream output)
521  throws java.io.IOException {
523  if (((bitField0_ & 0x00000001) != 0)) {
524  output.writeEnum(1, status_);
525  }
526  if (((bitField0_ & 0x00000004) != 0)) {
527  output.writeDouble(2, objectiveValue_);
528  }
529  if (getVariableValueList().size() > 0) {
530  output.writeUInt32NoTag(26);
531  output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
532  }
533  for (int i = 0; i < variableValue_.size(); i++) {
534  output.writeDoubleNoTag(variableValue_.getDouble(i));
535  }
536  if (getDualValueList().size() > 0) {
537  output.writeUInt32NoTag(34);
538  output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
539  }
540  for (int i = 0; i < dualValue_.size(); i++) {
541  output.writeDoubleNoTag(dualValue_.getDouble(i));
542  }
543  if (((bitField0_ & 0x00000008) != 0)) {
544  output.writeDouble(5, bestObjectiveBound_);
545  }
546  if (getReducedCostList().size() > 0) {
547  output.writeUInt32NoTag(50);
548  output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
549  }
550  for (int i = 0; i < reducedCost_.size(); i++) {
551  output.writeDoubleNoTag(reducedCost_.getDouble(i));
552  }
553  if (((bitField0_ & 0x00000002) != 0)) {
554  com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
555  }
556  unknownFields.writeTo(output);
557  }
558 
559  @java.lang.Override
560  public int getSerializedSize() {
561  int size = memoizedSize;
562  if (size != -1) return size;
563 
564  size = 0;
565  if (((bitField0_ & 0x00000001) != 0)) {
566  size += com.google.protobuf.CodedOutputStream
567  .computeEnumSize(1, status_);
568  }
569  if (((bitField0_ & 0x00000004) != 0)) {
570  size += com.google.protobuf.CodedOutputStream
571  .computeDoubleSize(2, objectiveValue_);
572  }
573  {
574  int dataSize = 0;
575  dataSize = 8 * getVariableValueList().size();
576  size += dataSize;
577  if (!getVariableValueList().isEmpty()) {
578  size += 1;
579  size += com.google.protobuf.CodedOutputStream
580  .computeInt32SizeNoTag(dataSize);
581  }
582  variableValueMemoizedSerializedSize = dataSize;
583  }
584  {
585  int dataSize = 0;
586  dataSize = 8 * getDualValueList().size();
587  size += dataSize;
588  if (!getDualValueList().isEmpty()) {
589  size += 1;
590  size += com.google.protobuf.CodedOutputStream
591  .computeInt32SizeNoTag(dataSize);
592  }
593  dualValueMemoizedSerializedSize = dataSize;
594  }
595  if (((bitField0_ & 0x00000008) != 0)) {
596  size += com.google.protobuf.CodedOutputStream
597  .computeDoubleSize(5, bestObjectiveBound_);
598  }
599  {
600  int dataSize = 0;
601  dataSize = 8 * getReducedCostList().size();
602  size += dataSize;
603  if (!getReducedCostList().isEmpty()) {
604  size += 1;
605  size += com.google.protobuf.CodedOutputStream
606  .computeInt32SizeNoTag(dataSize);
607  }
608  reducedCostMemoizedSerializedSize = dataSize;
609  }
610  if (((bitField0_ & 0x00000002) != 0)) {
611  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
612  }
613  size += unknownFields.getSerializedSize();
614  memoizedSize = size;
615  return size;
616  }
617 
618  @java.lang.Override
619  public boolean equals(final java.lang.Object obj) {
620  if (obj == this) {
621  return true;
622  }
623  if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
624  return super.equals(obj);
625  }
627 
628  if (hasStatus() != other.hasStatus()) return false;
629  if (hasStatus()) {
630  if (status_ != other.status_) return false;
631  }
632  if (hasStatusStr() != other.hasStatusStr()) return false;
633  if (hasStatusStr()) {
634  if (!getStatusStr()
635  .equals(other.getStatusStr())) return false;
636  }
637  if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
638  if (hasObjectiveValue()) {
639  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
640  != java.lang.Double.doubleToLongBits(
641  other.getObjectiveValue())) return false;
642  }
643  if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
644  if (hasBestObjectiveBound()) {
645  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
646  != java.lang.Double.doubleToLongBits(
647  other.getBestObjectiveBound())) return false;
648  }
649  if (!getVariableValueList()
650  .equals(other.getVariableValueList())) return false;
651  if (!getDualValueList()
652  .equals(other.getDualValueList())) return false;
653  if (!getReducedCostList()
654  .equals(other.getReducedCostList())) return false;
655  if (!unknownFields.equals(other.unknownFields)) return false;
656  return true;
657  }
658 
659  @java.lang.Override
660  public int hashCode() {
661  if (memoizedHashCode != 0) {
662  return memoizedHashCode;
663  }
664  int hash = 41;
665  hash = (19 * hash) + getDescriptor().hashCode();
666  if (hasStatus()) {
667  hash = (37 * hash) + STATUS_FIELD_NUMBER;
668  hash = (53 * hash) + status_;
669  }
670  if (hasStatusStr()) {
671  hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
672  hash = (53 * hash) + getStatusStr().hashCode();
673  }
674  if (hasObjectiveValue()) {
675  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
676  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
677  java.lang.Double.doubleToLongBits(getObjectiveValue()));
678  }
679  if (hasBestObjectiveBound()) {
680  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
681  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
682  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
683  }
684  if (getVariableValueCount() > 0) {
685  hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
686  hash = (53 * hash) + getVariableValueList().hashCode();
687  }
688  if (getDualValueCount() > 0) {
689  hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
690  hash = (53 * hash) + getDualValueList().hashCode();
691  }
692  if (getReducedCostCount() > 0) {
693  hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
694  hash = (53 * hash) + getReducedCostList().hashCode();
695  }
696  hash = (29 * hash) + unknownFields.hashCode();
697  memoizedHashCode = hash;
698  return hash;
699  }
700 
702  java.nio.ByteBuffer data)
703  throws com.google.protobuf.InvalidProtocolBufferException {
704  return PARSER.parseFrom(data);
705  }
707  java.nio.ByteBuffer data,
708  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
709  throws com.google.protobuf.InvalidProtocolBufferException {
710  return PARSER.parseFrom(data, extensionRegistry);
711  }
713  com.google.protobuf.ByteString data)
714  throws com.google.protobuf.InvalidProtocolBufferException {
715  return PARSER.parseFrom(data);
716  }
718  com.google.protobuf.ByteString data,
719  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
720  throws com.google.protobuf.InvalidProtocolBufferException {
721  return PARSER.parseFrom(data, extensionRegistry);
722  }
724  throws com.google.protobuf.InvalidProtocolBufferException {
725  return PARSER.parseFrom(data);
726  }
728  byte[] data,
729  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
730  throws com.google.protobuf.InvalidProtocolBufferException {
731  return PARSER.parseFrom(data, extensionRegistry);
732  }
733  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
734  throws java.io.IOException {
735  return com.google.protobuf.GeneratedMessageV3
736  .parseWithIOException(PARSER, input);
737  }
739  java.io.InputStream input,
740  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
741  throws java.io.IOException {
742  return com.google.protobuf.GeneratedMessageV3
743  .parseWithIOException(PARSER, input, extensionRegistry);
744  }
745  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
746  throws java.io.IOException {
747  return com.google.protobuf.GeneratedMessageV3
748  .parseDelimitedWithIOException(PARSER, input);
749  }
751  java.io.InputStream input,
752  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
753  throws java.io.IOException {
754  return com.google.protobuf.GeneratedMessageV3
755  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
756  }
758  com.google.protobuf.CodedInputStream input)
759  throws java.io.IOException {
760  return com.google.protobuf.GeneratedMessageV3
761  .parseWithIOException(PARSER, input);
762  }
764  com.google.protobuf.CodedInputStream input,
765  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
766  throws java.io.IOException {
767  return com.google.protobuf.GeneratedMessageV3
768  .parseWithIOException(PARSER, input, extensionRegistry);
769  }
770 
771  @java.lang.Override
772  public Builder newBuilderForType() { return newBuilder(); }
773  public static Builder newBuilder() {
774  return DEFAULT_INSTANCE.toBuilder();
775  }
777  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
778  }
779  @java.lang.Override
780  public Builder toBuilder() {
781  return this == DEFAULT_INSTANCE
782  ? new Builder() : new Builder().mergeFrom(this);
783  }
784 
785  @java.lang.Override
787  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
788  Builder builder = new Builder(parent);
789  return builder;
790  }
794  public static final class Builder extends
795  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
796  // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
797  com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
798  public static final com.google.protobuf.Descriptors.Descriptor
800  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
801  }
802 
803  @java.lang.Override
804  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
806  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
807  .ensureFieldAccessorsInitialized(
809  }
810 
811  // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
812  private Builder() {
813  maybeForceBuilderInitialization();
814  }
815 
816  private Builder(
817  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
818  super(parent);
819  maybeForceBuilderInitialization();
820  }
821  private void maybeForceBuilderInitialization() {
822  if (com.google.protobuf.GeneratedMessageV3
823  .alwaysUseFieldBuilders) {
824  }
825  }
826  @java.lang.Override
827  public Builder clear() {
828  super.clear();
829  status_ = 99;
830  bitField0_ = (bitField0_ & ~0x00000001);
831  statusStr_ = "";
832  bitField0_ = (bitField0_ & ~0x00000002);
833  objectiveValue_ = 0D;
834  bitField0_ = (bitField0_ & ~0x00000004);
835  bestObjectiveBound_ = 0D;
836  bitField0_ = (bitField0_ & ~0x00000008);
837  variableValue_ = emptyDoubleList();
838  bitField0_ = (bitField0_ & ~0x00000010);
839  dualValue_ = emptyDoubleList();
840  bitField0_ = (bitField0_ & ~0x00000020);
841  reducedCost_ = emptyDoubleList();
842  bitField0_ = (bitField0_ & ~0x00000040);
843  return this;
844  }
845 
846  @java.lang.Override
847  public com.google.protobuf.Descriptors.Descriptor
849  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
850  }
851 
852  @java.lang.Override
855  }
856 
857  @java.lang.Override
860  if (!result.isInitialized()) {
861  throw newUninitializedMessageException(result);
862  }
863  return result;
864  }
865 
866  @java.lang.Override
869  int from_bitField0_ = bitField0_;
870  int to_bitField0_ = 0;
871  if (((from_bitField0_ & 0x00000001) != 0)) {
872  to_bitField0_ |= 0x00000001;
873  }
874  result.status_ = status_;
875  if (((from_bitField0_ & 0x00000002) != 0)) {
876  to_bitField0_ |= 0x00000002;
877  }
878  result.statusStr_ = statusStr_;
879  if (((from_bitField0_ & 0x00000004) != 0)) {
880  result.objectiveValue_ = objectiveValue_;
881  to_bitField0_ |= 0x00000004;
882  }
883  if (((from_bitField0_ & 0x00000008) != 0)) {
884  result.bestObjectiveBound_ = bestObjectiveBound_;
885  to_bitField0_ |= 0x00000008;
886  }
887  if (((bitField0_ & 0x00000010) != 0)) {
888  variableValue_.makeImmutable();
889  bitField0_ = (bitField0_ & ~0x00000010);
890  }
891  result.variableValue_ = variableValue_;
892  if (((bitField0_ & 0x00000020) != 0)) {
893  dualValue_.makeImmutable();
894  bitField0_ = (bitField0_ & ~0x00000020);
895  }
896  result.dualValue_ = dualValue_;
897  if (((bitField0_ & 0x00000040) != 0)) {
898  reducedCost_.makeImmutable();
899  bitField0_ = (bitField0_ & ~0x00000040);
900  }
901  result.reducedCost_ = reducedCost_;
902  result.bitField0_ = to_bitField0_;
903  onBuilt();
904  return result;
905  }
906 
907  @java.lang.Override
908  public Builder clone() {
909  return super.clone();
910  }
911  @java.lang.Override
913  com.google.protobuf.Descriptors.FieldDescriptor field,
914  java.lang.Object value) {
915  return super.setField(field, value);
916  }
917  @java.lang.Override
919  com.google.protobuf.Descriptors.FieldDescriptor field) {
920  return super.clearField(field);
921  }
922  @java.lang.Override
924  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
925  return super.clearOneof(oneof);
926  }
927  @java.lang.Override
929  com.google.protobuf.Descriptors.FieldDescriptor field,
930  int index, java.lang.Object value) {
931  return super.setRepeatedField(field, index, value);
932  }
933  @java.lang.Override
935  com.google.protobuf.Descriptors.FieldDescriptor field,
936  java.lang.Object value) {
937  return super.addRepeatedField(field, value);
938  }
939  @java.lang.Override
940  public Builder mergeFrom(com.google.protobuf.Message other) {
941  if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
943  } else {
944  super.mergeFrom(other);
945  return this;
946  }
947  }
948 
951  if (other.hasStatus()) {
952  setStatus(other.getStatus());
953  }
954  if (other.hasStatusStr()) {
955  bitField0_ |= 0x00000002;
956  statusStr_ = other.statusStr_;
957  onChanged();
958  }
959  if (other.hasObjectiveValue()) {
960  setObjectiveValue(other.getObjectiveValue());
961  }
962  if (other.hasBestObjectiveBound()) {
963  setBestObjectiveBound(other.getBestObjectiveBound());
964  }
965  if (!other.variableValue_.isEmpty()) {
966  if (variableValue_.isEmpty()) {
967  variableValue_ = other.variableValue_;
968  bitField0_ = (bitField0_ & ~0x00000010);
969  } else {
970  ensureVariableValueIsMutable();
971  variableValue_.addAll(other.variableValue_);
972  }
973  onChanged();
974  }
975  if (!other.dualValue_.isEmpty()) {
976  if (dualValue_.isEmpty()) {
977  dualValue_ = other.dualValue_;
978  bitField0_ = (bitField0_ & ~0x00000020);
979  } else {
980  ensureDualValueIsMutable();
981  dualValue_.addAll(other.dualValue_);
982  }
983  onChanged();
984  }
985  if (!other.reducedCost_.isEmpty()) {
986  if (reducedCost_.isEmpty()) {
987  reducedCost_ = other.reducedCost_;
988  bitField0_ = (bitField0_ & ~0x00000040);
989  } else {
990  ensureReducedCostIsMutable();
991  reducedCost_.addAll(other.reducedCost_);
992  }
993  onChanged();
994  }
995  this.mergeUnknownFields(other.unknownFields);
996  onChanged();
997  return this;
998  }
999 
1000  @java.lang.Override
1001  public final boolean isInitialized() {
1002  return true;
1003  }
1004 
1005  @java.lang.Override
1007  com.google.protobuf.CodedInputStream input,
1008  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1009  throws java.io.IOException {
1010  com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
1011  try {
1012  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1013  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1014  parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
1015  throw e.unwrapIOException();
1016  } finally {
1017  if (parsedMessage != null) {
1018  mergeFrom(parsedMessage);
1019  }
1020  }
1021  return this;
1022  }
1023  private int bitField0_;
1024 
1025  private int status_ = 99;
1034  @java.lang.Override public boolean hasStatus() {
1035  return ((bitField0_ & 0x00000001) != 0);
1036  }
1045  @java.lang.Override
1047  @SuppressWarnings("deprecation")
1050  }
1061  if (value == null) {
1062  throw new NullPointerException();
1063  }
1064  bitField0_ |= 0x00000001;
1065  status_ = value.getNumber();
1066  onChanged();
1067  return this;
1068  }
1078  bitField0_ = (bitField0_ & ~0x00000001);
1079  status_ = 99;
1080  onChanged();
1081  return this;
1082  }
1083 
1084  private java.lang.Object statusStr_ = "";
1096  public boolean hasStatusStr() {
1097  return ((bitField0_ & 0x00000002) != 0);
1098  }
1110  public java.lang.String getStatusStr() {
1111  java.lang.Object ref = statusStr_;
1112  if (!(ref instanceof java.lang.String)) {
1113  com.google.protobuf.ByteString bs =
1114  (com.google.protobuf.ByteString) ref;
1115  java.lang.String s = bs.toStringUtf8();
1116  if (bs.isValidUtf8()) {
1117  statusStr_ = s;
1118  }
1119  return s;
1120  } else {
1121  return (java.lang.String) ref;
1122  }
1123  }
1135  public com.google.protobuf.ByteString
1137  java.lang.Object ref = statusStr_;
1138  if (ref instanceof String) {
1139  com.google.protobuf.ByteString b =
1140  com.google.protobuf.ByteString.copyFromUtf8(
1141  (java.lang.String) ref);
1142  statusStr_ = b;
1143  return b;
1144  } else {
1145  return (com.google.protobuf.ByteString) ref;
1146  }
1147  }
1161  java.lang.String value) {
1162  if (value == null) {
1163  throw new NullPointerException();
1164  }
1165  bitField0_ |= 0x00000002;
1166  statusStr_ = value;
1167  onChanged();
1168  return this;
1169  }
1182  bitField0_ = (bitField0_ & ~0x00000002);
1183  statusStr_ = getDefaultInstance().getStatusStr();
1184  onChanged();
1185  return this;
1186  }
1200  com.google.protobuf.ByteString value) {
1201  if (value == null) {
1202  throw new NullPointerException();
1203  }
1204  bitField0_ |= 0x00000002;
1205  statusStr_ = value;
1206  onChanged();
1207  return this;
1208  }
1209 
1210  private double objectiveValue_ ;
1221  @java.lang.Override
1222  public boolean hasObjectiveValue() {
1223  return ((bitField0_ & 0x00000004) != 0);
1224  }
1235  @java.lang.Override
1236  public double getObjectiveValue() {
1237  return objectiveValue_;
1238  }
1250  public Builder setObjectiveValue(double value) {
1251  bitField0_ |= 0x00000004;
1252  objectiveValue_ = value;
1253  onChanged();
1254  return this;
1255  }
1267  bitField0_ = (bitField0_ & ~0x00000004);
1268  objectiveValue_ = 0D;
1269  onChanged();
1270  return this;
1271  }
1272 
1273  private double bestObjectiveBound_ ;
1286  @java.lang.Override
1287  public boolean hasBestObjectiveBound() {
1288  return ((bitField0_ & 0x00000008) != 0);
1289  }
1302  @java.lang.Override
1303  public double getBestObjectiveBound() {
1304  return bestObjectiveBound_;
1305  }
1319  public Builder setBestObjectiveBound(double value) {
1320  bitField0_ |= 0x00000008;
1321  bestObjectiveBound_ = value;
1322  onChanged();
1323  return this;
1324  }
1338  bitField0_ = (bitField0_ & ~0x00000008);
1339  bestObjectiveBound_ = 0D;
1340  onChanged();
1341  return this;
1342  }
1343 
1344  private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1345  private void ensureVariableValueIsMutable() {
1346  if (!((bitField0_ & 0x00000010) != 0)) {
1347  variableValue_ = mutableCopy(variableValue_);
1348  bitField0_ |= 0x00000010;
1349  }
1350  }
1361  public java.util.List<java.lang.Double>
1363  return ((bitField0_ & 0x00000010) != 0) ?
1364  java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1365  }
1376  public int getVariableValueCount() {
1377  return variableValue_.size();
1378  }
1390  public double getVariableValue(int index) {
1391  return variableValue_.getDouble(index);
1392  }
1406  int index, double value) {
1407  ensureVariableValueIsMutable();
1408  variableValue_.setDouble(index, value);
1409  onChanged();
1410  return this;
1411  }
1423  public Builder addVariableValue(double value) {
1424  ensureVariableValueIsMutable();
1425  variableValue_.addDouble(value);
1426  onChanged();
1427  return this;
1428  }
1441  java.lang.Iterable<? extends java.lang.Double> values) {
1442  ensureVariableValueIsMutable();
1443  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1444  values, variableValue_);
1445  onChanged();
1446  return this;
1447  }
1459  variableValue_ = emptyDoubleList();
1460  bitField0_ = (bitField0_ & ~0x00000010);
1461  onChanged();
1462  return this;
1463  }
1464 
1465  private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1466  private void ensureDualValueIsMutable() {
1467  if (!((bitField0_ & 0x00000020) != 0)) {
1468  dualValue_ = mutableCopy(dualValue_);
1469  bitField0_ |= 0x00000020;
1470  }
1471  }
1485  public java.util.List<java.lang.Double>
1487  return ((bitField0_ & 0x00000020) != 0) ?
1488  java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1489  }
1503  public int getDualValueCount() {
1504  return dualValue_.size();
1505  }
1520  public double getDualValue(int index) {
1521  return dualValue_.getDouble(index);
1522  }
1539  int index, double value) {
1540  ensureDualValueIsMutable();
1541  dualValue_.setDouble(index, value);
1542  onChanged();
1543  return this;
1544  }
1559  public Builder addDualValue(double value) {
1560  ensureDualValueIsMutable();
1561  dualValue_.addDouble(value);
1562  onChanged();
1563  return this;
1564  }
1580  java.lang.Iterable<? extends java.lang.Double> values) {
1581  ensureDualValueIsMutable();
1582  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1583  values, dualValue_);
1584  onChanged();
1585  return this;
1586  }
1601  dualValue_ = emptyDoubleList();
1602  bitField0_ = (bitField0_ & ~0x00000020);
1603  onChanged();
1604  return this;
1605  }
1606 
1607  private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1608  private void ensureReducedCostIsMutable() {
1609  if (!((bitField0_ & 0x00000040) != 0)) {
1610  reducedCost_ = mutableCopy(reducedCost_);
1611  bitField0_ |= 0x00000040;
1612  }
1613  }
1627  public java.util.List<java.lang.Double>
1629  return ((bitField0_ & 0x00000040) != 0) ?
1630  java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1631  }
1645  public int getReducedCostCount() {
1646  return reducedCost_.size();
1647  }
1662  public double getReducedCost(int index) {
1663  return reducedCost_.getDouble(index);
1664  }
1681  int index, double value) {
1682  ensureReducedCostIsMutable();
1683  reducedCost_.setDouble(index, value);
1684  onChanged();
1685  return this;
1686  }
1701  public Builder addReducedCost(double value) {
1702  ensureReducedCostIsMutable();
1703  reducedCost_.addDouble(value);
1704  onChanged();
1705  return this;
1706  }
1722  java.lang.Iterable<? extends java.lang.Double> values) {
1723  ensureReducedCostIsMutable();
1724  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1725  values, reducedCost_);
1726  onChanged();
1727  return this;
1728  }
1743  reducedCost_ = emptyDoubleList();
1744  bitField0_ = (bitField0_ & ~0x00000040);
1745  onChanged();
1746  return this;
1747  }
1748  @java.lang.Override
1750  final com.google.protobuf.UnknownFieldSet unknownFields) {
1751  return super.setUnknownFields(unknownFields);
1752  }
1753 
1754  @java.lang.Override
1756  final com.google.protobuf.UnknownFieldSet unknownFields) {
1757  return super.mergeUnknownFields(unknownFields);
1758  }
1759 
1760 
1761  // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
1762  }
1763 
1764  // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
1765  private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
1766  static {
1767  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
1768  }
1769 
1771  return DEFAULT_INSTANCE;
1772  }
1773 
1774  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
1775  PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
1776  @java.lang.Override
1777  public MPSolutionResponse parsePartialFrom(
1778  com.google.protobuf.CodedInputStream input,
1779  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1780  throws com.google.protobuf.InvalidProtocolBufferException {
1781  return new MPSolutionResponse(input, extensionRegistry);
1782  }
1783  };
1784 
1785  public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
1786  return PARSER;
1787  }
1788 
1789  @java.lang.Override
1790  public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
1791  return PARSER;
1792  }
1793 
1794  @java.lang.Override
1796  return DEFAULT_INSTANCE;
1797  }
1798 
1799 }
1800 
double getReducedCost(int index)
Builder setStatusStr(java.lang.String value)
Builder clearDualValue()
MPSOLVER_UNKNOWN_STATUS
Protobuf type.
double getReducedCost(int index)
java.lang.String getStatusStr()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final int STATUS_STR_FIELD_NUMBER
java.util.List< java.lang.Double > getDualValueList()
.lang.Override java.lang.String getStatusStr()
int getVariableValueCount()
.lang.Override java.util.List< java.lang.Double > getReducedCostList()
static final int VARIABLE_VALUE_FIELD_NUMBER
.lang.Override boolean hasStatusStr()
.lang.Override Builder toBuilder()
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse build()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder clearStatus()
int getReducedCostCount()
double getDualValue(int index)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
.lang.Override boolean hasBestObjectiveBound()
Builder addVariableValue(double value)
.lang.Override int getSerializedSize()
com.google.protobuf.ByteString getStatusStrBytes()
java.util.List< java.lang.Double > getReducedCostList()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
int getVariableValueCount()
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override double getObjectiveValue()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Deprecated static MPSolverResponseStatus valueOf(int value)
static final int REDUCED_COST_FIELD_NUMBER
.lang.Deprecated static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
Builder setVariableValue(int index, double value)
.lang.Override boolean hasObjectiveValue()
Builder addDualValue(double value)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)
double getDualValue(int index)
.lang.Override java.util.List< java.lang.Double > getDualValueList()
.lang.Override boolean hasStatus()
static com.google.protobuf.Parser< MPSolutionResponse > parser()
Protobuf type.
.lang.Override com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
Builder setReducedCost(int index, double value)
double getVariableValue(int index)
static final int STATUS_FIELD_NUMBER
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
Builder setDualValue(int index, double value)
.lang.Override java.util.List< java.lang.Double > getVariableValueList()
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
boolean hasStatusStr()
static final int DUAL_VALUE_FIELD_NUMBER
Builder setBestObjectiveBound(double value)
int getDualValueCount()
static final int OBJECTIVE_VALUE_FIELD_NUMBER
.lang.Override com.google.protobuf.ByteString getStatusStrBytes()
Builder clearBestObjectiveBound()
.lang.Override boolean hasStatus()
.lang.Override Builder newBuilderForType()
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
.lang.Override Builder clear()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override boolean hasObjectiveValue()
int getReducedCostCount()
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
Builder addReducedCost(double value)
Builder clearStatusStr()
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
int getDualValueCount()
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
Builder clearVariableValue()
static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override double getBestObjectiveBound()
.lang.Override int hashCode()
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override final boolean isInitialized()
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder setObjectiveValue(double value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder clearObjectiveValue()
.lang.Override com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
java.util.List< java.lang.Double > getVariableValueList()
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
double getVariableValue(int index)
.lang.Override boolean hasBestObjectiveBound()
.lang.Override final boolean isInitialized()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder clearReducedCost()
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
.lang.Override double getBestObjectiveBound()
.lang.Override com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
.lang.Override double getObjectiveValue()
.lang.Override Builder clone()
static Builder newBuilder()
Builder setStatusStrBytes(com.google.protobuf.ByteString value)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
.lang.Override com.google.ortools.linearsolver.MPSolutionResponse buildPartial()