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  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  public boolean hasStatusStr() {
231  return ((bitField0_ & 0x00000002) != 0);
232  }
244  public java.lang.String getStatusStr() {
245  java.lang.Object ref = statusStr_;
246  if (ref instanceof java.lang.String) {
247  return (java.lang.String) ref;
248  } else {
249  com.google.protobuf.ByteString bs =
250  (com.google.protobuf.ByteString) ref;
251  java.lang.String s = bs.toStringUtf8();
252  if (bs.isValidUtf8()) {
253  statusStr_ = s;
254  }
255  return s;
256  }
257  }
269  public com.google.protobuf.ByteString
271  java.lang.Object ref = statusStr_;
272  if (ref instanceof java.lang.String) {
273  com.google.protobuf.ByteString b =
274  com.google.protobuf.ByteString.copyFromUtf8(
275  (java.lang.String) ref);
276  statusStr_ = b;
277  return b;
278  } else {
279  return (com.google.protobuf.ByteString) ref;
280  }
281  }
282 
283  public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
284  private double objectiveValue_;
295  public boolean hasObjectiveValue() {
296  return ((bitField0_ & 0x00000004) != 0);
297  }
308  public double getObjectiveValue() {
309  return objectiveValue_;
310  }
311 
312  public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
313  private double bestObjectiveBound_;
326  public boolean hasBestObjectiveBound() {
327  return ((bitField0_ & 0x00000008) != 0);
328  }
341  public double getBestObjectiveBound() {
342  return bestObjectiveBound_;
343  }
344 
345  public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
346  private com.google.protobuf.Internal.DoubleList variableValue_;
357  public java.util.List<java.lang.Double>
359  return variableValue_;
360  }
371  public int getVariableValueCount() {
372  return variableValue_.size();
373  }
385  public double getVariableValue(int index) {
386  return variableValue_.getDouble(index);
387  }
388  private int variableValueMemoizedSerializedSize = -1;
389 
390  public static final int DUAL_VALUE_FIELD_NUMBER = 4;
391  private com.google.protobuf.Internal.DoubleList dualValue_;
405  public java.util.List<java.lang.Double>
407  return dualValue_;
408  }
422  public int getDualValueCount() {
423  return dualValue_.size();
424  }
439  public double getDualValue(int index) {
440  return dualValue_.getDouble(index);
441  }
442  private int dualValueMemoizedSerializedSize = -1;
443 
444  public static final int REDUCED_COST_FIELD_NUMBER = 6;
445  private com.google.protobuf.Internal.DoubleList reducedCost_;
459  public java.util.List<java.lang.Double>
461  return reducedCost_;
462  }
476  public int getReducedCostCount() {
477  return reducedCost_.size();
478  }
493  public double getReducedCost(int index) {
494  return reducedCost_.getDouble(index);
495  }
496  private int reducedCostMemoizedSerializedSize = -1;
497 
498  private byte memoizedIsInitialized = -1;
499  @java.lang.Override
500  public final boolean isInitialized() {
501  byte isInitialized = memoizedIsInitialized;
502  if (isInitialized == 1) return true;
503  if (isInitialized == 0) return false;
504 
505  memoizedIsInitialized = 1;
506  return true;
507  }
508 
509  @java.lang.Override
510  public void writeTo(com.google.protobuf.CodedOutputStream output)
511  throws java.io.IOException {
513  if (((bitField0_ & 0x00000001) != 0)) {
514  output.writeEnum(1, status_);
515  }
516  if (((bitField0_ & 0x00000004) != 0)) {
517  output.writeDouble(2, objectiveValue_);
518  }
519  if (getVariableValueList().size() > 0) {
520  output.writeUInt32NoTag(26);
521  output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
522  }
523  for (int i = 0; i < variableValue_.size(); i++) {
524  output.writeDoubleNoTag(variableValue_.getDouble(i));
525  }
526  if (getDualValueList().size() > 0) {
527  output.writeUInt32NoTag(34);
528  output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
529  }
530  for (int i = 0; i < dualValue_.size(); i++) {
531  output.writeDoubleNoTag(dualValue_.getDouble(i));
532  }
533  if (((bitField0_ & 0x00000008) != 0)) {
534  output.writeDouble(5, bestObjectiveBound_);
535  }
536  if (getReducedCostList().size() > 0) {
537  output.writeUInt32NoTag(50);
538  output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
539  }
540  for (int i = 0; i < reducedCost_.size(); i++) {
541  output.writeDoubleNoTag(reducedCost_.getDouble(i));
542  }
543  if (((bitField0_ & 0x00000002) != 0)) {
544  com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
545  }
546  unknownFields.writeTo(output);
547  }
548 
549  @java.lang.Override
550  public int getSerializedSize() {
551  int size = memoizedSize;
552  if (size != -1) return size;
553 
554  size = 0;
555  if (((bitField0_ & 0x00000001) != 0)) {
556  size += com.google.protobuf.CodedOutputStream
557  .computeEnumSize(1, status_);
558  }
559  if (((bitField0_ & 0x00000004) != 0)) {
560  size += com.google.protobuf.CodedOutputStream
561  .computeDoubleSize(2, objectiveValue_);
562  }
563  {
564  int dataSize = 0;
565  dataSize = 8 * getVariableValueList().size();
566  size += dataSize;
567  if (!getVariableValueList().isEmpty()) {
568  size += 1;
569  size += com.google.protobuf.CodedOutputStream
570  .computeInt32SizeNoTag(dataSize);
571  }
572  variableValueMemoizedSerializedSize = dataSize;
573  }
574  {
575  int dataSize = 0;
576  dataSize = 8 * getDualValueList().size();
577  size += dataSize;
578  if (!getDualValueList().isEmpty()) {
579  size += 1;
580  size += com.google.protobuf.CodedOutputStream
581  .computeInt32SizeNoTag(dataSize);
582  }
583  dualValueMemoizedSerializedSize = dataSize;
584  }
585  if (((bitField0_ & 0x00000008) != 0)) {
586  size += com.google.protobuf.CodedOutputStream
587  .computeDoubleSize(5, bestObjectiveBound_);
588  }
589  {
590  int dataSize = 0;
591  dataSize = 8 * getReducedCostList().size();
592  size += dataSize;
593  if (!getReducedCostList().isEmpty()) {
594  size += 1;
595  size += com.google.protobuf.CodedOutputStream
596  .computeInt32SizeNoTag(dataSize);
597  }
598  reducedCostMemoizedSerializedSize = dataSize;
599  }
600  if (((bitField0_ & 0x00000002) != 0)) {
601  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
602  }
603  size += unknownFields.getSerializedSize();
604  memoizedSize = size;
605  return size;
606  }
607 
608  @java.lang.Override
609  public boolean equals(final java.lang.Object obj) {
610  if (obj == this) {
611  return true;
612  }
613  if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
614  return super.equals(obj);
615  }
617 
618  if (hasStatus() != other.hasStatus()) return false;
619  if (hasStatus()) {
620  if (status_ != other.status_) return false;
621  }
622  if (hasStatusStr() != other.hasStatusStr()) return false;
623  if (hasStatusStr()) {
624  if (!getStatusStr()
625  .equals(other.getStatusStr())) return false;
626  }
627  if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
628  if (hasObjectiveValue()) {
629  if (java.lang.Double.doubleToLongBits(getObjectiveValue())
630  != java.lang.Double.doubleToLongBits(
631  other.getObjectiveValue())) return false;
632  }
633  if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
634  if (hasBestObjectiveBound()) {
635  if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
636  != java.lang.Double.doubleToLongBits(
637  other.getBestObjectiveBound())) return false;
638  }
639  if (!getVariableValueList()
640  .equals(other.getVariableValueList())) return false;
641  if (!getDualValueList()
642  .equals(other.getDualValueList())) return false;
643  if (!getReducedCostList()
644  .equals(other.getReducedCostList())) return false;
645  if (!unknownFields.equals(other.unknownFields)) return false;
646  return true;
647  }
648 
649  @java.lang.Override
650  public int hashCode() {
651  if (memoizedHashCode != 0) {
652  return memoizedHashCode;
653  }
654  int hash = 41;
655  hash = (19 * hash) + getDescriptor().hashCode();
656  if (hasStatus()) {
657  hash = (37 * hash) + STATUS_FIELD_NUMBER;
658  hash = (53 * hash) + status_;
659  }
660  if (hasStatusStr()) {
661  hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
662  hash = (53 * hash) + getStatusStr().hashCode();
663  }
664  if (hasObjectiveValue()) {
665  hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
666  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
667  java.lang.Double.doubleToLongBits(getObjectiveValue()));
668  }
669  if (hasBestObjectiveBound()) {
670  hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
671  hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
672  java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
673  }
674  if (getVariableValueCount() > 0) {
675  hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
676  hash = (53 * hash) + getVariableValueList().hashCode();
677  }
678  if (getDualValueCount() > 0) {
679  hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
680  hash = (53 * hash) + getDualValueList().hashCode();
681  }
682  if (getReducedCostCount() > 0) {
683  hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
684  hash = (53 * hash) + getReducedCostList().hashCode();
685  }
686  hash = (29 * hash) + unknownFields.hashCode();
687  memoizedHashCode = hash;
688  return hash;
689  }
690 
692  java.nio.ByteBuffer data)
693  throws com.google.protobuf.InvalidProtocolBufferException {
694  return PARSER.parseFrom(data);
695  }
697  java.nio.ByteBuffer data,
698  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
699  throws com.google.protobuf.InvalidProtocolBufferException {
700  return PARSER.parseFrom(data, extensionRegistry);
701  }
703  com.google.protobuf.ByteString data)
704  throws com.google.protobuf.InvalidProtocolBufferException {
705  return PARSER.parseFrom(data);
706  }
708  com.google.protobuf.ByteString data,
709  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
710  throws com.google.protobuf.InvalidProtocolBufferException {
711  return PARSER.parseFrom(data, extensionRegistry);
712  }
714  throws com.google.protobuf.InvalidProtocolBufferException {
715  return PARSER.parseFrom(data);
716  }
718  byte[] data,
719  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
720  throws com.google.protobuf.InvalidProtocolBufferException {
721  return PARSER.parseFrom(data, extensionRegistry);
722  }
723  public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
724  throws java.io.IOException {
725  return com.google.protobuf.GeneratedMessageV3
726  .parseWithIOException(PARSER, input);
727  }
729  java.io.InputStream input,
730  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
731  throws java.io.IOException {
732  return com.google.protobuf.GeneratedMessageV3
733  .parseWithIOException(PARSER, input, extensionRegistry);
734  }
735  public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
736  throws java.io.IOException {
737  return com.google.protobuf.GeneratedMessageV3
738  .parseDelimitedWithIOException(PARSER, input);
739  }
741  java.io.InputStream input,
742  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
743  throws java.io.IOException {
744  return com.google.protobuf.GeneratedMessageV3
745  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
746  }
748  com.google.protobuf.CodedInputStream input)
749  throws java.io.IOException {
750  return com.google.protobuf.GeneratedMessageV3
751  .parseWithIOException(PARSER, input);
752  }
754  com.google.protobuf.CodedInputStream input,
755  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
756  throws java.io.IOException {
757  return com.google.protobuf.GeneratedMessageV3
758  .parseWithIOException(PARSER, input, extensionRegistry);
759  }
760 
761  @java.lang.Override
762  public Builder newBuilderForType() { return newBuilder(); }
763  public static Builder newBuilder() {
764  return DEFAULT_INSTANCE.toBuilder();
765  }
767  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
768  }
769  @java.lang.Override
770  public Builder toBuilder() {
771  return this == DEFAULT_INSTANCE
772  ? new Builder() : new Builder().mergeFrom(this);
773  }
774 
775  @java.lang.Override
777  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
778  Builder builder = new Builder(parent);
779  return builder;
780  }
784  public static final class Builder extends
785  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
786  // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
787  com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
788  public static final com.google.protobuf.Descriptors.Descriptor
790  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
791  }
792 
793  @java.lang.Override
794  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
796  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
797  .ensureFieldAccessorsInitialized(
799  }
800 
801  // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
802  private Builder() {
803  maybeForceBuilderInitialization();
804  }
805 
806  private Builder(
807  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
808  super(parent);
809  maybeForceBuilderInitialization();
810  }
811  private void maybeForceBuilderInitialization() {
812  if (com.google.protobuf.GeneratedMessageV3
813  .alwaysUseFieldBuilders) {
814  }
815  }
816  @java.lang.Override
817  public Builder clear() {
818  super.clear();
819  status_ = 99;
820  bitField0_ = (bitField0_ & ~0x00000001);
821  statusStr_ = "";
822  bitField0_ = (bitField0_ & ~0x00000002);
823  objectiveValue_ = 0D;
824  bitField0_ = (bitField0_ & ~0x00000004);
825  bestObjectiveBound_ = 0D;
826  bitField0_ = (bitField0_ & ~0x00000008);
827  variableValue_ = emptyDoubleList();
828  bitField0_ = (bitField0_ & ~0x00000010);
829  dualValue_ = emptyDoubleList();
830  bitField0_ = (bitField0_ & ~0x00000020);
831  reducedCost_ = emptyDoubleList();
832  bitField0_ = (bitField0_ & ~0x00000040);
833  return this;
834  }
835 
836  @java.lang.Override
837  public com.google.protobuf.Descriptors.Descriptor
839  return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
840  }
841 
842  @java.lang.Override
845  }
846 
847  @java.lang.Override
850  if (!result.isInitialized()) {
851  throw newUninitializedMessageException(result);
852  }
853  return result;
854  }
855 
856  @java.lang.Override
859  int from_bitField0_ = bitField0_;
860  int to_bitField0_ = 0;
861  if (((from_bitField0_ & 0x00000001) != 0)) {
862  to_bitField0_ |= 0x00000001;
863  }
864  result.status_ = status_;
865  if (((from_bitField0_ & 0x00000002) != 0)) {
866  to_bitField0_ |= 0x00000002;
867  }
868  result.statusStr_ = statusStr_;
869  if (((from_bitField0_ & 0x00000004) != 0)) {
870  result.objectiveValue_ = objectiveValue_;
871  to_bitField0_ |= 0x00000004;
872  }
873  if (((from_bitField0_ & 0x00000008) != 0)) {
874  result.bestObjectiveBound_ = bestObjectiveBound_;
875  to_bitField0_ |= 0x00000008;
876  }
877  if (((bitField0_ & 0x00000010) != 0)) {
878  variableValue_.makeImmutable();
879  bitField0_ = (bitField0_ & ~0x00000010);
880  }
881  result.variableValue_ = variableValue_;
882  if (((bitField0_ & 0x00000020) != 0)) {
883  dualValue_.makeImmutable();
884  bitField0_ = (bitField0_ & ~0x00000020);
885  }
886  result.dualValue_ = dualValue_;
887  if (((bitField0_ & 0x00000040) != 0)) {
888  reducedCost_.makeImmutable();
889  bitField0_ = (bitField0_ & ~0x00000040);
890  }
891  result.reducedCost_ = reducedCost_;
892  result.bitField0_ = to_bitField0_;
893  onBuilt();
894  return result;
895  }
896 
897  @java.lang.Override
898  public Builder clone() {
899  return super.clone();
900  }
901  @java.lang.Override
903  com.google.protobuf.Descriptors.FieldDescriptor field,
904  java.lang.Object value) {
905  return super.setField(field, value);
906  }
907  @java.lang.Override
909  com.google.protobuf.Descriptors.FieldDescriptor field) {
910  return super.clearField(field);
911  }
912  @java.lang.Override
914  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
915  return super.clearOneof(oneof);
916  }
917  @java.lang.Override
919  com.google.protobuf.Descriptors.FieldDescriptor field,
920  int index, java.lang.Object value) {
921  return super.setRepeatedField(field, index, value);
922  }
923  @java.lang.Override
925  com.google.protobuf.Descriptors.FieldDescriptor field,
926  java.lang.Object value) {
927  return super.addRepeatedField(field, value);
928  }
929  @java.lang.Override
930  public Builder mergeFrom(com.google.protobuf.Message other) {
931  if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
933  } else {
934  super.mergeFrom(other);
935  return this;
936  }
937  }
938 
941  if (other.hasStatus()) {
942  setStatus(other.getStatus());
943  }
944  if (other.hasStatusStr()) {
945  bitField0_ |= 0x00000002;
946  statusStr_ = other.statusStr_;
947  onChanged();
948  }
949  if (other.hasObjectiveValue()) {
950  setObjectiveValue(other.getObjectiveValue());
951  }
952  if (other.hasBestObjectiveBound()) {
953  setBestObjectiveBound(other.getBestObjectiveBound());
954  }
955  if (!other.variableValue_.isEmpty()) {
956  if (variableValue_.isEmpty()) {
957  variableValue_ = other.variableValue_;
958  bitField0_ = (bitField0_ & ~0x00000010);
959  } else {
960  ensureVariableValueIsMutable();
961  variableValue_.addAll(other.variableValue_);
962  }
963  onChanged();
964  }
965  if (!other.dualValue_.isEmpty()) {
966  if (dualValue_.isEmpty()) {
967  dualValue_ = other.dualValue_;
968  bitField0_ = (bitField0_ & ~0x00000020);
969  } else {
970  ensureDualValueIsMutable();
971  dualValue_.addAll(other.dualValue_);
972  }
973  onChanged();
974  }
975  if (!other.reducedCost_.isEmpty()) {
976  if (reducedCost_.isEmpty()) {
977  reducedCost_ = other.reducedCost_;
978  bitField0_ = (bitField0_ & ~0x00000040);
979  } else {
980  ensureReducedCostIsMutable();
981  reducedCost_.addAll(other.reducedCost_);
982  }
983  onChanged();
984  }
985  this.mergeUnknownFields(other.unknownFields);
986  onChanged();
987  return this;
988  }
989 
990  @java.lang.Override
991  public final boolean isInitialized() {
992  return true;
993  }
994 
995  @java.lang.Override
997  com.google.protobuf.CodedInputStream input,
998  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
999  throws java.io.IOException {
1000  com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
1001  try {
1002  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1003  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1004  parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
1005  throw e.unwrapIOException();
1006  } finally {
1007  if (parsedMessage != null) {
1008  mergeFrom(parsedMessage);
1009  }
1010  }
1011  return this;
1012  }
1013  private int bitField0_;
1014 
1015  private int status_ = 99;
1024  public boolean hasStatus() {
1025  return ((bitField0_ & 0x00000001) != 0);
1026  }
1036  @SuppressWarnings("deprecation")
1039  }
1050  if (value == null) {
1051  throw new NullPointerException();
1052  }
1053  bitField0_ |= 0x00000001;
1054  status_ = value.getNumber();
1055  onChanged();
1056  return this;
1057  }
1067  bitField0_ = (bitField0_ & ~0x00000001);
1068  status_ = 99;
1069  onChanged();
1070  return this;
1071  }
1072 
1073  private java.lang.Object statusStr_ = "";
1085  public boolean hasStatusStr() {
1086  return ((bitField0_ & 0x00000002) != 0);
1087  }
1099  public java.lang.String getStatusStr() {
1100  java.lang.Object ref = statusStr_;
1101  if (!(ref instanceof java.lang.String)) {
1102  com.google.protobuf.ByteString bs =
1103  (com.google.protobuf.ByteString) ref;
1104  java.lang.String s = bs.toStringUtf8();
1105  if (bs.isValidUtf8()) {
1106  statusStr_ = s;
1107  }
1108  return s;
1109  } else {
1110  return (java.lang.String) ref;
1111  }
1112  }
1124  public com.google.protobuf.ByteString
1126  java.lang.Object ref = statusStr_;
1127  if (ref instanceof String) {
1128  com.google.protobuf.ByteString b =
1129  com.google.protobuf.ByteString.copyFromUtf8(
1130  (java.lang.String) ref);
1131  statusStr_ = b;
1132  return b;
1133  } else {
1134  return (com.google.protobuf.ByteString) ref;
1135  }
1136  }
1150  java.lang.String value) {
1151  if (value == null) {
1152  throw new NullPointerException();
1153  }
1154  bitField0_ |= 0x00000002;
1155  statusStr_ = value;
1156  onChanged();
1157  return this;
1158  }
1171  bitField0_ = (bitField0_ & ~0x00000002);
1172  statusStr_ = getDefaultInstance().getStatusStr();
1173  onChanged();
1174  return this;
1175  }
1189  com.google.protobuf.ByteString value) {
1190  if (value == null) {
1191  throw new NullPointerException();
1192  }
1193  bitField0_ |= 0x00000002;
1194  statusStr_ = value;
1195  onChanged();
1196  return this;
1197  }
1198 
1199  private double objectiveValue_ ;
1210  public boolean hasObjectiveValue() {
1211  return ((bitField0_ & 0x00000004) != 0);
1212  }
1223  public double getObjectiveValue() {
1224  return objectiveValue_;
1225  }
1237  public Builder setObjectiveValue(double value) {
1238  bitField0_ |= 0x00000004;
1239  objectiveValue_ = value;
1240  onChanged();
1241  return this;
1242  }
1254  bitField0_ = (bitField0_ & ~0x00000004);
1255  objectiveValue_ = 0D;
1256  onChanged();
1257  return this;
1258  }
1259 
1260  private double bestObjectiveBound_ ;
1273  public boolean hasBestObjectiveBound() {
1274  return ((bitField0_ & 0x00000008) != 0);
1275  }
1288  public double getBestObjectiveBound() {
1289  return bestObjectiveBound_;
1290  }
1304  public Builder setBestObjectiveBound(double value) {
1305  bitField0_ |= 0x00000008;
1306  bestObjectiveBound_ = value;
1307  onChanged();
1308  return this;
1309  }
1323  bitField0_ = (bitField0_ & ~0x00000008);
1324  bestObjectiveBound_ = 0D;
1325  onChanged();
1326  return this;
1327  }
1328 
1329  private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1330  private void ensureVariableValueIsMutable() {
1331  if (!((bitField0_ & 0x00000010) != 0)) {
1332  variableValue_ = mutableCopy(variableValue_);
1333  bitField0_ |= 0x00000010;
1334  }
1335  }
1346  public java.util.List<java.lang.Double>
1348  return ((bitField0_ & 0x00000010) != 0) ?
1349  java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1350  }
1361  public int getVariableValueCount() {
1362  return variableValue_.size();
1363  }
1375  public double getVariableValue(int index) {
1376  return variableValue_.getDouble(index);
1377  }
1391  int index, double value) {
1392  ensureVariableValueIsMutable();
1393  variableValue_.setDouble(index, value);
1394  onChanged();
1395  return this;
1396  }
1408  public Builder addVariableValue(double value) {
1409  ensureVariableValueIsMutable();
1410  variableValue_.addDouble(value);
1411  onChanged();
1412  return this;
1413  }
1426  java.lang.Iterable<? extends java.lang.Double> values) {
1427  ensureVariableValueIsMutable();
1428  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1429  values, variableValue_);
1430  onChanged();
1431  return this;
1432  }
1444  variableValue_ = emptyDoubleList();
1445  bitField0_ = (bitField0_ & ~0x00000010);
1446  onChanged();
1447  return this;
1448  }
1449 
1450  private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1451  private void ensureDualValueIsMutable() {
1452  if (!((bitField0_ & 0x00000020) != 0)) {
1453  dualValue_ = mutableCopy(dualValue_);
1454  bitField0_ |= 0x00000020;
1455  }
1456  }
1470  public java.util.List<java.lang.Double>
1472  return ((bitField0_ & 0x00000020) != 0) ?
1473  java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1474  }
1488  public int getDualValueCount() {
1489  return dualValue_.size();
1490  }
1505  public double getDualValue(int index) {
1506  return dualValue_.getDouble(index);
1507  }
1524  int index, double value) {
1525  ensureDualValueIsMutable();
1526  dualValue_.setDouble(index, value);
1527  onChanged();
1528  return this;
1529  }
1544  public Builder addDualValue(double value) {
1545  ensureDualValueIsMutable();
1546  dualValue_.addDouble(value);
1547  onChanged();
1548  return this;
1549  }
1565  java.lang.Iterable<? extends java.lang.Double> values) {
1566  ensureDualValueIsMutable();
1567  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1568  values, dualValue_);
1569  onChanged();
1570  return this;
1571  }
1586  dualValue_ = emptyDoubleList();
1587  bitField0_ = (bitField0_ & ~0x00000020);
1588  onChanged();
1589  return this;
1590  }
1591 
1592  private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1593  private void ensureReducedCostIsMutable() {
1594  if (!((bitField0_ & 0x00000040) != 0)) {
1595  reducedCost_ = mutableCopy(reducedCost_);
1596  bitField0_ |= 0x00000040;
1597  }
1598  }
1612  public java.util.List<java.lang.Double>
1614  return ((bitField0_ & 0x00000040) != 0) ?
1615  java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1616  }
1630  public int getReducedCostCount() {
1631  return reducedCost_.size();
1632  }
1647  public double getReducedCost(int index) {
1648  return reducedCost_.getDouble(index);
1649  }
1666  int index, double value) {
1667  ensureReducedCostIsMutable();
1668  reducedCost_.setDouble(index, value);
1669  onChanged();
1670  return this;
1671  }
1686  public Builder addReducedCost(double value) {
1687  ensureReducedCostIsMutable();
1688  reducedCost_.addDouble(value);
1689  onChanged();
1690  return this;
1691  }
1707  java.lang.Iterable<? extends java.lang.Double> values) {
1708  ensureReducedCostIsMutable();
1709  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1710  values, reducedCost_);
1711  onChanged();
1712  return this;
1713  }
1728  reducedCost_ = emptyDoubleList();
1729  bitField0_ = (bitField0_ & ~0x00000040);
1730  onChanged();
1731  return this;
1732  }
1733  @java.lang.Override
1735  final com.google.protobuf.UnknownFieldSet unknownFields) {
1736  return super.setUnknownFields(unknownFields);
1737  }
1738 
1739  @java.lang.Override
1741  final com.google.protobuf.UnknownFieldSet unknownFields) {
1742  return super.mergeUnknownFields(unknownFields);
1743  }
1744 
1745 
1746  // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
1747  }
1748 
1749  // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
1750  private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
1751  static {
1752  DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
1753  }
1754 
1756  return DEFAULT_INSTANCE;
1757  }
1758 
1759  @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
1760  PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
1761  @java.lang.Override
1762  public MPSolutionResponse parsePartialFrom(
1763  com.google.protobuf.CodedInputStream input,
1764  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1765  throws com.google.protobuf.InvalidProtocolBufferException {
1766  return new MPSolutionResponse(input, extensionRegistry);
1767  }
1768  };
1769 
1770  public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
1771  return PARSER;
1772  }
1773 
1774  @java.lang.Override
1775  public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
1776  return PARSER;
1777  }
1778 
1779  @java.lang.Override
1781  return DEFAULT_INSTANCE;
1782  }
1783 
1784 }
1785 
boolean hasBestObjectiveBound()
double getReducedCost(int index)
Builder setStatusStr(java.lang.String value)
Builder clearDualValue()
boolean hasBestObjectiveBound()
MPSOLVER_UNKNOWN_STATUS
Protobuf type.
boolean hasStatus()
double getReducedCost(int index)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
java.lang.String getStatusStr()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
double getObjectiveValue()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
double getBestObjectiveBound()
static final int STATUS_STR_FIELD_NUMBER
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
java.util.List< java.lang.Double > getDualValueList()
boolean hasStatusStr()
int getVariableValueCount()
static final int VARIABLE_VALUE_FIELD_NUMBER
java.util.List< java.lang.Double > getReducedCostList()
.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)
java.util.List< java.lang.Double > getDualValueList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addVariableValue(double value)
.lang.Override int getSerializedSize()
com.google.protobuf.ByteString getStatusStrBytes()
java.util.List< java.lang.Double > getReducedCostList()
double getObjectiveValue()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
int getVariableValueCount()
.lang.Override boolean equals(final java.lang.Object obj)
boolean hasObjectiveValue()
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)
Builder addDualValue(double value)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)
double getDualValue(int index)
static com.google.protobuf.Parser< MPSolutionResponse > parser()
Protobuf type.
.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)
double getBestObjectiveBound()
.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
Builder clearBestObjectiveBound()
.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()
boolean hasObjectiveValue()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
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
com.google.protobuf.ByteString getStatusStrBytes()
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
boolean hasStatus()
.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)
java.lang.String getStatusStr()
.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)
java.util.List< java.lang.Double > getVariableValueList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
.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()