Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
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// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
14public final class MPSolutionResponse extends
15 com.google.protobuf.GeneratedMessage implements
16 // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
18private static final long serialVersionUID = 0L;
19 static {
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
22 /* major= */ 4,
23 /* minor= */ 26,
24 /* patch= */ 1,
25 /* suffix= */ "",
26 MPSolutionResponse.class.getName());
27 }
28 // Use MPSolutionResponse.newBuilder() to construct.
29 private MPSolutionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 super(builder);
31 }
32 private MPSolutionResponse() {
33 status_ = 99;
34 statusStr_ = "";
35 variableValue_ = emptyDoubleList();
36 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
37 dualValue_ = emptyDoubleList();
38 reducedCost_ = emptyDoubleList();
39 additionalSolutions_ = java.util.Collections.emptyList();
40 }
41
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
45 }
46
47 @java.lang.Override
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
53 }
54
55 private int bitField0_;
56 public static final int STATUS_FIELD_NUMBER = 1;
57 private int status_ = 99;
66 @java.lang.Override public boolean hasStatus() {
67 return ((bitField0_ & 0x00000001) != 0);
68 }
78 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
79 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
80 }
81
82 public static final int STATUS_STR_FIELD_NUMBER = 7;
83 @SuppressWarnings("serial")
84 private volatile java.lang.Object statusStr_ = "";
96 @java.lang.Override
97 public boolean hasStatusStr() {
98 return ((bitField0_ & 0x00000002) != 0);
99 }
111 @java.lang.Override
112 public java.lang.String getStatusStr() {
113 java.lang.Object ref = statusStr_;
114 if (ref instanceof java.lang.String) {
115 return (java.lang.String) ref;
116 } else {
117 com.google.protobuf.ByteString bs =
118 (com.google.protobuf.ByteString) ref;
119 java.lang.String s = bs.toStringUtf8();
120 if (bs.isValidUtf8()) {
121 statusStr_ = s;
122 }
123 return s;
124 }
125 }
137 @java.lang.Override
138 public com.google.protobuf.ByteString
140 java.lang.Object ref = statusStr_;
141 if (ref instanceof java.lang.String) {
142 com.google.protobuf.ByteString b =
143 com.google.protobuf.ByteString.copyFromUtf8(
144 (java.lang.String) ref);
145 statusStr_ = b;
146 return b;
147 } else {
148 return (com.google.protobuf.ByteString) ref;
149 }
150 }
151
152 public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
153 private double objectiveValue_ = 0D;
164 @java.lang.Override
165 public boolean hasObjectiveValue() {
166 return ((bitField0_ & 0x00000004) != 0);
167 }
178 @java.lang.Override
179 public double getObjectiveValue() {
180 return objectiveValue_;
181 }
182
183 public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
184 private double bestObjectiveBound_ = 0D;
197 @java.lang.Override
198 public boolean hasBestObjectiveBound() {
199 return ((bitField0_ & 0x00000008) != 0);
200 }
213 @java.lang.Override
214 public double getBestObjectiveBound() {
215 return bestObjectiveBound_;
216 }
217
218 public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
219 @SuppressWarnings("serial")
220 private com.google.protobuf.Internal.DoubleList variableValue_ =
221 emptyDoubleList();
232 @java.lang.Override
233 public java.util.List<java.lang.Double>
235 return variableValue_;
236 }
248 return variableValue_.size();
249 }
261 public double getVariableValue(int index) {
262 return variableValue_.getDouble(index);
263 }
264 private int variableValueMemoizedSerializedSize = -1;
265
266 public static final int SOLVE_INFO_FIELD_NUMBER = 10;
278 @java.lang.Override
279 public boolean hasSolveInfo() {
280 return ((bitField0_ & 0x00000010) != 0);
281 }
292 @java.lang.Override
294 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
295 }
305 @java.lang.Override
307 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
308 }
309
310 public static final int SOLVER_SPECIFIC_INFO_FIELD_NUMBER = 11;
311 private com.google.protobuf.ByteString solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
321 @java.lang.Override
322 public boolean hasSolverSpecificInfo() {
323 return ((bitField0_ & 0x00000020) != 0);
324 }
334 @java.lang.Override
335 public com.google.protobuf.ByteString getSolverSpecificInfo() {
336 return solverSpecificInfo_;
337 }
338
339 public static final int DUAL_VALUE_FIELD_NUMBER = 4;
340 @SuppressWarnings("serial")
341 private com.google.protobuf.Internal.DoubleList dualValue_ =
342 emptyDoubleList();
356 @java.lang.Override
357 public java.util.List<java.lang.Double>
359 return dualValue_;
360 }
374 public int getDualValueCount() {
375 return dualValue_.size();
376 }
391 public double getDualValue(int index) {
392 return dualValue_.getDouble(index);
393 }
394 private int dualValueMemoizedSerializedSize = -1;
395
396 public static final int REDUCED_COST_FIELD_NUMBER = 6;
397 @SuppressWarnings("serial")
398 private com.google.protobuf.Internal.DoubleList reducedCost_ =
399 emptyDoubleList();
413 @java.lang.Override
414 public java.util.List<java.lang.Double>
416 return reducedCost_;
417 }
431 public int getReducedCostCount() {
432 return reducedCost_.size();
433 }
448 public double getReducedCost(int index) {
449 return reducedCost_.getDouble(index);
450 }
451 private int reducedCostMemoizedSerializedSize = -1;
452
453 public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 8;
454 @SuppressWarnings("serial")
455 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_;
467 @java.lang.Override
468 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
469 return additionalSolutions_;
470 }
482 @java.lang.Override
483 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
485 return additionalSolutions_;
486 }
498 @java.lang.Override
500 return additionalSolutions_.size();
501 }
513 @java.lang.Override
515 return additionalSolutions_.get(index);
516 }
528 @java.lang.Override
530 int index) {
531 return additionalSolutions_.get(index);
532 }
533
534 private byte memoizedIsInitialized = -1;
535 @java.lang.Override
536 public final boolean isInitialized() {
537 byte isInitialized = memoizedIsInitialized;
538 if (isInitialized == 1) return true;
539 if (isInitialized == 0) return false;
540
541 memoizedIsInitialized = 1;
542 return true;
543 }
544
545 @java.lang.Override
546 public void writeTo(com.google.protobuf.CodedOutputStream output)
547 throws java.io.IOException {
549 if (((bitField0_ & 0x00000001) != 0)) {
550 output.writeEnum(1, status_);
551 }
552 if (((bitField0_ & 0x00000004) != 0)) {
553 output.writeDouble(2, objectiveValue_);
554 }
555 if (getVariableValueList().size() > 0) {
556 output.writeUInt32NoTag(26);
557 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
558 }
559 for (int i = 0; i < variableValue_.size(); i++) {
560 output.writeDoubleNoTag(variableValue_.getDouble(i));
561 }
562 if (getDualValueList().size() > 0) {
563 output.writeUInt32NoTag(34);
564 output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
565 }
566 for (int i = 0; i < dualValue_.size(); i++) {
567 output.writeDoubleNoTag(dualValue_.getDouble(i));
568 }
569 if (((bitField0_ & 0x00000008) != 0)) {
570 output.writeDouble(5, bestObjectiveBound_);
571 }
572 if (getReducedCostList().size() > 0) {
573 output.writeUInt32NoTag(50);
574 output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
575 }
576 for (int i = 0; i < reducedCost_.size(); i++) {
577 output.writeDoubleNoTag(reducedCost_.getDouble(i));
578 }
579 if (((bitField0_ & 0x00000002) != 0)) {
580 com.google.protobuf.GeneratedMessage.writeString(output, 7, statusStr_);
581 }
582 for (int i = 0; i < additionalSolutions_.size(); i++) {
583 output.writeMessage(8, additionalSolutions_.get(i));
584 }
585 if (((bitField0_ & 0x00000010) != 0)) {
586 output.writeMessage(10, getSolveInfo());
587 }
588 if (((bitField0_ & 0x00000020) != 0)) {
589 output.writeBytes(11, solverSpecificInfo_);
590 }
591 getUnknownFields().writeTo(output);
592 }
593
594 @java.lang.Override
595 public int getSerializedSize() {
596 int size = memoizedSize;
597 if (size != -1) return size;
598
599 size = 0;
600 if (((bitField0_ & 0x00000001) != 0)) {
601 size += com.google.protobuf.CodedOutputStream
602 .computeEnumSize(1, status_);
603 }
604 if (((bitField0_ & 0x00000004) != 0)) {
605 size += com.google.protobuf.CodedOutputStream
606 .computeDoubleSize(2, objectiveValue_);
607 }
608 {
609 int dataSize = 0;
610 dataSize = 8 * getVariableValueList().size();
611 size += dataSize;
612 if (!getVariableValueList().isEmpty()) {
613 size += 1;
614 size += com.google.protobuf.CodedOutputStream
615 .computeInt32SizeNoTag(dataSize);
616 }
617 variableValueMemoizedSerializedSize = dataSize;
618 }
619 {
620 int dataSize = 0;
621 dataSize = 8 * getDualValueList().size();
622 size += dataSize;
623 if (!getDualValueList().isEmpty()) {
624 size += 1;
625 size += com.google.protobuf.CodedOutputStream
626 .computeInt32SizeNoTag(dataSize);
627 }
628 dualValueMemoizedSerializedSize = dataSize;
629 }
630 if (((bitField0_ & 0x00000008) != 0)) {
631 size += com.google.protobuf.CodedOutputStream
632 .computeDoubleSize(5, bestObjectiveBound_);
633 }
634 {
635 int dataSize = 0;
636 dataSize = 8 * getReducedCostList().size();
637 size += dataSize;
638 if (!getReducedCostList().isEmpty()) {
639 size += 1;
640 size += com.google.protobuf.CodedOutputStream
641 .computeInt32SizeNoTag(dataSize);
642 }
643 reducedCostMemoizedSerializedSize = dataSize;
644 }
645 if (((bitField0_ & 0x00000002) != 0)) {
646 size += com.google.protobuf.GeneratedMessage.computeStringSize(7, statusStr_);
647 }
648 for (int i = 0; i < additionalSolutions_.size(); i++) {
649 size += com.google.protobuf.CodedOutputStream
650 .computeMessageSize(8, additionalSolutions_.get(i));
651 }
652 if (((bitField0_ & 0x00000010) != 0)) {
653 size += com.google.protobuf.CodedOutputStream
654 .computeMessageSize(10, getSolveInfo());
655 }
656 if (((bitField0_ & 0x00000020) != 0)) {
657 size += com.google.protobuf.CodedOutputStream
658 .computeBytesSize(11, solverSpecificInfo_);
659 }
660 size += getUnknownFields().getSerializedSize();
661 memoizedSize = size;
662 return size;
663 }
664
665 @java.lang.Override
666 public boolean equals(final java.lang.Object obj) {
667 if (obj == this) {
668 return true;
669 }
670 if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
671 return super.equals(obj);
672 }
673 com.google.ortools.linearsolver.MPSolutionResponse other = (com.google.ortools.linearsolver.MPSolutionResponse) obj;
674
675 if (hasStatus() != other.hasStatus()) return false;
676 if (hasStatus()) {
677 if (status_ != other.status_) return false;
678 }
679 if (hasStatusStr() != other.hasStatusStr()) return false;
680 if (hasStatusStr()) {
681 if (!getStatusStr()
682 .equals(other.getStatusStr())) return false;
683 }
684 if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
685 if (hasObjectiveValue()) {
686 if (java.lang.Double.doubleToLongBits(getObjectiveValue())
687 != java.lang.Double.doubleToLongBits(
688 other.getObjectiveValue())) return false;
689 }
690 if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
691 if (hasBestObjectiveBound()) {
692 if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
693 != java.lang.Double.doubleToLongBits(
694 other.getBestObjectiveBound())) return false;
695 }
697 .equals(other.getVariableValueList())) return false;
698 if (hasSolveInfo() != other.hasSolveInfo()) return false;
699 if (hasSolveInfo()) {
700 if (!getSolveInfo()
701 .equals(other.getSolveInfo())) return false;
702 }
703 if (hasSolverSpecificInfo() != other.hasSolverSpecificInfo()) return false;
704 if (hasSolverSpecificInfo()) {
706 .equals(other.getSolverSpecificInfo())) return false;
707 }
708 if (!getDualValueList()
709 .equals(other.getDualValueList())) return false;
710 if (!getReducedCostList()
711 .equals(other.getReducedCostList())) return false;
713 .equals(other.getAdditionalSolutionsList())) return false;
714 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
715 return true;
716 }
717
718 @java.lang.Override
719 public int hashCode() {
720 if (memoizedHashCode != 0) {
721 return memoizedHashCode;
722 }
723 int hash = 41;
724 hash = (19 * hash) + getDescriptor().hashCode();
725 if (hasStatus()) {
726 hash = (37 * hash) + STATUS_FIELD_NUMBER;
727 hash = (53 * hash) + status_;
728 }
729 if (hasStatusStr()) {
730 hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
731 hash = (53 * hash) + getStatusStr().hashCode();
732 }
733 if (hasObjectiveValue()) {
734 hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
735 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
736 java.lang.Double.doubleToLongBits(getObjectiveValue()));
737 }
738 if (hasBestObjectiveBound()) {
739 hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
740 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
741 java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
742 }
743 if (getVariableValueCount() > 0) {
744 hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
745 hash = (53 * hash) + getVariableValueList().hashCode();
746 }
747 if (hasSolveInfo()) {
748 hash = (37 * hash) + SOLVE_INFO_FIELD_NUMBER;
749 hash = (53 * hash) + getSolveInfo().hashCode();
750 }
751 if (hasSolverSpecificInfo()) {
752 hash = (37 * hash) + SOLVER_SPECIFIC_INFO_FIELD_NUMBER;
753 hash = (53 * hash) + getSolverSpecificInfo().hashCode();
754 }
755 if (getDualValueCount() > 0) {
756 hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
757 hash = (53 * hash) + getDualValueList().hashCode();
758 }
759 if (getReducedCostCount() > 0) {
760 hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
761 hash = (53 * hash) + getReducedCostList().hashCode();
762 }
763 if (getAdditionalSolutionsCount() > 0) {
764 hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
765 hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
766 }
767 hash = (29 * hash) + getUnknownFields().hashCode();
768 memoizedHashCode = hash;
769 return hash;
770 }
771
773 java.nio.ByteBuffer data)
774 throws com.google.protobuf.InvalidProtocolBufferException {
775 return PARSER.parseFrom(data);
776 }
778 java.nio.ByteBuffer data,
779 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
780 throws com.google.protobuf.InvalidProtocolBufferException {
781 return PARSER.parseFrom(data, extensionRegistry);
782 }
784 com.google.protobuf.ByteString data)
785 throws com.google.protobuf.InvalidProtocolBufferException {
786 return PARSER.parseFrom(data);
787 }
789 com.google.protobuf.ByteString data,
790 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
791 throws com.google.protobuf.InvalidProtocolBufferException {
792 return PARSER.parseFrom(data, extensionRegistry);
793 }
795 throws com.google.protobuf.InvalidProtocolBufferException {
796 return PARSER.parseFrom(data);
797 }
799 byte[] data,
800 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
801 throws com.google.protobuf.InvalidProtocolBufferException {
802 return PARSER.parseFrom(data, extensionRegistry);
803 }
804 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
805 throws java.io.IOException {
806 return com.google.protobuf.GeneratedMessage
807 .parseWithIOException(PARSER, input);
808 }
810 java.io.InputStream input,
811 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
812 throws java.io.IOException {
813 return com.google.protobuf.GeneratedMessage
814 .parseWithIOException(PARSER, input, extensionRegistry);
815 }
816
818 throws java.io.IOException {
819 return com.google.protobuf.GeneratedMessage
820 .parseDelimitedWithIOException(PARSER, input);
821 }
822
824 java.io.InputStream input,
825 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
826 throws java.io.IOException {
827 return com.google.protobuf.GeneratedMessage
828 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
829 }
831 com.google.protobuf.CodedInputStream input)
832 throws java.io.IOException {
833 return com.google.protobuf.GeneratedMessage
834 .parseWithIOException(PARSER, input);
835 }
837 com.google.protobuf.CodedInputStream input,
838 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
839 throws java.io.IOException {
840 return com.google.protobuf.GeneratedMessage
841 .parseWithIOException(PARSER, input, extensionRegistry);
842 }
843
844 @java.lang.Override
845 public Builder newBuilderForType() { return newBuilder(); }
846 public static Builder newBuilder() {
847 return DEFAULT_INSTANCE.toBuilder();
848 }
849 public static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype) {
850 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
851 }
852 @java.lang.Override
854 return this == DEFAULT_INSTANCE
855 ? new Builder() : new Builder().mergeFrom(this);
856 }
857
858 @java.lang.Override
860 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
861 Builder builder = new Builder(parent);
862 return builder;
863 }
871 public static final class Builder extends
872 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
873 // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
874 com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
875 public static final com.google.protobuf.Descriptors.Descriptor
877 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
878 }
879
880 @java.lang.Override
881 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
883 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
884 .ensureFieldAccessorsInitialized(
885 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
886 }
887
888 // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
889 private Builder() {
890 maybeForceBuilderInitialization();
891 }
892
893 private Builder(
894 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
895 super(parent);
896 maybeForceBuilderInitialization();
897 }
898 private void maybeForceBuilderInitialization() {
899 if (com.google.protobuf.GeneratedMessage
900 .alwaysUseFieldBuilders) {
901 getSolveInfoFieldBuilder();
902 getAdditionalSolutionsFieldBuilder();
903 }
904 }
905 @java.lang.Override
906 public Builder clear() {
907 super.clear();
908 bitField0_ = 0;
909 status_ = 99;
910 statusStr_ = "";
911 objectiveValue_ = 0D;
912 bestObjectiveBound_ = 0D;
913 variableValue_ = emptyDoubleList();
914 solveInfo_ = null;
915 if (solveInfoBuilder_ != null) {
916 solveInfoBuilder_.dispose();
917 solveInfoBuilder_ = null;
918 }
919 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
920 dualValue_ = emptyDoubleList();
921 reducedCost_ = emptyDoubleList();
922 if (additionalSolutionsBuilder_ == null) {
923 additionalSolutions_ = java.util.Collections.emptyList();
924 } else {
925 additionalSolutions_ = null;
926 additionalSolutionsBuilder_.clear();
927 }
928 bitField0_ = (bitField0_ & ~0x00000200);
929 return this;
930 }
931
932 @java.lang.Override
933 public com.google.protobuf.Descriptors.Descriptor
935 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
936 }
937
938 @java.lang.Override
940 return com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance();
941 }
942
943 @java.lang.Override
946 if (!result.isInitialized()) {
947 throw newUninitializedMessageException(result);
948 }
949 return result;
950 }
951
952 @java.lang.Override
954 com.google.ortools.linearsolver.MPSolutionResponse result = new com.google.ortools.linearsolver.MPSolutionResponse(this);
955 buildPartialRepeatedFields(result);
956 if (bitField0_ != 0) { buildPartial0(result); }
957 onBuilt();
958 return result;
959 }
960
961 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPSolutionResponse result) {
962 if (additionalSolutionsBuilder_ == null) {
963 if (((bitField0_ & 0x00000200) != 0)) {
964 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
965 bitField0_ = (bitField0_ & ~0x00000200);
966 }
967 result.additionalSolutions_ = additionalSolutions_;
968 } else {
969 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
970 }
971 }
972
973 private void buildPartial0(com.google.ortools.linearsolver.MPSolutionResponse result) {
974 int from_bitField0_ = bitField0_;
975 int to_bitField0_ = 0;
976 if (((from_bitField0_ & 0x00000001) != 0)) {
977 result.status_ = status_;
978 to_bitField0_ |= 0x00000001;
979 }
980 if (((from_bitField0_ & 0x00000002) != 0)) {
981 result.statusStr_ = statusStr_;
982 to_bitField0_ |= 0x00000002;
983 }
984 if (((from_bitField0_ & 0x00000004) != 0)) {
985 result.objectiveValue_ = objectiveValue_;
986 to_bitField0_ |= 0x00000004;
987 }
988 if (((from_bitField0_ & 0x00000008) != 0)) {
989 result.bestObjectiveBound_ = bestObjectiveBound_;
990 to_bitField0_ |= 0x00000008;
991 }
992 if (((from_bitField0_ & 0x00000010) != 0)) {
993 variableValue_.makeImmutable();
994 result.variableValue_ = variableValue_;
995 }
996 if (((from_bitField0_ & 0x00000020) != 0)) {
997 result.solveInfo_ = solveInfoBuilder_ == null
998 ? solveInfo_
999 : solveInfoBuilder_.build();
1000 to_bitField0_ |= 0x00000010;
1001 }
1002 if (((from_bitField0_ & 0x00000040) != 0)) {
1003 result.solverSpecificInfo_ = solverSpecificInfo_;
1004 to_bitField0_ |= 0x00000020;
1005 }
1006 if (((from_bitField0_ & 0x00000080) != 0)) {
1007 dualValue_.makeImmutable();
1008 result.dualValue_ = dualValue_;
1009 }
1010 if (((from_bitField0_ & 0x00000100) != 0)) {
1011 reducedCost_.makeImmutable();
1012 result.reducedCost_ = reducedCost_;
1013 }
1014 result.bitField0_ |= to_bitField0_;
1015 }
1016
1017 @java.lang.Override
1018 public Builder mergeFrom(com.google.protobuf.Message other) {
1019 if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
1020 return mergeFrom((com.google.ortools.linearsolver.MPSolutionResponse)other);
1021 } else {
1022 super.mergeFrom(other);
1023 return this;
1024 }
1025 }
1026
1027 public Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other) {
1028 if (other == com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance()) return this;
1029 if (other.hasStatus()) {
1030 setStatus(other.getStatus());
1031 }
1032 if (other.hasStatusStr()) {
1033 statusStr_ = other.statusStr_;
1034 bitField0_ |= 0x00000002;
1035 onChanged();
1036 }
1037 if (other.hasObjectiveValue()) {
1038 setObjectiveValue(other.getObjectiveValue());
1039 }
1040 if (other.hasBestObjectiveBound()) {
1041 setBestObjectiveBound(other.getBestObjectiveBound());
1042 }
1043 if (!other.variableValue_.isEmpty()) {
1044 if (variableValue_.isEmpty()) {
1045 variableValue_ = other.variableValue_;
1046 variableValue_.makeImmutable();
1047 bitField0_ |= 0x00000010;
1048 } else {
1049 ensureVariableValueIsMutable();
1050 variableValue_.addAll(other.variableValue_);
1051 }
1052 onChanged();
1053 }
1054 if (other.hasSolveInfo()) {
1055 mergeSolveInfo(other.getSolveInfo());
1056 }
1057 if (other.hasSolverSpecificInfo()) {
1058 setSolverSpecificInfo(other.getSolverSpecificInfo());
1059 }
1060 if (!other.dualValue_.isEmpty()) {
1061 if (dualValue_.isEmpty()) {
1062 dualValue_ = other.dualValue_;
1063 dualValue_.makeImmutable();
1064 bitField0_ |= 0x00000080;
1065 } else {
1066 ensureDualValueIsMutable();
1067 dualValue_.addAll(other.dualValue_);
1068 }
1069 onChanged();
1070 }
1071 if (!other.reducedCost_.isEmpty()) {
1072 if (reducedCost_.isEmpty()) {
1073 reducedCost_ = other.reducedCost_;
1074 reducedCost_.makeImmutable();
1075 bitField0_ |= 0x00000100;
1076 } else {
1077 ensureReducedCostIsMutable();
1078 reducedCost_.addAll(other.reducedCost_);
1079 }
1080 onChanged();
1081 }
1082 if (additionalSolutionsBuilder_ == null) {
1083 if (!other.additionalSolutions_.isEmpty()) {
1084 if (additionalSolutions_.isEmpty()) {
1085 additionalSolutions_ = other.additionalSolutions_;
1086 bitField0_ = (bitField0_ & ~0x00000200);
1087 } else {
1088 ensureAdditionalSolutionsIsMutable();
1089 additionalSolutions_.addAll(other.additionalSolutions_);
1090 }
1091 onChanged();
1092 }
1093 } else {
1094 if (!other.additionalSolutions_.isEmpty()) {
1095 if (additionalSolutionsBuilder_.isEmpty()) {
1096 additionalSolutionsBuilder_.dispose();
1097 additionalSolutionsBuilder_ = null;
1098 additionalSolutions_ = other.additionalSolutions_;
1099 bitField0_ = (bitField0_ & ~0x00000200);
1100 additionalSolutionsBuilder_ =
1101 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1102 getAdditionalSolutionsFieldBuilder() : null;
1103 } else {
1104 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1105 }
1106 }
1107 }
1108 this.mergeUnknownFields(other.getUnknownFields());
1109 onChanged();
1110 return this;
1111 }
1112
1113 @java.lang.Override
1114 public final boolean isInitialized() {
1115 return true;
1116 }
1117
1118 @java.lang.Override
1120 com.google.protobuf.CodedInputStream input,
1121 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1122 throws java.io.IOException {
1123 if (extensionRegistry == null) {
1124 throw new java.lang.NullPointerException();
1125 }
1126 try {
1127 boolean done = false;
1128 while (!done) {
1129 int tag = input.readTag();
1130 switch (tag) {
1131 case 0:
1132 done = true;
1133 break;
1134 case 8: {
1135 int tmpRaw = input.readEnum();
1137 com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(tmpRaw);
1138 if (tmpValue == null) {
1139 mergeUnknownVarintField(1, tmpRaw);
1140 } else {
1141 status_ = tmpRaw;
1142 bitField0_ |= 0x00000001;
1143 }
1144 break;
1145 } // case 8
1146 case 17: {
1147 objectiveValue_ = input.readDouble();
1148 bitField0_ |= 0x00000004;
1149 break;
1150 } // case 17
1151 case 25: {
1152 double v = input.readDouble();
1153 ensureVariableValueIsMutable();
1154 variableValue_.addDouble(v);
1155 break;
1156 } // case 25
1157 case 26: {
1158 int length = input.readRawVarint32();
1159 int limit = input.pushLimit(length);
1160 int alloc = length > 4096 ? 4096 : length;
1161 ensureVariableValueIsMutable(alloc / 8);
1162 while (input.getBytesUntilLimit() > 0) {
1163 variableValue_.addDouble(input.readDouble());
1164 }
1165 input.popLimit(limit);
1166 break;
1167 } // case 26
1168 case 33: {
1169 double v = input.readDouble();
1170 ensureDualValueIsMutable();
1171 dualValue_.addDouble(v);
1172 break;
1173 } // case 33
1174 case 34: {
1175 int length = input.readRawVarint32();
1176 int limit = input.pushLimit(length);
1177 int alloc = length > 4096 ? 4096 : length;
1178 ensureDualValueIsMutable(alloc / 8);
1179 while (input.getBytesUntilLimit() > 0) {
1180 dualValue_.addDouble(input.readDouble());
1181 }
1182 input.popLimit(limit);
1183 break;
1184 } // case 34
1185 case 41: {
1186 bestObjectiveBound_ = input.readDouble();
1187 bitField0_ |= 0x00000008;
1188 break;
1189 } // case 41
1190 case 49: {
1191 double v = input.readDouble();
1192 ensureReducedCostIsMutable();
1193 reducedCost_.addDouble(v);
1194 break;
1195 } // case 49
1196 case 50: {
1197 int length = input.readRawVarint32();
1198 int limit = input.pushLimit(length);
1199 int alloc = length > 4096 ? 4096 : length;
1200 ensureReducedCostIsMutable(alloc / 8);
1201 while (input.getBytesUntilLimit() > 0) {
1202 reducedCost_.addDouble(input.readDouble());
1203 }
1204 input.popLimit(limit);
1205 break;
1206 } // case 50
1207 case 58: {
1208 statusStr_ = input.readBytes();
1209 bitField0_ |= 0x00000002;
1210 break;
1211 } // case 58
1212 case 66: {
1214 input.readMessage(
1215 com.google.ortools.linearsolver.MPSolution.parser(),
1216 extensionRegistry);
1217 if (additionalSolutionsBuilder_ == null) {
1218 ensureAdditionalSolutionsIsMutable();
1219 additionalSolutions_.add(m);
1220 } else {
1221 additionalSolutionsBuilder_.addMessage(m);
1222 }
1223 break;
1224 } // case 66
1225 case 82: {
1226 input.readMessage(
1227 getSolveInfoFieldBuilder().getBuilder(),
1228 extensionRegistry);
1229 bitField0_ |= 0x00000020;
1230 break;
1231 } // case 82
1232 case 90: {
1233 solverSpecificInfo_ = input.readBytes();
1234 bitField0_ |= 0x00000040;
1235 break;
1236 } // case 90
1237 default: {
1238 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1239 done = true; // was an endgroup tag
1240 }
1241 break;
1242 } // default:
1243 } // switch (tag)
1244 } // while (!done)
1245 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1246 throw e.unwrapIOException();
1247 } finally {
1248 onChanged();
1249 } // finally
1250 return this;
1251 }
1252 private int bitField0_;
1253
1254 private int status_ = 99;
1263 @java.lang.Override public boolean hasStatus() {
1264 return ((bitField0_ & 0x00000001) != 0);
1265 }
1274 @java.lang.Override
1276 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
1277 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
1278 }
1288 public Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value) {
1289 if (value == null) {
1290 throw new NullPointerException();
1291 }
1292 bitField0_ |= 0x00000001;
1293 status_ = value.getNumber();
1294 onChanged();
1295 return this;
1296 }
1306 bitField0_ = (bitField0_ & ~0x00000001);
1307 status_ = 99;
1308 onChanged();
1309 return this;
1310 }
1311
1312 private java.lang.Object statusStr_ = "";
1324 public boolean hasStatusStr() {
1325 return ((bitField0_ & 0x00000002) != 0);
1326 }
1338 public java.lang.String getStatusStr() {
1339 java.lang.Object ref = statusStr_;
1340 if (!(ref instanceof java.lang.String)) {
1341 com.google.protobuf.ByteString bs =
1342 (com.google.protobuf.ByteString) ref;
1343 java.lang.String s = bs.toStringUtf8();
1344 if (bs.isValidUtf8()) {
1345 statusStr_ = s;
1346 }
1347 return s;
1348 } else {
1349 return (java.lang.String) ref;
1350 }
1351 }
1363 public com.google.protobuf.ByteString
1365 java.lang.Object ref = statusStr_;
1366 if (ref instanceof String) {
1367 com.google.protobuf.ByteString b =
1368 com.google.protobuf.ByteString.copyFromUtf8(
1369 (java.lang.String) ref);
1370 statusStr_ = b;
1371 return b;
1372 } else {
1373 return (com.google.protobuf.ByteString) ref;
1374 }
1375 }
1389 java.lang.String value) {
1390 if (value == null) { throw new NullPointerException(); }
1391 statusStr_ = value;
1392 bitField0_ |= 0x00000002;
1393 onChanged();
1394 return this;
1395 }
1408 statusStr_ = getDefaultInstance().getStatusStr();
1409 bitField0_ = (bitField0_ & ~0x00000002);
1410 onChanged();
1411 return this;
1412 }
1426 com.google.protobuf.ByteString value) {
1427 if (value == null) { throw new NullPointerException(); }
1428 statusStr_ = value;
1429 bitField0_ |= 0x00000002;
1430 onChanged();
1431 return this;
1432 }
1433
1434 private double objectiveValue_ ;
1445 @java.lang.Override
1446 public boolean hasObjectiveValue() {
1447 return ((bitField0_ & 0x00000004) != 0);
1448 }
1459 @java.lang.Override
1460 public double getObjectiveValue() {
1461 return objectiveValue_;
1462 }
1474 public Builder setObjectiveValue(double value) {
1475
1476 objectiveValue_ = value;
1477 bitField0_ |= 0x00000004;
1478 onChanged();
1479 return this;
1480 }
1492 bitField0_ = (bitField0_ & ~0x00000004);
1493 objectiveValue_ = 0D;
1494 onChanged();
1495 return this;
1496 }
1497
1498 private double bestObjectiveBound_ ;
1511 @java.lang.Override
1512 public boolean hasBestObjectiveBound() {
1513 return ((bitField0_ & 0x00000008) != 0);
1514 }
1527 @java.lang.Override
1528 public double getBestObjectiveBound() {
1529 return bestObjectiveBound_;
1530 }
1544 public Builder setBestObjectiveBound(double value) {
1545
1546 bestObjectiveBound_ = value;
1547 bitField0_ |= 0x00000008;
1548 onChanged();
1549 return this;
1550 }
1564 bitField0_ = (bitField0_ & ~0x00000008);
1565 bestObjectiveBound_ = 0D;
1566 onChanged();
1567 return this;
1568 }
1569
1570 private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1571 private void ensureVariableValueIsMutable() {
1572 if (!variableValue_.isModifiable()) {
1573 variableValue_ = makeMutableCopy(variableValue_);
1574 }
1575 bitField0_ |= 0x00000010;
1576 }
1577 private void ensureVariableValueIsMutable(int capacity) {
1578 if (!variableValue_.isModifiable()) {
1579 variableValue_ = makeMutableCopy(variableValue_, capacity);
1580 }
1581 bitField0_ |= 0x00000010;
1582 }
1593 public java.util.List<java.lang.Double>
1595 variableValue_.makeImmutable();
1596 return variableValue_;
1597 }
1609 return variableValue_.size();
1610 }
1622 public double getVariableValue(int index) {
1623 return variableValue_.getDouble(index);
1624 }
1638 int index, double value) {
1639
1640 ensureVariableValueIsMutable();
1641 variableValue_.setDouble(index, value);
1642 bitField0_ |= 0x00000010;
1643 onChanged();
1644 return this;
1645 }
1657 public Builder addVariableValue(double value) {
1658
1659 ensureVariableValueIsMutable();
1660 variableValue_.addDouble(value);
1661 bitField0_ |= 0x00000010;
1662 onChanged();
1663 return this;
1664 }
1677 java.lang.Iterable<? extends java.lang.Double> values) {
1678 ensureVariableValueIsMutable();
1679 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1680 values, variableValue_);
1681 bitField0_ |= 0x00000010;
1682 onChanged();
1683 return this;
1684 }
1696 variableValue_ = emptyDoubleList();
1697 bitField0_ = (bitField0_ & ~0x00000010);
1698 onChanged();
1699 return this;
1700 }
1701
1703 private com.google.protobuf.SingleFieldBuilder<
1704 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder> solveInfoBuilder_;
1715 public boolean hasSolveInfo() {
1716 return ((bitField0_ & 0x00000020) != 0);
1717 }
1729 if (solveInfoBuilder_ == null) {
1730 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1731 } else {
1732 return solveInfoBuilder_.getMessage();
1733 }
1734 }
1744 public Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1745 if (solveInfoBuilder_ == null) {
1746 if (value == null) {
1747 throw new NullPointerException();
1748 }
1749 solveInfo_ = value;
1750 } else {
1751 solveInfoBuilder_.setMessage(value);
1752 }
1753 bitField0_ |= 0x00000020;
1754 onChanged();
1755 return this;
1756 }
1767 com.google.ortools.linearsolver.MPSolveInfo.Builder builderForValue) {
1768 if (solveInfoBuilder_ == null) {
1769 solveInfo_ = builderForValue.build();
1770 } else {
1771 solveInfoBuilder_.setMessage(builderForValue.build());
1772 }
1773 bitField0_ |= 0x00000020;
1774 onChanged();
1775 return this;
1776 }
1786 public Builder mergeSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1787 if (solveInfoBuilder_ == null) {
1788 if (((bitField0_ & 0x00000020) != 0) &&
1789 solveInfo_ != null &&
1790 solveInfo_ != com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance()) {
1791 getSolveInfoBuilder().mergeFrom(value);
1792 } else {
1793 solveInfo_ = value;
1794 }
1795 } else {
1796 solveInfoBuilder_.mergeFrom(value);
1797 }
1798 if (solveInfo_ != null) {
1799 bitField0_ |= 0x00000020;
1800 onChanged();
1801 }
1802 return this;
1803 }
1814 bitField0_ = (bitField0_ & ~0x00000020);
1815 solveInfo_ = null;
1816 if (solveInfoBuilder_ != null) {
1817 solveInfoBuilder_.dispose();
1818 solveInfoBuilder_ = null;
1819 }
1820 onChanged();
1821 return this;
1822 }
1833 bitField0_ |= 0x00000020;
1834 onChanged();
1835 return getSolveInfoFieldBuilder().getBuilder();
1836 }
1847 if (solveInfoBuilder_ != null) {
1848 return solveInfoBuilder_.getMessageOrBuilder();
1849 } else {
1850 return solveInfo_ == null ?
1851 com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1852 }
1853 }
1863 private com.google.protobuf.SingleFieldBuilder<
1864 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>
1865 getSolveInfoFieldBuilder() {
1866 if (solveInfoBuilder_ == null) {
1867 solveInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1868 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>(
1869 getSolveInfo(),
1870 getParentForChildren(),
1871 isClean());
1872 solveInfo_ = null;
1873 }
1874 return solveInfoBuilder_;
1875 }
1876
1877 private com.google.protobuf.ByteString solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
1887 @java.lang.Override
1888 public boolean hasSolverSpecificInfo() {
1889 return ((bitField0_ & 0x00000040) != 0);
1890 }
1900 @java.lang.Override
1901 public com.google.protobuf.ByteString getSolverSpecificInfo() {
1902 return solverSpecificInfo_;
1903 }
1914 public Builder setSolverSpecificInfo(com.google.protobuf.ByteString value) {
1915 if (value == null) { throw new NullPointerException(); }
1916 solverSpecificInfo_ = value;
1917 bitField0_ |= 0x00000040;
1918 onChanged();
1919 return this;
1920 }
1931 bitField0_ = (bitField0_ & ~0x00000040);
1932 solverSpecificInfo_ = getDefaultInstance().getSolverSpecificInfo();
1933 onChanged();
1934 return this;
1935 }
1936
1937 private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1938 private void ensureDualValueIsMutable() {
1939 if (!dualValue_.isModifiable()) {
1940 dualValue_ = makeMutableCopy(dualValue_);
1941 }
1942 bitField0_ |= 0x00000080;
1943 }
1944 private void ensureDualValueIsMutable(int capacity) {
1945 if (!dualValue_.isModifiable()) {
1946 dualValue_ = makeMutableCopy(dualValue_, capacity);
1947 }
1948 bitField0_ |= 0x00000080;
1949 }
1963 public java.util.List<java.lang.Double>
1965 dualValue_.makeImmutable();
1966 return dualValue_;
1967 }
1981 public int getDualValueCount() {
1982 return dualValue_.size();
1983 }
1998 public double getDualValue(int index) {
1999 return dualValue_.getDouble(index);
2000 }
2017 int index, double value) {
2018
2019 ensureDualValueIsMutable();
2020 dualValue_.setDouble(index, value);
2021 bitField0_ |= 0x00000080;
2022 onChanged();
2023 return this;
2024 }
2039 public Builder addDualValue(double value) {
2040
2041 ensureDualValueIsMutable();
2042 dualValue_.addDouble(value);
2043 bitField0_ |= 0x00000080;
2044 onChanged();
2045 return this;
2046 }
2062 java.lang.Iterable<? extends java.lang.Double> values) {
2063 ensureDualValueIsMutable();
2064 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2065 values, dualValue_);
2066 bitField0_ |= 0x00000080;
2067 onChanged();
2068 return this;
2069 }
2084 dualValue_ = emptyDoubleList();
2085 bitField0_ = (bitField0_ & ~0x00000080);
2086 onChanged();
2087 return this;
2088 }
2089
2090 private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
2091 private void ensureReducedCostIsMutable() {
2092 if (!reducedCost_.isModifiable()) {
2093 reducedCost_ = makeMutableCopy(reducedCost_);
2094 }
2095 bitField0_ |= 0x00000100;
2096 }
2097 private void ensureReducedCostIsMutable(int capacity) {
2098 if (!reducedCost_.isModifiable()) {
2099 reducedCost_ = makeMutableCopy(reducedCost_, capacity);
2100 }
2101 bitField0_ |= 0x00000100;
2102 }
2116 public java.util.List<java.lang.Double>
2118 reducedCost_.makeImmutable();
2119 return reducedCost_;
2120 }
2134 public int getReducedCostCount() {
2135 return reducedCost_.size();
2136 }
2151 public double getReducedCost(int index) {
2152 return reducedCost_.getDouble(index);
2153 }
2170 int index, double value) {
2171
2172 ensureReducedCostIsMutable();
2173 reducedCost_.setDouble(index, value);
2174 bitField0_ |= 0x00000100;
2175 onChanged();
2176 return this;
2177 }
2192 public Builder addReducedCost(double value) {
2193
2194 ensureReducedCostIsMutable();
2195 reducedCost_.addDouble(value);
2196 bitField0_ |= 0x00000100;
2197 onChanged();
2198 return this;
2199 }
2215 java.lang.Iterable<? extends java.lang.Double> values) {
2216 ensureReducedCostIsMutable();
2217 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2218 values, reducedCost_);
2219 bitField0_ |= 0x00000100;
2220 onChanged();
2221 return this;
2222 }
2237 reducedCost_ = emptyDoubleList();
2238 bitField0_ = (bitField0_ & ~0x00000100);
2239 onChanged();
2240 return this;
2241 }
2242
2243 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_ =
2244 java.util.Collections.emptyList();
2245 private void ensureAdditionalSolutionsIsMutable() {
2246 if (!((bitField0_ & 0x00000200) != 0)) {
2247 additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>(additionalSolutions_);
2248 bitField0_ |= 0x00000200;
2249 }
2250 }
2251
2252 private com.google.protobuf.RepeatedFieldBuilder<
2253 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder> additionalSolutionsBuilder_;
2254
2266 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
2267 if (additionalSolutionsBuilder_ == null) {
2268 return java.util.Collections.unmodifiableList(additionalSolutions_);
2269 } else {
2270 return additionalSolutionsBuilder_.getMessageList();
2271 }
2272 }
2285 if (additionalSolutionsBuilder_ == null) {
2286 return additionalSolutions_.size();
2287 } else {
2288 return additionalSolutionsBuilder_.getCount();
2289 }
2290 }
2303 if (additionalSolutionsBuilder_ == null) {
2304 return additionalSolutions_.get(index);
2305 } else {
2306 return additionalSolutionsBuilder_.getMessage(index);
2307 }
2308 }
2321 int index, com.google.ortools.linearsolver.MPSolution value) {
2322 if (additionalSolutionsBuilder_ == null) {
2323 if (value == null) {
2324 throw new NullPointerException();
2325 }
2326 ensureAdditionalSolutionsIsMutable();
2327 additionalSolutions_.set(index, value);
2328 onChanged();
2329 } else {
2330 additionalSolutionsBuilder_.setMessage(index, value);
2331 }
2332 return this;
2333 }
2346 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2347 if (additionalSolutionsBuilder_ == null) {
2348 ensureAdditionalSolutionsIsMutable();
2349 additionalSolutions_.set(index, builderForValue.build());
2350 onChanged();
2351 } else {
2352 additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2353 }
2354 return this;
2355 }
2367 public Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value) {
2368 if (additionalSolutionsBuilder_ == null) {
2369 if (value == null) {
2370 throw new NullPointerException();
2371 }
2372 ensureAdditionalSolutionsIsMutable();
2373 additionalSolutions_.add(value);
2374 onChanged();
2375 } else {
2376 additionalSolutionsBuilder_.addMessage(value);
2377 }
2378 return this;
2379 }
2392 int index, com.google.ortools.linearsolver.MPSolution value) {
2393 if (additionalSolutionsBuilder_ == null) {
2394 if (value == null) {
2395 throw new NullPointerException();
2396 }
2397 ensureAdditionalSolutionsIsMutable();
2398 additionalSolutions_.add(index, value);
2399 onChanged();
2400 } else {
2401 additionalSolutionsBuilder_.addMessage(index, value);
2402 }
2403 return this;
2404 }
2417 com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2418 if (additionalSolutionsBuilder_ == null) {
2419 ensureAdditionalSolutionsIsMutable();
2420 additionalSolutions_.add(builderForValue.build());
2421 onChanged();
2422 } else {
2423 additionalSolutionsBuilder_.addMessage(builderForValue.build());
2424 }
2425 return this;
2426 }
2439 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2440 if (additionalSolutionsBuilder_ == null) {
2441 ensureAdditionalSolutionsIsMutable();
2442 additionalSolutions_.add(index, builderForValue.build());
2443 onChanged();
2444 } else {
2445 additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2446 }
2447 return this;
2448 }
2461 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution> values) {
2462 if (additionalSolutionsBuilder_ == null) {
2463 ensureAdditionalSolutionsIsMutable();
2464 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2465 values, additionalSolutions_);
2466 onChanged();
2467 } else {
2468 additionalSolutionsBuilder_.addAllMessages(values);
2469 }
2470 return this;
2471 }
2484 if (additionalSolutionsBuilder_ == null) {
2485 additionalSolutions_ = java.util.Collections.emptyList();
2486 bitField0_ = (bitField0_ & ~0x00000200);
2487 onChanged();
2488 } else {
2489 additionalSolutionsBuilder_.clear();
2490 }
2491 return this;
2492 }
2505 if (additionalSolutionsBuilder_ == null) {
2506 ensureAdditionalSolutionsIsMutable();
2507 additionalSolutions_.remove(index);
2508 onChanged();
2509 } else {
2510 additionalSolutionsBuilder_.remove(index);
2511 }
2512 return this;
2513 }
2526 int index) {
2527 return getAdditionalSolutionsFieldBuilder().getBuilder(index);
2528 }
2541 int index) {
2542 if (additionalSolutionsBuilder_ == null) {
2543 return additionalSolutions_.get(index); } else {
2544 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2545 }
2546 }
2558 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
2560 if (additionalSolutionsBuilder_ != null) {
2561 return additionalSolutionsBuilder_.getMessageOrBuilderList();
2562 } else {
2563 return java.util.Collections.unmodifiableList(additionalSolutions_);
2564 }
2565 }
2578 return getAdditionalSolutionsFieldBuilder().addBuilder(
2579 com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2580 }
2593 int index) {
2594 return getAdditionalSolutionsFieldBuilder().addBuilder(
2595 index, com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2596 }
2608 public java.util.List<com.google.ortools.linearsolver.MPSolution.Builder>
2610 return getAdditionalSolutionsFieldBuilder().getBuilderList();
2611 }
2612 private com.google.protobuf.RepeatedFieldBuilder<
2613 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>
2614 getAdditionalSolutionsFieldBuilder() {
2615 if (additionalSolutionsBuilder_ == null) {
2616 additionalSolutionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2617 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>(
2618 additionalSolutions_,
2619 ((bitField0_ & 0x00000200) != 0),
2620 getParentForChildren(),
2621 isClean());
2622 additionalSolutions_ = null;
2623 }
2624 return additionalSolutionsBuilder_;
2625 }
2626
2627 // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
2628 }
2629
2630 // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
2631 private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
2632 static {
2633 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
2634 }
2635
2637 return DEFAULT_INSTANCE;
2638 }
2639
2640 private static final com.google.protobuf.Parser<MPSolutionResponse>
2641 PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
2642 @java.lang.Override
2643 public MPSolutionResponse parsePartialFrom(
2644 com.google.protobuf.CodedInputStream input,
2645 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2646 throws com.google.protobuf.InvalidProtocolBufferException {
2647 Builder builder = newBuilder();
2648 try {
2649 builder.mergeFrom(input, extensionRegistry);
2650 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2651 throw e.setUnfinishedMessage(builder.buildPartial());
2652 } catch (com.google.protobuf.UninitializedMessageException e) {
2653 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2654 } catch (java.io.IOException e) {
2655 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2656 .setUnfinishedMessage(builder.buildPartial());
2657 }
2658 return builder.buildPartial();
2659 }
2660 };
2661
2662 public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
2663 return PARSER;
2664 }
2665
2666 @java.lang.Override
2667 public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
2668 return PARSER;
2669 }
2670
2671 @java.lang.Override
2675
2676}
2677
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value)
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
com.google.ortools.linearsolver.MPSolutionResponse buildPartial()
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value)
com.google.ortools.linearsolver.MPSolutionResponse build()
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
Builder addAllReducedCost(java.lang.Iterable<? extends java.lang.Double > values)
Builder setStatusStrBytes(com.google.protobuf.ByteString value)
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value)
Builder addAllAdditionalSolutions(java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution > values)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder()
com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder()
Builder setSolverSpecificInfo(com.google.protobuf.ByteString value)
com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder addAllDualValue(java.lang.Iterable<? extends java.lang.Double > values)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPSolveInfo getSolveInfo()
Builder setAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution.Builder builderForValue)
Builder mergeSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value)
java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.MPSolveInfo.Builder getSolveInfoBuilder()
Builder addAdditionalSolutions(int index, com.google.ortools.linearsolver.MPSolution value)
com.google.ortools.linearsolver.MPSolution.Builder getAdditionalSolutionsBuilder(int index)
Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo.Builder builderForValue)
Builder addAllVariableValue(java.lang.Iterable<? extends java.lang.Double > values)
com.google.ortools.linearsolver.MPSolution.Builder addAdditionalSolutionsBuilder(int index)
java.util.List< com.google.ortools.linearsolver.MPSolution.Builder > getAdditionalSolutionsBuilderList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
java.util.List< java.lang.Double > getVariableValueList()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstance()
com.google.ortools.linearsolver.MPSolutionOrBuilder getAdditionalSolutionsOrBuilder(int index)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.util.List< com.google.ortools.linearsolver.MPSolution > getAdditionalSolutionsList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< MPSolutionResponse > getParserForType()
java.util.List< java.lang.Double > getReducedCostList()
com.google.ortools.linearsolver.MPSolveInfo getSolveInfo()
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input)
static com.google.protobuf.Parser< MPSolutionResponse > parser()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.nio.ByteBuffer data)
com.google.ortools.linearsolver.MPSolutionResponse getDefaultInstanceForType()
com.google.ortools.linearsolver.MPSolution getAdditionalSolutions(int index)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.linearsolver.MPSolveInfoOrBuilder getSolveInfoOrBuilder()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
java.util.List< java.lang.Double > getDualValueList()
java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder > getAdditionalSolutionsOrBuilderList()
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.linearsolver.MPSolutionResponse parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)