Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPSolverCommonParameters.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
19public final class MPSolverCommonParameters extends
20 com.google.protobuf.GeneratedMessage implements
21 // @@protoc_insertion_point(message_implements:operations_research.MPSolverCommonParameters)
23private static final long serialVersionUID = 0L;
24 static {
25 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
26 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27 /* major= */ 4,
28 /* minor= */ 26,
29 /* patch= */ 1,
30 /* suffix= */ "",
31 MPSolverCommonParameters.class.getName());
32 }
33 // Use MPSolverCommonParameters.newBuilder() to construct.
34 private MPSolverCommonParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 super(builder);
36 }
37 private MPSolverCommonParameters() {
38 lpAlgorithm_ = 0;
39 presolve_ = 0;
40 scaling_ = 0;
41 }
42
43 public static final com.google.protobuf.Descriptors.Descriptor
45 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolverCommonParameters_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_MPSolverCommonParameters_fieldAccessorTable
52 .ensureFieldAccessorsInitialized(
53 com.google.ortools.linearsolver.MPSolverCommonParameters.class, com.google.ortools.linearsolver.MPSolverCommonParameters.Builder.class);
54 }
55
60 implements com.google.protobuf.ProtocolMessageEnum {
89 ;
90
91 static {
92 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
93 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
94 /* major= */ 4,
95 /* minor= */ 26,
96 /* patch= */ 1,
97 /* suffix= */ "",
98 LPAlgorithmValues.class.getName());
99 }
103 public static final int LP_ALGO_UNSPECIFIED_VALUE = 0;
111 public static final int LP_ALGO_DUAL_VALUE = 1;
119 public static final int LP_ALGO_PRIMAL_VALUE = 2;
127 public static final int LP_ALGO_BARRIER_VALUE = 3;
128
129
130 public final int getNumber() {
131 return value;
132 }
133
139 @java.lang.Deprecated
140 public static LPAlgorithmValues valueOf(int value) {
141 return forNumber(value);
142 }
143
148 public static LPAlgorithmValues forNumber(int value) {
149 switch (value) {
150 case 0: return LP_ALGO_UNSPECIFIED;
151 case 1: return LP_ALGO_DUAL;
152 case 2: return LP_ALGO_PRIMAL;
153 case 3: return LP_ALGO_BARRIER;
154 default: return null;
155 }
156 }
157
158 public static com.google.protobuf.Internal.EnumLiteMap<LPAlgorithmValues>
160 return internalValueMap;
161 }
162 private static final com.google.protobuf.Internal.EnumLiteMap<
163 LPAlgorithmValues> internalValueMap =
164 new com.google.protobuf.Internal.EnumLiteMap<LPAlgorithmValues>() {
165 public LPAlgorithmValues findValueByNumber(int number) {
166 return LPAlgorithmValues.forNumber(number);
167 }
168 };
169
170 public final com.google.protobuf.Descriptors.EnumValueDescriptor
172 return getDescriptor().getValues().get(ordinal());
173 }
174 public final com.google.protobuf.Descriptors.EnumDescriptor
176 return getDescriptor();
177 }
178 public static final com.google.protobuf.Descriptors.EnumDescriptor
180 return com.google.ortools.linearsolver.MPSolverCommonParameters.getDescriptor().getEnumTypes().get(0);
181 }
182
183 private static final LPAlgorithmValues[] VALUES = values();
184
186 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
187 if (desc.getType() != getDescriptor()) {
188 throw new java.lang.IllegalArgumentException(
189 "EnumValueDescriptor is not for this type.");
190 }
191 return VALUES[desc.getIndex()];
192 }
193
194 private final int value;
195
196 private LPAlgorithmValues(int value) {
197 this.value = value;
198 }
199
200 // @@protoc_insertion_point(enum_scope:operations_research.MPSolverCommonParameters.LPAlgorithmValues)
201 }
202
203 private int bitField0_;
204 public static final int RELATIVE_MIP_GAP_FIELD_NUMBER = 1;
228 @java.lang.Override
229 public boolean hasRelativeMipGap() {
230 return ((bitField0_ & 0x00000001) != 0);
231 }
254 @java.lang.Override
256 return relativeMipGap_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : relativeMipGap_;
257 }
279 @java.lang.Override
281 return relativeMipGap_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : relativeMipGap_;
282 }
283
284 public static final int PRIMAL_TOLERANCE_FIELD_NUMBER = 2;
285 private com.google.ortools.linearsolver.OptionalDouble primalTolerance_;
297 @java.lang.Override
298 public boolean hasPrimalTolerance() {
299 return ((bitField0_ & 0x00000002) != 0);
300 }
312 @java.lang.Override
314 return primalTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : primalTolerance_;
315 }
326 @java.lang.Override
328 return primalTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : primalTolerance_;
329 }
330
331 public static final int DUAL_TOLERANCE_FIELD_NUMBER = 3;
345 @java.lang.Override
346 public boolean hasDualTolerance() {
347 return ((bitField0_ & 0x00000004) != 0);
348 }
361 @java.lang.Override
363 return dualTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : dualTolerance_;
364 }
376 @java.lang.Override
378 return dualTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : dualTolerance_;
379 }
380
381 public static final int LP_ALGORITHM_FIELD_NUMBER = 4;
382 private int lpAlgorithm_ = 0;
392 @java.lang.Override public boolean hasLpAlgorithm() {
393 return ((bitField0_ & 0x00000008) != 0);
394 }
405 com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues result = com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues.forNumber(lpAlgorithm_);
406 return result == null ? com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues.LP_ALGO_UNSPECIFIED : result;
407 }
408
409 public static final int PRESOLVE_FIELD_NUMBER = 5;
410 private int presolve_ = 0;
420 @java.lang.Override public boolean hasPresolve() {
421 return ((bitField0_ & 0x00000010) != 0);
422 }
433 com.google.ortools.util.OptionalBoolean result = com.google.ortools.util.OptionalBoolean.forNumber(presolve_);
434 return result == null ? com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED : result;
435 }
436
437 public static final int SCALING_FIELD_NUMBER = 7;
438 private int scaling_ = 0;
449 @java.lang.Override public boolean hasScaling() {
450 return ((bitField0_ & 0x00000020) != 0);
451 }
463 com.google.ortools.util.OptionalBoolean result = com.google.ortools.util.OptionalBoolean.forNumber(scaling_);
464 return result == null ? com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED : result;
465 }
466
467 private byte memoizedIsInitialized = -1;
468 @java.lang.Override
469 public final boolean isInitialized() {
470 byte isInitialized = memoizedIsInitialized;
471 if (isInitialized == 1) return true;
472 if (isInitialized == 0) return false;
473
474 memoizedIsInitialized = 1;
475 return true;
476 }
477
478 @java.lang.Override
479 public void writeTo(com.google.protobuf.CodedOutputStream output)
480 throws java.io.IOException {
481 if (((bitField0_ & 0x00000001) != 0)) {
482 output.writeMessage(1, getRelativeMipGap());
483 }
484 if (((bitField0_ & 0x00000002) != 0)) {
485 output.writeMessage(2, getPrimalTolerance());
486 }
487 if (((bitField0_ & 0x00000004) != 0)) {
488 output.writeMessage(3, getDualTolerance());
489 }
490 if (((bitField0_ & 0x00000008) != 0)) {
491 output.writeEnum(4, lpAlgorithm_);
492 }
493 if (((bitField0_ & 0x00000010) != 0)) {
494 output.writeEnum(5, presolve_);
495 }
496 if (((bitField0_ & 0x00000020) != 0)) {
497 output.writeEnum(7, scaling_);
498 }
499 getUnknownFields().writeTo(output);
500 }
501
502 @java.lang.Override
503 public int getSerializedSize() {
504 int size = memoizedSize;
505 if (size != -1) return size;
506
507 size = 0;
508 if (((bitField0_ & 0x00000001) != 0)) {
509 size += com.google.protobuf.CodedOutputStream
510 .computeMessageSize(1, getRelativeMipGap());
511 }
512 if (((bitField0_ & 0x00000002) != 0)) {
513 size += com.google.protobuf.CodedOutputStream
514 .computeMessageSize(2, getPrimalTolerance());
515 }
516 if (((bitField0_ & 0x00000004) != 0)) {
517 size += com.google.protobuf.CodedOutputStream
518 .computeMessageSize(3, getDualTolerance());
519 }
520 if (((bitField0_ & 0x00000008) != 0)) {
521 size += com.google.protobuf.CodedOutputStream
522 .computeEnumSize(4, lpAlgorithm_);
523 }
524 if (((bitField0_ & 0x00000010) != 0)) {
525 size += com.google.protobuf.CodedOutputStream
526 .computeEnumSize(5, presolve_);
527 }
528 if (((bitField0_ & 0x00000020) != 0)) {
529 size += com.google.protobuf.CodedOutputStream
530 .computeEnumSize(7, scaling_);
531 }
532 size += getUnknownFields().getSerializedSize();
533 memoizedSize = size;
534 return size;
535 }
536
537 @java.lang.Override
538 public boolean equals(final java.lang.Object obj) {
539 if (obj == this) {
540 return true;
541 }
542 if (!(obj instanceof com.google.ortools.linearsolver.MPSolverCommonParameters)) {
543 return super.equals(obj);
544 }
545 com.google.ortools.linearsolver.MPSolverCommonParameters other = (com.google.ortools.linearsolver.MPSolverCommonParameters) obj;
546
547 if (hasRelativeMipGap() != other.hasRelativeMipGap()) return false;
548 if (hasRelativeMipGap()) {
549 if (!getRelativeMipGap()
550 .equals(other.getRelativeMipGap())) return false;
551 }
552 if (hasPrimalTolerance() != other.hasPrimalTolerance()) return false;
553 if (hasPrimalTolerance()) {
554 if (!getPrimalTolerance()
555 .equals(other.getPrimalTolerance())) return false;
556 }
557 if (hasDualTolerance() != other.hasDualTolerance()) return false;
558 if (hasDualTolerance()) {
559 if (!getDualTolerance()
560 .equals(other.getDualTolerance())) return false;
561 }
562 if (hasLpAlgorithm() != other.hasLpAlgorithm()) return false;
563 if (hasLpAlgorithm()) {
564 if (lpAlgorithm_ != other.lpAlgorithm_) return false;
565 }
566 if (hasPresolve() != other.hasPresolve()) return false;
567 if (hasPresolve()) {
568 if (presolve_ != other.presolve_) return false;
569 }
570 if (hasScaling() != other.hasScaling()) return false;
571 if (hasScaling()) {
572 if (scaling_ != other.scaling_) return false;
573 }
574 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
575 return true;
576 }
577
578 @java.lang.Override
579 public int hashCode() {
580 if (memoizedHashCode != 0) {
581 return memoizedHashCode;
582 }
583 int hash = 41;
584 hash = (19 * hash) + getDescriptor().hashCode();
585 if (hasRelativeMipGap()) {
586 hash = (37 * hash) + RELATIVE_MIP_GAP_FIELD_NUMBER;
587 hash = (53 * hash) + getRelativeMipGap().hashCode();
588 }
589 if (hasPrimalTolerance()) {
590 hash = (37 * hash) + PRIMAL_TOLERANCE_FIELD_NUMBER;
591 hash = (53 * hash) + getPrimalTolerance().hashCode();
592 }
593 if (hasDualTolerance()) {
594 hash = (37 * hash) + DUAL_TOLERANCE_FIELD_NUMBER;
595 hash = (53 * hash) + getDualTolerance().hashCode();
596 }
597 if (hasLpAlgorithm()) {
598 hash = (37 * hash) + LP_ALGORITHM_FIELD_NUMBER;
599 hash = (53 * hash) + lpAlgorithm_;
600 }
601 if (hasPresolve()) {
602 hash = (37 * hash) + PRESOLVE_FIELD_NUMBER;
603 hash = (53 * hash) + presolve_;
604 }
605 if (hasScaling()) {
606 hash = (37 * hash) + SCALING_FIELD_NUMBER;
607 hash = (53 * hash) + scaling_;
608 }
609 hash = (29 * hash) + getUnknownFields().hashCode();
610 memoizedHashCode = hash;
611 return hash;
612 }
613
615 java.nio.ByteBuffer data)
616 throws com.google.protobuf.InvalidProtocolBufferException {
617 return PARSER.parseFrom(data);
618 }
620 java.nio.ByteBuffer data,
621 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
622 throws com.google.protobuf.InvalidProtocolBufferException {
623 return PARSER.parseFrom(data, extensionRegistry);
624 }
626 com.google.protobuf.ByteString data)
627 throws com.google.protobuf.InvalidProtocolBufferException {
628 return PARSER.parseFrom(data);
629 }
631 com.google.protobuf.ByteString data,
632 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
633 throws com.google.protobuf.InvalidProtocolBufferException {
634 return PARSER.parseFrom(data, extensionRegistry);
635 }
637 throws com.google.protobuf.InvalidProtocolBufferException {
638 return PARSER.parseFrom(data);
639 }
641 byte[] data,
642 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
643 throws com.google.protobuf.InvalidProtocolBufferException {
644 return PARSER.parseFrom(data, extensionRegistry);
645 }
647 throws java.io.IOException {
648 return com.google.protobuf.GeneratedMessage
649 .parseWithIOException(PARSER, input);
650 }
652 java.io.InputStream input,
653 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
654 throws java.io.IOException {
655 return com.google.protobuf.GeneratedMessage
656 .parseWithIOException(PARSER, input, extensionRegistry);
657 }
658
660 throws java.io.IOException {
661 return com.google.protobuf.GeneratedMessage
662 .parseDelimitedWithIOException(PARSER, input);
663 }
664
666 java.io.InputStream input,
667 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
668 throws java.io.IOException {
669 return com.google.protobuf.GeneratedMessage
670 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
671 }
673 com.google.protobuf.CodedInputStream input)
674 throws java.io.IOException {
675 return com.google.protobuf.GeneratedMessage
676 .parseWithIOException(PARSER, input);
677 }
679 com.google.protobuf.CodedInputStream input,
680 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
681 throws java.io.IOException {
682 return com.google.protobuf.GeneratedMessage
683 .parseWithIOException(PARSER, input, extensionRegistry);
684 }
685
686 @java.lang.Override
687 public Builder newBuilderForType() { return newBuilder(); }
688 public static Builder newBuilder() {
689 return DEFAULT_INSTANCE.toBuilder();
690 }
691 public static Builder newBuilder(com.google.ortools.linearsolver.MPSolverCommonParameters prototype) {
692 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
693 }
694 @java.lang.Override
696 return this == DEFAULT_INSTANCE
697 ? new Builder() : new Builder().mergeFrom(this);
698 }
699
700 @java.lang.Override
702 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
703 Builder builder = new Builder(parent);
704 return builder;
705 }
718 public static final class Builder extends
719 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
720 // @@protoc_insertion_point(builder_implements:operations_research.MPSolverCommonParameters)
721 com.google.ortools.linearsolver.MPSolverCommonParametersOrBuilder {
722 public static final com.google.protobuf.Descriptors.Descriptor
724 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolverCommonParameters_descriptor;
725 }
726
727 @java.lang.Override
728 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
730 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolverCommonParameters_fieldAccessorTable
731 .ensureFieldAccessorsInitialized(
732 com.google.ortools.linearsolver.MPSolverCommonParameters.class, com.google.ortools.linearsolver.MPSolverCommonParameters.Builder.class);
733 }
734
735 // Construct using com.google.ortools.linearsolver.MPSolverCommonParameters.newBuilder()
736 private Builder() {
737 maybeForceBuilderInitialization();
738 }
739
740 private Builder(
741 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
742 super(parent);
743 maybeForceBuilderInitialization();
744 }
745 private void maybeForceBuilderInitialization() {
746 if (com.google.protobuf.GeneratedMessage
747 .alwaysUseFieldBuilders) {
748 getRelativeMipGapFieldBuilder();
749 getPrimalToleranceFieldBuilder();
750 getDualToleranceFieldBuilder();
751 }
752 }
753 @java.lang.Override
754 public Builder clear() {
755 super.clear();
756 bitField0_ = 0;
757 relativeMipGap_ = null;
758 if (relativeMipGapBuilder_ != null) {
759 relativeMipGapBuilder_.dispose();
760 relativeMipGapBuilder_ = null;
761 }
762 primalTolerance_ = null;
763 if (primalToleranceBuilder_ != null) {
764 primalToleranceBuilder_.dispose();
765 primalToleranceBuilder_ = null;
766 }
767 dualTolerance_ = null;
768 if (dualToleranceBuilder_ != null) {
769 dualToleranceBuilder_.dispose();
770 dualToleranceBuilder_ = null;
771 }
772 lpAlgorithm_ = 0;
773 presolve_ = 0;
774 scaling_ = 0;
775 return this;
776 }
777
778 @java.lang.Override
779 public com.google.protobuf.Descriptors.Descriptor
781 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolverCommonParameters_descriptor;
782 }
783
784 @java.lang.Override
786 return com.google.ortools.linearsolver.MPSolverCommonParameters.getDefaultInstance();
787 }
788
789 @java.lang.Override
792 if (!result.isInitialized()) {
793 throw newUninitializedMessageException(result);
794 }
795 return result;
796 }
797
798 @java.lang.Override
800 com.google.ortools.linearsolver.MPSolverCommonParameters result = new com.google.ortools.linearsolver.MPSolverCommonParameters(this);
801 if (bitField0_ != 0) { buildPartial0(result); }
802 onBuilt();
803 return result;
804 }
805
806 private void buildPartial0(com.google.ortools.linearsolver.MPSolverCommonParameters result) {
807 int from_bitField0_ = bitField0_;
808 int to_bitField0_ = 0;
809 if (((from_bitField0_ & 0x00000001) != 0)) {
810 result.relativeMipGap_ = relativeMipGapBuilder_ == null
811 ? relativeMipGap_
812 : relativeMipGapBuilder_.build();
813 to_bitField0_ |= 0x00000001;
814 }
815 if (((from_bitField0_ & 0x00000002) != 0)) {
816 result.primalTolerance_ = primalToleranceBuilder_ == null
817 ? primalTolerance_
818 : primalToleranceBuilder_.build();
819 to_bitField0_ |= 0x00000002;
820 }
821 if (((from_bitField0_ & 0x00000004) != 0)) {
822 result.dualTolerance_ = dualToleranceBuilder_ == null
823 ? dualTolerance_
824 : dualToleranceBuilder_.build();
825 to_bitField0_ |= 0x00000004;
826 }
827 if (((from_bitField0_ & 0x00000008) != 0)) {
828 result.lpAlgorithm_ = lpAlgorithm_;
829 to_bitField0_ |= 0x00000008;
830 }
831 if (((from_bitField0_ & 0x00000010) != 0)) {
832 result.presolve_ = presolve_;
833 to_bitField0_ |= 0x00000010;
834 }
835 if (((from_bitField0_ & 0x00000020) != 0)) {
836 result.scaling_ = scaling_;
837 to_bitField0_ |= 0x00000020;
838 }
839 result.bitField0_ |= to_bitField0_;
840 }
841
842 @java.lang.Override
843 public Builder mergeFrom(com.google.protobuf.Message other) {
844 if (other instanceof com.google.ortools.linearsolver.MPSolverCommonParameters) {
845 return mergeFrom((com.google.ortools.linearsolver.MPSolverCommonParameters)other);
846 } else {
847 super.mergeFrom(other);
848 return this;
849 }
850 }
851
852 public Builder mergeFrom(com.google.ortools.linearsolver.MPSolverCommonParameters other) {
853 if (other == com.google.ortools.linearsolver.MPSolverCommonParameters.getDefaultInstance()) return this;
854 if (other.hasRelativeMipGap()) {
855 mergeRelativeMipGap(other.getRelativeMipGap());
856 }
857 if (other.hasPrimalTolerance()) {
858 mergePrimalTolerance(other.getPrimalTolerance());
859 }
860 if (other.hasDualTolerance()) {
861 mergeDualTolerance(other.getDualTolerance());
862 }
863 if (other.hasLpAlgorithm()) {
864 setLpAlgorithm(other.getLpAlgorithm());
865 }
866 if (other.hasPresolve()) {
867 setPresolve(other.getPresolve());
868 }
869 if (other.hasScaling()) {
870 setScaling(other.getScaling());
871 }
872 this.mergeUnknownFields(other.getUnknownFields());
873 onChanged();
874 return this;
875 }
876
877 @java.lang.Override
878 public final boolean isInitialized() {
879 return true;
880 }
881
882 @java.lang.Override
884 com.google.protobuf.CodedInputStream input,
885 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
886 throws java.io.IOException {
887 if (extensionRegistry == null) {
888 throw new java.lang.NullPointerException();
889 }
890 try {
891 boolean done = false;
892 while (!done) {
893 int tag = input.readTag();
894 switch (tag) {
895 case 0:
896 done = true;
897 break;
898 case 10: {
899 input.readMessage(
900 getRelativeMipGapFieldBuilder().getBuilder(),
901 extensionRegistry);
902 bitField0_ |= 0x00000001;
903 break;
904 } // case 10
905 case 18: {
906 input.readMessage(
907 getPrimalToleranceFieldBuilder().getBuilder(),
908 extensionRegistry);
909 bitField0_ |= 0x00000002;
910 break;
911 } // case 18
912 case 26: {
913 input.readMessage(
914 getDualToleranceFieldBuilder().getBuilder(),
915 extensionRegistry);
916 bitField0_ |= 0x00000004;
917 break;
918 } // case 26
919 case 32: {
920 int tmpRaw = input.readEnum();
922 com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues.forNumber(tmpRaw);
923 if (tmpValue == null) {
924 mergeUnknownVarintField(4, tmpRaw);
925 } else {
926 lpAlgorithm_ = tmpRaw;
927 bitField0_ |= 0x00000008;
928 }
929 break;
930 } // case 32
931 case 40: {
932 int tmpRaw = input.readEnum();
934 com.google.ortools.util.OptionalBoolean.forNumber(tmpRaw);
935 if (tmpValue == null) {
936 mergeUnknownVarintField(5, tmpRaw);
937 } else {
938 presolve_ = tmpRaw;
939 bitField0_ |= 0x00000010;
940 }
941 break;
942 } // case 40
943 case 56: {
944 int tmpRaw = input.readEnum();
946 com.google.ortools.util.OptionalBoolean.forNumber(tmpRaw);
947 if (tmpValue == null) {
948 mergeUnknownVarintField(7, tmpRaw);
949 } else {
950 scaling_ = tmpRaw;
951 bitField0_ |= 0x00000020;
952 }
953 break;
954 } // case 56
955 default: {
956 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
957 done = true; // was an endgroup tag
958 }
959 break;
960 } // default:
961 } // switch (tag)
962 } // while (!done)
963 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
964 throw e.unwrapIOException();
965 } finally {
966 onChanged();
967 } // finally
968 return this;
969 }
970 private int bitField0_;
971
973 private com.google.protobuf.SingleFieldBuilder<
974 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder> relativeMipGapBuilder_;
997 public boolean hasRelativeMipGap() {
998 return ((bitField0_ & 0x00000001) != 0);
999 }
1023 if (relativeMipGapBuilder_ == null) {
1024 return relativeMipGap_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : relativeMipGap_;
1025 } else {
1026 return relativeMipGapBuilder_.getMessage();
1027 }
1028 }
1050 public Builder setRelativeMipGap(com.google.ortools.linearsolver.OptionalDouble value) {
1051 if (relativeMipGapBuilder_ == null) {
1052 if (value == null) {
1053 throw new NullPointerException();
1054 }
1055 relativeMipGap_ = value;
1056 } else {
1057 relativeMipGapBuilder_.setMessage(value);
1058 }
1059 bitField0_ |= 0x00000001;
1060 onChanged();
1061 return this;
1062 }
1085 com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue) {
1086 if (relativeMipGapBuilder_ == null) {
1087 relativeMipGap_ = builderForValue.build();
1088 } else {
1089 relativeMipGapBuilder_.setMessage(builderForValue.build());
1090 }
1091 bitField0_ |= 0x00000001;
1092 onChanged();
1093 return this;
1094 }
1116 public Builder mergeRelativeMipGap(com.google.ortools.linearsolver.OptionalDouble value) {
1117 if (relativeMipGapBuilder_ == null) {
1118 if (((bitField0_ & 0x00000001) != 0) &&
1119 relativeMipGap_ != null &&
1120 relativeMipGap_ != com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance()) {
1121 getRelativeMipGapBuilder().mergeFrom(value);
1122 } else {
1123 relativeMipGap_ = value;
1124 }
1125 } else {
1126 relativeMipGapBuilder_.mergeFrom(value);
1127 }
1128 if (relativeMipGap_ != null) {
1129 bitField0_ |= 0x00000001;
1130 onChanged();
1131 }
1132 return this;
1133 }
1156 bitField0_ = (bitField0_ & ~0x00000001);
1157 relativeMipGap_ = null;
1158 if (relativeMipGapBuilder_ != null) {
1159 relativeMipGapBuilder_.dispose();
1160 relativeMipGapBuilder_ = null;
1161 }
1162 onChanged();
1163 return this;
1164 }
1187 bitField0_ |= 0x00000001;
1188 onChanged();
1189 return getRelativeMipGapFieldBuilder().getBuilder();
1190 }
1213 if (relativeMipGapBuilder_ != null) {
1214 return relativeMipGapBuilder_.getMessageOrBuilder();
1215 } else {
1216 return relativeMipGap_ == null ?
1217 com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : relativeMipGap_;
1218 }
1219 }
1241 private com.google.protobuf.SingleFieldBuilder<
1242 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>
1243 getRelativeMipGapFieldBuilder() {
1244 if (relativeMipGapBuilder_ == null) {
1245 relativeMipGapBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1246 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>(
1248 getParentForChildren(),
1249 isClean());
1250 relativeMipGap_ = null;
1251 }
1252 return relativeMipGapBuilder_;
1253 }
1254
1255 private com.google.ortools.linearsolver.OptionalDouble primalTolerance_;
1256 private com.google.protobuf.SingleFieldBuilder<
1257 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder> primalToleranceBuilder_;
1269 public boolean hasPrimalTolerance() {
1270 return ((bitField0_ & 0x00000002) != 0);
1271 }
1284 if (primalToleranceBuilder_ == null) {
1285 return primalTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : primalTolerance_;
1286 } else {
1287 return primalToleranceBuilder_.getMessage();
1288 }
1289 }
1300 public Builder setPrimalTolerance(com.google.ortools.linearsolver.OptionalDouble value) {
1301 if (primalToleranceBuilder_ == null) {
1302 if (value == null) {
1303 throw new NullPointerException();
1304 }
1305 primalTolerance_ = value;
1306 } else {
1307 primalToleranceBuilder_.setMessage(value);
1308 }
1309 bitField0_ |= 0x00000002;
1310 onChanged();
1311 return this;
1312 }
1324 com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue) {
1325 if (primalToleranceBuilder_ == null) {
1326 primalTolerance_ = builderForValue.build();
1327 } else {
1328 primalToleranceBuilder_.setMessage(builderForValue.build());
1329 }
1330 bitField0_ |= 0x00000002;
1331 onChanged();
1332 return this;
1333 }
1344 public Builder mergePrimalTolerance(com.google.ortools.linearsolver.OptionalDouble value) {
1345 if (primalToleranceBuilder_ == null) {
1346 if (((bitField0_ & 0x00000002) != 0) &&
1347 primalTolerance_ != null &&
1348 primalTolerance_ != com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance()) {
1349 getPrimalToleranceBuilder().mergeFrom(value);
1350 } else {
1351 primalTolerance_ = value;
1352 }
1353 } else {
1354 primalToleranceBuilder_.mergeFrom(value);
1355 }
1356 if (primalTolerance_ != null) {
1357 bitField0_ |= 0x00000002;
1358 onChanged();
1359 }
1360 return this;
1361 }
1373 bitField0_ = (bitField0_ & ~0x00000002);
1374 primalTolerance_ = null;
1375 if (primalToleranceBuilder_ != null) {
1376 primalToleranceBuilder_.dispose();
1377 primalToleranceBuilder_ = null;
1378 }
1379 onChanged();
1380 return this;
1381 }
1393 bitField0_ |= 0x00000002;
1394 onChanged();
1395 return getPrimalToleranceFieldBuilder().getBuilder();
1396 }
1408 if (primalToleranceBuilder_ != null) {
1409 return primalToleranceBuilder_.getMessageOrBuilder();
1410 } else {
1411 return primalTolerance_ == null ?
1412 com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : primalTolerance_;
1413 }
1414 }
1425 private com.google.protobuf.SingleFieldBuilder<
1426 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>
1427 getPrimalToleranceFieldBuilder() {
1428 if (primalToleranceBuilder_ == null) {
1429 primalToleranceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1430 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>(
1432 getParentForChildren(),
1433 isClean());
1434 primalTolerance_ = null;
1435 }
1436 return primalToleranceBuilder_;
1437 }
1438
1440 private com.google.protobuf.SingleFieldBuilder<
1441 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder> dualToleranceBuilder_;
1454 public boolean hasDualTolerance() {
1455 return ((bitField0_ & 0x00000004) != 0);
1456 }
1470 if (dualToleranceBuilder_ == null) {
1471 return dualTolerance_ == null ? com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : dualTolerance_;
1472 } else {
1473 return dualToleranceBuilder_.getMessage();
1474 }
1475 }
1487 public Builder setDualTolerance(com.google.ortools.linearsolver.OptionalDouble value) {
1488 if (dualToleranceBuilder_ == null) {
1489 if (value == null) {
1490 throw new NullPointerException();
1491 }
1492 dualTolerance_ = value;
1493 } else {
1494 dualToleranceBuilder_.setMessage(value);
1495 }
1496 bitField0_ |= 0x00000004;
1497 onChanged();
1498 return this;
1499 }
1512 com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue) {
1513 if (dualToleranceBuilder_ == null) {
1514 dualTolerance_ = builderForValue.build();
1515 } else {
1516 dualToleranceBuilder_.setMessage(builderForValue.build());
1517 }
1518 bitField0_ |= 0x00000004;
1519 onChanged();
1520 return this;
1521 }
1533 public Builder mergeDualTolerance(com.google.ortools.linearsolver.OptionalDouble value) {
1534 if (dualToleranceBuilder_ == null) {
1535 if (((bitField0_ & 0x00000004) != 0) &&
1536 dualTolerance_ != null &&
1537 dualTolerance_ != com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance()) {
1538 getDualToleranceBuilder().mergeFrom(value);
1539 } else {
1540 dualTolerance_ = value;
1541 }
1542 } else {
1543 dualToleranceBuilder_.mergeFrom(value);
1544 }
1545 if (dualTolerance_ != null) {
1546 bitField0_ |= 0x00000004;
1547 onChanged();
1548 }
1549 return this;
1550 }
1563 bitField0_ = (bitField0_ & ~0x00000004);
1564 dualTolerance_ = null;
1565 if (dualToleranceBuilder_ != null) {
1566 dualToleranceBuilder_.dispose();
1567 dualToleranceBuilder_ = null;
1568 }
1569 onChanged();
1570 return this;
1571 }
1584 bitField0_ |= 0x00000004;
1585 onChanged();
1586 return getDualToleranceFieldBuilder().getBuilder();
1587 }
1600 if (dualToleranceBuilder_ != null) {
1601 return dualToleranceBuilder_.getMessageOrBuilder();
1602 } else {
1603 return dualTolerance_ == null ?
1604 com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance() : dualTolerance_;
1605 }
1606 }
1618 private com.google.protobuf.SingleFieldBuilder<
1619 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>
1620 getDualToleranceFieldBuilder() {
1621 if (dualToleranceBuilder_ == null) {
1622 dualToleranceBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1623 com.google.ortools.linearsolver.OptionalDouble, com.google.ortools.linearsolver.OptionalDouble.Builder, com.google.ortools.linearsolver.OptionalDoubleOrBuilder>(
1625 getParentForChildren(),
1626 isClean());
1627 dualTolerance_ = null;
1628 }
1629 return dualToleranceBuilder_;
1630 }
1631
1632 private int lpAlgorithm_ = 0;
1642 @java.lang.Override public boolean hasLpAlgorithm() {
1643 return ((bitField0_ & 0x00000008) != 0);
1644 }
1654 @java.lang.Override
1656 com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues result = com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues.forNumber(lpAlgorithm_);
1657 return result == null ? com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues.LP_ALGO_UNSPECIFIED : result;
1658 }
1669 public Builder setLpAlgorithm(com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues value) {
1670 if (value == null) {
1671 throw new NullPointerException();
1672 }
1673 bitField0_ |= 0x00000008;
1674 lpAlgorithm_ = value.getNumber();
1675 onChanged();
1676 return this;
1677 }
1688 bitField0_ = (bitField0_ & ~0x00000008);
1689 lpAlgorithm_ = 0;
1690 onChanged();
1691 return this;
1692 }
1693
1694 private int presolve_ = 0;
1704 @java.lang.Override public boolean hasPresolve() {
1705 return ((bitField0_ & 0x00000010) != 0);
1706 }
1716 @java.lang.Override
1718 com.google.ortools.util.OptionalBoolean result = com.google.ortools.util.OptionalBoolean.forNumber(presolve_);
1719 return result == null ? com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED : result;
1720 }
1731 public Builder setPresolve(com.google.ortools.util.OptionalBoolean value) {
1732 if (value == null) {
1733 throw new NullPointerException();
1734 }
1735 bitField0_ |= 0x00000010;
1736 presolve_ = value.getNumber();
1737 onChanged();
1738 return this;
1739 }
1750 bitField0_ = (bitField0_ & ~0x00000010);
1751 presolve_ = 0;
1752 onChanged();
1753 return this;
1754 }
1755
1756 private int scaling_ = 0;
1767 @java.lang.Override public boolean hasScaling() {
1768 return ((bitField0_ & 0x00000020) != 0);
1769 }
1780 @java.lang.Override
1782 com.google.ortools.util.OptionalBoolean result = com.google.ortools.util.OptionalBoolean.forNumber(scaling_);
1783 return result == null ? com.google.ortools.util.OptionalBoolean.BOOL_UNSPECIFIED : result;
1784 }
1796 public Builder setScaling(com.google.ortools.util.OptionalBoolean value) {
1797 if (value == null) {
1798 throw new NullPointerException();
1799 }
1800 bitField0_ |= 0x00000020;
1801 scaling_ = value.getNumber();
1802 onChanged();
1803 return this;
1804 }
1816 bitField0_ = (bitField0_ & ~0x00000020);
1817 scaling_ = 0;
1818 onChanged();
1819 return this;
1820 }
1821
1822 // @@protoc_insertion_point(builder_scope:operations_research.MPSolverCommonParameters)
1823 }
1824
1825 // @@protoc_insertion_point(class_scope:operations_research.MPSolverCommonParameters)
1826 private static final com.google.ortools.linearsolver.MPSolverCommonParameters DEFAULT_INSTANCE;
1827 static {
1828 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPSolverCommonParameters();
1829 }
1830
1832 return DEFAULT_INSTANCE;
1833 }
1834
1835 private static final com.google.protobuf.Parser<MPSolverCommonParameters>
1836 PARSER = new com.google.protobuf.AbstractParser<MPSolverCommonParameters>() {
1837 @java.lang.Override
1838 public MPSolverCommonParameters parsePartialFrom(
1839 com.google.protobuf.CodedInputStream input,
1840 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1841 throws com.google.protobuf.InvalidProtocolBufferException {
1842 Builder builder = newBuilder();
1843 try {
1844 builder.mergeFrom(input, extensionRegistry);
1845 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1846 throw e.setUnfinishedMessage(builder.buildPartial());
1847 } catch (com.google.protobuf.UninitializedMessageException e) {
1848 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1849 } catch (java.io.IOException e) {
1850 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1851 .setUnfinishedMessage(builder.buildPartial());
1852 }
1853 return builder.buildPartial();
1854 }
1855 };
1856
1857 public static com.google.protobuf.Parser<MPSolverCommonParameters> parser() {
1858 return PARSER;
1859 }
1860
1861 @java.lang.Override
1862 public com.google.protobuf.Parser<MPSolverCommonParameters> getParserForType() {
1863 return PARSER;
1864 }
1865
1866 @java.lang.Override
1868 return DEFAULT_INSTANCE;
1869 }
1870
1871}
1872
Builder setRelativeMipGap(com.google.ortools.linearsolver.OptionalDouble value)
com.google.ortools.linearsolver.MPSolverCommonParameters buildPartial()
Builder mergeFrom(com.google.ortools.linearsolver.MPSolverCommonParameters other)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.OptionalDouble.Builder getPrimalToleranceBuilder()
com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstanceForType()
Builder setDualTolerance(com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getRelativeMipGapOrBuilder()
com.google.ortools.linearsolver.MPSolverCommonParameters build()
Builder setDualTolerance(com.google.ortools.linearsolver.OptionalDouble value)
Builder setPresolve(com.google.ortools.util.OptionalBoolean value)
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getPrimalToleranceOrBuilder()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder setLpAlgorithm(com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues value)
Builder setPrimalTolerance(com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue)
Builder setPrimalTolerance(com.google.ortools.linearsolver.OptionalDouble value)
com.google.ortools.linearsolver.OptionalDouble.Builder getDualToleranceBuilder()
Builder mergeRelativeMipGap(com.google.ortools.linearsolver.OptionalDouble value)
Builder setScaling(com.google.ortools.util.OptionalBoolean value)
Builder setRelativeMipGap(com.google.ortools.linearsolver.OptionalDouble.Builder builderForValue)
com.google.ortools.linearsolver.OptionalDouble getPrimalTolerance()
Builder mergeDualTolerance(com.google.ortools.linearsolver.OptionalDouble value)
com.google.ortools.linearsolver.OptionalDouble.Builder getRelativeMipGapBuilder()
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getDualToleranceOrBuilder()
Builder mergePrimalTolerance(com.google.ortools.linearsolver.OptionalDouble value)
com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues getLpAlgorithm()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(java.io.InputStream input)
com.google.protobuf.Parser< MPSolverCommonParameters > getParserForType()
com.google.ortools.linearsolver.OptionalDouble getDualTolerance()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.linearsolver.OptionalDouble getPrimalTolerance()
static com.google.protobuf.Parser< MPSolverCommonParameters > parser()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.linearsolver.MPSolverCommonParameters.LPAlgorithmValues getLpAlgorithm()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom(java.io.InputStream input)
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getPrimalToleranceOrBuilder()
static com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstance()
com.google.ortools.linearsolver.OptionalDouble getRelativeMipGap()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getDualToleranceOrBuilder()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(java.nio.ByteBuffer data)
static Builder newBuilder(com.google.ortools.linearsolver.MPSolverCommonParameters prototype)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(com.google.protobuf.CodedInputStream input)
com.google.ortools.linearsolver.MPSolverCommonParameters getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.linearsolver.MPSolverCommonParameters parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.OptionalDoubleOrBuilder getRelativeMipGapOrBuilder()
static com.google.ortools.linearsolver.MPSolverCommonParameters parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static LPAlgorithmValues valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap< LPAlgorithmValues > internalGetValueMap()