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
4package com.google.ortools.linearsolver;
5
13public final class MPSolutionResponse extends
14 com.google.protobuf.GeneratedMessageV3 implements
15 // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
17private static final long serialVersionUID = 0L;
18 // Use MPSolutionResponse.newBuilder() to construct.
19 private MPSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20 super(builder);
21 }
22 private MPSolutionResponse() {
23 status_ = 99;
24 statusStr_ = "";
25 variableValue_ = emptyDoubleList();
26 dualValue_ = emptyDoubleList();
27 reducedCost_ = emptyDoubleList();
28 additionalSolutions_ = java.util.Collections.emptyList();
29 }
30
31 @java.lang.Override
32 @SuppressWarnings({"unused"})
33 protected java.lang.Object newInstance(
34 UnusedPrivateParameter unused) {
35 return new MPSolutionResponse();
36 }
37
38 @java.lang.Override
39 public final com.google.protobuf.UnknownFieldSet
41 return this.unknownFields;
42 }
43 private MPSolutionResponse(
44 com.google.protobuf.CodedInputStream input,
45 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
46 throws com.google.protobuf.InvalidProtocolBufferException {
47 this();
48 if (extensionRegistry == null) {
49 throw new java.lang.NullPointerException();
50 }
51 int mutable_bitField0_ = 0;
52 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
53 com.google.protobuf.UnknownFieldSet.newBuilder();
54 try {
55 boolean done = false;
56 while (!done) {
57 int tag = input.readTag();
58 switch (tag) {
59 case 0:
60 done = true;
61 break;
62 case 8: {
63 int rawValue = input.readEnum();
64 @SuppressWarnings("deprecation")
65 com.google.ortools.linearsolver.MPSolverResponseStatus value = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
66 if (value == null) {
67 unknownFields.mergeVarintField(1, rawValue);
68 } else {
69 bitField0_ |= 0x00000001;
70 status_ = rawValue;
71 }
72 break;
73 }
74 case 17: {
75 bitField0_ |= 0x00000004;
76 objectiveValue_ = input.readDouble();
77 break;
78 }
79 case 25: {
80 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
81 variableValue_ = newDoubleList();
82 mutable_bitField0_ |= 0x00000010;
83 }
84 variableValue_.addDouble(input.readDouble());
85 break;
86 }
87 case 26: {
88 int length = input.readRawVarint32();
89 int limit = input.pushLimit(length);
90 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
91 variableValue_ = newDoubleList();
92 mutable_bitField0_ |= 0x00000010;
93 }
94 while (input.getBytesUntilLimit() > 0) {
95 variableValue_.addDouble(input.readDouble());
96 }
97 input.popLimit(limit);
98 break;
99 }
100 case 33: {
101 if (!((mutable_bitField0_ & 0x00000040) != 0)) {
102 dualValue_ = newDoubleList();
103 mutable_bitField0_ |= 0x00000040;
104 }
105 dualValue_.addDouble(input.readDouble());
106 break;
107 }
108 case 34: {
109 int length = input.readRawVarint32();
110 int limit = input.pushLimit(length);
111 if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) {
112 dualValue_ = newDoubleList();
113 mutable_bitField0_ |= 0x00000040;
114 }
115 while (input.getBytesUntilLimit() > 0) {
116 dualValue_.addDouble(input.readDouble());
117 }
118 input.popLimit(limit);
119 break;
120 }
121 case 41: {
122 bitField0_ |= 0x00000008;
123 bestObjectiveBound_ = input.readDouble();
124 break;
125 }
126 case 49: {
127 if (!((mutable_bitField0_ & 0x00000080) != 0)) {
128 reducedCost_ = newDoubleList();
129 mutable_bitField0_ |= 0x00000080;
130 }
131 reducedCost_.addDouble(input.readDouble());
132 break;
133 }
134 case 50: {
135 int length = input.readRawVarint32();
136 int limit = input.pushLimit(length);
137 if (!((mutable_bitField0_ & 0x00000080) != 0) && input.getBytesUntilLimit() > 0) {
138 reducedCost_ = newDoubleList();
139 mutable_bitField0_ |= 0x00000080;
140 }
141 while (input.getBytesUntilLimit() > 0) {
142 reducedCost_.addDouble(input.readDouble());
143 }
144 input.popLimit(limit);
145 break;
146 }
147 case 58: {
148 com.google.protobuf.ByteString bs = input.readBytes();
149 bitField0_ |= 0x00000002;
150 statusStr_ = bs;
151 break;
152 }
153 case 66: {
154 if (!((mutable_bitField0_ & 0x00000100) != 0)) {
155 additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>();
156 mutable_bitField0_ |= 0x00000100;
157 }
158 additionalSolutions_.add(
159 input.readMessage(com.google.ortools.linearsolver.MPSolution.PARSER, extensionRegistry));
160 break;
161 }
162 case 82: {
163 com.google.ortools.linearsolver.MPSolveInfo.Builder subBuilder = null;
164 if (((bitField0_ & 0x00000010) != 0)) {
165 subBuilder = solveInfo_.toBuilder();
166 }
167 solveInfo_ = input.readMessage(com.google.ortools.linearsolver.MPSolveInfo.PARSER, extensionRegistry);
168 if (subBuilder != null) {
169 subBuilder.mergeFrom(solveInfo_);
170 solveInfo_ = subBuilder.buildPartial();
171 }
172 bitField0_ |= 0x00000010;
173 break;
174 }
175 default: {
176 if (!parseUnknownField(
177 input, unknownFields, extensionRegistry, tag)) {
178 done = true;
179 }
180 break;
181 }
182 }
183 }
184 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
185 throw e.setUnfinishedMessage(this);
186 } catch (java.io.IOException e) {
187 throw new com.google.protobuf.InvalidProtocolBufferException(
188 e).setUnfinishedMessage(this);
189 } finally {
190 if (((mutable_bitField0_ & 0x00000010) != 0)) {
191 variableValue_.makeImmutable(); // C
192 }
193 if (((mutable_bitField0_ & 0x00000040) != 0)) {
194 dualValue_.makeImmutable(); // C
195 }
196 if (((mutable_bitField0_ & 0x00000080) != 0)) {
197 reducedCost_.makeImmutable(); // C
198 }
199 if (((mutable_bitField0_ & 0x00000100) != 0)) {
200 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
201 }
202 this.unknownFields = unknownFields.build();
203 makeExtensionsImmutable();
204 }
205 }
206 public static final com.google.protobuf.Descriptors.Descriptor
208 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
209 }
210
211 @java.lang.Override
212 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
214 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
215 .ensureFieldAccessorsInitialized(
216 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
217 }
218
219 private int bitField0_;
220 public static final int STATUS_FIELD_NUMBER = 1;
221 private int status_;
230 @java.lang.Override public boolean hasStatus() {
231 return ((bitField0_ & 0x00000001) != 0);
232 }
241 @java.lang.Override public com.google.ortools.linearsolver.MPSolverResponseStatus getStatus() {
242 @SuppressWarnings("deprecation")
243 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(status_);
244 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
245 }
246
247 public static final int STATUS_STR_FIELD_NUMBER = 7;
248 private volatile java.lang.Object statusStr_;
260 @java.lang.Override
261 public boolean hasStatusStr() {
262 return ((bitField0_ & 0x00000002) != 0);
263 }
275 @java.lang.Override
276 public java.lang.String getStatusStr() {
277 java.lang.Object ref = statusStr_;
278 if (ref instanceof java.lang.String) {
279 return (java.lang.String) ref;
280 } else {
281 com.google.protobuf.ByteString bs =
282 (com.google.protobuf.ByteString) ref;
283 java.lang.String s = bs.toStringUtf8();
284 if (bs.isValidUtf8()) {
285 statusStr_ = s;
286 }
287 return s;
288 }
289 }
301 @java.lang.Override
302 public com.google.protobuf.ByteString
304 java.lang.Object ref = statusStr_;
305 if (ref instanceof java.lang.String) {
306 com.google.protobuf.ByteString b =
307 com.google.protobuf.ByteString.copyFromUtf8(
308 (java.lang.String) ref);
309 statusStr_ = b;
310 return b;
311 } else {
312 return (com.google.protobuf.ByteString) ref;
313 }
314 }
315
316 public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
317 private double objectiveValue_;
328 @java.lang.Override
329 public boolean hasObjectiveValue() {
330 return ((bitField0_ & 0x00000004) != 0);
331 }
342 @java.lang.Override
343 public double getObjectiveValue() {
344 return objectiveValue_;
345 }
346
347 public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
348 private double bestObjectiveBound_;
361 @java.lang.Override
362 public boolean hasBestObjectiveBound() {
363 return ((bitField0_ & 0x00000008) != 0);
364 }
377 @java.lang.Override
378 public double getBestObjectiveBound() {
379 return bestObjectiveBound_;
380 }
381
382 public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
383 private com.google.protobuf.Internal.DoubleList variableValue_;
394 @java.lang.Override
395 public java.util.List<java.lang.Double>
397 return variableValue_;
398 }
410 return variableValue_.size();
411 }
423 public double getVariableValue(int index) {
424 return variableValue_.getDouble(index);
425 }
426 private int variableValueMemoizedSerializedSize = -1;
427
428 public static final int SOLVE_INFO_FIELD_NUMBER = 10;
429 private com.google.ortools.linearsolver.MPSolveInfo solveInfo_;
440 @java.lang.Override
441 public boolean hasSolveInfo() {
442 return ((bitField0_ & 0x00000010) != 0);
443 }
454 @java.lang.Override
455 public com.google.ortools.linearsolver.MPSolveInfo getSolveInfo() {
456 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
457 }
467 @java.lang.Override
468 public com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder() {
469 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
470 }
471
472 public static final int DUAL_VALUE_FIELD_NUMBER = 4;
473 private com.google.protobuf.Internal.DoubleList dualValue_;
487 @java.lang.Override
488 public java.util.List<java.lang.Double>
490 return dualValue_;
491 }
505 public int getDualValueCount() {
506 return dualValue_.size();
507 }
522 public double getDualValue(int index) {
523 return dualValue_.getDouble(index);
524 }
525 private int dualValueMemoizedSerializedSize = -1;
526
527 public static final int REDUCED_COST_FIELD_NUMBER = 6;
528 private com.google.protobuf.Internal.DoubleList reducedCost_;
542 @java.lang.Override
543 public java.util.List<java.lang.Double>
545 return reducedCost_;
546 }
560 public int getReducedCostCount() {
561 return reducedCost_.size();
562 }
577 public double getReducedCost(int index) {
578 return reducedCost_.getDouble(index);
579 }
580 private int reducedCostMemoizedSerializedSize = -1;
581
582 public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 8;
583 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_;
595 @java.lang.Override
596 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
597 return additionalSolutions_;
598 }
610 @java.lang.Override
611 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
613 return additionalSolutions_;
614 }
626 @java.lang.Override
628 return additionalSolutions_.size();
629 }
641 @java.lang.Override
642 public com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index) {
643 return additionalSolutions_.get(index);
644 }
656 @java.lang.Override
657 public com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(
658 int index) {
659 return additionalSolutions_.get(index);
660 }
661
662 private byte memoizedIsInitialized = -1;
663 @java.lang.Override
664 public final boolean isInitialized() {
665 byte isInitialized = memoizedIsInitialized;
666 if (isInitialized == 1) return true;
667 if (isInitialized == 0) return false;
668
669 memoizedIsInitialized = 1;
670 return true;
671 }
672
673 @java.lang.Override
674 public void writeTo(com.google.protobuf.CodedOutputStream output)
675 throws java.io.IOException {
677 if (((bitField0_ & 0x00000001) != 0)) {
678 output.writeEnum(1, status_);
679 }
680 if (((bitField0_ & 0x00000004) != 0)) {
681 output.writeDouble(2, objectiveValue_);
682 }
683 if (getVariableValueList().size() > 0) {
684 output.writeUInt32NoTag(26);
685 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
686 }
687 for (int i = 0; i < variableValue_.size(); i++) {
688 output.writeDoubleNoTag(variableValue_.getDouble(i));
689 }
690 if (getDualValueList().size() > 0) {
691 output.writeUInt32NoTag(34);
692 output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
693 }
694 for (int i = 0; i < dualValue_.size(); i++) {
695 output.writeDoubleNoTag(dualValue_.getDouble(i));
696 }
697 if (((bitField0_ & 0x00000008) != 0)) {
698 output.writeDouble(5, bestObjectiveBound_);
699 }
700 if (getReducedCostList().size() > 0) {
701 output.writeUInt32NoTag(50);
702 output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
703 }
704 for (int i = 0; i < reducedCost_.size(); i++) {
705 output.writeDoubleNoTag(reducedCost_.getDouble(i));
706 }
707 if (((bitField0_ & 0x00000002) != 0)) {
708 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
709 }
710 for (int i = 0; i < additionalSolutions_.size(); i++) {
711 output.writeMessage(8, additionalSolutions_.get(i));
712 }
713 if (((bitField0_ & 0x00000010) != 0)) {
714 output.writeMessage(10, getSolveInfo());
715 }
716 unknownFields.writeTo(output);
717 }
718
719 @java.lang.Override
720 public int getSerializedSize() {
721 int size = memoizedSize;
722 if (size != -1) return size;
723
724 size = 0;
725 if (((bitField0_ & 0x00000001) != 0)) {
726 size += com.google.protobuf.CodedOutputStream
727 .computeEnumSize(1, status_);
728 }
729 if (((bitField0_ & 0x00000004) != 0)) {
730 size += com.google.protobuf.CodedOutputStream
731 .computeDoubleSize(2, objectiveValue_);
732 }
733 {
734 int dataSize = 0;
735 dataSize = 8 * getVariableValueList().size();
736 size += dataSize;
737 if (!getVariableValueList().isEmpty()) {
738 size += 1;
739 size += com.google.protobuf.CodedOutputStream
740 .computeInt32SizeNoTag(dataSize);
741 }
742 variableValueMemoizedSerializedSize = dataSize;
743 }
744 {
745 int dataSize = 0;
746 dataSize = 8 * getDualValueList().size();
747 size += dataSize;
748 if (!getDualValueList().isEmpty()) {
749 size += 1;
750 size += com.google.protobuf.CodedOutputStream
751 .computeInt32SizeNoTag(dataSize);
752 }
753 dualValueMemoizedSerializedSize = dataSize;
754 }
755 if (((bitField0_ & 0x00000008) != 0)) {
756 size += com.google.protobuf.CodedOutputStream
757 .computeDoubleSize(5, bestObjectiveBound_);
758 }
759 {
760 int dataSize = 0;
761 dataSize = 8 * getReducedCostList().size();
762 size += dataSize;
763 if (!getReducedCostList().isEmpty()) {
764 size += 1;
765 size += com.google.protobuf.CodedOutputStream
766 .computeInt32SizeNoTag(dataSize);
767 }
768 reducedCostMemoizedSerializedSize = dataSize;
769 }
770 if (((bitField0_ & 0x00000002) != 0)) {
771 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
772 }
773 for (int i = 0; i < additionalSolutions_.size(); i++) {
774 size += com.google.protobuf.CodedOutputStream
775 .computeMessageSize(8, additionalSolutions_.get(i));
776 }
777 if (((bitField0_ & 0x00000010) != 0)) {
778 size += com.google.protobuf.CodedOutputStream
779 .computeMessageSize(10, getSolveInfo());
780 }
781 size += unknownFields.getSerializedSize();
782 memoizedSize = size;
783 return size;
784 }
785
786 @java.lang.Override
787 public boolean equals(final java.lang.Object obj) {
788 if (obj == this) {
789 return true;
790 }
791 if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
792 return super.equals(obj);
793 }
794 com.google.ortools.linearsolver.MPSolutionResponse other = (com.google.ortools.linearsolver.MPSolutionResponse) obj;
795
796 if (hasStatus() != other.hasStatus()) return false;
797 if (hasStatus()) {
798 if (status_ != other.status_) return false;
799 }
800 if (hasStatusStr() != other.hasStatusStr()) return false;
801 if (hasStatusStr()) {
802 if (!getStatusStr()
803 .equals(other.getStatusStr())) return false;
804 }
805 if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
806 if (hasObjectiveValue()) {
807 if (java.lang.Double.doubleToLongBits(getObjectiveValue())
808 != java.lang.Double.doubleToLongBits(
809 other.getObjectiveValue())) return false;
810 }
811 if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
812 if (hasBestObjectiveBound()) {
813 if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
814 != java.lang.Double.doubleToLongBits(
815 other.getBestObjectiveBound())) return false;
816 }
818 .equals(other.getVariableValueList())) return false;
819 if (hasSolveInfo() != other.hasSolveInfo()) return false;
820 if (hasSolveInfo()) {
821 if (!getSolveInfo()
822 .equals(other.getSolveInfo())) return false;
823 }
824 if (!getDualValueList()
825 .equals(other.getDualValueList())) return false;
826 if (!getReducedCostList()
827 .equals(other.getReducedCostList())) return false;
829 .equals(other.getAdditionalSolutionsList())) return false;
830 if (!unknownFields.equals(other.unknownFields)) return false;
831 return true;
832 }
833
834 @java.lang.Override
835 public int hashCode() {
836 if (memoizedHashCode != 0) {
837 return memoizedHashCode;
838 }
839 int hash = 41;
840 hash = (19 * hash) + getDescriptor().hashCode();
841 if (hasStatus()) {
842 hash = (37 * hash) + STATUS_FIELD_NUMBER;
843 hash = (53 * hash) + status_;
844 }
845 if (hasStatusStr()) {
846 hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
847 hash = (53 * hash) + getStatusStr().hashCode();
848 }
849 if (hasObjectiveValue()) {
850 hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
851 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
852 java.lang.Double.doubleToLongBits(getObjectiveValue()));
853 }
854 if (hasBestObjectiveBound()) {
855 hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
856 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
857 java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
858 }
859 if (getVariableValueCount() > 0) {
860 hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
861 hash = (53 * hash) + getVariableValueList().hashCode();
862 }
863 if (hasSolveInfo()) {
864 hash = (37 * hash) + SOLVE_INFO_FIELD_NUMBER;
865 hash = (53 * hash) + getSolveInfo().hashCode();
866 }
867 if (getDualValueCount() > 0) {
868 hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
869 hash = (53 * hash) + getDualValueList().hashCode();
870 }
871 if (getReducedCostCount() > 0) {
872 hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
873 hash = (53 * hash) + getReducedCostList().hashCode();
874 }
875 if (getAdditionalSolutionsCount() > 0) {
876 hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
877 hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
878 }
879 hash = (29 * hash) + unknownFields.hashCode();
880 memoizedHashCode = hash;
881 return hash;
882 }
883
884 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
885 java.nio.ByteBuffer data)
886 throws com.google.protobuf.InvalidProtocolBufferException {
887 return PARSER.parseFrom(data);
888 }
889 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
890 java.nio.ByteBuffer data,
891 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
892 throws com.google.protobuf.InvalidProtocolBufferException {
893 return PARSER.parseFrom(data, extensionRegistry);
894 }
895 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
896 com.google.protobuf.ByteString data)
897 throws com.google.protobuf.InvalidProtocolBufferException {
898 return PARSER.parseFrom(data);
899 }
900 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
901 com.google.protobuf.ByteString data,
902 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
903 throws com.google.protobuf.InvalidProtocolBufferException {
904 return PARSER.parseFrom(data, extensionRegistry);
905 }
906 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
907 throws com.google.protobuf.InvalidProtocolBufferException {
908 return PARSER.parseFrom(data);
909 }
910 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
911 byte[] data,
912 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
913 throws com.google.protobuf.InvalidProtocolBufferException {
914 return PARSER.parseFrom(data, extensionRegistry);
915 }
916 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
917 throws java.io.IOException {
918 return com.google.protobuf.GeneratedMessageV3
919 .parseWithIOException(PARSER, input);
920 }
921 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
922 java.io.InputStream input,
923 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
924 throws java.io.IOException {
925 return com.google.protobuf.GeneratedMessageV3
926 .parseWithIOException(PARSER, input, extensionRegistry);
927 }
928 public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
929 throws java.io.IOException {
930 return com.google.protobuf.GeneratedMessageV3
931 .parseDelimitedWithIOException(PARSER, input);
932 }
933 public static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(
934 java.io.InputStream input,
935 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
936 throws java.io.IOException {
937 return com.google.protobuf.GeneratedMessageV3
938 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
939 }
940 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
941 com.google.protobuf.CodedInputStream input)
942 throws java.io.IOException {
943 return com.google.protobuf.GeneratedMessageV3
944 .parseWithIOException(PARSER, input);
945 }
946 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(
947 com.google.protobuf.CodedInputStream input,
948 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
949 throws java.io.IOException {
950 return com.google.protobuf.GeneratedMessageV3
951 .parseWithIOException(PARSER, input, extensionRegistry);
952 }
953
954 @java.lang.Override
955 public Builder newBuilderForType() { return newBuilder(); }
956 public static Builder newBuilder() {
957 return DEFAULT_INSTANCE.toBuilder();
958 }
959 public static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype) {
960 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
961 }
962 @java.lang.Override
964 return this == DEFAULT_INSTANCE
965 ? new Builder() : new Builder().mergeFrom(this);
966 }
967
968 @java.lang.Override
970 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
971 Builder builder = new Builder(parent);
972 return builder;
973 }
981 public static final class Builder extends
982 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
983 // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
984 com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
985 public static final com.google.protobuf.Descriptors.Descriptor
987 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
988 }
989
990 @java.lang.Override
991 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
993 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
994 .ensureFieldAccessorsInitialized(
995 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
996 }
997
998 // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
999 private Builder() {
1000 maybeForceBuilderInitialization();
1001 }
1002
1003 private Builder(
1004 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1005 super(parent);
1006 maybeForceBuilderInitialization();
1007 }
1008 private void maybeForceBuilderInitialization() {
1009 if (com.google.protobuf.GeneratedMessageV3
1010 .alwaysUseFieldBuilders) {
1011 getSolveInfoFieldBuilder();
1012 getAdditionalSolutionsFieldBuilder();
1013 }
1014 }
1015 @java.lang.Override
1016 public Builder clear() {
1017 super.clear();
1018 status_ = 99;
1019 bitField0_ = (bitField0_ & ~0x00000001);
1020 statusStr_ = "";
1021 bitField0_ = (bitField0_ & ~0x00000002);
1022 objectiveValue_ = 0D;
1023 bitField0_ = (bitField0_ & ~0x00000004);
1024 bestObjectiveBound_ = 0D;
1025 bitField0_ = (bitField0_ & ~0x00000008);
1026 variableValue_ = emptyDoubleList();
1027 bitField0_ = (bitField0_ & ~0x00000010);
1028 if (solveInfoBuilder_ == null) {
1029 solveInfo_ = null;
1030 } else {
1031 solveInfoBuilder_.clear();
1032 }
1033 bitField0_ = (bitField0_ & ~0x00000020);
1034 dualValue_ = emptyDoubleList();
1035 bitField0_ = (bitField0_ & ~0x00000040);
1036 reducedCost_ = emptyDoubleList();
1037 bitField0_ = (bitField0_ & ~0x00000080);
1038 if (additionalSolutionsBuilder_ == null) {
1039 additionalSolutions_ = java.util.Collections.emptyList();
1040 bitField0_ = (bitField0_ & ~0x00000100);
1041 } else {
1042 additionalSolutionsBuilder_.clear();
1043 }
1044 return this;
1045 }
1046
1047 @java.lang.Override
1048 public com.google.protobuf.Descriptors.Descriptor
1050 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
1051 }
1052
1053 @java.lang.Override
1054 public com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType() {
1055 return com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance();
1056 }
1057
1058 @java.lang.Override
1059 public com.google.ortools.linearsolver.MPSolutionResponse build() {
1060 com.google.ortools.linearsolver.MPSolutionResponse result = buildPartial();
1061 if (!result.isInitialized()) {
1062 throw newUninitializedMessageException(result);
1063 }
1064 return result;
1065 }
1066
1067 @java.lang.Override
1068 public com.google.ortools.linearsolver.MPSolutionResponse buildPartial() {
1069 com.google.ortools.linearsolver.MPSolutionResponse result = new com.google.ortools.linearsolver.MPSolutionResponse(this);
1070 int from_bitField0_ = bitField0_;
1071 int to_bitField0_ = 0;
1072 if (((from_bitField0_ & 0x00000001) != 0)) {
1073 to_bitField0_ |= 0x00000001;
1074 }
1075 result.status_ = status_;
1076 if (((from_bitField0_ & 0x00000002) != 0)) {
1077 to_bitField0_ |= 0x00000002;
1078 }
1079 result.statusStr_ = statusStr_;
1080 if (((from_bitField0_ & 0x00000004) != 0)) {
1081 result.objectiveValue_ = objectiveValue_;
1082 to_bitField0_ |= 0x00000004;
1083 }
1084 if (((from_bitField0_ & 0x00000008) != 0)) {
1085 result.bestObjectiveBound_ = bestObjectiveBound_;
1086 to_bitField0_ |= 0x00000008;
1087 }
1088 if (((bitField0_ & 0x00000010) != 0)) {
1089 variableValue_.makeImmutable();
1090 bitField0_ = (bitField0_ & ~0x00000010);
1091 }
1092 result.variableValue_ = variableValue_;
1093 if (((from_bitField0_ & 0x00000020) != 0)) {
1094 if (solveInfoBuilder_ == null) {
1095 result.solveInfo_ = solveInfo_;
1096 } else {
1097 result.solveInfo_ = solveInfoBuilder_.build();
1098 }
1099 to_bitField0_ |= 0x00000010;
1100 }
1101 if (((bitField0_ & 0x00000040) != 0)) {
1102 dualValue_.makeImmutable();
1103 bitField0_ = (bitField0_ & ~0x00000040);
1104 }
1105 result.dualValue_ = dualValue_;
1106 if (((bitField0_ & 0x00000080) != 0)) {
1107 reducedCost_.makeImmutable();
1108 bitField0_ = (bitField0_ & ~0x00000080);
1109 }
1110 result.reducedCost_ = reducedCost_;
1111 if (additionalSolutionsBuilder_ == null) {
1112 if (((bitField0_ & 0x00000100) != 0)) {
1113 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
1114 bitField0_ = (bitField0_ & ~0x00000100);
1115 }
1116 result.additionalSolutions_ = additionalSolutions_;
1117 } else {
1118 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
1119 }
1120 result.bitField0_ = to_bitField0_;
1121 onBuilt();
1122 return result;
1123 }
1124
1125 @java.lang.Override
1126 public Builder clone() {
1127 return super.clone();
1128 }
1129 @java.lang.Override
1131 com.google.protobuf.Descriptors.FieldDescriptor field,
1132 java.lang.Object value) {
1133 return super.setField(field, value);
1134 }
1135 @java.lang.Override
1137 com.google.protobuf.Descriptors.FieldDescriptor field) {
1138 return super.clearField(field);
1139 }
1140 @java.lang.Override
1142 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1143 return super.clearOneof(oneof);
1144 }
1145 @java.lang.Override
1147 com.google.protobuf.Descriptors.FieldDescriptor field,
1148 int index, java.lang.Object value) {
1149 return super.setRepeatedField(field, index, value);
1150 }
1151 @java.lang.Override
1153 com.google.protobuf.Descriptors.FieldDescriptor field,
1154 java.lang.Object value) {
1155 return super.addRepeatedField(field, value);
1156 }
1157 @java.lang.Override
1158 public Builder mergeFrom(com.google.protobuf.Message other) {
1159 if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
1160 return mergeFrom((com.google.ortools.linearsolver.MPSolutionResponse)other);
1161 } else {
1162 super.mergeFrom(other);
1163 return this;
1164 }
1165 }
1166
1167 public Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other) {
1168 if (other == com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance()) return this;
1169 if (other.hasStatus()) {
1170 setStatus(other.getStatus());
1171 }
1172 if (other.hasStatusStr()) {
1173 bitField0_ |= 0x00000002;
1174 statusStr_ = other.statusStr_;
1175 onChanged();
1176 }
1177 if (other.hasObjectiveValue()) {
1178 setObjectiveValue(other.getObjectiveValue());
1179 }
1180 if (other.hasBestObjectiveBound()) {
1181 setBestObjectiveBound(other.getBestObjectiveBound());
1182 }
1183 if (!other.variableValue_.isEmpty()) {
1184 if (variableValue_.isEmpty()) {
1185 variableValue_ = other.variableValue_;
1186 bitField0_ = (bitField0_ & ~0x00000010);
1187 } else {
1188 ensureVariableValueIsMutable();
1189 variableValue_.addAll(other.variableValue_);
1190 }
1191 onChanged();
1192 }
1193 if (other.hasSolveInfo()) {
1194 mergeSolveInfo(other.getSolveInfo());
1195 }
1196 if (!other.dualValue_.isEmpty()) {
1197 if (dualValue_.isEmpty()) {
1198 dualValue_ = other.dualValue_;
1199 bitField0_ = (bitField0_ & ~0x00000040);
1200 } else {
1201 ensureDualValueIsMutable();
1202 dualValue_.addAll(other.dualValue_);
1203 }
1204 onChanged();
1205 }
1206 if (!other.reducedCost_.isEmpty()) {
1207 if (reducedCost_.isEmpty()) {
1208 reducedCost_ = other.reducedCost_;
1209 bitField0_ = (bitField0_ & ~0x00000080);
1210 } else {
1211 ensureReducedCostIsMutable();
1212 reducedCost_.addAll(other.reducedCost_);
1213 }
1214 onChanged();
1215 }
1216 if (additionalSolutionsBuilder_ == null) {
1217 if (!other.additionalSolutions_.isEmpty()) {
1218 if (additionalSolutions_.isEmpty()) {
1219 additionalSolutions_ = other.additionalSolutions_;
1220 bitField0_ = (bitField0_ & ~0x00000100);
1221 } else {
1222 ensureAdditionalSolutionsIsMutable();
1223 additionalSolutions_.addAll(other.additionalSolutions_);
1224 }
1225 onChanged();
1226 }
1227 } else {
1228 if (!other.additionalSolutions_.isEmpty()) {
1229 if (additionalSolutionsBuilder_.isEmpty()) {
1230 additionalSolutionsBuilder_.dispose();
1231 additionalSolutionsBuilder_ = null;
1232 additionalSolutions_ = other.additionalSolutions_;
1233 bitField0_ = (bitField0_ & ~0x00000100);
1234 additionalSolutionsBuilder_ =
1235 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1236 getAdditionalSolutionsFieldBuilder() : null;
1237 } else {
1238 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1239 }
1240 }
1241 }
1242 this.mergeUnknownFields(other.unknownFields);
1243 onChanged();
1244 return this;
1245 }
1246
1247 @java.lang.Override
1248 public final boolean isInitialized() {
1249 return true;
1250 }
1251
1252 @java.lang.Override
1254 com.google.protobuf.CodedInputStream input,
1255 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1256 throws java.io.IOException {
1257 com.google.ortools.linearsolver.MPSolutionResponse parsedMessage = null;
1258 try {
1259 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1260 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1261 parsedMessage = (com.google.ortools.linearsolver.MPSolutionResponse) e.getUnfinishedMessage();
1262 throw e.unwrapIOException();
1263 } finally {
1264 if (parsedMessage != null) {
1265 mergeFrom(parsedMessage);
1266 }
1267 }
1268 return this;
1269 }
1270 private int bitField0_;
1271
1272 private int status_ = 99;
1281 @java.lang.Override public boolean hasStatus() {
1282 return ((bitField0_ & 0x00000001) != 0);
1283 }
1292 @java.lang.Override
1293 public com.google.ortools.linearsolver.MPSolverResponseStatus getStatus() {
1294 @SuppressWarnings("deprecation")
1295 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(status_);
1296 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
1297 }
1307 public Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value) {
1308 if (value == null) {
1309 throw new NullPointerException();
1310 }
1311 bitField0_ |= 0x00000001;
1312 status_ = value.getNumber();
1313 onChanged();
1314 return this;
1315 }
1325 bitField0_ = (bitField0_ & ~0x00000001);
1326 status_ = 99;
1327 onChanged();
1328 return this;
1329 }
1330
1331 private java.lang.Object statusStr_ = "";
1343 public boolean hasStatusStr() {
1344 return ((bitField0_ & 0x00000002) != 0);
1345 }
1357 public java.lang.String getStatusStr() {
1358 java.lang.Object ref = statusStr_;
1359 if (!(ref instanceof java.lang.String)) {
1360 com.google.protobuf.ByteString bs =
1361 (com.google.protobuf.ByteString) ref;
1362 java.lang.String s = bs.toStringUtf8();
1363 if (bs.isValidUtf8()) {
1364 statusStr_ = s;
1365 }
1366 return s;
1367 } else {
1368 return (java.lang.String) ref;
1369 }
1370 }
1382 public com.google.protobuf.ByteString
1384 java.lang.Object ref = statusStr_;
1385 if (ref instanceof String) {
1386 com.google.protobuf.ByteString b =
1387 com.google.protobuf.ByteString.copyFromUtf8(
1388 (java.lang.String) ref);
1389 statusStr_ = b;
1390 return b;
1391 } else {
1392 return (com.google.protobuf.ByteString) ref;
1393 }
1394 }
1408 java.lang.String value) {
1409 if (value == null) {
1410 throw new NullPointerException();
1411 }
1412 bitField0_ |= 0x00000002;
1413 statusStr_ = value;
1414 onChanged();
1415 return this;
1416 }
1429 bitField0_ = (bitField0_ & ~0x00000002);
1430 statusStr_ = getDefaultInstance().getStatusStr();
1431 onChanged();
1432 return this;
1433 }
1447 com.google.protobuf.ByteString value) {
1448 if (value == null) {
1449 throw new NullPointerException();
1450 }
1451 bitField0_ |= 0x00000002;
1452 statusStr_ = value;
1453 onChanged();
1454 return this;
1455 }
1456
1457 private double objectiveValue_ ;
1468 @java.lang.Override
1469 public boolean hasObjectiveValue() {
1470 return ((bitField0_ & 0x00000004) != 0);
1471 }
1482 @java.lang.Override
1483 public double getObjectiveValue() {
1484 return objectiveValue_;
1485 }
1497 public Builder setObjectiveValue(double value) {
1498 bitField0_ |= 0x00000004;
1499 objectiveValue_ = value;
1500 onChanged();
1501 return this;
1502 }
1514 bitField0_ = (bitField0_ & ~0x00000004);
1515 objectiveValue_ = 0D;
1516 onChanged();
1517 return this;
1518 }
1519
1520 private double bestObjectiveBound_ ;
1533 @java.lang.Override
1534 public boolean hasBestObjectiveBound() {
1535 return ((bitField0_ & 0x00000008) != 0);
1536 }
1549 @java.lang.Override
1550 public double getBestObjectiveBound() {
1551 return bestObjectiveBound_;
1552 }
1566 public Builder setBestObjectiveBound(double value) {
1567 bitField0_ |= 0x00000008;
1568 bestObjectiveBound_ = value;
1569 onChanged();
1570 return this;
1571 }
1585 bitField0_ = (bitField0_ & ~0x00000008);
1586 bestObjectiveBound_ = 0D;
1587 onChanged();
1588 return this;
1589 }
1590
1591 private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1592 private void ensureVariableValueIsMutable() {
1593 if (!((bitField0_ & 0x00000010) != 0)) {
1594 variableValue_ = mutableCopy(variableValue_);
1595 bitField0_ |= 0x00000010;
1596 }
1597 }
1608 public java.util.List<java.lang.Double>
1610 return ((bitField0_ & 0x00000010) != 0) ?
1611 java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1612 }
1624 return variableValue_.size();
1625 }
1637 public double getVariableValue(int index) {
1638 return variableValue_.getDouble(index);
1639 }
1653 int index, double value) {
1654 ensureVariableValueIsMutable();
1655 variableValue_.setDouble(index, value);
1656 onChanged();
1657 return this;
1658 }
1670 public Builder addVariableValue(double value) {
1671 ensureVariableValueIsMutable();
1672 variableValue_.addDouble(value);
1673 onChanged();
1674 return this;
1675 }
1688 java.lang.Iterable<? extends java.lang.Double> values) {
1689 ensureVariableValueIsMutable();
1690 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1691 values, variableValue_);
1692 onChanged();
1693 return this;
1694 }
1706 variableValue_ = emptyDoubleList();
1707 bitField0_ = (bitField0_ & ~0x00000010);
1708 onChanged();
1709 return this;
1710 }
1711
1712 private com.google.ortools.linearsolver.MPSolveInfo solveInfo_;
1713 private com.google.protobuf.SingleFieldBuilderV3<
1714 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder> solveInfoBuilder_;
1725 public boolean hasSolveInfo() {
1726 return ((bitField0_ & 0x00000020) != 0);
1727 }
1738 public com.google.ortools.linearsolver.MPSolveInfo getSolveInfo() {
1739 if (solveInfoBuilder_ == null) {
1740 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1741 } else {
1742 return solveInfoBuilder_.getMessage();
1743 }
1744 }
1754 public Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1755 if (solveInfoBuilder_ == null) {
1756 if (value == null) {
1757 throw new NullPointerException();
1758 }
1759 solveInfo_ = value;
1760 onChanged();
1761 } else {
1762 solveInfoBuilder_.setMessage(value);
1763 }
1764 bitField0_ |= 0x00000020;
1765 return this;
1766 }
1777 com.google.ortools.linearsolver.MPSolveInfo.Builder builderForValue) {
1778 if (solveInfoBuilder_ == null) {
1779 solveInfo_ = builderForValue.build();
1780 onChanged();
1781 } else {
1782 solveInfoBuilder_.setMessage(builderForValue.build());
1783 }
1784 bitField0_ |= 0x00000020;
1785 return this;
1786 }
1796 public Builder mergeSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1797 if (solveInfoBuilder_ == null) {
1798 if (((bitField0_ & 0x00000020) != 0) &&
1799 solveInfo_ != null &&
1800 solveInfo_ != com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance()) {
1801 solveInfo_ =
1802 com.google.ortools.linearsolver.MPSolveInfo.newBuilder(solveInfo_).mergeFrom(value).buildPartial();
1803 } else {
1804 solveInfo_ = value;
1805 }
1806 onChanged();
1807 } else {
1808 solveInfoBuilder_.mergeFrom(value);
1809 }
1810 bitField0_ |= 0x00000020;
1811 return this;
1812 }
1823 if (solveInfoBuilder_ == null) {
1824 solveInfo_ = null;
1825 onChanged();
1826 } else {
1827 solveInfoBuilder_.clear();
1828 }
1829 bitField0_ = (bitField0_ & ~0x00000020);
1830 return this;
1831 }
1841 public com.google.ortools.linearsolver.MPSolveInfo.Builder getSolveInfoBuilder() {
1842 bitField0_ |= 0x00000020;
1843 onChanged();
1844 return getSolveInfoFieldBuilder().getBuilder();
1845 }
1855 public com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder() {
1856 if (solveInfoBuilder_ != null) {
1857 return solveInfoBuilder_.getMessageOrBuilder();
1858 } else {
1859 return solveInfo_ == null ?
1860 com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1861 }
1862 }
1872 private com.google.protobuf.SingleFieldBuilderV3<
1873 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>
1874 getSolveInfoFieldBuilder() {
1875 if (solveInfoBuilder_ == null) {
1876 solveInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1877 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>(
1878 getSolveInfo(),
1879 getParentForChildren(),
1880 isClean());
1881 solveInfo_ = null;
1882 }
1883 return solveInfoBuilder_;
1884 }
1885
1886 private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1887 private void ensureDualValueIsMutable() {
1888 if (!((bitField0_ & 0x00000040) != 0)) {
1889 dualValue_ = mutableCopy(dualValue_);
1890 bitField0_ |= 0x00000040;
1891 }
1892 }
1906 public java.util.List<java.lang.Double>
1908 return ((bitField0_ & 0x00000040) != 0) ?
1909 java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1910 }
1924 public int getDualValueCount() {
1925 return dualValue_.size();
1926 }
1941 public double getDualValue(int index) {
1942 return dualValue_.getDouble(index);
1943 }
1960 int index, double value) {
1961 ensureDualValueIsMutable();
1962 dualValue_.setDouble(index, value);
1963 onChanged();
1964 return this;
1965 }
1980 public Builder addDualValue(double value) {
1981 ensureDualValueIsMutable();
1982 dualValue_.addDouble(value);
1983 onChanged();
1984 return this;
1985 }
2001 java.lang.Iterable<? extends java.lang.Double> values) {
2002 ensureDualValueIsMutable();
2003 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2004 values, dualValue_);
2005 onChanged();
2006 return this;
2007 }
2022 dualValue_ = emptyDoubleList();
2023 bitField0_ = (bitField0_ & ~0x00000040);
2024 onChanged();
2025 return this;
2026 }
2027
2028 private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
2029 private void ensureReducedCostIsMutable() {
2030 if (!((bitField0_ & 0x00000080) != 0)) {
2031 reducedCost_ = mutableCopy(reducedCost_);
2032 bitField0_ |= 0x00000080;
2033 }
2034 }
2048 public java.util.List<java.lang.Double>
2050 return ((bitField0_ & 0x00000080) != 0) ?
2051 java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
2052 }
2066 public int getReducedCostCount() {
2067 return reducedCost_.size();
2068 }
2083 public double getReducedCost(int index) {
2084 return reducedCost_.getDouble(index);
2085 }
2102 int index, double value) {
2103 ensureReducedCostIsMutable();
2104 reducedCost_.setDouble(index, value);
2105 onChanged();
2106 return this;
2107 }
2122 public Builder addReducedCost(double value) {
2123 ensureReducedCostIsMutable();
2124 reducedCost_.addDouble(value);
2125 onChanged();
2126 return this;
2127 }
2143 java.lang.Iterable<? extends java.lang.Double> values) {
2144 ensureReducedCostIsMutable();
2145 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2146 values, reducedCost_);
2147 onChanged();
2148 return this;
2149 }
2164 reducedCost_ = emptyDoubleList();
2165 bitField0_ = (bitField0_ & ~0x00000080);
2166 onChanged();
2167 return this;
2168 }
2169
2170 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_ =
2171 java.util.Collections.emptyList();
2172 private void ensureAdditionalSolutionsIsMutable() {
2173 if (!((bitField0_ & 0x00000100) != 0)) {
2174 additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>(additionalSolutions_);
2175 bitField0_ |= 0x00000100;
2176 }
2177 }
2178
2179 private com.google.protobuf.RepeatedFieldBuilderV3<
2180 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder> additionalSolutionsBuilder_;
2181
2193 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
2194 if (additionalSolutionsBuilder_ == null) {
2195 return java.util.Collections.unmodifiableList(additionalSolutions_);
2196 } else {
2197 return additionalSolutionsBuilder_.getMessageList();
2198 }
2199 }
2212 if (additionalSolutionsBuilder_ == null) {
2213 return additionalSolutions_.size();
2214 } else {
2215 return additionalSolutionsBuilder_.getCount();
2216 }
2217 }
2229 public com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index) {
2230 if (additionalSolutionsBuilder_ == null) {
2231 return additionalSolutions_.get(index);
2232 } else {
2233 return additionalSolutionsBuilder_.getMessage(index);
2234 }
2235 }
2248 int index, com.google.ortools.linearsolver.MPSolution value) {
2249 if (additionalSolutionsBuilder_ == null) {
2250 if (value == null) {
2251 throw new NullPointerException();
2252 }
2253 ensureAdditionalSolutionsIsMutable();
2254 additionalSolutions_.set(index, value);
2255 onChanged();
2256 } else {
2257 additionalSolutionsBuilder_.setMessage(index, value);
2258 }
2259 return this;
2260 }
2273 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2274 if (additionalSolutionsBuilder_ == null) {
2275 ensureAdditionalSolutionsIsMutable();
2276 additionalSolutions_.set(index, builderForValue.build());
2277 onChanged();
2278 } else {
2279 additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2280 }
2281 return this;
2282 }
2294 public Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value) {
2295 if (additionalSolutionsBuilder_ == null) {
2296 if (value == null) {
2297 throw new NullPointerException();
2298 }
2299 ensureAdditionalSolutionsIsMutable();
2300 additionalSolutions_.add(value);
2301 onChanged();
2302 } else {
2303 additionalSolutionsBuilder_.addMessage(value);
2304 }
2305 return this;
2306 }
2319 int index, com.google.ortools.linearsolver.MPSolution value) {
2320 if (additionalSolutionsBuilder_ == null) {
2321 if (value == null) {
2322 throw new NullPointerException();
2323 }
2324 ensureAdditionalSolutionsIsMutable();
2325 additionalSolutions_.add(index, value);
2326 onChanged();
2327 } else {
2328 additionalSolutionsBuilder_.addMessage(index, value);
2329 }
2330 return this;
2331 }
2344 com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2345 if (additionalSolutionsBuilder_ == null) {
2346 ensureAdditionalSolutionsIsMutable();
2347 additionalSolutions_.add(builderForValue.build());
2348 onChanged();
2349 } else {
2350 additionalSolutionsBuilder_.addMessage(builderForValue.build());
2351 }
2352 return this;
2353 }
2366 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2367 if (additionalSolutionsBuilder_ == null) {
2368 ensureAdditionalSolutionsIsMutable();
2369 additionalSolutions_.add(index, builderForValue.build());
2370 onChanged();
2371 } else {
2372 additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2373 }
2374 return this;
2375 }
2388 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution> values) {
2389 if (additionalSolutionsBuilder_ == null) {
2390 ensureAdditionalSolutionsIsMutable();
2391 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2392 values, additionalSolutions_);
2393 onChanged();
2394 } else {
2395 additionalSolutionsBuilder_.addAllMessages(values);
2396 }
2397 return this;
2398 }
2411 if (additionalSolutionsBuilder_ == null) {
2412 additionalSolutions_ = java.util.Collections.emptyList();
2413 bitField0_ = (bitField0_ & ~0x00000100);
2414 onChanged();
2415 } else {
2416 additionalSolutionsBuilder_.clear();
2417 }
2418 return this;
2419 }
2432 if (additionalSolutionsBuilder_ == null) {
2433 ensureAdditionalSolutionsIsMutable();
2434 additionalSolutions_.remove(index);
2435 onChanged();
2436 } else {
2437 additionalSolutionsBuilder_.remove(index);
2438 }
2439 return this;
2440 }
2452 public com.google.ortools.linearsolver.MPSolution.Builder getAdditionalSolutionsBuilder(
2453 int index) {
2454 return getAdditionalSolutionsFieldBuilder().getBuilder(index);
2455 }
2467 public com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(
2468 int index) {
2469 if (additionalSolutionsBuilder_ == null) {
2470 return additionalSolutions_.get(index); } else {
2471 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2472 }
2473 }
2485 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
2487 if (additionalSolutionsBuilder_ != null) {
2488 return additionalSolutionsBuilder_.getMessageOrBuilderList();
2489 } else {
2490 return java.util.Collections.unmodifiableList(additionalSolutions_);
2491 }
2492 }
2504 public com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder() {
2505 return getAdditionalSolutionsFieldBuilder().addBuilder(
2506 com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2507 }
2519 public com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder(
2520 int index) {
2521 return getAdditionalSolutionsFieldBuilder().addBuilder(
2522 index, com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2523 }
2535 public java.util.List<com.google.ortools.linearsolver.MPSolution.Builder>
2537 return getAdditionalSolutionsFieldBuilder().getBuilderList();
2538 }
2539 private com.google.protobuf.RepeatedFieldBuilderV3<
2540 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>
2541 getAdditionalSolutionsFieldBuilder() {
2542 if (additionalSolutionsBuilder_ == null) {
2543 additionalSolutionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2544 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>(
2545 additionalSolutions_,
2546 ((bitField0_ & 0x00000100) != 0),
2547 getParentForChildren(),
2548 isClean());
2549 additionalSolutions_ = null;
2550 }
2551 return additionalSolutionsBuilder_;
2552 }
2553 @java.lang.Override
2555 final com.google.protobuf.UnknownFieldSet unknownFields) {
2556 return super.setUnknownFields(unknownFields);
2557 }
2558
2559 @java.lang.Override
2561 final com.google.protobuf.UnknownFieldSet unknownFields) {
2562 return super.mergeUnknownFields(unknownFields);
2563 }
2564
2565
2566 // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
2567 }
2568
2569 // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
2570 private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
2571 static {
2572 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
2573 }
2574
2575 public static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance() {
2576 return DEFAULT_INSTANCE;
2577 }
2578
2579 @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
2580 PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
2581 @java.lang.Override
2582 public MPSolutionResponse parsePartialFrom(
2583 com.google.protobuf.CodedInputStream input,
2584 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2585 throws com.google.protobuf.InvalidProtocolBufferException {
2586 return new MPSolutionResponse(input, extensionRegistry);
2587 }
2588 };
2589
2590 public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
2591 return PARSER;
2592 }
2593
2594 @java.lang.Override
2595 public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
2596 return PARSER;
2597 }
2598
2599 @java.lang.Override
2600 public com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType() {
2601 return DEFAULT_INSTANCE;
2602 }
2603
2604}
2605
com.google.ortools.linearsolver.MPSolutionResponse buildPartial()
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value)
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder mergeSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value)
Builder addAllAdditionalSolutions(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution > values)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder setStatusStrBytes(com.google.protobuf.ByteString value)
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.linearsolver.MPSolveInfo getSolveInfo()
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder()
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value)
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
com.google.ortools.linearsolver.MPSolveInfo.Builder getSolveInfoBuilder()
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
java.util.List< com.google.ortools.linearsolver.MPSolution.Builder > getAdditionalSolutionsBuilderList()
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder()
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder(int index)
com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo.Builder builderForValue)
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.MPSolutionResponse build()
com.google.ortools.linearsolver.MPSolution.Builder getAdditionalSolutionsBuilder(int index)
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.protobuf.Parser< MPSolutionResponse > parser()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPSolveInfo getSolveInfo()
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
java.util.List< java.lang.Double > getDualValueList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
final com.google.protobuf.UnknownFieldSet getUnknownFields()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder()
java.util.List< java.lang.Double > getVariableValueList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
java.util.List< java.lang.Double > getReducedCostList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
java.lang.Object newInstance(UnusedPrivateParameter unused)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
boolean equals(final java.lang.Object obj)