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