Google OR-Tools v9.9
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: 3.25.3
5package com.google.ortools.linearsolver;
6
14public final class MPSolutionResponse extends
15 com.google.protobuf.GeneratedMessageV3 implements
16 // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
18private static final long serialVersionUID = 0L;
19 // Use MPSolutionResponse.newBuilder() to construct.
20 private MPSolutionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
21 super(builder);
22 }
23 private MPSolutionResponse() {
24 status_ = 99;
25 statusStr_ = "";
26 variableValue_ = emptyDoubleList();
27 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
28 dualValue_ = emptyDoubleList();
29 reducedCost_ = emptyDoubleList();
30 additionalSolutions_ = java.util.Collections.emptyList();
31 }
32
33 @java.lang.Override
34 @SuppressWarnings({"unused"})
35 protected java.lang.Object newInstance(
36 UnusedPrivateParameter unused) {
37 return new MPSolutionResponse();
38 }
39
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
43 }
44
45 @java.lang.Override
46 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
48 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
51 }
52
53 private int bitField0_;
54 public static final int STATUS_FIELD_NUMBER = 1;
55 private int status_ = 99;
64 @java.lang.Override public boolean hasStatus() {
65 return ((bitField0_ & 0x00000001) != 0);
66 }
76 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
77 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
78 }
79
80 public static final int STATUS_STR_FIELD_NUMBER = 7;
81 @SuppressWarnings("serial")
82 private volatile java.lang.Object statusStr_ = "";
94 @java.lang.Override
95 public boolean hasStatusStr() {
96 return ((bitField0_ & 0x00000002) != 0);
97 }
109 @java.lang.Override
110 public java.lang.String getStatusStr() {
111 java.lang.Object ref = statusStr_;
112 if (ref instanceof java.lang.String) {
113 return (java.lang.String) ref;
114 } else {
115 com.google.protobuf.ByteString bs =
116 (com.google.protobuf.ByteString) ref;
117 java.lang.String s = bs.toStringUtf8();
118 if (bs.isValidUtf8()) {
119 statusStr_ = s;
120 }
121 return s;
122 }
123 }
135 @java.lang.Override
136 public com.google.protobuf.ByteString
138 java.lang.Object ref = statusStr_;
139 if (ref instanceof java.lang.String) {
140 com.google.protobuf.ByteString b =
141 com.google.protobuf.ByteString.copyFromUtf8(
142 (java.lang.String) ref);
143 statusStr_ = b;
144 return b;
145 } else {
146 return (com.google.protobuf.ByteString) ref;
147 }
148 }
149
150 public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
151 private double objectiveValue_ = 0D;
162 @java.lang.Override
163 public boolean hasObjectiveValue() {
164 return ((bitField0_ & 0x00000004) != 0);
165 }
176 @java.lang.Override
177 public double getObjectiveValue() {
178 return objectiveValue_;
179 }
180
181 public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
182 private double bestObjectiveBound_ = 0D;
195 @java.lang.Override
196 public boolean hasBestObjectiveBound() {
197 return ((bitField0_ & 0x00000008) != 0);
198 }
211 @java.lang.Override
212 public double getBestObjectiveBound() {
213 return bestObjectiveBound_;
214 }
215
216 public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
217 @SuppressWarnings("serial")
218 private com.google.protobuf.Internal.DoubleList variableValue_ =
219 emptyDoubleList();
230 @java.lang.Override
231 public java.util.List<java.lang.Double>
233 return variableValue_;
234 }
246 return variableValue_.size();
247 }
259 public double getVariableValue(int index) {
260 return variableValue_.getDouble(index);
261 }
262 private int variableValueMemoizedSerializedSize = -1;
263
264 public static final int SOLVE_INFO_FIELD_NUMBER = 10;
276 @java.lang.Override
277 public boolean hasSolveInfo() {
278 return ((bitField0_ & 0x00000010) != 0);
279 }
290 @java.lang.Override
292 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
293 }
303 @java.lang.Override
305 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
306 }
307
308 public static final int SOLVER_SPECIFIC_INFO_FIELD_NUMBER = 11;
309 private com.google.protobuf.ByteString solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
319 @java.lang.Override
320 public boolean hasSolverSpecificInfo() {
321 return ((bitField0_ & 0x00000020) != 0);
322 }
332 @java.lang.Override
333 public com.google.protobuf.ByteString getSolverSpecificInfo() {
334 return solverSpecificInfo_;
335 }
336
337 public static final int DUAL_VALUE_FIELD_NUMBER = 4;
338 @SuppressWarnings("serial")
339 private com.google.protobuf.Internal.DoubleList dualValue_ =
340 emptyDoubleList();
354 @java.lang.Override
355 public java.util.List<java.lang.Double>
357 return dualValue_;
358 }
372 public int getDualValueCount() {
373 return dualValue_.size();
374 }
389 public double getDualValue(int index) {
390 return dualValue_.getDouble(index);
391 }
392 private int dualValueMemoizedSerializedSize = -1;
393
394 public static final int REDUCED_COST_FIELD_NUMBER = 6;
395 @SuppressWarnings("serial")
396 private com.google.protobuf.Internal.DoubleList reducedCost_ =
397 emptyDoubleList();
411 @java.lang.Override
412 public java.util.List<java.lang.Double>
414 return reducedCost_;
415 }
429 public int getReducedCostCount() {
430 return reducedCost_.size();
431 }
446 public double getReducedCost(int index) {
447 return reducedCost_.getDouble(index);
448 }
449 private int reducedCostMemoizedSerializedSize = -1;
450
451 public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 8;
452 @SuppressWarnings("serial")
453 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_;
465 @java.lang.Override
466 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
467 return additionalSolutions_;
468 }
480 @java.lang.Override
481 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
483 return additionalSolutions_;
484 }
496 @java.lang.Override
498 return additionalSolutions_.size();
499 }
511 @java.lang.Override
513 return additionalSolutions_.get(index);
514 }
526 @java.lang.Override
528 int index) {
529 return additionalSolutions_.get(index);
530 }
531
532 private byte memoizedIsInitialized = -1;
533 @java.lang.Override
534 public final boolean isInitialized() {
535 byte isInitialized = memoizedIsInitialized;
536 if (isInitialized == 1) return true;
537 if (isInitialized == 0) return false;
538
539 memoizedIsInitialized = 1;
540 return true;
541 }
542
543 @java.lang.Override
544 public void writeTo(com.google.protobuf.CodedOutputStream output)
545 throws java.io.IOException {
547 if (((bitField0_ & 0x00000001) != 0)) {
548 output.writeEnum(1, status_);
549 }
550 if (((bitField0_ & 0x00000004) != 0)) {
551 output.writeDouble(2, objectiveValue_);
552 }
553 if (getVariableValueList().size() > 0) {
554 output.writeUInt32NoTag(26);
555 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
556 }
557 for (int i = 0; i < variableValue_.size(); i++) {
558 output.writeDoubleNoTag(variableValue_.getDouble(i));
559 }
560 if (getDualValueList().size() > 0) {
561 output.writeUInt32NoTag(34);
562 output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
563 }
564 for (int i = 0; i < dualValue_.size(); i++) {
565 output.writeDoubleNoTag(dualValue_.getDouble(i));
566 }
567 if (((bitField0_ & 0x00000008) != 0)) {
568 output.writeDouble(5, bestObjectiveBound_);
569 }
570 if (getReducedCostList().size() > 0) {
571 output.writeUInt32NoTag(50);
572 output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
573 }
574 for (int i = 0; i < reducedCost_.size(); i++) {
575 output.writeDoubleNoTag(reducedCost_.getDouble(i));
576 }
577 if (((bitField0_ & 0x00000002) != 0)) {
578 com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusStr_);
579 }
580 for (int i = 0; i < additionalSolutions_.size(); i++) {
581 output.writeMessage(8, additionalSolutions_.get(i));
582 }
583 if (((bitField0_ & 0x00000010) != 0)) {
584 output.writeMessage(10, getSolveInfo());
585 }
586 if (((bitField0_ & 0x00000020) != 0)) {
587 output.writeBytes(11, solverSpecificInfo_);
588 }
589 getUnknownFields().writeTo(output);
590 }
591
592 @java.lang.Override
593 public int getSerializedSize() {
594 int size = memoizedSize;
595 if (size != -1) return size;
596
597 size = 0;
598 if (((bitField0_ & 0x00000001) != 0)) {
599 size += com.google.protobuf.CodedOutputStream
600 .computeEnumSize(1, status_);
601 }
602 if (((bitField0_ & 0x00000004) != 0)) {
603 size += com.google.protobuf.CodedOutputStream
604 .computeDoubleSize(2, objectiveValue_);
605 }
606 {
607 int dataSize = 0;
608 dataSize = 8 * getVariableValueList().size();
609 size += dataSize;
610 if (!getVariableValueList().isEmpty()) {
611 size += 1;
612 size += com.google.protobuf.CodedOutputStream
613 .computeInt32SizeNoTag(dataSize);
614 }
615 variableValueMemoizedSerializedSize = dataSize;
616 }
617 {
618 int dataSize = 0;
619 dataSize = 8 * getDualValueList().size();
620 size += dataSize;
621 if (!getDualValueList().isEmpty()) {
622 size += 1;
623 size += com.google.protobuf.CodedOutputStream
624 .computeInt32SizeNoTag(dataSize);
625 }
626 dualValueMemoizedSerializedSize = dataSize;
627 }
628 if (((bitField0_ & 0x00000008) != 0)) {
629 size += com.google.protobuf.CodedOutputStream
630 .computeDoubleSize(5, bestObjectiveBound_);
631 }
632 {
633 int dataSize = 0;
634 dataSize = 8 * getReducedCostList().size();
635 size += dataSize;
636 if (!getReducedCostList().isEmpty()) {
637 size += 1;
638 size += com.google.protobuf.CodedOutputStream
639 .computeInt32SizeNoTag(dataSize);
640 }
641 reducedCostMemoizedSerializedSize = dataSize;
642 }
643 if (((bitField0_ & 0x00000002) != 0)) {
644 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusStr_);
645 }
646 for (int i = 0; i < additionalSolutions_.size(); i++) {
647 size += com.google.protobuf.CodedOutputStream
648 .computeMessageSize(8, additionalSolutions_.get(i));
649 }
650 if (((bitField0_ & 0x00000010) != 0)) {
651 size += com.google.protobuf.CodedOutputStream
652 .computeMessageSize(10, getSolveInfo());
653 }
654 if (((bitField0_ & 0x00000020) != 0)) {
655 size += com.google.protobuf.CodedOutputStream
656 .computeBytesSize(11, solverSpecificInfo_);
657 }
658 size += getUnknownFields().getSerializedSize();
659 memoizedSize = size;
660 return size;
661 }
662
663 @java.lang.Override
664 public boolean equals(final java.lang.Object obj) {
665 if (obj == this) {
666 return true;
667 }
668 if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
669 return super.equals(obj);
670 }
671 com.google.ortools.linearsolver.MPSolutionResponse other = (com.google.ortools.linearsolver.MPSolutionResponse) obj;
672
673 if (hasStatus() != other.hasStatus()) return false;
674 if (hasStatus()) {
675 if (status_ != other.status_) return false;
676 }
677 if (hasStatusStr() != other.hasStatusStr()) return false;
678 if (hasStatusStr()) {
679 if (!getStatusStr()
680 .equals(other.getStatusStr())) return false;
681 }
682 if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
683 if (hasObjectiveValue()) {
684 if (java.lang.Double.doubleToLongBits(getObjectiveValue())
685 != java.lang.Double.doubleToLongBits(
686 other.getObjectiveValue())) return false;
687 }
688 if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
689 if (hasBestObjectiveBound()) {
690 if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
691 != java.lang.Double.doubleToLongBits(
692 other.getBestObjectiveBound())) return false;
693 }
695 .equals(other.getVariableValueList())) return false;
696 if (hasSolveInfo() != other.hasSolveInfo()) return false;
697 if (hasSolveInfo()) {
698 if (!getSolveInfo()
699 .equals(other.getSolveInfo())) return false;
700 }
701 if (hasSolverSpecificInfo() != other.hasSolverSpecificInfo()) return false;
702 if (hasSolverSpecificInfo()) {
704 .equals(other.getSolverSpecificInfo())) return false;
705 }
706 if (!getDualValueList()
707 .equals(other.getDualValueList())) return false;
708 if (!getReducedCostList()
709 .equals(other.getReducedCostList())) return false;
711 .equals(other.getAdditionalSolutionsList())) return false;
712 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
713 return true;
714 }
715
716 @java.lang.Override
717 public int hashCode() {
718 if (memoizedHashCode != 0) {
719 return memoizedHashCode;
720 }
721 int hash = 41;
722 hash = (19 * hash) + getDescriptor().hashCode();
723 if (hasStatus()) {
724 hash = (37 * hash) + STATUS_FIELD_NUMBER;
725 hash = (53 * hash) + status_;
726 }
727 if (hasStatusStr()) {
728 hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
729 hash = (53 * hash) + getStatusStr().hashCode();
730 }
731 if (hasObjectiveValue()) {
732 hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
733 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
734 java.lang.Double.doubleToLongBits(getObjectiveValue()));
735 }
736 if (hasBestObjectiveBound()) {
737 hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
738 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
739 java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
740 }
741 if (getVariableValueCount() > 0) {
742 hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
743 hash = (53 * hash) + getVariableValueList().hashCode();
744 }
745 if (hasSolveInfo()) {
746 hash = (37 * hash) + SOLVE_INFO_FIELD_NUMBER;
747 hash = (53 * hash) + getSolveInfo().hashCode();
748 }
749 if (hasSolverSpecificInfo()) {
750 hash = (37 * hash) + SOLVER_SPECIFIC_INFO_FIELD_NUMBER;
751 hash = (53 * hash) + getSolverSpecificInfo().hashCode();
752 }
753 if (getDualValueCount() > 0) {
754 hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
755 hash = (53 * hash) + getDualValueList().hashCode();
756 }
757 if (getReducedCostCount() > 0) {
758 hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
759 hash = (53 * hash) + getReducedCostList().hashCode();
760 }
761 if (getAdditionalSolutionsCount() > 0) {
762 hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
763 hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
764 }
765 hash = (29 * hash) + getUnknownFields().hashCode();
766 memoizedHashCode = hash;
767 return hash;
768 }
769
771 java.nio.ByteBuffer data)
772 throws com.google.protobuf.InvalidProtocolBufferException {
773 return PARSER.parseFrom(data);
774 }
776 java.nio.ByteBuffer data,
777 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
778 throws com.google.protobuf.InvalidProtocolBufferException {
779 return PARSER.parseFrom(data, extensionRegistry);
780 }
782 com.google.protobuf.ByteString data)
783 throws com.google.protobuf.InvalidProtocolBufferException {
784 return PARSER.parseFrom(data);
785 }
787 com.google.protobuf.ByteString data,
788 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
789 throws com.google.protobuf.InvalidProtocolBufferException {
790 return PARSER.parseFrom(data, extensionRegistry);
791 }
793 throws com.google.protobuf.InvalidProtocolBufferException {
794 return PARSER.parseFrom(data);
795 }
797 byte[] data,
798 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
799 throws com.google.protobuf.InvalidProtocolBufferException {
800 return PARSER.parseFrom(data, extensionRegistry);
801 }
802 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
803 throws java.io.IOException {
804 return com.google.protobuf.GeneratedMessageV3
805 .parseWithIOException(PARSER, input);
806 }
808 java.io.InputStream input,
809 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
810 throws java.io.IOException {
811 return com.google.protobuf.GeneratedMessageV3
812 .parseWithIOException(PARSER, input, extensionRegistry);
813 }
814
816 throws java.io.IOException {
817 return com.google.protobuf.GeneratedMessageV3
818 .parseDelimitedWithIOException(PARSER, input);
819 }
820
822 java.io.InputStream input,
823 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
824 throws java.io.IOException {
825 return com.google.protobuf.GeneratedMessageV3
826 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
827 }
829 com.google.protobuf.CodedInputStream input)
830 throws java.io.IOException {
831 return com.google.protobuf.GeneratedMessageV3
832 .parseWithIOException(PARSER, input);
833 }
835 com.google.protobuf.CodedInputStream input,
836 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837 throws java.io.IOException {
838 return com.google.protobuf.GeneratedMessageV3
839 .parseWithIOException(PARSER, input, extensionRegistry);
840 }
841
842 @java.lang.Override
843 public Builder newBuilderForType() { return newBuilder(); }
844 public static Builder newBuilder() {
845 return DEFAULT_INSTANCE.toBuilder();
846 }
847 public static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype) {
848 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
849 }
850 @java.lang.Override
852 return this == DEFAULT_INSTANCE
853 ? new Builder() : new Builder().mergeFrom(this);
854 }
855
856 @java.lang.Override
858 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
859 Builder builder = new Builder(parent);
860 return builder;
861 }
869 public static final class Builder extends
870 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
871 // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
872 com.google.ortools.linearsolver.MPSolutionResponseOrBuilder {
873 public static final com.google.protobuf.Descriptors.Descriptor
875 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
876 }
877
878 @java.lang.Override
879 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
881 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
882 .ensureFieldAccessorsInitialized(
883 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
884 }
885
886 // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
887 private Builder() {
888 maybeForceBuilderInitialization();
889 }
890
891 private Builder(
892 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
893 super(parent);
894 maybeForceBuilderInitialization();
895 }
896 private void maybeForceBuilderInitialization() {
897 if (com.google.protobuf.GeneratedMessageV3
898 .alwaysUseFieldBuilders) {
899 getSolveInfoFieldBuilder();
900 getAdditionalSolutionsFieldBuilder();
901 }
902 }
903 @java.lang.Override
904 public Builder clear() {
905 super.clear();
906 bitField0_ = 0;
907 status_ = 99;
908 statusStr_ = "";
909 objectiveValue_ = 0D;
910 bestObjectiveBound_ = 0D;
911 variableValue_ = emptyDoubleList();
912 solveInfo_ = null;
913 if (solveInfoBuilder_ != null) {
914 solveInfoBuilder_.dispose();
915 solveInfoBuilder_ = null;
916 }
917 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
918 dualValue_ = emptyDoubleList();
919 reducedCost_ = emptyDoubleList();
920 if (additionalSolutionsBuilder_ == null) {
921 additionalSolutions_ = java.util.Collections.emptyList();
922 } else {
923 additionalSolutions_ = null;
924 additionalSolutionsBuilder_.clear();
925 }
926 bitField0_ = (bitField0_ & ~0x00000200);
927 return this;
928 }
929
930 @java.lang.Override
931 public com.google.protobuf.Descriptors.Descriptor
933 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
934 }
935
936 @java.lang.Override
938 return com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance();
939 }
940
941 @java.lang.Override
944 if (!result.isInitialized()) {
945 throw newUninitializedMessageException(result);
946 }
947 return result;
948 }
949
950 @java.lang.Override
952 com.google.ortools.linearsolver.MPSolutionResponse result = new com.google.ortools.linearsolver.MPSolutionResponse(this);
953 buildPartialRepeatedFields(result);
954 if (bitField0_ != 0) { buildPartial0(result); }
955 onBuilt();
956 return result;
957 }
958
959 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPSolutionResponse result) {
960 if (additionalSolutionsBuilder_ == null) {
961 if (((bitField0_ & 0x00000200) != 0)) {
962 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
963 bitField0_ = (bitField0_ & ~0x00000200);
964 }
965 result.additionalSolutions_ = additionalSolutions_;
966 } else {
967 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
968 }
969 }
970
971 private void buildPartial0(com.google.ortools.linearsolver.MPSolutionResponse result) {
972 int from_bitField0_ = bitField0_;
973 int to_bitField0_ = 0;
974 if (((from_bitField0_ & 0x00000001) != 0)) {
975 result.status_ = status_;
976 to_bitField0_ |= 0x00000001;
977 }
978 if (((from_bitField0_ & 0x00000002) != 0)) {
979 result.statusStr_ = statusStr_;
980 to_bitField0_ |= 0x00000002;
981 }
982 if (((from_bitField0_ & 0x00000004) != 0)) {
983 result.objectiveValue_ = objectiveValue_;
984 to_bitField0_ |= 0x00000004;
985 }
986 if (((from_bitField0_ & 0x00000008) != 0)) {
987 result.bestObjectiveBound_ = bestObjectiveBound_;
988 to_bitField0_ |= 0x00000008;
989 }
990 if (((from_bitField0_ & 0x00000010) != 0)) {
991 variableValue_.makeImmutable();
992 result.variableValue_ = variableValue_;
993 }
994 if (((from_bitField0_ & 0x00000020) != 0)) {
995 result.solveInfo_ = solveInfoBuilder_ == null
996 ? solveInfo_
997 : solveInfoBuilder_.build();
998 to_bitField0_ |= 0x00000010;
999 }
1000 if (((from_bitField0_ & 0x00000040) != 0)) {
1001 result.solverSpecificInfo_ = solverSpecificInfo_;
1002 to_bitField0_ |= 0x00000020;
1003 }
1004 if (((from_bitField0_ & 0x00000080) != 0)) {
1005 dualValue_.makeImmutable();
1006 result.dualValue_ = dualValue_;
1007 }
1008 if (((from_bitField0_ & 0x00000100) != 0)) {
1009 reducedCost_.makeImmutable();
1010 result.reducedCost_ = reducedCost_;
1011 }
1012 result.bitField0_ |= to_bitField0_;
1013 }
1014
1015 @java.lang.Override
1016 public Builder clone() {
1017 return super.clone();
1018 }
1019 @java.lang.Override
1021 com.google.protobuf.Descriptors.FieldDescriptor field,
1022 java.lang.Object value) {
1023 return super.setField(field, value);
1024 }
1025 @java.lang.Override
1027 com.google.protobuf.Descriptors.FieldDescriptor field) {
1028 return super.clearField(field);
1029 }
1030 @java.lang.Override
1032 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1033 return super.clearOneof(oneof);
1034 }
1035 @java.lang.Override
1037 com.google.protobuf.Descriptors.FieldDescriptor field,
1038 int index, java.lang.Object value) {
1039 return super.setRepeatedField(field, index, value);
1040 }
1041 @java.lang.Override
1043 com.google.protobuf.Descriptors.FieldDescriptor field,
1044 java.lang.Object value) {
1045 return super.addRepeatedField(field, value);
1046 }
1047 @java.lang.Override
1048 public Builder mergeFrom(com.google.protobuf.Message other) {
1049 if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
1050 return mergeFrom((com.google.ortools.linearsolver.MPSolutionResponse)other);
1051 } else {
1052 super.mergeFrom(other);
1053 return this;
1054 }
1055 }
1056
1057 public Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other) {
1058 if (other == com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance()) return this;
1059 if (other.hasStatus()) {
1060 setStatus(other.getStatus());
1061 }
1062 if (other.hasStatusStr()) {
1063 statusStr_ = other.statusStr_;
1064 bitField0_ |= 0x00000002;
1065 onChanged();
1066 }
1067 if (other.hasObjectiveValue()) {
1068 setObjectiveValue(other.getObjectiveValue());
1069 }
1070 if (other.hasBestObjectiveBound()) {
1071 setBestObjectiveBound(other.getBestObjectiveBound());
1072 }
1073 if (!other.variableValue_.isEmpty()) {
1074 if (variableValue_.isEmpty()) {
1075 variableValue_ = other.variableValue_;
1076 variableValue_.makeImmutable();
1077 bitField0_ |= 0x00000010;
1078 } else {
1079 ensureVariableValueIsMutable();
1080 variableValue_.addAll(other.variableValue_);
1081 }
1082 onChanged();
1083 }
1084 if (other.hasSolveInfo()) {
1085 mergeSolveInfo(other.getSolveInfo());
1086 }
1087 if (other.hasSolverSpecificInfo()) {
1088 setSolverSpecificInfo(other.getSolverSpecificInfo());
1089 }
1090 if (!other.dualValue_.isEmpty()) {
1091 if (dualValue_.isEmpty()) {
1092 dualValue_ = other.dualValue_;
1093 dualValue_.makeImmutable();
1094 bitField0_ |= 0x00000080;
1095 } else {
1096 ensureDualValueIsMutable();
1097 dualValue_.addAll(other.dualValue_);
1098 }
1099 onChanged();
1100 }
1101 if (!other.reducedCost_.isEmpty()) {
1102 if (reducedCost_.isEmpty()) {
1103 reducedCost_ = other.reducedCost_;
1104 reducedCost_.makeImmutable();
1105 bitField0_ |= 0x00000100;
1106 } else {
1107 ensureReducedCostIsMutable();
1108 reducedCost_.addAll(other.reducedCost_);
1109 }
1110 onChanged();
1111 }
1112 if (additionalSolutionsBuilder_ == null) {
1113 if (!other.additionalSolutions_.isEmpty()) {
1114 if (additionalSolutions_.isEmpty()) {
1115 additionalSolutions_ = other.additionalSolutions_;
1116 bitField0_ = (bitField0_ & ~0x00000200);
1117 } else {
1118 ensureAdditionalSolutionsIsMutable();
1119 additionalSolutions_.addAll(other.additionalSolutions_);
1120 }
1121 onChanged();
1122 }
1123 } else {
1124 if (!other.additionalSolutions_.isEmpty()) {
1125 if (additionalSolutionsBuilder_.isEmpty()) {
1126 additionalSolutionsBuilder_.dispose();
1127 additionalSolutionsBuilder_ = null;
1128 additionalSolutions_ = other.additionalSolutions_;
1129 bitField0_ = (bitField0_ & ~0x00000200);
1130 additionalSolutionsBuilder_ =
1131 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1132 getAdditionalSolutionsFieldBuilder() : null;
1133 } else {
1134 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1135 }
1136 }
1137 }
1138 this.mergeUnknownFields(other.getUnknownFields());
1139 onChanged();
1140 return this;
1141 }
1142
1143 @java.lang.Override
1144 public final boolean isInitialized() {
1145 return true;
1146 }
1147
1148 @java.lang.Override
1150 com.google.protobuf.CodedInputStream input,
1151 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1152 throws java.io.IOException {
1153 if (extensionRegistry == null) {
1154 throw new java.lang.NullPointerException();
1155 }
1156 try {
1157 boolean done = false;
1158 while (!done) {
1159 int tag = input.readTag();
1160 switch (tag) {
1161 case 0:
1162 done = true;
1163 break;
1164 case 8: {
1165 int tmpRaw = input.readEnum();
1167 com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(tmpRaw);
1168 if (tmpValue == null) {
1169 mergeUnknownVarintField(1, tmpRaw);
1170 } else {
1171 status_ = tmpRaw;
1172 bitField0_ |= 0x00000001;
1173 }
1174 break;
1175 } // case 8
1176 case 17: {
1177 objectiveValue_ = input.readDouble();
1178 bitField0_ |= 0x00000004;
1179 break;
1180 } // case 17
1181 case 25: {
1182 double v = input.readDouble();
1183 ensureVariableValueIsMutable();
1184 variableValue_.addDouble(v);
1185 break;
1186 } // case 25
1187 case 26: {
1188 int length = input.readRawVarint32();
1189 int limit = input.pushLimit(length);
1190 int alloc = length > 4096 ? 4096 : length;
1191 ensureVariableValueIsMutable(alloc / 8);
1192 while (input.getBytesUntilLimit() > 0) {
1193 variableValue_.addDouble(input.readDouble());
1194 }
1195 input.popLimit(limit);
1196 break;
1197 } // case 26
1198 case 33: {
1199 double v = input.readDouble();
1200 ensureDualValueIsMutable();
1201 dualValue_.addDouble(v);
1202 break;
1203 } // case 33
1204 case 34: {
1205 int length = input.readRawVarint32();
1206 int limit = input.pushLimit(length);
1207 int alloc = length > 4096 ? 4096 : length;
1208 ensureDualValueIsMutable(alloc / 8);
1209 while (input.getBytesUntilLimit() > 0) {
1210 dualValue_.addDouble(input.readDouble());
1211 }
1212 input.popLimit(limit);
1213 break;
1214 } // case 34
1215 case 41: {
1216 bestObjectiveBound_ = input.readDouble();
1217 bitField0_ |= 0x00000008;
1218 break;
1219 } // case 41
1220 case 49: {
1221 double v = input.readDouble();
1222 ensureReducedCostIsMutable();
1223 reducedCost_.addDouble(v);
1224 break;
1225 } // case 49
1226 case 50: {
1227 int length = input.readRawVarint32();
1228 int limit = input.pushLimit(length);
1229 int alloc = length > 4096 ? 4096 : length;
1230 ensureReducedCostIsMutable(alloc / 8);
1231 while (input.getBytesUntilLimit() > 0) {
1232 reducedCost_.addDouble(input.readDouble());
1233 }
1234 input.popLimit(limit);
1235 break;
1236 } // case 50
1237 case 58: {
1238 statusStr_ = input.readBytes();
1239 bitField0_ |= 0x00000002;
1240 break;
1241 } // case 58
1242 case 66: {
1244 input.readMessage(
1245 com.google.ortools.linearsolver.MPSolution.PARSER,
1246 extensionRegistry);
1247 if (additionalSolutionsBuilder_ == null) {
1248 ensureAdditionalSolutionsIsMutable();
1249 additionalSolutions_.add(m);
1250 } else {
1251 additionalSolutionsBuilder_.addMessage(m);
1252 }
1253 break;
1254 } // case 66
1255 case 82: {
1256 input.readMessage(
1257 getSolveInfoFieldBuilder().getBuilder(),
1258 extensionRegistry);
1259 bitField0_ |= 0x00000020;
1260 break;
1261 } // case 82
1262 case 90: {
1263 solverSpecificInfo_ = input.readBytes();
1264 bitField0_ |= 0x00000040;
1265 break;
1266 } // case 90
1267 default: {
1268 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1269 done = true; // was an endgroup tag
1270 }
1271 break;
1272 } // default:
1273 } // switch (tag)
1274 } // while (!done)
1275 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1276 throw e.unwrapIOException();
1277 } finally {
1278 onChanged();
1279 } // finally
1280 return this;
1281 }
1282 private int bitField0_;
1283
1284 private int status_ = 99;
1293 @java.lang.Override public boolean hasStatus() {
1294 return ((bitField0_ & 0x00000001) != 0);
1295 }
1304 @java.lang.Override
1306 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
1307 return result == null ? com.google.ortools.linearsolver.MPSolverResponseStatus.MPSOLVER_UNKNOWN_STATUS : result;
1308 }
1318 public Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value) {
1319 if (value == null) {
1320 throw new NullPointerException();
1321 }
1322 bitField0_ |= 0x00000001;
1323 status_ = value.getNumber();
1324 onChanged();
1325 return this;
1326 }
1336 bitField0_ = (bitField0_ & ~0x00000001);
1337 status_ = 99;
1338 onChanged();
1339 return this;
1340 }
1341
1342 private java.lang.Object statusStr_ = "";
1354 public boolean hasStatusStr() {
1355 return ((bitField0_ & 0x00000002) != 0);
1356 }
1368 public java.lang.String getStatusStr() {
1369 java.lang.Object ref = statusStr_;
1370 if (!(ref instanceof java.lang.String)) {
1371 com.google.protobuf.ByteString bs =
1372 (com.google.protobuf.ByteString) ref;
1373 java.lang.String s = bs.toStringUtf8();
1374 if (bs.isValidUtf8()) {
1375 statusStr_ = s;
1376 }
1377 return s;
1378 } else {
1379 return (java.lang.String) ref;
1380 }
1381 }
1393 public com.google.protobuf.ByteString
1395 java.lang.Object ref = statusStr_;
1396 if (ref instanceof String) {
1397 com.google.protobuf.ByteString b =
1398 com.google.protobuf.ByteString.copyFromUtf8(
1399 (java.lang.String) ref);
1400 statusStr_ = b;
1401 return b;
1402 } else {
1403 return (com.google.protobuf.ByteString) ref;
1404 }
1405 }
1419 java.lang.String value) {
1420 if (value == null) { throw new NullPointerException(); }
1421 statusStr_ = value;
1422 bitField0_ |= 0x00000002;
1423 onChanged();
1424 return this;
1425 }
1438 statusStr_ = getDefaultInstance().getStatusStr();
1439 bitField0_ = (bitField0_ & ~0x00000002);
1440 onChanged();
1441 return this;
1442 }
1456 com.google.protobuf.ByteString value) {
1457 if (value == null) { throw new NullPointerException(); }
1458 statusStr_ = value;
1459 bitField0_ |= 0x00000002;
1460 onChanged();
1461 return this;
1462 }
1463
1464 private double objectiveValue_ ;
1475 @java.lang.Override
1476 public boolean hasObjectiveValue() {
1477 return ((bitField0_ & 0x00000004) != 0);
1478 }
1489 @java.lang.Override
1490 public double getObjectiveValue() {
1491 return objectiveValue_;
1492 }
1504 public Builder setObjectiveValue(double value) {
1505
1506 objectiveValue_ = value;
1507 bitField0_ |= 0x00000004;
1508 onChanged();
1509 return this;
1510 }
1522 bitField0_ = (bitField0_ & ~0x00000004);
1523 objectiveValue_ = 0D;
1524 onChanged();
1525 return this;
1526 }
1527
1528 private double bestObjectiveBound_ ;
1541 @java.lang.Override
1542 public boolean hasBestObjectiveBound() {
1543 return ((bitField0_ & 0x00000008) != 0);
1544 }
1557 @java.lang.Override
1558 public double getBestObjectiveBound() {
1559 return bestObjectiveBound_;
1560 }
1574 public Builder setBestObjectiveBound(double value) {
1575
1576 bestObjectiveBound_ = value;
1577 bitField0_ |= 0x00000008;
1578 onChanged();
1579 return this;
1580 }
1594 bitField0_ = (bitField0_ & ~0x00000008);
1595 bestObjectiveBound_ = 0D;
1596 onChanged();
1597 return this;
1598 }
1599
1600 private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1601 private void ensureVariableValueIsMutable() {
1602 if (!variableValue_.isModifiable()) {
1603 variableValue_ = makeMutableCopy(variableValue_);
1604 }
1605 bitField0_ |= 0x00000010;
1606 }
1607 private void ensureVariableValueIsMutable(int capacity) {
1608 if (!variableValue_.isModifiable()) {
1609 variableValue_ = makeMutableCopy(variableValue_, capacity);
1610 }
1611 bitField0_ |= 0x00000010;
1612 }
1623 public java.util.List<java.lang.Double>
1625 variableValue_.makeImmutable();
1626 return variableValue_;
1627 }
1639 return variableValue_.size();
1640 }
1652 public double getVariableValue(int index) {
1653 return variableValue_.getDouble(index);
1654 }
1668 int index, double value) {
1669
1670 ensureVariableValueIsMutable();
1671 variableValue_.setDouble(index, value);
1672 bitField0_ |= 0x00000010;
1673 onChanged();
1674 return this;
1675 }
1687 public Builder addVariableValue(double value) {
1688
1689 ensureVariableValueIsMutable();
1690 variableValue_.addDouble(value);
1691 bitField0_ |= 0x00000010;
1692 onChanged();
1693 return this;
1694 }
1707 java.lang.Iterable<? extends java.lang.Double> values) {
1708 ensureVariableValueIsMutable();
1709 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1710 values, variableValue_);
1711 bitField0_ |= 0x00000010;
1712 onChanged();
1713 return this;
1714 }
1726 variableValue_ = emptyDoubleList();
1727 bitField0_ = (bitField0_ & ~0x00000010);
1728 onChanged();
1729 return this;
1730 }
1731
1733 private com.google.protobuf.SingleFieldBuilderV3<
1734 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder> solveInfoBuilder_;
1745 public boolean hasSolveInfo() {
1746 return ((bitField0_ & 0x00000020) != 0);
1747 }
1759 if (solveInfoBuilder_ == null) {
1760 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1761 } else {
1762 return solveInfoBuilder_.getMessage();
1763 }
1764 }
1774 public Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1775 if (solveInfoBuilder_ == null) {
1776 if (value == null) {
1777 throw new NullPointerException();
1778 }
1779 solveInfo_ = value;
1780 } else {
1781 solveInfoBuilder_.setMessage(value);
1782 }
1783 bitField0_ |= 0x00000020;
1784 onChanged();
1785 return this;
1786 }
1797 com.google.ortools.linearsolver.MPSolveInfo.Builder builderForValue) {
1798 if (solveInfoBuilder_ == null) {
1799 solveInfo_ = builderForValue.build();
1800 } else {
1801 solveInfoBuilder_.setMessage(builderForValue.build());
1802 }
1803 bitField0_ |= 0x00000020;
1804 onChanged();
1805 return this;
1806 }
1816 public Builder mergeSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value) {
1817 if (solveInfoBuilder_ == null) {
1818 if (((bitField0_ & 0x00000020) != 0) &&
1819 solveInfo_ != null &&
1820 solveInfo_ != com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance()) {
1821 getSolveInfoBuilder().mergeFrom(value);
1822 } else {
1823 solveInfo_ = value;
1824 }
1825 } else {
1826 solveInfoBuilder_.mergeFrom(value);
1827 }
1828 if (solveInfo_ != null) {
1829 bitField0_ |= 0x00000020;
1830 onChanged();
1831 }
1832 return this;
1833 }
1844 bitField0_ = (bitField0_ & ~0x00000020);
1845 solveInfo_ = null;
1846 if (solveInfoBuilder_ != null) {
1847 solveInfoBuilder_.dispose();
1848 solveInfoBuilder_ = null;
1849 }
1850 onChanged();
1851 return this;
1852 }
1863 bitField0_ |= 0x00000020;
1864 onChanged();
1865 return getSolveInfoFieldBuilder().getBuilder();
1866 }
1877 if (solveInfoBuilder_ != null) {
1878 return solveInfoBuilder_.getMessageOrBuilder();
1879 } else {
1880 return solveInfo_ == null ?
1881 com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1882 }
1883 }
1893 private com.google.protobuf.SingleFieldBuilderV3<
1894 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>
1895 getSolveInfoFieldBuilder() {
1896 if (solveInfoBuilder_ == null) {
1897 solveInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
1898 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>(
1899 getSolveInfo(),
1900 getParentForChildren(),
1901 isClean());
1902 solveInfo_ = null;
1903 }
1904 return solveInfoBuilder_;
1905 }
1906
1907 private com.google.protobuf.ByteString solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
1917 @java.lang.Override
1918 public boolean hasSolverSpecificInfo() {
1919 return ((bitField0_ & 0x00000040) != 0);
1920 }
1930 @java.lang.Override
1931 public com.google.protobuf.ByteString getSolverSpecificInfo() {
1932 return solverSpecificInfo_;
1933 }
1944 public Builder setSolverSpecificInfo(com.google.protobuf.ByteString value) {
1945 if (value == null) { throw new NullPointerException(); }
1946 solverSpecificInfo_ = value;
1947 bitField0_ |= 0x00000040;
1948 onChanged();
1949 return this;
1950 }
1961 bitField0_ = (bitField0_ & ~0x00000040);
1962 solverSpecificInfo_ = getDefaultInstance().getSolverSpecificInfo();
1963 onChanged();
1964 return this;
1965 }
1966
1967 private com.google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1968 private void ensureDualValueIsMutable() {
1969 if (!dualValue_.isModifiable()) {
1970 dualValue_ = makeMutableCopy(dualValue_);
1971 }
1972 bitField0_ |= 0x00000080;
1973 }
1974 private void ensureDualValueIsMutable(int capacity) {
1975 if (!dualValue_.isModifiable()) {
1976 dualValue_ = makeMutableCopy(dualValue_, capacity);
1977 }
1978 bitField0_ |= 0x00000080;
1979 }
1993 public java.util.List<java.lang.Double>
1995 dualValue_.makeImmutable();
1996 return dualValue_;
1997 }
2011 public int getDualValueCount() {
2012 return dualValue_.size();
2013 }
2028 public double getDualValue(int index) {
2029 return dualValue_.getDouble(index);
2030 }
2047 int index, double value) {
2048
2049 ensureDualValueIsMutable();
2050 dualValue_.setDouble(index, value);
2051 bitField0_ |= 0x00000080;
2052 onChanged();
2053 return this;
2054 }
2069 public Builder addDualValue(double value) {
2070
2071 ensureDualValueIsMutable();
2072 dualValue_.addDouble(value);
2073 bitField0_ |= 0x00000080;
2074 onChanged();
2075 return this;
2076 }
2092 java.lang.Iterable<? extends java.lang.Double> values) {
2093 ensureDualValueIsMutable();
2094 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2095 values, dualValue_);
2096 bitField0_ |= 0x00000080;
2097 onChanged();
2098 return this;
2099 }
2114 dualValue_ = emptyDoubleList();
2115 bitField0_ = (bitField0_ & ~0x00000080);
2116 onChanged();
2117 return this;
2118 }
2119
2120 private com.google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
2121 private void ensureReducedCostIsMutable() {
2122 if (!reducedCost_.isModifiable()) {
2123 reducedCost_ = makeMutableCopy(reducedCost_);
2124 }
2125 bitField0_ |= 0x00000100;
2126 }
2127 private void ensureReducedCostIsMutable(int capacity) {
2128 if (!reducedCost_.isModifiable()) {
2129 reducedCost_ = makeMutableCopy(reducedCost_, capacity);
2130 }
2131 bitField0_ |= 0x00000100;
2132 }
2146 public java.util.List<java.lang.Double>
2148 reducedCost_.makeImmutable();
2149 return reducedCost_;
2150 }
2164 public int getReducedCostCount() {
2165 return reducedCost_.size();
2166 }
2181 public double getReducedCost(int index) {
2182 return reducedCost_.getDouble(index);
2183 }
2200 int index, double value) {
2201
2202 ensureReducedCostIsMutable();
2203 reducedCost_.setDouble(index, value);
2204 bitField0_ |= 0x00000100;
2205 onChanged();
2206 return this;
2207 }
2222 public Builder addReducedCost(double value) {
2223
2224 ensureReducedCostIsMutable();
2225 reducedCost_.addDouble(value);
2226 bitField0_ |= 0x00000100;
2227 onChanged();
2228 return this;
2229 }
2245 java.lang.Iterable<? extends java.lang.Double> values) {
2246 ensureReducedCostIsMutable();
2247 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2248 values, reducedCost_);
2249 bitField0_ |= 0x00000100;
2250 onChanged();
2251 return this;
2252 }
2267 reducedCost_ = emptyDoubleList();
2268 bitField0_ = (bitField0_ & ~0x00000100);
2269 onChanged();
2270 return this;
2271 }
2272
2273 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_ =
2274 java.util.Collections.emptyList();
2275 private void ensureAdditionalSolutionsIsMutable() {
2276 if (!((bitField0_ & 0x00000200) != 0)) {
2277 additionalSolutions_ = new java.util.ArrayList<com.google.ortools.linearsolver.MPSolution>(additionalSolutions_);
2278 bitField0_ |= 0x00000200;
2279 }
2280 }
2281
2282 private com.google.protobuf.RepeatedFieldBuilderV3<
2283 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder> additionalSolutionsBuilder_;
2284
2296 public java.util.List<com.google.ortools.linearsolver.MPSolution> getAdditionalSolutionsList() {
2297 if (additionalSolutionsBuilder_ == null) {
2298 return java.util.Collections.unmodifiableList(additionalSolutions_);
2299 } else {
2300 return additionalSolutionsBuilder_.getMessageList();
2301 }
2302 }
2315 if (additionalSolutionsBuilder_ == null) {
2316 return additionalSolutions_.size();
2317 } else {
2318 return additionalSolutionsBuilder_.getCount();
2319 }
2320 }
2333 if (additionalSolutionsBuilder_ == null) {
2334 return additionalSolutions_.get(index);
2335 } else {
2336 return additionalSolutionsBuilder_.getMessage(index);
2337 }
2338 }
2351 int index, com.google.ortools.linearsolver.MPSolution value) {
2352 if (additionalSolutionsBuilder_ == null) {
2353 if (value == null) {
2354 throw new NullPointerException();
2355 }
2356 ensureAdditionalSolutionsIsMutable();
2357 additionalSolutions_.set(index, value);
2358 onChanged();
2359 } else {
2360 additionalSolutionsBuilder_.setMessage(index, value);
2361 }
2362 return this;
2363 }
2376 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2377 if (additionalSolutionsBuilder_ == null) {
2378 ensureAdditionalSolutionsIsMutable();
2379 additionalSolutions_.set(index, builderForValue.build());
2380 onChanged();
2381 } else {
2382 additionalSolutionsBuilder_.setMessage(index, builderForValue.build());
2383 }
2384 return this;
2385 }
2397 public Builder addAdditionalSolutions(com.google.ortools.linearsolver.MPSolution value) {
2398 if (additionalSolutionsBuilder_ == null) {
2399 if (value == null) {
2400 throw new NullPointerException();
2401 }
2402 ensureAdditionalSolutionsIsMutable();
2403 additionalSolutions_.add(value);
2404 onChanged();
2405 } else {
2406 additionalSolutionsBuilder_.addMessage(value);
2407 }
2408 return this;
2409 }
2422 int index, com.google.ortools.linearsolver.MPSolution value) {
2423 if (additionalSolutionsBuilder_ == null) {
2424 if (value == null) {
2425 throw new NullPointerException();
2426 }
2427 ensureAdditionalSolutionsIsMutable();
2428 additionalSolutions_.add(index, value);
2429 onChanged();
2430 } else {
2431 additionalSolutionsBuilder_.addMessage(index, value);
2432 }
2433 return this;
2434 }
2447 com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2448 if (additionalSolutionsBuilder_ == null) {
2449 ensureAdditionalSolutionsIsMutable();
2450 additionalSolutions_.add(builderForValue.build());
2451 onChanged();
2452 } else {
2453 additionalSolutionsBuilder_.addMessage(builderForValue.build());
2454 }
2455 return this;
2456 }
2469 int index, com.google.ortools.linearsolver.MPSolution.Builder builderForValue) {
2470 if (additionalSolutionsBuilder_ == null) {
2471 ensureAdditionalSolutionsIsMutable();
2472 additionalSolutions_.add(index, builderForValue.build());
2473 onChanged();
2474 } else {
2475 additionalSolutionsBuilder_.addMessage(index, builderForValue.build());
2476 }
2477 return this;
2478 }
2491 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPSolution> values) {
2492 if (additionalSolutionsBuilder_ == null) {
2493 ensureAdditionalSolutionsIsMutable();
2494 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2495 values, additionalSolutions_);
2496 onChanged();
2497 } else {
2498 additionalSolutionsBuilder_.addAllMessages(values);
2499 }
2500 return this;
2501 }
2514 if (additionalSolutionsBuilder_ == null) {
2515 additionalSolutions_ = java.util.Collections.emptyList();
2516 bitField0_ = (bitField0_ & ~0x00000200);
2517 onChanged();
2518 } else {
2519 additionalSolutionsBuilder_.clear();
2520 }
2521 return this;
2522 }
2535 if (additionalSolutionsBuilder_ == null) {
2536 ensureAdditionalSolutionsIsMutable();
2537 additionalSolutions_.remove(index);
2538 onChanged();
2539 } else {
2540 additionalSolutionsBuilder_.remove(index);
2541 }
2542 return this;
2543 }
2556 int index) {
2557 return getAdditionalSolutionsFieldBuilder().getBuilder(index);
2558 }
2571 int index) {
2572 if (additionalSolutionsBuilder_ == null) {
2573 return additionalSolutions_.get(index); } else {
2574 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2575 }
2576 }
2588 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
2590 if (additionalSolutionsBuilder_ != null) {
2591 return additionalSolutionsBuilder_.getMessageOrBuilderList();
2592 } else {
2593 return java.util.Collections.unmodifiableList(additionalSolutions_);
2594 }
2595 }
2608 return getAdditionalSolutionsFieldBuilder().addBuilder(
2609 com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2610 }
2623 int index) {
2624 return getAdditionalSolutionsFieldBuilder().addBuilder(
2625 index, com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2626 }
2638 public java.util.List<com.google.ortools.linearsolver.MPSolution.Builder>
2640 return getAdditionalSolutionsFieldBuilder().getBuilderList();
2641 }
2642 private com.google.protobuf.RepeatedFieldBuilderV3<
2643 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>
2644 getAdditionalSolutionsFieldBuilder() {
2645 if (additionalSolutionsBuilder_ == null) {
2646 additionalSolutionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2647 com.google.ortools.linearsolver.MPSolution, com.google.ortools.linearsolver.MPSolution.Builder, com.google.ortools.linearsolver.MPSolutionOrBuilder>(
2648 additionalSolutions_,
2649 ((bitField0_ & 0x00000200) != 0),
2650 getParentForChildren(),
2651 isClean());
2652 additionalSolutions_ = null;
2653 }
2654 return additionalSolutionsBuilder_;
2655 }
2656 @java.lang.Override
2658 final com.google.protobuf.UnknownFieldSet unknownFields) {
2659 return super.setUnknownFields(unknownFields);
2660 }
2661
2662 @java.lang.Override
2664 final com.google.protobuf.UnknownFieldSet unknownFields) {
2665 return super.mergeUnknownFields(unknownFields);
2666 }
2667
2668
2669 // @@protoc_insertion_point(builder_scope:operations_research.MPSolutionResponse)
2670 }
2671
2672 // @@protoc_insertion_point(class_scope:operations_research.MPSolutionResponse)
2673 private static final com.google.ortools.linearsolver.MPSolutionResponse DEFAULT_INSTANCE;
2674 static {
2675 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolutionResponse();
2676 }
2677
2679 return DEFAULT_INSTANCE;
2680 }
2681
2682 @java.lang.Deprecated public static final com.google.protobuf.Parser<MPSolutionResponse>
2683 PARSER = new com.google.protobuf.AbstractParser<MPSolutionResponse>() {
2684 @java.lang.Override
2685 public MPSolutionResponse parsePartialFrom(
2686 com.google.protobuf.CodedInputStream input,
2687 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2688 throws com.google.protobuf.InvalidProtocolBufferException {
2689 Builder builder = newBuilder();
2690 try {
2691 builder.mergeFrom(input, extensionRegistry);
2692 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2693 throw e.setUnfinishedMessage(builder.buildPartial());
2694 } catch (com.google.protobuf.UninitializedMessageException e) {
2695 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2696 } catch (java.io.IOException e) {
2697 throw new com.google.protobuf.InvalidProtocolBufferException(e)
2698 .setUnfinishedMessage(builder.buildPartial());
2699 }
2700 return builder.buildPartial();
2701 }
2702 };
2703
2704 public static com.google.protobuf.Parser<MPSolutionResponse> parser() {
2705 return PARSER;
2706 }
2707
2708 @java.lang.Override
2709 public com.google.protobuf.Parser<MPSolutionResponse> getParserForType() {
2710 return PARSER;
2711 }
2712
2713 @java.lang.Override
2717
2718}
2719
com.google.ortools.linearsolver.MPSolverResponseStatus getStatus()
Builder setSolveInfo(com.google.ortools.linearsolver.MPSolveInfo value)
Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other)
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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()
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
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)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
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()
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
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 addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
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()
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Parser< MPSolutionResponse > PARSER
static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype)
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()
java.lang.Object newInstance(UnusedPrivateParameter unused)
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()
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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()
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
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)
boolean equals(final java.lang.Object obj)