4 package com.google.ortools.linearsolver;
10 com.google.protobuf.GeneratedMessageV3 implements
13 private static final long serialVersionUID = 0L;
20 solverSpecificParameters_ =
"";
24 @SuppressWarnings({
"unused"})
26 UnusedPrivateParameter unused) {
31 public final com.
google.protobuf.UnknownFieldSet
33 return this.unknownFields;
36 com.
google.protobuf.CodedInputStream input,
37 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
38 throws com.
google.protobuf.InvalidProtocolBufferException {
40 if (extensionRegistry ==
null) {
41 throw new java.lang.NullPointerException();
43 int mutable_bitField0_ = 0;
44 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
45 com.
google.protobuf.UnknownFieldSet.newBuilder();
49 int tag = input.readTag();
56 if (((bitField0_ & 0x00000001) != 0)) {
60 if (subBuilder !=
null) {
61 subBuilder.mergeFrom(model_);
62 model_ = subBuilder.buildPartial();
64 bitField0_ |= 0x00000001;
68 int rawValue = input.readEnum();
69 @SuppressWarnings(
"deprecation")
70 com.google.ortools.linearsolver.MPModelRequest.SolverType value =
com.google.ortools.linearsolver.MPModelRequest.SolverType.valueOf(rawValue);
72 unknownFields.mergeVarintField(2, rawValue);
74 bitField0_ |= 0x00000002;
75 solverType_ = rawValue;
80 bitField0_ |= 0x00000004;
81 solverTimeLimitSeconds_ = input.readDouble();
85 bitField0_ |= 0x00000008;
86 enableInternalSolverOutput_ = input.readBool();
90 com.
google.protobuf.ByteString bs = input.readBytes();
91 bitField0_ |= 0x00000010;
92 solverSpecificParameters_ = bs;
96 if (!parseUnknownField(
97 input, unknownFields, extensionRegistry, tag)) {
104 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
105 throw e.setUnfinishedMessage(
this);
106 }
catch (java.io.IOException e) {
107 throw new com.
google.protobuf.InvalidProtocolBufferException(
108 e).setUnfinishedMessage(
this);
110 this.unknownFields = unknownFields.build();
111 makeExtensionsImmutable();
114 public static final com.
google.protobuf.Descriptors.Descriptor
120 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
123 .ensureFieldAccessorsInitialized(
139 implements
com.
google.protobuf.ProtocolMessageEnum {
236 public static final int GLOP_LINEAR_PROGRAMMING_VALUE = 2;
240 public static final int CLP_LINEAR_PROGRAMMING_VALUE = 0;
244 public static final int GLPK_LINEAR_PROGRAMMING_VALUE = 1;
252 public static final int GUROBI_LINEAR_PROGRAMMING_VALUE = 6;
260 public static final int CPLEX_LINEAR_PROGRAMMING_VALUE = 10;
268 public static final int SCIP_MIXED_INTEGER_PROGRAMMING_VALUE = 3;
272 public static final int GLPK_MIXED_INTEGER_PROGRAMMING_VALUE = 4;
276 public static final int CBC_MIXED_INTEGER_PROGRAMMING_VALUE = 5;
284 public static final int GUROBI_MIXED_INTEGER_PROGRAMMING_VALUE = 7;
292 public static final int CPLEX_MIXED_INTEGER_PROGRAMMING_VALUE = 11;
300 public static final int BOP_INTEGER_PROGRAMMING_VALUE = 12;
311 public static final int SAT_INTEGER_PROGRAMMING_VALUE = 14;
315 public static final int KNAPSACK_MIXED_INTEGER_PROGRAMMING_VALUE = 13;
325 @java.lang.Deprecated
327 return forNumber(value);
332 case 2:
return GLOP_LINEAR_PROGRAMMING;
333 case 0:
return CLP_LINEAR_PROGRAMMING;
334 case 1:
return GLPK_LINEAR_PROGRAMMING;
335 case 6:
return GUROBI_LINEAR_PROGRAMMING;
336 case 10:
return CPLEX_LINEAR_PROGRAMMING;
337 case 3:
return SCIP_MIXED_INTEGER_PROGRAMMING;
338 case 4:
return GLPK_MIXED_INTEGER_PROGRAMMING;
339 case 5:
return CBC_MIXED_INTEGER_PROGRAMMING;
340 case 7:
return GUROBI_MIXED_INTEGER_PROGRAMMING;
341 case 11:
return CPLEX_MIXED_INTEGER_PROGRAMMING;
342 case 12:
return BOP_INTEGER_PROGRAMMING;
343 case 14:
return SAT_INTEGER_PROGRAMMING;
344 case 13:
return KNAPSACK_MIXED_INTEGER_PROGRAMMING;
345 default:
return null;
351 return internalValueMap;
353 private static final com.
google.protobuf.Internal.EnumLiteMap<
356 public SolverType findValueByNumber(
int number) {
361 public final com.
google.protobuf.Descriptors.EnumValueDescriptor
365 public final com.
google.protobuf.Descriptors.EnumDescriptor
369 public static final com.
google.protobuf.Descriptors.EnumDescriptor
374 private static final SolverType[] VALUES = values();
377 com.
google.protobuf.Descriptors.EnumValueDescriptor desc) {
379 throw new java.lang.IllegalArgumentException(
380 "EnumValueDescriptor is not for this type.");
382 return VALUES[desc.getIndex()];
385 private final int value;
394 private int bitField0_;
405 return ((bitField0_ & 0x00000001) != 0);
429 private int solverType_;
434 return ((bitField0_ & 0x00000002) != 0);
440 @SuppressWarnings(
"deprecation")
446 private double solverTimeLimitSeconds_;
461 return ((bitField0_ & 0x00000004) != 0);
477 return solverTimeLimitSeconds_;
481 private boolean enableInternalSolverOutput_;
493 return ((bitField0_ & 0x00000008) != 0);
506 return enableInternalSolverOutput_;
510 private volatile java.lang.Object solverSpecificParameters_;
528 return ((bitField0_ & 0x00000010) != 0);
547 java.lang.Object ref = solverSpecificParameters_;
548 if (ref instanceof java.lang.String) {
549 return (java.lang.String) ref;
553 java.lang.String s = bs.toStringUtf8();
554 if (bs.isValidUtf8()) {
555 solverSpecificParameters_ = s;
578 java.lang.Object ref = solverSpecificParameters_;
579 if (ref instanceof java.lang.String) {
581 com.
google.protobuf.ByteString.copyFromUtf8(
582 (java.lang.String) ref);
583 solverSpecificParameters_ = b;
586 return (
com.
google.protobuf.ByteString) ref;
590 private byte memoizedIsInitialized = -1;
597 memoizedIsInitialized = 1;
603 throws java.io.IOException {
604 if (((bitField0_ & 0x00000001) != 0)) {
607 if (((bitField0_ & 0x00000002) != 0)) {
608 output.writeEnum(2, solverType_);
610 if (((bitField0_ & 0x00000004) != 0)) {
611 output.writeDouble(3, solverTimeLimitSeconds_);
613 if (((bitField0_ & 0x00000008) != 0)) {
614 output.writeBool(4, enableInternalSolverOutput_);
616 if (((bitField0_ & 0x00000010) != 0)) {
617 com.
google.protobuf.GeneratedMessageV3.writeString(output, 5, solverSpecificParameters_);
619 unknownFields.writeTo(output);
624 int size = memoizedSize;
625 if (size != -1)
return size;
628 if (((bitField0_ & 0x00000001) != 0)) {
629 size +=
com.
google.protobuf.CodedOutputStream
632 if (((bitField0_ & 0x00000002) != 0)) {
633 size +=
com.
google.protobuf.CodedOutputStream
634 .computeEnumSize(2, solverType_);
636 if (((bitField0_ & 0x00000004) != 0)) {
637 size +=
com.
google.protobuf.CodedOutputStream
638 .computeDoubleSize(3, solverTimeLimitSeconds_);
640 if (((bitField0_ & 0x00000008) != 0)) {
641 size +=
com.
google.protobuf.CodedOutputStream
642 .computeBoolSize(4, enableInternalSolverOutput_);
644 if (((bitField0_ & 0x00000010) != 0)) {
645 size +=
com.
google.protobuf.GeneratedMessageV3.computeStringSize(5, solverSpecificParameters_);
647 size += unknownFields.getSerializedSize();
653 public boolean equals(
final java.lang.Object obj) {
658 return super.equals(obj);
662 if (
hasModel() != other.hasModel())
return false;
665 .
equals(other.getModel()))
return false;
669 if (solverType_ != other.solverType_)
return false;
674 != java.lang.Double.doubleToLongBits(
675 other.getSolverTimeLimitSeconds()))
return false;
680 != other.getEnableInternalSolverOutput())
return false;
685 .equals(other.getSolverSpecificParameters()))
return false;
687 if (!unknownFields.equals(other.unknownFields))
return false;
693 if (memoizedHashCode != 0) {
694 return memoizedHashCode;
704 hash = (53 * hash) + solverType_;
708 hash = (53 * hash) +
com.
google.protobuf.Internal.hashLong(
713 hash = (53 * hash) +
com.
google.protobuf.Internal.hashBoolean(
720 hash = (29 * hash) + unknownFields.hashCode();
721 memoizedHashCode = hash;
726 java.nio.ByteBuffer data)
727 throws com.
google.protobuf.InvalidProtocolBufferException {
728 return PARSER.parseFrom(data);
731 java.nio.ByteBuffer data,
732 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
733 throws com.
google.protobuf.InvalidProtocolBufferException {
734 return PARSER.parseFrom(data, extensionRegistry);
738 throws com.
google.protobuf.InvalidProtocolBufferException {
739 return PARSER.parseFrom(data);
743 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
744 throws com.
google.protobuf.InvalidProtocolBufferException {
745 return PARSER.parseFrom(data, extensionRegistry);
748 throws com.
google.protobuf.InvalidProtocolBufferException {
749 return PARSER.parseFrom(data);
753 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
754 throws com.
google.protobuf.InvalidProtocolBufferException {
755 return PARSER.parseFrom(data, extensionRegistry);
758 throws java.io.IOException {
759 return com.
google.protobuf.GeneratedMessageV3
760 .parseWithIOException(
PARSER, input);
763 java.io.InputStream input,
764 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
765 throws java.io.IOException {
766 return com.
google.protobuf.GeneratedMessageV3
767 .parseWithIOException(
PARSER, input, extensionRegistry);
770 throws java.io.IOException {
771 return com.
google.protobuf.GeneratedMessageV3
772 .parseDelimitedWithIOException(
PARSER, input);
775 java.io.InputStream input,
776 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
777 throws java.io.IOException {
778 return com.
google.protobuf.GeneratedMessageV3
779 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
782 com.
google.protobuf.CodedInputStream input)
783 throws java.io.IOException {
784 return com.
google.protobuf.GeneratedMessageV3
785 .parseWithIOException(
PARSER, input);
788 com.
google.protobuf.CodedInputStream input,
789 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
790 throws java.io.IOException {
791 return com.
google.protobuf.GeneratedMessageV3
792 .parseWithIOException(
PARSER, input, extensionRegistry);
805 return this == DEFAULT_INSTANCE
811 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
819 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
822 public static final com.
google.protobuf.Descriptors.Descriptor
828 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
831 .ensureFieldAccessorsInitialized(
837 maybeForceBuilderInitialization();
841 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
843 maybeForceBuilderInitialization();
845 private void maybeForceBuilderInitialization() {
846 if (
com.
google.protobuf.GeneratedMessageV3
847 .alwaysUseFieldBuilders) {
848 getModelFieldBuilder();
854 if (modelBuilder_ ==
null) {
857 modelBuilder_.clear();
859 bitField0_ = (bitField0_ & ~0x00000001);
861 bitField0_ = (bitField0_ & ~0x00000002);
862 solverTimeLimitSeconds_ = 0D;
863 bitField0_ = (bitField0_ & ~0x00000004);
864 enableInternalSolverOutput_ =
false;
865 bitField0_ = (bitField0_ & ~0x00000008);
866 solverSpecificParameters_ =
"";
867 bitField0_ = (bitField0_ & ~0x00000010);
872 public com.
google.protobuf.Descriptors.Descriptor
885 if (!result.isInitialized()) {
886 throw newUninitializedMessageException(result);
894 int from_bitField0_ = bitField0_;
895 int to_bitField0_ = 0;
896 if (((from_bitField0_ & 0x00000001) != 0)) {
897 if (modelBuilder_ ==
null) {
898 result.model_ = model_;
900 result.model_ = modelBuilder_.build();
902 to_bitField0_ |= 0x00000001;
904 if (((from_bitField0_ & 0x00000002) != 0)) {
905 to_bitField0_ |= 0x00000002;
907 result.solverType_ = solverType_;
908 if (((from_bitField0_ & 0x00000004) != 0)) {
909 result.solverTimeLimitSeconds_ = solverTimeLimitSeconds_;
910 to_bitField0_ |= 0x00000004;
912 if (((from_bitField0_ & 0x00000008) != 0)) {
913 result.enableInternalSolverOutput_ = enableInternalSolverOutput_;
914 to_bitField0_ |= 0x00000008;
916 if (((from_bitField0_ & 0x00000010) != 0)) {
917 to_bitField0_ |= 0x00000010;
919 result.solverSpecificParameters_ = solverSpecificParameters_;
920 result.bitField0_ = to_bitField0_;
927 return super.
clone();
931 com.
google.protobuf.Descriptors.FieldDescriptor field,
932 java.lang.Object value) {
933 return super.
setField(field, value);
937 com.
google.protobuf.Descriptors.FieldDescriptor field) {
942 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
947 com.
google.protobuf.Descriptors.FieldDescriptor field,
948 int index, java.lang.Object value) {
953 com.
google.protobuf.Descriptors.FieldDescriptor field,
954 java.lang.Object value) {
962 super.mergeFrom(other);
969 if (other.hasModel()) {
972 if (other.hasSolverType()) {
975 if (other.hasSolverTimeLimitSeconds()) {
978 if (other.hasEnableInternalSolverOutput()) {
981 if (other.hasSolverSpecificParameters()) {
982 bitField0_ |= 0x00000010;
983 solverSpecificParameters_ = other.solverSpecificParameters_;
998 com.
google.protobuf.CodedInputStream input,
999 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1000 throws java.io.IOException {
1003 parsedMessage =
PARSER.parsePartialFrom(input, extensionRegistry);
1004 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
1006 throw e.unwrapIOException();
1008 if (parsedMessage !=
null) {
1014 private int bitField0_;
1017 private com.
google.protobuf.SingleFieldBuilderV3<
1027 return ((bitField0_ & 0x00000001) != 0);
1037 if (modelBuilder_ ==
null) {
1040 return modelBuilder_.getMessage();
1051 if (modelBuilder_ ==
null) {
1052 if (value ==
null) {
1053 throw new NullPointerException();
1058 modelBuilder_.setMessage(value);
1060 bitField0_ |= 0x00000001;
1072 if (modelBuilder_ ==
null) {
1073 model_ = builderForValue.build();
1076 modelBuilder_.setMessage(builderForValue.build());
1078 bitField0_ |= 0x00000001;
1089 if (modelBuilder_ ==
null) {
1090 if (((bitField0_ & 0x00000001) != 0) &&
1100 modelBuilder_.mergeFrom(value);
1102 bitField0_ |= 0x00000001;
1113 if (modelBuilder_ ==
null) {
1117 modelBuilder_.clear();
1119 bitField0_ = (bitField0_ & ~0x00000001);
1130 bitField0_ |= 0x00000001;
1132 return getModelFieldBuilder().getBuilder();
1142 if (modelBuilder_ !=
null) {
1143 return modelBuilder_.getMessageOrBuilder();
1145 return model_ ==
null ?
1156 private com.
google.protobuf.SingleFieldBuilderV3<
1158 getModelFieldBuilder() {
1159 if (modelBuilder_ ==
null) {
1160 modelBuilder_ =
new com.
google.protobuf.SingleFieldBuilderV3<
1163 getParentForChildren(),
1167 return modelBuilder_;
1170 private int solverType_ = 2;
1175 return ((bitField0_ & 0x00000002) != 0);
1181 @SuppressWarnings(
"deprecation")
1189 if (value ==
null) {
1190 throw new NullPointerException();
1192 bitField0_ |= 0x00000002;
1193 solverType_ = value.getNumber();
1201 bitField0_ = (bitField0_ & ~0x00000002);
1207 private double solverTimeLimitSeconds_ ;
1222 return ((bitField0_ & 0x00000004) != 0);
1238 return solverTimeLimitSeconds_;
1254 bitField0_ |= 0x00000004;
1255 solverTimeLimitSeconds_ = value;
1273 bitField0_ = (bitField0_ & ~0x00000004);
1274 solverTimeLimitSeconds_ = 0D;
1279 private boolean enableInternalSolverOutput_ ;
1291 return ((bitField0_ & 0x00000008) != 0);
1304 return enableInternalSolverOutput_;
1317 bitField0_ |= 0x00000008;
1318 enableInternalSolverOutput_ = value;
1333 bitField0_ = (bitField0_ & ~0x00000008);
1334 enableInternalSolverOutput_ =
false;
1339 private java.lang.Object solverSpecificParameters_ =
"";
1357 return ((bitField0_ & 0x00000010) != 0);
1376 java.lang.Object ref = solverSpecificParameters_;
1377 if (!(ref instanceof java.lang.String)) {
1380 java.lang.String s = bs.toStringUtf8();
1381 if (bs.isValidUtf8()) {
1382 solverSpecificParameters_ = s;
1386 return (java.lang.String) ref;
1407 java.lang.Object ref = solverSpecificParameters_;
1408 if (ref instanceof String) {
1410 com.
google.protobuf.ByteString.copyFromUtf8(
1411 (java.lang.String) ref);
1412 solverSpecificParameters_ = b;
1415 return (
com.
google.protobuf.ByteString) ref;
1435 java.lang.String value) {
1436 if (value ==
null) {
1437 throw new NullPointerException();
1439 bitField0_ |= 0x00000010;
1440 solverSpecificParameters_ = value;
1461 bitField0_ = (bitField0_ & ~0x00000010);
1484 if (value ==
null) {
1485 throw new NullPointerException();
1487 bitField0_ |= 0x00000010;
1488 solverSpecificParameters_ = value;
1494 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1500 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1515 return DEFAULT_INSTANCE;
1522 com.
google.protobuf.CodedInputStream input,
1523 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1524 throws com.
google.protobuf.InvalidProtocolBufferException {
1540 return DEFAULT_INSTANCE;