Google OR-Tools v9.14
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// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/linear_solver/linear_solver.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.linearsolver;
7
15@com.google.protobuf.Generated
16public final class MPSolutionResponse extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.MPSolutionResponse)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 MPSolutionResponse.class.getName());
29 }
30 // Use MPSolutionResponse.newBuilder() to construct.
31 private MPSolutionResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private MPSolutionResponse() {
35 status_ = 99;
36 statusStr_ = "";
37 variableValue_ = emptyDoubleList();
38 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
39 dualValue_ = emptyDoubleList();
40 reducedCost_ = emptyDoubleList();
41 additionalSolutions_ = java.util.Collections.emptyList();
42 }
43
44 public static final com.google.protobuf.Descriptors.Descriptor
46 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
47 }
48
49 @java.lang.Override
50 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
52 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
53 .ensureFieldAccessorsInitialized(
54 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
55 }
56
57 private int bitField0_;
58 public static final int STATUS_FIELD_NUMBER = 1;
59 private int status_ = 99;
68 @java.lang.Override public boolean hasStatus() {
69 return ((bitField0_ & 0x00000001) != 0);
70 }
71
80 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
82 }
83
84 public static final int STATUS_STR_FIELD_NUMBER = 7;
85 @SuppressWarnings("serial")
86 private volatile java.lang.Object statusStr_ = "";
98 @java.lang.Override
99 public boolean hasStatusStr() {
100 return ((bitField0_ & 0x00000002) != 0);
101 }
102
113 @java.lang.Override
114 public java.lang.String getStatusStr() {
115 java.lang.Object ref = statusStr_;
116 if (ref instanceof java.lang.String) {
117 return (java.lang.String) ref;
118 } else {
119 com.google.protobuf.ByteString bs =
120 (com.google.protobuf.ByteString) ref;
121 java.lang.String s = bs.toStringUtf8();
122 if (bs.isValidUtf8()) {
123 statusStr_ = s;
124 }
125 return s;
126 }
127 }
128
139 @java.lang.Override
140 public com.google.protobuf.ByteString
142 java.lang.Object ref = statusStr_;
143 if (ref instanceof java.lang.String) {
144 com.google.protobuf.ByteString b =
145 com.google.protobuf.ByteString.copyFromUtf8(
146 (java.lang.String) ref);
147 statusStr_ = b;
148 return b;
149 } else {
150 return (com.google.protobuf.ByteString) ref;
151 }
152 }
153
154 public static final int OBJECTIVE_VALUE_FIELD_NUMBER = 2;
155 private double objectiveValue_ = 0D;
166 @java.lang.Override
167 public boolean hasObjectiveValue() {
168 return ((bitField0_ & 0x00000004) != 0);
169 }
170
180 @java.lang.Override
181 public double getObjectiveValue() {
182 return objectiveValue_;
183 }
184
185 public static final int BEST_OBJECTIVE_BOUND_FIELD_NUMBER = 5;
186 private double bestObjectiveBound_ = 0D;
199 @java.lang.Override
200 public boolean hasBestObjectiveBound() {
201 return ((bitField0_ & 0x00000008) != 0);
202 }
203
215 @java.lang.Override
216 public double getBestObjectiveBound() {
217 return bestObjectiveBound_;
218 }
219
220 public static final int VARIABLE_VALUE_FIELD_NUMBER = 3;
221 @SuppressWarnings("serial")
222 private com.google.protobuf.Internal.DoubleList variableValue_ =
223 emptyDoubleList();
234 @java.lang.Override
235 public java.util.List<java.lang.Double>
237 return variableValue_;
238 }
239
250 return variableValue_.size();
251 }
252
263 public double getVariableValue(int index) {
264 return variableValue_.getDouble(index);
265 }
266 private int variableValueMemoizedSerializedSize = -1;
267
268 public static final int SOLVE_INFO_FIELD_NUMBER = 10;
280 @java.lang.Override
281 public boolean hasSolveInfo() {
282 return ((bitField0_ & 0x00000010) != 0);
283 }
284
294 @java.lang.Override
296 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
297 }
298
307 @java.lang.Override
309 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
310 }
311
312 public static final int SOLVER_SPECIFIC_INFO_FIELD_NUMBER = 11;
313 private com.google.protobuf.ByteString solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
323 @java.lang.Override
324 public boolean hasSolverSpecificInfo() {
325 return ((bitField0_ & 0x00000020) != 0);
326 }
327
336 @java.lang.Override
337 public com.google.protobuf.ByteString getSolverSpecificInfo() {
338 return solverSpecificInfo_;
339 }
340
341 public static final int DUAL_VALUE_FIELD_NUMBER = 4;
342 @SuppressWarnings("serial")
343 private com.google.protobuf.Internal.DoubleList dualValue_ =
344 emptyDoubleList();
358 @java.lang.Override
359 public java.util.List<java.lang.Double>
361 return dualValue_;
362 }
363
376 public int getDualValueCount() {
377 return dualValue_.size();
378 }
379
393 public double getDualValue(int index) {
394 return dualValue_.getDouble(index);
395 }
396 private int dualValueMemoizedSerializedSize = -1;
397
398 public static final int REDUCED_COST_FIELD_NUMBER = 6;
399 @SuppressWarnings("serial")
400 private com.google.protobuf.Internal.DoubleList reducedCost_ =
401 emptyDoubleList();
415 @java.lang.Override
416 public java.util.List<java.lang.Double>
418 return reducedCost_;
419 }
420
433 public int getReducedCostCount() {
434 return reducedCost_.size();
435 }
436
450 public double getReducedCost(int index) {
451 return reducedCost_.getDouble(index);
452 }
453 private int reducedCostMemoizedSerializedSize = -1;
454
455 public static final int ADDITIONAL_SOLUTIONS_FIELD_NUMBER = 8;
456 @SuppressWarnings("serial")
457 private java.util.List<com.google.ortools.linearsolver.MPSolution> additionalSolutions_;
469 @java.lang.Override
471 return additionalSolutions_;
472 }
473
484 @java.lang.Override
485 public java.util.List<? extends com.google.ortools.linearsolver.MPSolutionOrBuilder>
487 return additionalSolutions_;
488 }
489
500 @java.lang.Override
502 return additionalSolutions_.size();
503 }
504
515 @java.lang.Override
517 return additionalSolutions_.get(index);
518 }
519
530 @java.lang.Override
532 int index) {
533 return additionalSolutions_.get(index);
534 }
535
536 private byte memoizedIsInitialized = -1;
537 @java.lang.Override
538 public final boolean isInitialized() {
539 byte isInitialized = memoizedIsInitialized;
540 if (isInitialized == 1) return true;
541 if (isInitialized == 0) return false;
542
543 memoizedIsInitialized = 1;
544 return true;
545 }
546
547 @java.lang.Override
548 public void writeTo(com.google.protobuf.CodedOutputStream output)
549 throws java.io.IOException {
551 if (((bitField0_ & 0x00000001) != 0)) {
552 output.writeEnum(1, status_);
553 }
554 if (((bitField0_ & 0x00000004) != 0)) {
555 output.writeDouble(2, objectiveValue_);
556 }
557 if (getVariableValueList().size() > 0) {
558 output.writeUInt32NoTag(26);
559 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
560 }
561 for (int i = 0; i < variableValue_.size(); i++) {
562 output.writeDoubleNoTag(variableValue_.getDouble(i));
563 }
564 if (getDualValueList().size() > 0) {
565 output.writeUInt32NoTag(34);
566 output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
567 }
568 for (int i = 0; i < dualValue_.size(); i++) {
569 output.writeDoubleNoTag(dualValue_.getDouble(i));
570 }
571 if (((bitField0_ & 0x00000008) != 0)) {
572 output.writeDouble(5, bestObjectiveBound_);
573 }
574 if (getReducedCostList().size() > 0) {
575 output.writeUInt32NoTag(50);
576 output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
577 }
578 for (int i = 0; i < reducedCost_.size(); i++) {
579 output.writeDoubleNoTag(reducedCost_.getDouble(i));
580 }
581 if (((bitField0_ & 0x00000002) != 0)) {
582 com.google.protobuf.GeneratedMessage.writeString(output, 7, statusStr_);
583 }
584 for (int i = 0; i < additionalSolutions_.size(); i++) {
585 output.writeMessage(8, additionalSolutions_.get(i));
586 }
587 if (((bitField0_ & 0x00000010) != 0)) {
588 output.writeMessage(10, getSolveInfo());
589 }
590 if (((bitField0_ & 0x00000020) != 0)) {
591 output.writeBytes(11, solverSpecificInfo_);
592 }
593 getUnknownFields().writeTo(output);
594 }
595
596 @java.lang.Override
597 public int getSerializedSize() {
598 int size = memoizedSize;
599 if (size != -1) return size;
600
601 size = 0;
602 if (((bitField0_ & 0x00000001) != 0)) {
603 size += com.google.protobuf.CodedOutputStream
604 .computeEnumSize(1, status_);
605 }
606 if (((bitField0_ & 0x00000004) != 0)) {
607 size += com.google.protobuf.CodedOutputStream
608 .computeDoubleSize(2, objectiveValue_);
609 }
610 {
611 int dataSize = 0;
612 dataSize = 8 * getVariableValueList().size();
613 size += dataSize;
614 if (!getVariableValueList().isEmpty()) {
615 size += 1;
616 size += com.google.protobuf.CodedOutputStream
617 .computeInt32SizeNoTag(dataSize);
618 }
619 variableValueMemoizedSerializedSize = dataSize;
620 }
621 {
622 int dataSize = 0;
623 dataSize = 8 * getDualValueList().size();
624 size += dataSize;
625 if (!getDualValueList().isEmpty()) {
626 size += 1;
627 size += com.google.protobuf.CodedOutputStream
628 .computeInt32SizeNoTag(dataSize);
629 }
630 dualValueMemoizedSerializedSize = dataSize;
631 }
632 if (((bitField0_ & 0x00000008) != 0)) {
633 size += com.google.protobuf.CodedOutputStream
634 .computeDoubleSize(5, bestObjectiveBound_);
635 }
636 {
637 int dataSize = 0;
638 dataSize = 8 * getReducedCostList().size();
639 size += dataSize;
640 if (!getReducedCostList().isEmpty()) {
641 size += 1;
642 size += com.google.protobuf.CodedOutputStream
643 .computeInt32SizeNoTag(dataSize);
644 }
645 reducedCostMemoizedSerializedSize = dataSize;
646 }
647 if (((bitField0_ & 0x00000002) != 0)) {
648 size += com.google.protobuf.GeneratedMessage.computeStringSize(7, statusStr_);
649 }
650 for (int i = 0; i < additionalSolutions_.size(); i++) {
651 size += com.google.protobuf.CodedOutputStream
652 .computeMessageSize(8, additionalSolutions_.get(i));
653 }
654 if (((bitField0_ & 0x00000010) != 0)) {
655 size += com.google.protobuf.CodedOutputStream
656 .computeMessageSize(10, getSolveInfo());
657 }
658 if (((bitField0_ & 0x00000020) != 0)) {
659 size += com.google.protobuf.CodedOutputStream
660 .computeBytesSize(11, solverSpecificInfo_);
661 }
662 size += getUnknownFields().getSerializedSize();
663 memoizedSize = size;
664 return size;
665 }
666
667 @java.lang.Override
668 public boolean equals(final java.lang.Object obj) {
669 if (obj == this) {
670 return true;
671 }
672 if (!(obj instanceof com.google.ortools.linearsolver.MPSolutionResponse)) {
673 return super.equals(obj);
674 }
675 com.google.ortools.linearsolver.MPSolutionResponse other = (com.google.ortools.linearsolver.MPSolutionResponse) obj;
676
677 if (hasStatus() != other.hasStatus()) return false;
678 if (hasStatus()) {
679 if (status_ != other.status_) return false;
680 }
681 if (hasStatusStr() != other.hasStatusStr()) return false;
682 if (hasStatusStr()) {
683 if (!getStatusStr()
684 .equals(other.getStatusStr())) return false;
685 }
686 if (hasObjectiveValue() != other.hasObjectiveValue()) return false;
687 if (hasObjectiveValue()) {
688 if (java.lang.Double.doubleToLongBits(getObjectiveValue())
689 != java.lang.Double.doubleToLongBits(
690 other.getObjectiveValue())) return false;
691 }
692 if (hasBestObjectiveBound() != other.hasBestObjectiveBound()) return false;
693 if (hasBestObjectiveBound()) {
694 if (java.lang.Double.doubleToLongBits(getBestObjectiveBound())
695 != java.lang.Double.doubleToLongBits(
696 other.getBestObjectiveBound())) return false;
697 }
699 .equals(other.getVariableValueList())) return false;
700 if (hasSolveInfo() != other.hasSolveInfo()) return false;
701 if (hasSolveInfo()) {
702 if (!getSolveInfo()
703 .equals(other.getSolveInfo())) return false;
704 }
705 if (hasSolverSpecificInfo() != other.hasSolverSpecificInfo()) return false;
706 if (hasSolverSpecificInfo()) {
708 .equals(other.getSolverSpecificInfo())) return false;
709 }
710 if (!getDualValueList()
711 .equals(other.getDualValueList())) return false;
712 if (!getReducedCostList()
713 .equals(other.getReducedCostList())) return false;
715 .equals(other.getAdditionalSolutionsList())) return false;
716 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
717 return true;
718 }
719
720 @java.lang.Override
721 public int hashCode() {
722 if (memoizedHashCode != 0) {
723 return memoizedHashCode;
724 }
725 int hash = 41;
726 hash = (19 * hash) + getDescriptor().hashCode();
727 if (hasStatus()) {
728 hash = (37 * hash) + STATUS_FIELD_NUMBER;
729 hash = (53 * hash) + status_;
730 }
731 if (hasStatusStr()) {
732 hash = (37 * hash) + STATUS_STR_FIELD_NUMBER;
733 hash = (53 * hash) + getStatusStr().hashCode();
734 }
735 if (hasObjectiveValue()) {
736 hash = (37 * hash) + OBJECTIVE_VALUE_FIELD_NUMBER;
737 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
738 java.lang.Double.doubleToLongBits(getObjectiveValue()));
739 }
740 if (hasBestObjectiveBound()) {
741 hash = (37 * hash) + BEST_OBJECTIVE_BOUND_FIELD_NUMBER;
742 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
743 java.lang.Double.doubleToLongBits(getBestObjectiveBound()));
744 }
745 if (getVariableValueCount() > 0) {
746 hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER;
747 hash = (53 * hash) + getVariableValueList().hashCode();
748 }
749 if (hasSolveInfo()) {
750 hash = (37 * hash) + SOLVE_INFO_FIELD_NUMBER;
751 hash = (53 * hash) + getSolveInfo().hashCode();
752 }
753 if (hasSolverSpecificInfo()) {
754 hash = (37 * hash) + SOLVER_SPECIFIC_INFO_FIELD_NUMBER;
755 hash = (53 * hash) + getSolverSpecificInfo().hashCode();
756 }
757 if (getDualValueCount() > 0) {
758 hash = (37 * hash) + DUAL_VALUE_FIELD_NUMBER;
759 hash = (53 * hash) + getDualValueList().hashCode();
760 }
761 if (getReducedCostCount() > 0) {
762 hash = (37 * hash) + REDUCED_COST_FIELD_NUMBER;
763 hash = (53 * hash) + getReducedCostList().hashCode();
764 }
765 if (getAdditionalSolutionsCount() > 0) {
766 hash = (37 * hash) + ADDITIONAL_SOLUTIONS_FIELD_NUMBER;
767 hash = (53 * hash) + getAdditionalSolutionsList().hashCode();
768 }
769 hash = (29 * hash) + getUnknownFields().hashCode();
770 memoizedHashCode = hash;
771 return hash;
772 }
773
775 java.nio.ByteBuffer data)
776 throws com.google.protobuf.InvalidProtocolBufferException {
777 return PARSER.parseFrom(data);
778 }
780 java.nio.ByteBuffer data,
781 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
782 throws com.google.protobuf.InvalidProtocolBufferException {
783 return PARSER.parseFrom(data, extensionRegistry);
784 }
786 com.google.protobuf.ByteString data)
787 throws com.google.protobuf.InvalidProtocolBufferException {
788 return PARSER.parseFrom(data);
789 }
791 com.google.protobuf.ByteString data,
792 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
793 throws com.google.protobuf.InvalidProtocolBufferException {
794 return PARSER.parseFrom(data, extensionRegistry);
795 }
797 throws com.google.protobuf.InvalidProtocolBufferException {
798 return PARSER.parseFrom(data);
799 }
801 byte[] data,
802 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
803 throws com.google.protobuf.InvalidProtocolBufferException {
804 return PARSER.parseFrom(data, extensionRegistry);
805 }
806 public static com.google.ortools.linearsolver.MPSolutionResponse parseFrom(java.io.InputStream input)
807 throws java.io.IOException {
808 return com.google.protobuf.GeneratedMessage
809 .parseWithIOException(PARSER, input);
810 }
812 java.io.InputStream input,
813 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
814 throws java.io.IOException {
815 return com.google.protobuf.GeneratedMessage
816 .parseWithIOException(PARSER, input, extensionRegistry);
817 }
818
820 throws java.io.IOException {
821 return com.google.protobuf.GeneratedMessage
822 .parseDelimitedWithIOException(PARSER, input);
823 }
824
826 java.io.InputStream input,
827 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
828 throws java.io.IOException {
829 return com.google.protobuf.GeneratedMessage
830 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
831 }
833 com.google.protobuf.CodedInputStream input)
834 throws java.io.IOException {
835 return com.google.protobuf.GeneratedMessage
836 .parseWithIOException(PARSER, input);
837 }
839 com.google.protobuf.CodedInputStream input,
840 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
841 throws java.io.IOException {
842 return com.google.protobuf.GeneratedMessage
843 .parseWithIOException(PARSER, input, extensionRegistry);
844 }
845
846 @java.lang.Override
847 public Builder newBuilderForType() { return newBuilder(); }
848 public static Builder newBuilder() {
849 return DEFAULT_INSTANCE.toBuilder();
850 }
851 public static Builder newBuilder(com.google.ortools.linearsolver.MPSolutionResponse prototype) {
852 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
853 }
854 @java.lang.Override
856 return this == DEFAULT_INSTANCE
857 ? new Builder() : new Builder().mergeFrom(this);
858 }
859
860 @java.lang.Override
862 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
863 Builder builder = new Builder(parent);
864 return builder;
865 }
866
873 public static final class Builder extends
874 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
875 // @@protoc_insertion_point(builder_implements:operations_research.MPSolutionResponse)
877 public static final com.google.protobuf.Descriptors.Descriptor
879 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
880 }
881
882 @java.lang.Override
883 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
885 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_fieldAccessorTable
886 .ensureFieldAccessorsInitialized(
887 com.google.ortools.linearsolver.MPSolutionResponse.class, com.google.ortools.linearsolver.MPSolutionResponse.Builder.class);
888 }
889
890 // Construct using com.google.ortools.linearsolver.MPSolutionResponse.newBuilder()
891 private Builder() {
892 maybeForceBuilderInitialization();
893 }
894
895 private Builder(
896 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
897 super(parent);
898 maybeForceBuilderInitialization();
899 }
900 private void maybeForceBuilderInitialization() {
901 if (com.google.protobuf.GeneratedMessage
902 .alwaysUseFieldBuilders) {
903 internalGetSolveInfoFieldBuilder();
904 internalGetAdditionalSolutionsFieldBuilder();
905 }
906 }
907 @java.lang.Override
908 public Builder clear() {
909 super.clear();
910 bitField0_ = 0;
911 status_ = 99;
912 statusStr_ = "";
913 objectiveValue_ = 0D;
914 bestObjectiveBound_ = 0D;
915 variableValue_ = emptyDoubleList();
916 solveInfo_ = null;
917 if (solveInfoBuilder_ != null) {
918 solveInfoBuilder_.dispose();
919 solveInfoBuilder_ = null;
920 }
921 solverSpecificInfo_ = com.google.protobuf.ByteString.EMPTY;
922 dualValue_ = emptyDoubleList();
923 reducedCost_ = emptyDoubleList();
924 if (additionalSolutionsBuilder_ == null) {
925 additionalSolutions_ = java.util.Collections.emptyList();
926 } else {
927 additionalSolutions_ = null;
928 additionalSolutionsBuilder_.clear();
929 }
930 bitField0_ = (bitField0_ & ~0x00000200);
931 return this;
932 }
933
934 @java.lang.Override
935 public com.google.protobuf.Descriptors.Descriptor
937 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolutionResponse_descriptor;
938 }
939
940 @java.lang.Override
942 return com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance();
943 }
944
945 @java.lang.Override
948 if (!result.isInitialized()) {
949 throw newUninitializedMessageException(result);
950 }
951 return result;
952 }
953
954 @java.lang.Override
956 com.google.ortools.linearsolver.MPSolutionResponse result = new com.google.ortools.linearsolver.MPSolutionResponse(this);
957 buildPartialRepeatedFields(result);
958 if (bitField0_ != 0) { buildPartial0(result); }
959 onBuilt();
960 return result;
961 }
962
963 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPSolutionResponse result) {
964 if (additionalSolutionsBuilder_ == null) {
965 if (((bitField0_ & 0x00000200) != 0)) {
966 additionalSolutions_ = java.util.Collections.unmodifiableList(additionalSolutions_);
967 bitField0_ = (bitField0_ & ~0x00000200);
968 }
969 result.additionalSolutions_ = additionalSolutions_;
970 } else {
971 result.additionalSolutions_ = additionalSolutionsBuilder_.build();
972 }
973 }
974
975 private void buildPartial0(com.google.ortools.linearsolver.MPSolutionResponse result) {
976 int from_bitField0_ = bitField0_;
977 int to_bitField0_ = 0;
978 if (((from_bitField0_ & 0x00000001) != 0)) {
979 result.status_ = status_;
980 to_bitField0_ |= 0x00000001;
981 }
982 if (((from_bitField0_ & 0x00000002) != 0)) {
983 result.statusStr_ = statusStr_;
984 to_bitField0_ |= 0x00000002;
985 }
986 if (((from_bitField0_ & 0x00000004) != 0)) {
987 result.objectiveValue_ = objectiveValue_;
988 to_bitField0_ |= 0x00000004;
989 }
990 if (((from_bitField0_ & 0x00000008) != 0)) {
991 result.bestObjectiveBound_ = bestObjectiveBound_;
992 to_bitField0_ |= 0x00000008;
993 }
994 if (((from_bitField0_ & 0x00000010) != 0)) {
995 variableValue_.makeImmutable();
996 result.variableValue_ = variableValue_;
997 }
998 if (((from_bitField0_ & 0x00000020) != 0)) {
999 result.solveInfo_ = solveInfoBuilder_ == null
1000 ? solveInfo_
1001 : solveInfoBuilder_.build();
1002 to_bitField0_ |= 0x00000010;
1003 }
1004 if (((from_bitField0_ & 0x00000040) != 0)) {
1005 result.solverSpecificInfo_ = solverSpecificInfo_;
1006 to_bitField0_ |= 0x00000020;
1007 }
1008 if (((from_bitField0_ & 0x00000080) != 0)) {
1009 dualValue_.makeImmutable();
1010 result.dualValue_ = dualValue_;
1011 }
1012 if (((from_bitField0_ & 0x00000100) != 0)) {
1013 reducedCost_.makeImmutable();
1014 result.reducedCost_ = reducedCost_;
1015 }
1016 result.bitField0_ |= to_bitField0_;
1017 }
1018
1019 @java.lang.Override
1020 public Builder mergeFrom(com.google.protobuf.Message other) {
1021 if (other instanceof com.google.ortools.linearsolver.MPSolutionResponse) {
1022 return mergeFrom((com.google.ortools.linearsolver.MPSolutionResponse)other);
1023 } else {
1024 super.mergeFrom(other);
1025 return this;
1026 }
1027 }
1028
1029 public Builder mergeFrom(com.google.ortools.linearsolver.MPSolutionResponse other) {
1030 if (other == com.google.ortools.linearsolver.MPSolutionResponse.getDefaultInstance()) return this;
1031 if (other.hasStatus()) {
1032 setStatus(other.getStatus());
1033 }
1034 if (other.hasStatusStr()) {
1035 statusStr_ = other.statusStr_;
1036 bitField0_ |= 0x00000002;
1037 onChanged();
1038 }
1039 if (other.hasObjectiveValue()) {
1040 setObjectiveValue(other.getObjectiveValue());
1041 }
1042 if (other.hasBestObjectiveBound()) {
1043 setBestObjectiveBound(other.getBestObjectiveBound());
1044 }
1045 if (!other.variableValue_.isEmpty()) {
1046 if (variableValue_.isEmpty()) {
1047 variableValue_ = other.variableValue_;
1048 variableValue_.makeImmutable();
1049 bitField0_ |= 0x00000010;
1050 } else {
1051 ensureVariableValueIsMutable();
1052 variableValue_.addAll(other.variableValue_);
1053 }
1054 onChanged();
1055 }
1056 if (other.hasSolveInfo()) {
1057 mergeSolveInfo(other.getSolveInfo());
1058 }
1059 if (other.hasSolverSpecificInfo()) {
1060 setSolverSpecificInfo(other.getSolverSpecificInfo());
1061 }
1062 if (!other.dualValue_.isEmpty()) {
1063 if (dualValue_.isEmpty()) {
1064 dualValue_ = other.dualValue_;
1065 dualValue_.makeImmutable();
1066 bitField0_ |= 0x00000080;
1067 } else {
1068 ensureDualValueIsMutable();
1069 dualValue_.addAll(other.dualValue_);
1070 }
1071 onChanged();
1072 }
1073 if (!other.reducedCost_.isEmpty()) {
1074 if (reducedCost_.isEmpty()) {
1075 reducedCost_ = other.reducedCost_;
1076 reducedCost_.makeImmutable();
1077 bitField0_ |= 0x00000100;
1078 } else {
1079 ensureReducedCostIsMutable();
1080 reducedCost_.addAll(other.reducedCost_);
1081 }
1082 onChanged();
1083 }
1084 if (additionalSolutionsBuilder_ == null) {
1085 if (!other.additionalSolutions_.isEmpty()) {
1086 if (additionalSolutions_.isEmpty()) {
1087 additionalSolutions_ = other.additionalSolutions_;
1088 bitField0_ = (bitField0_ & ~0x00000200);
1089 } else {
1090 ensureAdditionalSolutionsIsMutable();
1091 additionalSolutions_.addAll(other.additionalSolutions_);
1092 }
1093 onChanged();
1094 }
1095 } else {
1096 if (!other.additionalSolutions_.isEmpty()) {
1097 if (additionalSolutionsBuilder_.isEmpty()) {
1098 additionalSolutionsBuilder_.dispose();
1099 additionalSolutionsBuilder_ = null;
1100 additionalSolutions_ = other.additionalSolutions_;
1101 bitField0_ = (bitField0_ & ~0x00000200);
1102 additionalSolutionsBuilder_ =
1103 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1104 internalGetAdditionalSolutionsFieldBuilder() : null;
1105 } else {
1106 additionalSolutionsBuilder_.addAllMessages(other.additionalSolutions_);
1107 }
1108 }
1109 }
1110 this.mergeUnknownFields(other.getUnknownFields());
1111 onChanged();
1112 return this;
1113 }
1114
1115 @java.lang.Override
1116 public final boolean isInitialized() {
1117 return true;
1118 }
1119
1120 @java.lang.Override
1121 public Builder mergeFrom(
1122 com.google.protobuf.CodedInputStream input,
1123 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1124 throws java.io.IOException {
1125 if (extensionRegistry == null) {
1126 throw new java.lang.NullPointerException();
1127 }
1128 try {
1129 boolean done = false;
1130 while (!done) {
1131 int tag = input.readTag();
1132 switch (tag) {
1133 case 0:
1134 done = true;
1135 break;
1136 case 8: {
1137 int tmpRaw = input.readEnum();
1139 com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(tmpRaw);
1140 if (tmpValue == null) {
1141 mergeUnknownVarintField(1, tmpRaw);
1142 } else {
1143 status_ = tmpRaw;
1144 bitField0_ |= 0x00000001;
1145 }
1146 break;
1147 } // case 8
1148 case 17: {
1149 objectiveValue_ = input.readDouble();
1150 bitField0_ |= 0x00000004;
1151 break;
1152 } // case 17
1153 case 25: {
1154 double v = input.readDouble();
1155 ensureVariableValueIsMutable();
1156 variableValue_.addDouble(v);
1157 break;
1158 } // case 25
1159 case 26: {
1160 int length = input.readRawVarint32();
1161 int limit = input.pushLimit(length);
1162 int alloc = length > 4096 ? 4096 : length;
1163 ensureVariableValueIsMutable(alloc / 8);
1164 while (input.getBytesUntilLimit() > 0) {
1165 variableValue_.addDouble(input.readDouble());
1166 }
1167 input.popLimit(limit);
1168 break;
1169 } // case 26
1170 case 33: {
1171 double v = input.readDouble();
1172 ensureDualValueIsMutable();
1173 dualValue_.addDouble(v);
1174 break;
1175 } // case 33
1176 case 34: {
1177 int length = input.readRawVarint32();
1178 int limit = input.pushLimit(length);
1179 int alloc = length > 4096 ? 4096 : length;
1180 ensureDualValueIsMutable(alloc / 8);
1181 while (input.getBytesUntilLimit() > 0) {
1182 dualValue_.addDouble(input.readDouble());
1183 }
1184 input.popLimit(limit);
1185 break;
1186 } // case 34
1187 case 41: {
1188 bestObjectiveBound_ = input.readDouble();
1189 bitField0_ |= 0x00000008;
1190 break;
1191 } // case 41
1192 case 49: {
1193 double v = input.readDouble();
1194 ensureReducedCostIsMutable();
1195 reducedCost_.addDouble(v);
1196 break;
1197 } // case 49
1198 case 50: {
1199 int length = input.readRawVarint32();
1200 int limit = input.pushLimit(length);
1201 int alloc = length > 4096 ? 4096 : length;
1202 ensureReducedCostIsMutable(alloc / 8);
1203 while (input.getBytesUntilLimit() > 0) {
1204 reducedCost_.addDouble(input.readDouble());
1205 }
1206 input.popLimit(limit);
1207 break;
1208 } // case 50
1209 case 58: {
1210 statusStr_ = input.readBytes();
1211 bitField0_ |= 0x00000002;
1212 break;
1213 } // case 58
1214 case 66: {
1216 input.readMessage(
1217 com.google.ortools.linearsolver.MPSolution.parser(),
1218 extensionRegistry);
1219 if (additionalSolutionsBuilder_ == null) {
1220 ensureAdditionalSolutionsIsMutable();
1221 additionalSolutions_.add(m);
1222 } else {
1223 additionalSolutionsBuilder_.addMessage(m);
1224 }
1225 break;
1226 } // case 66
1227 case 82: {
1228 input.readMessage(
1229 internalGetSolveInfoFieldBuilder().getBuilder(),
1230 extensionRegistry);
1231 bitField0_ |= 0x00000020;
1232 break;
1233 } // case 82
1234 case 90: {
1235 solverSpecificInfo_ = input.readBytes();
1236 bitField0_ |= 0x00000040;
1237 break;
1238 } // case 90
1239 default: {
1240 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1241 done = true; // was an endgroup tag
1242 }
1243 break;
1244 } // default:
1245 } // switch (tag)
1246 } // while (!done)
1247 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1248 throw e.unwrapIOException();
1249 } finally {
1250 onChanged();
1251 } // finally
1252 return this;
1253 }
1254 private int bitField0_;
1255
1256 private int status_ = 99;
1265 @java.lang.Override public boolean hasStatus() {
1266 return ((bitField0_ & 0x00000001) != 0);
1267 }
1268
1276 @java.lang.Override
1278 com.google.ortools.linearsolver.MPSolverResponseStatus result = com.google.ortools.linearsolver.MPSolverResponseStatus.forNumber(status_);
1280 }
1281
1290 public Builder setStatus(com.google.ortools.linearsolver.MPSolverResponseStatus value) {
1291 if (value == null) { throw new NullPointerException(); }
1292 bitField0_ |= 0x00000001;
1293 status_ = value.getNumber();
1294 onChanged();
1295 return this;
1296 }
1297
1305 public Builder clearStatus() {
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 }
1327
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 }
1352
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 }
1376
1388 public Builder setStatusStr(
1389 java.lang.String value) {
1390 if (value == null) { throw new NullPointerException(); }
1391 statusStr_ = value;
1392 bitField0_ |= 0x00000002;
1393 onChanged();
1394 return this;
1395 }
1396
1407 public Builder clearStatusStr() {
1408 statusStr_ = getDefaultInstance().getStatusStr();
1409 bitField0_ = (bitField0_ & ~0x00000002);
1410 onChanged();
1411 return this;
1412 }
1413
1425 public Builder setStatusStrBytes(
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 }
1449
1459 @java.lang.Override
1460 public double getObjectiveValue() {
1461 return objectiveValue_;
1462 }
1463
1474 public Builder setObjectiveValue(double value) {
1475
1476 objectiveValue_ = value;
1477 bitField0_ |= 0x00000004;
1478 onChanged();
1479 return this;
1480 }
1481
1491 public Builder clearObjectiveValue() {
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 }
1515
1527 @java.lang.Override
1528 public double getBestObjectiveBound() {
1529 return bestObjectiveBound_;
1530 }
1531
1544 public Builder setBestObjectiveBound(double value) {
1545
1546 bestObjectiveBound_ = value;
1547 bitField0_ |= 0x00000008;
1548 onChanged();
1549 return this;
1550 }
1551
1563 public Builder clearBestObjectiveBound() {
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 }
1598
1609 return variableValue_.size();
1610 }
1611
1622 public double getVariableValue(int index) {
1623 return variableValue_.getDouble(index);
1624 }
1625
1637 public Builder setVariableValue(
1638 int index, double value) {
1639
1640 ensureVariableValueIsMutable();
1641 variableValue_.setDouble(index, value);
1642 bitField0_ |= 0x00000010;
1643 onChanged();
1644 return this;
1645 }
1646
1657 public Builder addVariableValue(double value) {
1658
1659 ensureVariableValueIsMutable();
1660 variableValue_.addDouble(value);
1661 bitField0_ |= 0x00000010;
1662 onChanged();
1663 return this;
1664 }
1665
1676 public Builder addAllVariableValue(
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 }
1685
1695 public Builder clearVariableValue() {
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 }
1718
1729 if (solveInfoBuilder_ == null) {
1730 return solveInfo_ == null ? com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1731 } else {
1732 return solveInfoBuilder_.getMessage();
1733 }
1734 }
1735
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 }
1757
1766 public Builder setSolveInfo(
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 }
1777
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 }
1804
1813 public Builder clearSolveInfo() {
1814 bitField0_ = (bitField0_ & ~0x00000020);
1815 solveInfo_ = null;
1816 if (solveInfoBuilder_ != null) {
1817 solveInfoBuilder_.dispose();
1818 solveInfoBuilder_ = null;
1819 }
1820 onChanged();
1821 return this;
1822 }
1823
1833 bitField0_ |= 0x00000020;
1834 onChanged();
1835 return internalGetSolveInfoFieldBuilder().getBuilder();
1836 }
1837
1847 if (solveInfoBuilder_ != null) {
1848 return solveInfoBuilder_.getMessageOrBuilder();
1849 } else {
1850 return solveInfo_ == null ?
1851 com.google.ortools.linearsolver.MPSolveInfo.getDefaultInstance() : solveInfo_;
1852 }
1853 }
1854
1863 private com.google.protobuf.SingleFieldBuilder<
1864 com.google.ortools.linearsolver.MPSolveInfo, com.google.ortools.linearsolver.MPSolveInfo.Builder, com.google.ortools.linearsolver.MPSolveInfoOrBuilder>
1865 internalGetSolveInfoFieldBuilder() {
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 }
1891
1900 @java.lang.Override
1901 public com.google.protobuf.ByteString getSolverSpecificInfo() {
1902 return solverSpecificInfo_;
1903 }
1904
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 }
1921
1930 public Builder clearSolverSpecificInfo() {
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 }
1968
1981 public int getDualValueCount() {
1982 return dualValue_.size();
1983 }
1984
1998 public double getDualValue(int index) {
1999 return dualValue_.getDouble(index);
2000 }
2001
2016 public Builder setDualValue(
2017 int index, double value) {
2018
2019 ensureDualValueIsMutable();
2020 dualValue_.setDouble(index, value);
2021 bitField0_ |= 0x00000080;
2022 onChanged();
2023 return this;
2024 }
2025
2039 public Builder addDualValue(double value) {
2040
2041 ensureDualValueIsMutable();
2042 dualValue_.addDouble(value);
2043 bitField0_ |= 0x00000080;
2044 onChanged();
2045 return this;
2046 }
2047
2061 public Builder addAllDualValue(
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 }
2070
2083 public Builder clearDualValue() {
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 }
2121
2134 public int getReducedCostCount() {
2135 return reducedCost_.size();
2136 }
2137
2151 public double getReducedCost(int index) {
2152 return reducedCost_.getDouble(index);
2153 }
2154
2169 public Builder setReducedCost(
2170 int index, double value) {
2171
2172 ensureReducedCostIsMutable();
2173 reducedCost_.setDouble(index, value);
2174 bitField0_ |= 0x00000100;
2175 onChanged();
2176 return this;
2177 }
2178
2192 public Builder addReducedCost(double value) {
2193
2194 ensureReducedCostIsMutable();
2195 reducedCost_.addDouble(value);
2196 bitField0_ |= 0x00000100;
2197 onChanged();
2198 return this;
2199 }
2200
2214 public Builder addAllReducedCost(
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 }
2223
2236 public Builder clearReducedCost() {
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 }
2273
2285 if (additionalSolutionsBuilder_ == null) {
2286 return additionalSolutions_.size();
2287 } else {
2288 return additionalSolutionsBuilder_.getCount();
2289 }
2290 }
2291
2303 if (additionalSolutionsBuilder_ == null) {
2304 return additionalSolutions_.get(index);
2305 } else {
2306 return additionalSolutionsBuilder_.getMessage(index);
2307 }
2308 }
2309
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 }
2334
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 }
2356
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 }
2380
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 }
2405
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 }
2427
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 }
2449
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 }
2472
2483 public Builder clearAdditionalSolutions() {
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 }
2493
2504 public Builder removeAdditionalSolutions(int index) {
2505 if (additionalSolutionsBuilder_ == null) {
2506 ensureAdditionalSolutionsIsMutable();
2507 additionalSolutions_.remove(index);
2508 onChanged();
2509 } else {
2510 additionalSolutionsBuilder_.remove(index);
2511 }
2512 return this;
2513 }
2514
2526 int index) {
2527 return internalGetAdditionalSolutionsFieldBuilder().getBuilder(index);
2528 }
2529
2541 int index) {
2542 if (additionalSolutionsBuilder_ == null) {
2543 return additionalSolutions_.get(index); } else {
2544 return additionalSolutionsBuilder_.getMessageOrBuilder(index);
2545 }
2546 }
2547
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 }
2566
2578 return internalGetAdditionalSolutionsFieldBuilder().addBuilder(
2579 com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2580 }
2581
2593 int index) {
2594 return internalGetAdditionalSolutionsFieldBuilder().addBuilder(
2595 index, com.google.ortools.linearsolver.MPSolution.getDefaultInstance());
2596 }
2597
2608 public java.util.List<com.google.ortools.linearsolver.MPSolution.Builder>
2610 return internalGetAdditionalSolutionsFieldBuilder().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 internalGetAdditionalSolutionsFieldBuilder() {
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)