5package com.google.ortools.linearsolver;
15 com.google.protobuf.GeneratedMessage implements
18private static final long serialVersionUID = 0L;
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 private MPModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 variable_ = java.util.Collections.emptyList();
34 constraint_ = java.util.Collections.emptyList();
35 generalConstraint_ = java.util.Collections.emptyList();
37 annotation_ = java.util.Collections.emptyList();
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
55 com.google.protobuf.MessageOrBuilder {
115 com.google.protobuf.ByteString
147 com.google.protobuf.ByteString
164 com.google.protobuf.ByteString
176 com.google.protobuf.GeneratedMessage implements
179 private static final long serialVersionUID = 0L;
181 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
182 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
190 private Annotation(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
200 public static final com.google.protobuf.Descriptors.Descriptor
202 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
206 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
208 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
209 .ensureFieldAccessorsInitialized(
210 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
222 implements com.google.protobuf.ProtocolMessageEnum {
238 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
239 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
249 public static final int VARIABLE_DEFAULT_VALUE = 0;
253 public static final int CONSTRAINT_VALUE = 1;
257 public static final int GENERAL_CONSTRAINT_VALUE = 2;
269 @java.lang.Deprecated
271 return forNumber(value);
280 case 0:
return VARIABLE_DEFAULT;
281 case 1:
return CONSTRAINT;
282 case 2:
return GENERAL_CONSTRAINT;
283 default:
return null;
287 public static com.google.protobuf.Internal.EnumLiteMap<
TargetType>
289 return internalValueMap;
291 private static final com.google.protobuf.Internal.EnumLiteMap<
293 new com.google.protobuf.Internal.EnumLiteMap<
TargetType>() {
294 public TargetType findValueByNumber(
int number) {
299 public final com.google.protobuf.Descriptors.EnumValueDescriptor
303 public final com.google.protobuf.Descriptors.EnumDescriptor
307 public static final com.google.protobuf.Descriptors.EnumDescriptor
309 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDescriptor().getEnumTypes().get(0);
312 private static final TargetType[] VALUES = values();
315 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
317 throw new java.lang.IllegalArgumentException(
318 "EnumValueDescriptor is not for this type.");
320 return VALUES[desc.getIndex()];
323 private final int value;
332 private int bitField0_;
334 private int targetType_ = 0;
340 return ((bitField0_ & 0x00000001) != 0);
348 return result ==
null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
352 private int targetIndex_ = 0;
364 return ((bitField0_ & 0x00000002) != 0);
381 @SuppressWarnings(
"serial")
382 private volatile java.lang.Object targetName_ = "";
393 return ((bitField0_ & 0x00000004) != 0);
405 java.lang.Object ref = targetName_;
406 if (ref instanceof java.lang.String) {
407 return (java.lang.String) ref;
409 com.google.protobuf.ByteString bs =
410 (com.google.protobuf.ByteString) ref;
411 java.lang.String s = bs.toStringUtf8();
412 if (bs.isValidUtf8()) {
427 public com.google.protobuf.ByteString
429 java.lang.Object ref = targetName_;
430 if (ref instanceof java.lang.String) {
431 com.google.protobuf.ByteString b =
432 com.google.protobuf.ByteString.copyFromUtf8(
433 (java.lang.String) ref);
437 return (com.google.protobuf.ByteString) ref;
442 @SuppressWarnings(
"serial")
443 private volatile java.lang.Object payloadKey_ = "";
455 return ((bitField0_ & 0x00000008) != 0);
468 java.lang.Object ref = payloadKey_;
469 if (ref instanceof java.lang.String) {
470 return (java.lang.String) ref;
472 com.google.protobuf.ByteString bs =
473 (com.google.protobuf.ByteString) ref;
474 java.lang.String s = bs.toStringUtf8();
475 if (bs.isValidUtf8()) {
491 public com.google.protobuf.ByteString
493 java.lang.Object ref = payloadKey_;
494 if (ref instanceof java.lang.String) {
495 com.google.protobuf.ByteString b =
496 com.google.protobuf.ByteString.copyFromUtf8(
497 (java.lang.String) ref);
501 return (com.google.protobuf.ByteString) ref;
506 @SuppressWarnings(
"serial")
507 private volatile java.lang.Object payloadValue_ = "";
514 return ((bitField0_ & 0x00000010) != 0);
522 java.lang.Object ref = payloadValue_;
523 if (ref instanceof java.lang.String) {
524 return (java.lang.String) ref;
526 com.google.protobuf.ByteString bs =
527 (com.google.protobuf.ByteString) ref;
528 java.lang.String s = bs.toStringUtf8();
529 if (bs.isValidUtf8()) {
540 public com.google.protobuf.ByteString
542 java.lang.Object ref = payloadValue_;
543 if (ref instanceof java.lang.String) {
544 com.google.protobuf.ByteString b =
545 com.google.protobuf.ByteString.copyFromUtf8(
546 (java.lang.String) ref);
550 return (com.google.protobuf.ByteString) ref;
554 private byte memoizedIsInitialized = -1;
561 memoizedIsInitialized = 1;
566 public void writeTo(com.google.protobuf.CodedOutputStream output)
567 throws java.io.IOException {
568 if (((bitField0_ & 0x00000001) != 0)) {
569 output.writeEnum(1, targetType_);
571 if (((bitField0_ & 0x00000002) != 0)) {
572 output.writeInt32(2, targetIndex_);
574 if (((bitField0_ & 0x00000004) != 0)) {
575 com.google.protobuf.GeneratedMessage.writeString(output, 3, targetName_);
577 if (((bitField0_ & 0x00000008) != 0)) {
578 com.google.protobuf.GeneratedMessage.writeString(output, 4, payloadKey_);
580 if (((bitField0_ & 0x00000010) != 0)) {
581 com.google.protobuf.GeneratedMessage.writeString(output, 5, payloadValue_);
583 getUnknownFields().writeTo(output);
588 int size = memoizedSize;
589 if (size != -1)
return size;
592 if (((bitField0_ & 0x00000001) != 0)) {
593 size += com.google.protobuf.CodedOutputStream
594 .computeEnumSize(1, targetType_);
596 if (((bitField0_ & 0x00000002) != 0)) {
597 size += com.google.protobuf.CodedOutputStream
598 .computeInt32Size(2, targetIndex_);
600 if (((bitField0_ & 0x00000004) != 0)) {
601 size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetName_);
603 if (((bitField0_ & 0x00000008) != 0)) {
604 size += com.google.protobuf.GeneratedMessage.computeStringSize(4, payloadKey_);
606 if (((bitField0_ & 0x00000010) != 0)) {
607 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, payloadValue_);
609 size += getUnknownFields().getSerializedSize();
615 public boolean equals(
final java.lang.Object obj) {
619 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto.Annotation)) {
620 return super.equals(obj);
626 if (targetType_ != other.targetType_)
return false;
648 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
654 if (memoizedHashCode != 0) {
655 return memoizedHashCode;
661 hash = (53 * hash) + targetType_;
679 hash = (29 * hash) + getUnknownFields().hashCode();
680 memoizedHashCode = hash;
685 java.nio.ByteBuffer data)
686 throws com.google.protobuf.InvalidProtocolBufferException {
687 return PARSER.parseFrom(data);
690 java.nio.ByteBuffer data,
691 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692 throws com.google.protobuf.InvalidProtocolBufferException {
693 return PARSER.parseFrom(data, extensionRegistry);
696 com.google.protobuf.ByteString data)
697 throws com.google.protobuf.InvalidProtocolBufferException {
698 return PARSER.parseFrom(data);
701 com.google.protobuf.ByteString data,
702 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
703 throws com.google.protobuf.InvalidProtocolBufferException {
704 return PARSER.parseFrom(data, extensionRegistry);
707 throws com.google.protobuf.InvalidProtocolBufferException {
708 return PARSER.parseFrom(data);
712 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
713 throws com.google.protobuf.InvalidProtocolBufferException {
714 return PARSER.parseFrom(data, extensionRegistry);
717 throws java.io.IOException {
718 return com.google.protobuf.GeneratedMessage
719 .parseWithIOException(PARSER, input);
722 java.io.InputStream input,
723 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
724 throws java.io.IOException {
725 return com.google.protobuf.GeneratedMessage
726 .parseWithIOException(PARSER, input, extensionRegistry);
730 throws java.io.IOException {
731 return com.google.protobuf.GeneratedMessage
732 .parseDelimitedWithIOException(PARSER, input);
736 java.io.InputStream input,
737 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
738 throws java.io.IOException {
739 return com.google.protobuf.GeneratedMessage
740 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
743 com.google.protobuf.CodedInputStream input)
744 throws java.io.IOException {
745 return com.google.protobuf.GeneratedMessage
746 .parseWithIOException(PARSER, input);
749 com.google.protobuf.CodedInputStream input,
750 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
751 throws java.io.IOException {
752 return com.google.protobuf.GeneratedMessage
753 .parseWithIOException(PARSER, input, extensionRegistry);
761 public static Builder newBuilder(com.google.ortools.linearsolver.MPModelProto.Annotation prototype) {
766 return this == DEFAULT_INSTANCE
772 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
785 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
788 public static final com.google.protobuf.Descriptors.Descriptor
790 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
794 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
796 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_fieldAccessorTable
797 .ensureFieldAccessorsInitialized(
798 com.google.ortools.linearsolver.MPModelProto.Annotation.class, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder.class);
807 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
824 public com.google.protobuf.Descriptors.Descriptor
826 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_Annotation_descriptor;
831 return com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance();
838 throw newUninitializedMessageException(result);
846 if (bitField0_ != 0) { buildPartial0(result); }
851 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto.Annotation result) {
852 int from_bitField0_ = bitField0_;
853 int to_bitField0_ = 0;
854 if (((from_bitField0_ & 0x00000001) != 0)) {
855 result.targetType_ = targetType_;
856 to_bitField0_ |= 0x00000001;
858 if (((from_bitField0_ & 0x00000002) != 0)) {
859 result.targetIndex_ = targetIndex_;
860 to_bitField0_ |= 0x00000002;
862 if (((from_bitField0_ & 0x00000004) != 0)) {
863 result.targetName_ = targetName_;
864 to_bitField0_ |= 0x00000004;
866 if (((from_bitField0_ & 0x00000008) != 0)) {
867 result.payloadKey_ = payloadKey_;
868 to_bitField0_ |= 0x00000008;
870 if (((from_bitField0_ & 0x00000010) != 0)) {
871 result.payloadValue_ = payloadValue_;
872 to_bitField0_ |= 0x00000010;
874 result.bitField0_ |= to_bitField0_;
879 if (other instanceof com.google.ortools.linearsolver.MPModelProto.Annotation) {
880 return mergeFrom((com.google.ortools.linearsolver.MPModelProto.Annotation)other);
882 super.mergeFrom(other);
888 if (other == com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance())
return this;
889 if (other.hasTargetType()) {
892 if (other.hasTargetIndex()) {
895 if (other.hasTargetName()) {
896 targetName_ = other.targetName_;
897 bitField0_ |= 0x00000004;
900 if (other.hasPayloadKey()) {
901 payloadKey_ = other.payloadKey_;
902 bitField0_ |= 0x00000008;
905 if (other.hasPayloadValue()) {
906 payloadValue_ = other.payloadValue_;
907 bitField0_ |= 0x00000010;
910 this.mergeUnknownFields(other.getUnknownFields());
922 com.google.protobuf.CodedInputStream input,
923 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
924 throws java.io.IOException {
925 if (extensionRegistry ==
null) {
926 throw new java.lang.NullPointerException();
929 boolean done =
false;
931 int tag = input.readTag();
937 int tmpRaw = input.readEnum();
939 com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.forNumber(tmpRaw);
940 if (tmpValue ==
null) {
941 mergeUnknownVarintField(1, tmpRaw);
943 targetType_ = tmpRaw;
944 bitField0_ |= 0x00000001;
949 targetIndex_ = input.readInt32();
950 bitField0_ |= 0x00000002;
954 targetName_ = input.readBytes();
955 bitField0_ |= 0x00000004;
959 payloadKey_ = input.readBytes();
960 bitField0_ |= 0x00000008;
964 payloadValue_ = input.readBytes();
965 bitField0_ |= 0x00000010;
969 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
976 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
977 throw e.unwrapIOException();
983 private int bitField0_;
985 private int targetType_ = 0;
991 return ((bitField0_ & 0x00000001) != 0);
1000 return result ==
null ? com.google.ortools.linearsolver.MPModelProto.Annotation.TargetType.VARIABLE_DEFAULT : result;
1008 if (value ==
null) {
1009 throw new NullPointerException();
1011 bitField0_ |= 0x00000001;
1012 targetType_ = value.getNumber();
1021 bitField0_ = (bitField0_ & ~0x00000001);
1027 private int targetIndex_ ;
1039 return ((bitField0_ & 0x00000002) != 0);
1052 return targetIndex_;
1066 targetIndex_ = value;
1067 bitField0_ |= 0x00000002;
1081 bitField0_ = (bitField0_ & ~0x00000002);
1087 private java.lang.Object targetName_ =
"";
1097 return ((bitField0_ & 0x00000004) != 0);
1108 java.lang.Object ref = targetName_;
1109 if (!(ref instanceof java.lang.String)) {
1110 com.google.protobuf.ByteString bs =
1111 (com.google.protobuf.ByteString) ref;
1112 java.lang.String s = bs.toStringUtf8();
1113 if (bs.isValidUtf8()) {
1118 return (java.lang.String) ref;
1129 public com.google.protobuf.ByteString
1131 java.lang.Object ref = targetName_;
1132 if (ref instanceof String) {
1133 com.google.protobuf.ByteString b =
1134 com.google.protobuf.ByteString.copyFromUtf8(
1135 (java.lang.String) ref);
1139 return (com.google.protobuf.ByteString) ref;
1152 java.lang.String value) {
1153 if (value ==
null) {
throw new NullPointerException(); }
1154 targetName_ = value;
1155 bitField0_ |= 0x00000004;
1169 bitField0_ = (bitField0_ & ~0x00000004);
1183 com.google.protobuf.ByteString value) {
1184 if (value ==
null) {
throw new NullPointerException(); }
1185 targetName_ = value;
1186 bitField0_ |= 0x00000004;
1191 private java.lang.Object payloadKey_ =
"";
1202 return ((bitField0_ & 0x00000008) != 0);
1214 java.lang.Object ref = payloadKey_;
1215 if (!(ref instanceof java.lang.String)) {
1216 com.google.protobuf.ByteString bs =
1217 (com.google.protobuf.ByteString) ref;
1218 java.lang.String s = bs.toStringUtf8();
1219 if (bs.isValidUtf8()) {
1224 return (java.lang.String) ref;
1236 public com.google.protobuf.ByteString
1238 java.lang.Object ref = payloadKey_;
1239 if (ref instanceof String) {
1240 com.google.protobuf.ByteString b =
1241 com.google.protobuf.ByteString.copyFromUtf8(
1242 (java.lang.String) ref);
1246 return (com.google.protobuf.ByteString) ref;
1260 java.lang.String value) {
1261 if (value ==
null) {
throw new NullPointerException(); }
1262 payloadKey_ = value;
1263 bitField0_ |= 0x00000008;
1278 bitField0_ = (bitField0_ & ~0x00000008);
1293 com.google.protobuf.ByteString value) {
1294 if (value ==
null) {
throw new NullPointerException(); }
1295 payloadKey_ = value;
1296 bitField0_ |= 0x00000008;
1301 private java.lang.Object payloadValue_ =
"";
1307 return ((bitField0_ & 0x00000010) != 0);
1314 java.lang.Object ref = payloadValue_;
1315 if (!(ref instanceof java.lang.String)) {
1316 com.google.protobuf.ByteString bs =
1317 (com.google.protobuf.ByteString) ref;
1318 java.lang.String s = bs.toStringUtf8();
1319 if (bs.isValidUtf8()) {
1324 return (java.lang.String) ref;
1331 public com.google.protobuf.ByteString
1333 java.lang.Object ref = payloadValue_;
1334 if (ref instanceof String) {
1335 com.google.protobuf.ByteString b =
1336 com.google.protobuf.ByteString.copyFromUtf8(
1337 (java.lang.String) ref);
1341 return (com.google.protobuf.ByteString) ref;
1350 java.lang.String value) {
1351 if (value ==
null) {
throw new NullPointerException(); }
1352 payloadValue_ = value;
1353 bitField0_ |= 0x00000010;
1363 bitField0_ = (bitField0_ & ~0x00000010);
1373 com.google.protobuf.ByteString value) {
1374 if (value ==
null) {
throw new NullPointerException(); }
1375 payloadValue_ = value;
1376 bitField0_ |= 0x00000010;
1387 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPModelProto.Annotation();
1391 return DEFAULT_INSTANCE;
1394 private static final com.google.protobuf.Parser<
Annotation>
1395 PARSER =
new com.google.protobuf.AbstractParser<
Annotation>() {
1398 com.google.protobuf.CodedInputStream input,
1399 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1400 throws com.google.protobuf.InvalidProtocolBufferException {
1403 builder.
mergeFrom(input, extensionRegistry);
1404 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1406 }
catch (com.google.protobuf.UninitializedMessageException e) {
1407 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
1408 }
catch (java.io.IOException e) {
1409 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1427 return DEFAULT_INSTANCE;
1432 private int bitField0_;
1434 @SuppressWarnings(
"serial")
1435 private java.util.List<com.google.ortools.linearsolver.
MPVariableProto> variable_;
1455 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
1468 return variable_.size();
1479 return variable_.get(index);
1491 return variable_.get(index);
1495 @SuppressWarnings(
"serial")
1496 private java.util.List<com.google.ortools.linearsolver.
MPConstraintProto> constraint_;
1516 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
1529 return constraint_.size();
1540 return constraint_.get(index);
1552 return constraint_.get(index);
1556 @SuppressWarnings(
"serial")
1568 return generalConstraint_;
1579 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
1581 return generalConstraint_;
1593 return generalConstraint_.size();
1605 return generalConstraint_.get(index);
1618 return generalConstraint_.get(index);
1622 private boolean maximize_ =
false;
1633 return ((bitField0_ & 0x00000001) != 0);
1649 private double objectiveOffset_ = 0D;
1660 return ((bitField0_ & 0x00000002) != 0);
1672 return objectiveOffset_;
1688 return ((bitField0_ & 0x00000004) != 0);
1701 return quadraticObjective_ ==
null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1713 return quadraticObjective_ ==
null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
1717 @SuppressWarnings(
"serial")
1718 private volatile java.lang.Object name_ = "";
1729 return ((bitField0_ & 0x00000008) != 0);
1741 java.lang.Object ref = name_;
1742 if (ref instanceof java.lang.String) {
1743 return (java.lang.String) ref;
1745 com.google.protobuf.ByteString bs =
1746 (com.google.protobuf.ByteString) ref;
1747 java.lang.String s = bs.toStringUtf8();
1748 if (bs.isValidUtf8()) {
1763 public com.google.protobuf.ByteString
1765 java.lang.Object ref = name_;
1766 if (ref instanceof java.lang.String) {
1767 com.google.protobuf.ByteString b =
1768 com.google.protobuf.ByteString.copyFromUtf8(
1769 (java.lang.String) ref);
1773 return (com.google.protobuf.ByteString) ref;
1799 return ((bitField0_ & 0x00000010) != 0);
1821 return solutionHint_ ==
null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1842 return solutionHint_ ==
null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
1846 @SuppressWarnings(
"serial")
1859 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
1868 return annotation_.size();
1875 return annotation_.get(index);
1883 return annotation_.get(index);
1886 private byte memoizedIsInitialized = -1;
1893 memoizedIsInitialized = 1;
1898 public void writeTo(com.google.protobuf.CodedOutputStream output)
1899 throws java.io.IOException {
1900 if (((bitField0_ & 0x00000001) != 0)) {
1901 output.writeBool(1, maximize_);
1903 if (((bitField0_ & 0x00000002) != 0)) {
1904 output.writeDouble(2, objectiveOffset_);
1906 for (
int i = 0; i < variable_.size(); i++) {
1907 output.writeMessage(3, variable_.get(i));
1909 for (
int i = 0; i < constraint_.size(); i++) {
1910 output.writeMessage(4, constraint_.get(i));
1912 if (((bitField0_ & 0x00000008) != 0)) {
1913 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
1915 if (((bitField0_ & 0x00000010) != 0)) {
1918 for (
int i = 0; i < generalConstraint_.size(); i++) {
1919 output.writeMessage(7, generalConstraint_.get(i));
1921 if (((bitField0_ & 0x00000004) != 0)) {
1924 for (
int i = 0; i < annotation_.size(); i++) {
1925 output.writeMessage(9, annotation_.get(i));
1927 getUnknownFields().writeTo(output);
1932 int size = memoizedSize;
1933 if (size != -1)
return size;
1936 if (((bitField0_ & 0x00000001) != 0)) {
1937 size += com.google.protobuf.CodedOutputStream
1938 .computeBoolSize(1, maximize_);
1940 if (((bitField0_ & 0x00000002) != 0)) {
1941 size += com.google.protobuf.CodedOutputStream
1942 .computeDoubleSize(2, objectiveOffset_);
1944 for (
int i = 0; i < variable_.size(); i++) {
1945 size += com.google.protobuf.CodedOutputStream
1946 .computeMessageSize(3, variable_.get(i));
1948 for (
int i = 0; i < constraint_.size(); i++) {
1949 size += com.google.protobuf.CodedOutputStream
1950 .computeMessageSize(4, constraint_.get(i));
1952 if (((bitField0_ & 0x00000008) != 0)) {
1953 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
1955 if (((bitField0_ & 0x00000010) != 0)) {
1956 size += com.google.protobuf.CodedOutputStream
1959 for (
int i = 0; i < generalConstraint_.size(); i++) {
1960 size += com.google.protobuf.CodedOutputStream
1961 .computeMessageSize(7, generalConstraint_.get(i));
1963 if (((bitField0_ & 0x00000004) != 0)) {
1964 size += com.google.protobuf.CodedOutputStream
1967 for (
int i = 0; i < annotation_.size(); i++) {
1968 size += com.google.protobuf.CodedOutputStream
1969 .computeMessageSize(9, annotation_.get(i));
1971 size += getUnknownFields().getSerializedSize();
1972 memoizedSize = size;
1977 public boolean equals(
final java.lang.Object obj) {
1981 if (!(obj instanceof com.google.ortools.linearsolver.MPModelProto)) {
1982 return super.equals(obj);
2000 != java.lang.Double.doubleToLongBits(
2020 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
2026 if (memoizedHashCode != 0) {
2027 return memoizedHashCode;
2045 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
2050 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
2059 hash = (53 * hash) +
getName().hashCode();
2069 hash = (29 * hash) + getUnknownFields().hashCode();
2070 memoizedHashCode = hash;
2075 java.nio.ByteBuffer data)
2076 throws com.google.protobuf.InvalidProtocolBufferException {
2080 java.nio.ByteBuffer data,
2081 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2082 throws com.google.protobuf.InvalidProtocolBufferException {
2083 return PARSER.
parseFrom(data, extensionRegistry);
2086 com.google.protobuf.ByteString data)
2087 throws com.google.protobuf.InvalidProtocolBufferException {
2091 com.google.protobuf.ByteString data,
2092 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2093 throws com.google.protobuf.InvalidProtocolBufferException {
2094 return PARSER.
parseFrom(data, extensionRegistry);
2097 throws com.google.protobuf.InvalidProtocolBufferException {
2102 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2103 throws com.google.protobuf.InvalidProtocolBufferException {
2104 return PARSER.
parseFrom(data, extensionRegistry);
2107 throws java.io.IOException {
2108 return com.google.protobuf.GeneratedMessage
2109 .parseWithIOException(PARSER, input);
2112 java.io.InputStream input,
2113 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2114 throws java.io.IOException {
2115 return com.google.protobuf.GeneratedMessage
2116 .parseWithIOException(PARSER, input, extensionRegistry);
2120 throws java.io.IOException {
2121 return com.google.protobuf.GeneratedMessage
2122 .parseDelimitedWithIOException(PARSER, input);
2126 java.io.InputStream input,
2127 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2128 throws java.io.IOException {
2129 return com.google.protobuf.GeneratedMessage
2130 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
2133 com.google.protobuf.CodedInputStream input)
2134 throws java.io.IOException {
2135 return com.google.protobuf.GeneratedMessage
2136 .parseWithIOException(PARSER, input);
2139 com.google.protobuf.CodedInputStream input,
2140 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2141 throws java.io.IOException {
2142 return com.google.protobuf.GeneratedMessage
2143 .parseWithIOException(PARSER, input, extensionRegistry);
2156 return this == DEFAULT_INSTANCE
2162 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2174 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
2177 public static final com.google.protobuf.Descriptors.Descriptor
2179 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2183 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2185 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_fieldAccessorTable
2186 .ensureFieldAccessorsInitialized(
2187 com.google.ortools.linearsolver.MPModelProto.class, com.google.ortools.linearsolver.MPModelProto.Builder.class);
2192 maybeForceBuilderInitialization();
2196 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2198 maybeForceBuilderInitialization();
2200 private void maybeForceBuilderInitialization() {
2201 if (com.google.protobuf.GeneratedMessage
2202 .alwaysUseFieldBuilders) {
2203 getVariableFieldBuilder();
2204 getConstraintFieldBuilder();
2205 getGeneralConstraintFieldBuilder();
2206 getQuadraticObjectiveFieldBuilder();
2207 getSolutionHintFieldBuilder();
2208 getAnnotationFieldBuilder();
2215 if (variableBuilder_ ==
null) {
2216 variable_ = java.util.Collections.emptyList();
2219 variableBuilder_.clear();
2221 bitField0_ = (bitField0_ & ~0x00000001);
2222 if (constraintBuilder_ ==
null) {
2223 constraint_ = java.util.Collections.emptyList();
2226 constraintBuilder_.clear();
2228 bitField0_ = (bitField0_ & ~0x00000002);
2229 if (generalConstraintBuilder_ ==
null) {
2230 generalConstraint_ = java.util.Collections.emptyList();
2232 generalConstraint_ =
null;
2233 generalConstraintBuilder_.clear();
2235 bitField0_ = (bitField0_ & ~0x00000004);
2237 objectiveOffset_ = 0D;
2238 quadraticObjective_ =
null;
2239 if (quadraticObjectiveBuilder_ !=
null) {
2240 quadraticObjectiveBuilder_.dispose();
2241 quadraticObjectiveBuilder_ =
null;
2244 solutionHint_ =
null;
2245 if (solutionHintBuilder_ !=
null) {
2246 solutionHintBuilder_.dispose();
2247 solutionHintBuilder_ =
null;
2249 if (annotationBuilder_ ==
null) {
2250 annotation_ = java.util.Collections.emptyList();
2253 annotationBuilder_.clear();
2255 bitField0_ = (bitField0_ & ~0x00000100);
2260 public com.google.protobuf.Descriptors.Descriptor
2262 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPModelProto_descriptor;
2267 return com.google.ortools.linearsolver.MPModelProto.getDefaultInstance();
2274 throw newUninitializedMessageException(result);
2282 buildPartialRepeatedFields(result);
2283 if (bitField0_ != 0) { buildPartial0(result); }
2288 private void buildPartialRepeatedFields(com.google.ortools.linearsolver.MPModelProto result) {
2289 if (variableBuilder_ ==
null) {
2290 if (((bitField0_ & 0x00000001) != 0)) {
2291 variable_ = java.util.Collections.unmodifiableList(variable_);
2292 bitField0_ = (bitField0_ & ~0x00000001);
2294 result.variable_ = variable_;
2296 result.variable_ = variableBuilder_.build();
2298 if (constraintBuilder_ ==
null) {
2299 if (((bitField0_ & 0x00000002) != 0)) {
2300 constraint_ = java.util.Collections.unmodifiableList(constraint_);
2301 bitField0_ = (bitField0_ & ~0x00000002);
2303 result.constraint_ = constraint_;
2305 result.constraint_ = constraintBuilder_.build();
2307 if (generalConstraintBuilder_ ==
null) {
2308 if (((bitField0_ & 0x00000004) != 0)) {
2309 generalConstraint_ = java.util.Collections.unmodifiableList(generalConstraint_);
2310 bitField0_ = (bitField0_ & ~0x00000004);
2312 result.generalConstraint_ = generalConstraint_;
2314 result.generalConstraint_ = generalConstraintBuilder_.build();
2316 if (annotationBuilder_ ==
null) {
2317 if (((bitField0_ & 0x00000100) != 0)) {
2318 annotation_ = java.util.Collections.unmodifiableList(annotation_);
2319 bitField0_ = (bitField0_ & ~0x00000100);
2321 result.annotation_ = annotation_;
2323 result.annotation_ = annotationBuilder_.build();
2327 private void buildPartial0(com.google.ortools.linearsolver.MPModelProto result) {
2328 int from_bitField0_ = bitField0_;
2329 int to_bitField0_ = 0;
2330 if (((from_bitField0_ & 0x00000008) != 0)) {
2331 result.maximize_ = maximize_;
2332 to_bitField0_ |= 0x00000001;
2334 if (((from_bitField0_ & 0x00000010) != 0)) {
2335 result.objectiveOffset_ = objectiveOffset_;
2336 to_bitField0_ |= 0x00000002;
2338 if (((from_bitField0_ & 0x00000020) != 0)) {
2339 result.quadraticObjective_ = quadraticObjectiveBuilder_ ==
null
2340 ? quadraticObjective_
2341 : quadraticObjectiveBuilder_.build();
2342 to_bitField0_ |= 0x00000004;
2344 if (((from_bitField0_ & 0x00000040) != 0)) {
2345 result.name_ = name_;
2346 to_bitField0_ |= 0x00000008;
2348 if (((from_bitField0_ & 0x00000080) != 0)) {
2349 result.solutionHint_ = solutionHintBuilder_ ==
null
2351 : solutionHintBuilder_.build();
2352 to_bitField0_ |= 0x00000010;
2354 result.bitField0_ |= to_bitField0_;
2359 if (other instanceof com.google.ortools.linearsolver.MPModelProto) {
2360 return mergeFrom((com.google.ortools.linearsolver.MPModelProto)other);
2362 super.mergeFrom(other);
2368 if (other == com.google.ortools.linearsolver.MPModelProto.getDefaultInstance())
return this;
2369 if (variableBuilder_ ==
null) {
2370 if (!other.variable_.isEmpty()) {
2371 if (variable_.isEmpty()) {
2372 variable_ = other.variable_;
2373 bitField0_ = (bitField0_ & ~0x00000001);
2375 ensureVariableIsMutable();
2376 variable_.addAll(other.variable_);
2381 if (!other.variable_.isEmpty()) {
2382 if (variableBuilder_.isEmpty()) {
2383 variableBuilder_.dispose();
2384 variableBuilder_ =
null;
2385 variable_ = other.variable_;
2386 bitField0_ = (bitField0_ & ~0x00000001);
2388 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2389 getVariableFieldBuilder() :
null;
2391 variableBuilder_.addAllMessages(other.variable_);
2395 if (constraintBuilder_ ==
null) {
2396 if (!other.constraint_.isEmpty()) {
2397 if (constraint_.isEmpty()) {
2398 constraint_ = other.constraint_;
2399 bitField0_ = (bitField0_ & ~0x00000002);
2401 ensureConstraintIsMutable();
2402 constraint_.addAll(other.constraint_);
2407 if (!other.constraint_.isEmpty()) {
2408 if (constraintBuilder_.isEmpty()) {
2409 constraintBuilder_.dispose();
2410 constraintBuilder_ =
null;
2411 constraint_ = other.constraint_;
2412 bitField0_ = (bitField0_ & ~0x00000002);
2413 constraintBuilder_ =
2414 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2415 getConstraintFieldBuilder() :
null;
2417 constraintBuilder_.addAllMessages(other.constraint_);
2421 if (generalConstraintBuilder_ ==
null) {
2422 if (!other.generalConstraint_.isEmpty()) {
2423 if (generalConstraint_.isEmpty()) {
2424 generalConstraint_ = other.generalConstraint_;
2425 bitField0_ = (bitField0_ & ~0x00000004);
2427 ensureGeneralConstraintIsMutable();
2428 generalConstraint_.addAll(other.generalConstraint_);
2433 if (!other.generalConstraint_.isEmpty()) {
2434 if (generalConstraintBuilder_.isEmpty()) {
2435 generalConstraintBuilder_.dispose();
2436 generalConstraintBuilder_ =
null;
2437 generalConstraint_ = other.generalConstraint_;
2438 bitField0_ = (bitField0_ & ~0x00000004);
2439 generalConstraintBuilder_ =
2440 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2441 getGeneralConstraintFieldBuilder() :
null;
2443 generalConstraintBuilder_.addAllMessages(other.generalConstraint_);
2447 if (other.hasMaximize()) {
2450 if (other.hasObjectiveOffset()) {
2453 if (other.hasQuadraticObjective()) {
2456 if (other.hasName()) {
2457 name_ = other.name_;
2458 bitField0_ |= 0x00000040;
2461 if (other.hasSolutionHint()) {
2464 if (annotationBuilder_ ==
null) {
2465 if (!other.annotation_.isEmpty()) {
2466 if (annotation_.isEmpty()) {
2467 annotation_ = other.annotation_;
2468 bitField0_ = (bitField0_ & ~0x00000100);
2470 ensureAnnotationIsMutable();
2471 annotation_.addAll(other.annotation_);
2476 if (!other.annotation_.isEmpty()) {
2477 if (annotationBuilder_.isEmpty()) {
2478 annotationBuilder_.dispose();
2479 annotationBuilder_ =
null;
2480 annotation_ = other.annotation_;
2481 bitField0_ = (bitField0_ & ~0x00000100);
2482 annotationBuilder_ =
2483 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
2484 getAnnotationFieldBuilder() :
null;
2486 annotationBuilder_.addAllMessages(other.annotation_);
2490 this.mergeUnknownFields(other.getUnknownFields());
2502 com.google.protobuf.CodedInputStream input,
2503 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2504 throws java.io.IOException {
2505 if (extensionRegistry ==
null) {
2506 throw new java.lang.NullPointerException();
2509 boolean done =
false;
2511 int tag = input.readTag();
2517 maximize_ = input.readBool();
2518 bitField0_ |= 0x00000008;
2522 objectiveOffset_ = input.readDouble();
2523 bitField0_ |= 0x00000010;
2529 com.google.ortools.linearsolver.MPVariableProto.parser(),
2531 if (variableBuilder_ ==
null) {
2532 ensureVariableIsMutable();
2535 variableBuilder_.addMessage(m);
2542 com.google.ortools.linearsolver.MPConstraintProto.parser(),
2544 if (constraintBuilder_ ==
null) {
2545 ensureConstraintIsMutable();
2548 constraintBuilder_.addMessage(m);
2553 name_ = input.readBytes();
2554 bitField0_ |= 0x00000040;
2559 getSolutionHintFieldBuilder().getBuilder(),
2561 bitField0_ |= 0x00000080;
2567 com.google.ortools.linearsolver.MPGeneralConstraintProto.parser(),
2569 if (generalConstraintBuilder_ ==
null) {
2570 ensureGeneralConstraintIsMutable();
2571 generalConstraint_.add(m);
2573 generalConstraintBuilder_.addMessage(m);
2579 getQuadraticObjectiveFieldBuilder().getBuilder(),
2581 bitField0_ |= 0x00000020;
2587 com.google.ortools.linearsolver.MPModelProto.Annotation.parser(),
2589 if (annotationBuilder_ ==
null) {
2590 ensureAnnotationIsMutable();
2593 annotationBuilder_.addMessage(m);
2598 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2605 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
2606 throw e.unwrapIOException();
2612 private int bitField0_;
2614 private java.util.List<com.google.ortools.linearsolver.MPVariableProto> variable_ =
2615 java.util.Collections.emptyList();
2616 private void ensureVariableIsMutable() {
2617 if (!((bitField0_ & 0x00000001) != 0)) {
2618 variable_ =
new java.util.ArrayList<com.google.ortools.linearsolver.MPVariableProto>(variable_);
2619 bitField0_ |= 0x00000001;
2623 private com.google.protobuf.RepeatedFieldBuilder<
2624 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder> variableBuilder_;
2633 public java.util.List<com.google.ortools.linearsolver.MPVariableProto>
getVariableList() {
2634 if (variableBuilder_ ==
null) {
2635 return java.util.Collections.unmodifiableList(variable_);
2637 return variableBuilder_.getMessageList();
2648 if (variableBuilder_ ==
null) {
2649 return variable_.size();
2651 return variableBuilder_.getCount();
2662 if (variableBuilder_ ==
null) {
2663 return variable_.get(index);
2665 return variableBuilder_.getMessage(index);
2676 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2677 if (variableBuilder_ ==
null) {
2678 if (value ==
null) {
2679 throw new NullPointerException();
2681 ensureVariableIsMutable();
2682 variable_.set(index, value);
2685 variableBuilder_.setMessage(index, value);
2697 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2698 if (variableBuilder_ ==
null) {
2699 ensureVariableIsMutable();
2700 variable_.set(index, builderForValue.build());
2703 variableBuilder_.setMessage(index, builderForValue.build());
2715 if (variableBuilder_ ==
null) {
2716 if (value ==
null) {
2717 throw new NullPointerException();
2719 ensureVariableIsMutable();
2720 variable_.add(value);
2723 variableBuilder_.addMessage(value);
2735 int index, com.google.ortools.linearsolver.MPVariableProto value) {
2736 if (variableBuilder_ ==
null) {
2737 if (value ==
null) {
2738 throw new NullPointerException();
2740 ensureVariableIsMutable();
2741 variable_.add(index, value);
2744 variableBuilder_.addMessage(index, value);
2756 com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2757 if (variableBuilder_ ==
null) {
2758 ensureVariableIsMutable();
2759 variable_.add(builderForValue.build());
2762 variableBuilder_.addMessage(builderForValue.build());
2774 int index, com.google.ortools.linearsolver.MPVariableProto.Builder builderForValue) {
2775 if (variableBuilder_ ==
null) {
2776 ensureVariableIsMutable();
2777 variable_.add(index, builderForValue.build());
2780 variableBuilder_.addMessage(index, builderForValue.build());
2792 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPVariableProto> values) {
2793 if (variableBuilder_ ==
null) {
2794 ensureVariableIsMutable();
2795 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2799 variableBuilder_.addAllMessages(values);
2811 if (variableBuilder_ ==
null) {
2812 variable_ = java.util.Collections.emptyList();
2813 bitField0_ = (bitField0_ & ~0x00000001);
2816 variableBuilder_.clear();
2828 if (variableBuilder_ ==
null) {
2829 ensureVariableIsMutable();
2830 variable_.remove(index);
2833 variableBuilder_.remove(index);
2846 return getVariableFieldBuilder().getBuilder(index);
2857 if (variableBuilder_ ==
null) {
2858 return variable_.get(index); }
else {
2859 return variableBuilder_.getMessageOrBuilder(index);
2869 public java.util.List<? extends com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2871 if (variableBuilder_ !=
null) {
2872 return variableBuilder_.getMessageOrBuilderList();
2874 return java.util.Collections.unmodifiableList(variable_);
2885 return getVariableFieldBuilder().addBuilder(
2886 com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2897 return getVariableFieldBuilder().addBuilder(
2898 index, com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance());
2907 public java.util.List<com.google.ortools.linearsolver.MPVariableProto.Builder>
2909 return getVariableFieldBuilder().getBuilderList();
2911 private com.google.protobuf.RepeatedFieldBuilder<
2912 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>
2913 getVariableFieldBuilder() {
2914 if (variableBuilder_ ==
null) {
2915 variableBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
2916 com.google.ortools.linearsolver.MPVariableProto, com.google.ortools.linearsolver.MPVariableProto.Builder, com.google.ortools.linearsolver.MPVariableProtoOrBuilder>(
2918 ((bitField0_ & 0x00000001) != 0),
2919 getParentForChildren(),
2923 return variableBuilder_;
2926 private java.util.List<com.google.ortools.linearsolver.MPConstraintProto> constraint_ =
2927 java.util.Collections.emptyList();
2928 private void ensureConstraintIsMutable() {
2929 if (!((bitField0_ & 0x00000002) != 0)) {
2930 constraint_ =
new java.util.ArrayList<com.google.ortools.linearsolver.MPConstraintProto>(constraint_);
2931 bitField0_ |= 0x00000002;
2935 private com.google.protobuf.RepeatedFieldBuilder<
2936 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
2946 if (constraintBuilder_ ==
null) {
2947 return java.util.Collections.unmodifiableList(constraint_);
2949 return constraintBuilder_.getMessageList();
2960 if (constraintBuilder_ ==
null) {
2961 return constraint_.size();
2963 return constraintBuilder_.getCount();
2974 if (constraintBuilder_ ==
null) {
2975 return constraint_.get(index);
2977 return constraintBuilder_.getMessage(index);
2988 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
2989 if (constraintBuilder_ ==
null) {
2990 if (value ==
null) {
2991 throw new NullPointerException();
2993 ensureConstraintIsMutable();
2994 constraint_.set(index, value);
2997 constraintBuilder_.setMessage(index, value);
3009 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3010 if (constraintBuilder_ ==
null) {
3011 ensureConstraintIsMutable();
3012 constraint_.set(index, builderForValue.build());
3015 constraintBuilder_.setMessage(index, builderForValue.build());
3027 if (constraintBuilder_ ==
null) {
3028 if (value ==
null) {
3029 throw new NullPointerException();
3031 ensureConstraintIsMutable();
3032 constraint_.add(value);
3035 constraintBuilder_.addMessage(value);
3047 int index, com.google.ortools.linearsolver.MPConstraintProto value) {
3048 if (constraintBuilder_ ==
null) {
3049 if (value ==
null) {
3050 throw new NullPointerException();
3052 ensureConstraintIsMutable();
3053 constraint_.add(index, value);
3056 constraintBuilder_.addMessage(index, value);
3068 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3069 if (constraintBuilder_ ==
null) {
3070 ensureConstraintIsMutable();
3071 constraint_.add(builderForValue.build());
3074 constraintBuilder_.addMessage(builderForValue.build());
3086 int index, com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
3087 if (constraintBuilder_ ==
null) {
3088 ensureConstraintIsMutable();
3089 constraint_.add(index, builderForValue.build());
3092 constraintBuilder_.addMessage(index, builderForValue.build());
3104 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPConstraintProto> values) {
3105 if (constraintBuilder_ ==
null) {
3106 ensureConstraintIsMutable();
3107 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3108 values, constraint_);
3111 constraintBuilder_.addAllMessages(values);
3123 if (constraintBuilder_ ==
null) {
3124 constraint_ = java.util.Collections.emptyList();
3125 bitField0_ = (bitField0_ & ~0x00000002);
3128 constraintBuilder_.clear();
3140 if (constraintBuilder_ ==
null) {
3141 ensureConstraintIsMutable();
3142 constraint_.remove(index);
3145 constraintBuilder_.remove(index);
3158 return getConstraintFieldBuilder().getBuilder(index);
3169 if (constraintBuilder_ ==
null) {
3170 return constraint_.get(index); }
else {
3171 return constraintBuilder_.getMessageOrBuilder(index);
3181 public java.util.List<? extends com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3183 if (constraintBuilder_ !=
null) {
3184 return constraintBuilder_.getMessageOrBuilderList();
3186 return java.util.Collections.unmodifiableList(constraint_);
3197 return getConstraintFieldBuilder().addBuilder(
3198 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3209 return getConstraintFieldBuilder().addBuilder(
3210 index, com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance());
3219 public java.util.List<com.google.ortools.linearsolver.MPConstraintProto.Builder>
3221 return getConstraintFieldBuilder().getBuilderList();
3223 private com.google.protobuf.RepeatedFieldBuilder<
3224 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
3225 getConstraintFieldBuilder() {
3226 if (constraintBuilder_ ==
null) {
3227 constraintBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
3228 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
3230 ((bitField0_ & 0x00000002) != 0),
3231 getParentForChildren(),
3235 return constraintBuilder_;
3238 private java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto> generalConstraint_ =
3239 java.util.Collections.emptyList();
3240 private void ensureGeneralConstraintIsMutable() {
3241 if (!((bitField0_ & 0x00000004) != 0)) {
3242 generalConstraint_ =
new java.util.ArrayList<com.google.ortools.linearsolver.MPGeneralConstraintProto>(generalConstraint_);
3243 bitField0_ |= 0x00000004;
3247 private com.google.protobuf.RepeatedFieldBuilder<
3248 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder> generalConstraintBuilder_;
3259 if (generalConstraintBuilder_ ==
null) {
3260 return java.util.Collections.unmodifiableList(generalConstraint_);
3262 return generalConstraintBuilder_.getMessageList();
3274 if (generalConstraintBuilder_ ==
null) {
3275 return generalConstraint_.size();
3277 return generalConstraintBuilder_.getCount();
3289 if (generalConstraintBuilder_ ==
null) {
3290 return generalConstraint_.get(index);
3292 return generalConstraintBuilder_.getMessage(index);
3304 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3305 if (generalConstraintBuilder_ ==
null) {
3306 if (value ==
null) {
3307 throw new NullPointerException();
3309 ensureGeneralConstraintIsMutable();
3310 generalConstraint_.set(index, value);
3313 generalConstraintBuilder_.setMessage(index, value);
3326 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3327 if (generalConstraintBuilder_ ==
null) {
3328 ensureGeneralConstraintIsMutable();
3329 generalConstraint_.set(index, builderForValue.build());
3332 generalConstraintBuilder_.setMessage(index, builderForValue.build());
3345 if (generalConstraintBuilder_ ==
null) {
3346 if (value ==
null) {
3347 throw new NullPointerException();
3349 ensureGeneralConstraintIsMutable();
3350 generalConstraint_.add(value);
3353 generalConstraintBuilder_.addMessage(value);
3366 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto value) {
3367 if (generalConstraintBuilder_ ==
null) {
3368 if (value ==
null) {
3369 throw new NullPointerException();
3371 ensureGeneralConstraintIsMutable();
3372 generalConstraint_.add(index, value);
3375 generalConstraintBuilder_.addMessage(index, value);
3388 com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3389 if (generalConstraintBuilder_ ==
null) {
3390 ensureGeneralConstraintIsMutable();
3391 generalConstraint_.add(builderForValue.build());
3394 generalConstraintBuilder_.addMessage(builderForValue.build());
3407 int index, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder builderForValue) {
3408 if (generalConstraintBuilder_ ==
null) {
3409 ensureGeneralConstraintIsMutable();
3410 generalConstraint_.add(index, builderForValue.build());
3413 generalConstraintBuilder_.addMessage(index, builderForValue.build());
3426 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPGeneralConstraintProto> values) {
3427 if (generalConstraintBuilder_ ==
null) {
3428 ensureGeneralConstraintIsMutable();
3429 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3430 values, generalConstraint_);
3433 generalConstraintBuilder_.addAllMessages(values);
3446 if (generalConstraintBuilder_ ==
null) {
3447 generalConstraint_ = java.util.Collections.emptyList();
3448 bitField0_ = (bitField0_ & ~0x00000004);
3451 generalConstraintBuilder_.clear();
3464 if (generalConstraintBuilder_ ==
null) {
3465 ensureGeneralConstraintIsMutable();
3466 generalConstraint_.remove(index);
3469 generalConstraintBuilder_.remove(index);
3483 return getGeneralConstraintFieldBuilder().getBuilder(index);
3495 if (generalConstraintBuilder_ ==
null) {
3496 return generalConstraint_.get(index); }
else {
3497 return generalConstraintBuilder_.getMessageOrBuilder(index);
3508 public java.util.List<? extends com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3510 if (generalConstraintBuilder_ !=
null) {
3511 return generalConstraintBuilder_.getMessageOrBuilderList();
3513 return java.util.Collections.unmodifiableList(generalConstraint_);
3525 return getGeneralConstraintFieldBuilder().addBuilder(
3526 com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3538 return getGeneralConstraintFieldBuilder().addBuilder(
3539 index, com.google.ortools.linearsolver.MPGeneralConstraintProto.getDefaultInstance());
3549 public java.util.List<com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder>
3551 return getGeneralConstraintFieldBuilder().getBuilderList();
3553 private com.google.protobuf.RepeatedFieldBuilder<
3554 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>
3555 getGeneralConstraintFieldBuilder() {
3556 if (generalConstraintBuilder_ ==
null) {
3557 generalConstraintBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
3558 com.google.ortools.linearsolver.MPGeneralConstraintProto, com.google.ortools.linearsolver.MPGeneralConstraintProto.Builder, com.google.ortools.linearsolver.MPGeneralConstraintProtoOrBuilder>(
3560 ((bitField0_ & 0x00000004) != 0),
3561 getParentForChildren(),
3563 generalConstraint_ =
null;
3565 return generalConstraintBuilder_;
3568 private boolean maximize_ ;
3579 return ((bitField0_ & 0x00000008) != 0);
3605 bitField0_ |= 0x00000008;
3618 bitField0_ = (bitField0_ & ~0x00000008);
3624 private double objectiveOffset_ ;
3635 return ((bitField0_ & 0x00000010) != 0);
3647 return objectiveOffset_;
3660 objectiveOffset_ = value;
3661 bitField0_ |= 0x00000010;
3674 bitField0_ = (bitField0_ & ~0x00000010);
3675 objectiveOffset_ = 0D;
3681 private com.google.protobuf.SingleFieldBuilder<
3682 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder> quadraticObjectiveBuilder_;
3693 return ((bitField0_ & 0x00000020) != 0);
3705 if (quadraticObjectiveBuilder_ ==
null) {
3706 return quadraticObjective_ ==
null ? com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3708 return quadraticObjectiveBuilder_.getMessage();
3720 if (quadraticObjectiveBuilder_ ==
null) {
3721 if (value ==
null) {
3722 throw new NullPointerException();
3724 quadraticObjective_ = value;
3726 quadraticObjectiveBuilder_.setMessage(value);
3728 bitField0_ |= 0x00000020;
3741 com.google.ortools.linearsolver.MPQuadraticObjective.Builder builderForValue) {
3742 if (quadraticObjectiveBuilder_ ==
null) {
3743 quadraticObjective_ = builderForValue.build();
3745 quadraticObjectiveBuilder_.setMessage(builderForValue.build());
3747 bitField0_ |= 0x00000020;
3760 if (quadraticObjectiveBuilder_ ==
null) {
3761 if (((bitField0_ & 0x00000020) != 0) &&
3762 quadraticObjective_ !=
null &&
3763 quadraticObjective_ != com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance()) {
3766 quadraticObjective_ = value;
3769 quadraticObjectiveBuilder_.mergeFrom(value);
3771 if (quadraticObjective_ !=
null) {
3772 bitField0_ |= 0x00000020;
3786 bitField0_ = (bitField0_ & ~0x00000020);
3787 quadraticObjective_ =
null;
3788 if (quadraticObjectiveBuilder_ !=
null) {
3789 quadraticObjectiveBuilder_.dispose();
3790 quadraticObjectiveBuilder_ =
null;
3804 bitField0_ |= 0x00000020;
3806 return getQuadraticObjectiveFieldBuilder().getBuilder();
3817 if (quadraticObjectiveBuilder_ !=
null) {
3818 return quadraticObjectiveBuilder_.getMessageOrBuilder();
3820 return quadraticObjective_ ==
null ?
3821 com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance() : quadraticObjective_;
3832 private com.google.protobuf.SingleFieldBuilder<
3833 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>
3834 getQuadraticObjectiveFieldBuilder() {
3835 if (quadraticObjectiveBuilder_ ==
null) {
3836 quadraticObjectiveBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
3837 com.google.ortools.linearsolver.MPQuadraticObjective, com.google.ortools.linearsolver.MPQuadraticObjective.Builder, com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder>(
3839 getParentForChildren(),
3841 quadraticObjective_ =
null;
3843 return quadraticObjectiveBuilder_;
3846 private java.lang.Object name_ =
"";
3856 return ((bitField0_ & 0x00000040) != 0);
3867 java.lang.Object ref = name_;
3868 if (!(ref instanceof java.lang.String)) {
3869 com.google.protobuf.ByteString bs =
3870 (com.google.protobuf.ByteString) ref;
3871 java.lang.String s = bs.toStringUtf8();
3872 if (bs.isValidUtf8()) {
3877 return (java.lang.String) ref;
3888 public com.google.protobuf.ByteString
3890 java.lang.Object ref = name_;
3891 if (ref instanceof String) {
3892 com.google.protobuf.ByteString b =
3893 com.google.protobuf.ByteString.copyFromUtf8(
3894 (java.lang.String) ref);
3898 return (com.google.protobuf.ByteString) ref;
3911 java.lang.String value) {
3912 if (value ==
null) {
throw new NullPointerException(); }
3914 bitField0_ |= 0x00000040;
3928 bitField0_ = (bitField0_ & ~0x00000040);
3942 com.google.protobuf.ByteString value) {
3943 if (value ==
null) {
throw new NullPointerException(); }
3945 bitField0_ |= 0x00000040;
3951 private com.google.protobuf.SingleFieldBuilder<
3952 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
3972 return ((bitField0_ & 0x00000080) != 0);
3993 if (solutionHintBuilder_ ==
null) {
3994 return solutionHint_ ==
null ? com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3996 return solutionHintBuilder_.getMessage();
4017 if (solutionHintBuilder_ ==
null) {
4018 if (value ==
null) {
4019 throw new NullPointerException();
4021 solutionHint_ = value;
4023 solutionHintBuilder_.setMessage(value);
4025 bitField0_ |= 0x00000080;
4047 com.google.ortools.linearsolver.PartialVariableAssignment.Builder builderForValue) {
4048 if (solutionHintBuilder_ ==
null) {
4049 solutionHint_ = builderForValue.build();
4051 solutionHintBuilder_.setMessage(builderForValue.build());
4053 bitField0_ |= 0x00000080;
4075 if (solutionHintBuilder_ ==
null) {
4076 if (((bitField0_ & 0x00000080) != 0) &&
4077 solutionHint_ !=
null &&
4078 solutionHint_ != com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance()) {
4081 solutionHint_ = value;
4084 solutionHintBuilder_.mergeFrom(value);
4086 if (solutionHint_ !=
null) {
4087 bitField0_ |= 0x00000080;
4110 bitField0_ = (bitField0_ & ~0x00000080);
4111 solutionHint_ =
null;
4112 if (solutionHintBuilder_ !=
null) {
4113 solutionHintBuilder_.dispose();
4114 solutionHintBuilder_ =
null;
4137 bitField0_ |= 0x00000080;
4139 return getSolutionHintFieldBuilder().getBuilder();
4159 if (solutionHintBuilder_ !=
null) {
4160 return solutionHintBuilder_.getMessageOrBuilder();
4162 return solutionHint_ ==
null ?
4163 com.google.ortools.linearsolver.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
4183 private com.google.protobuf.SingleFieldBuilder<
4184 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>
4185 getSolutionHintFieldBuilder() {
4186 if (solutionHintBuilder_ ==
null) {
4187 solutionHintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
4188 com.google.ortools.linearsolver.PartialVariableAssignment, com.google.ortools.linearsolver.PartialVariableAssignment.Builder, com.google.ortools.linearsolver.PartialVariableAssignmentOrBuilder>(
4190 getParentForChildren(),
4192 solutionHint_ =
null;
4194 return solutionHintBuilder_;
4197 private java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation> annotation_ =
4198 java.util.Collections.emptyList();
4199 private void ensureAnnotationIsMutable() {
4200 if (!((bitField0_ & 0x00000100) != 0)) {
4201 annotation_ =
new java.util.ArrayList<com.google.ortools.linearsolver.MPModelProto.Annotation>(annotation_);
4202 bitField0_ |= 0x00000100;
4206 private com.google.protobuf.RepeatedFieldBuilder<
4207 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder> annotationBuilder_;
4212 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation>
getAnnotationList() {
4213 if (annotationBuilder_ ==
null) {
4214 return java.util.Collections.unmodifiableList(annotation_);
4216 return annotationBuilder_.getMessageList();
4223 if (annotationBuilder_ ==
null) {
4224 return annotation_.size();
4226 return annotationBuilder_.getCount();
4233 if (annotationBuilder_ ==
null) {
4234 return annotation_.get(index);
4236 return annotationBuilder_.getMessage(index);
4243 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4244 if (annotationBuilder_ ==
null) {
4245 if (value ==
null) {
4246 throw new NullPointerException();
4248 ensureAnnotationIsMutable();
4249 annotation_.set(index, value);
4252 annotationBuilder_.setMessage(index, value);
4260 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4261 if (annotationBuilder_ ==
null) {
4262 ensureAnnotationIsMutable();
4263 annotation_.set(index, builderForValue.build());
4266 annotationBuilder_.setMessage(index, builderForValue.build());
4274 if (annotationBuilder_ ==
null) {
4275 if (value ==
null) {
4276 throw new NullPointerException();
4278 ensureAnnotationIsMutable();
4279 annotation_.add(value);
4282 annotationBuilder_.addMessage(value);
4290 int index, com.google.ortools.linearsolver.MPModelProto.Annotation value) {
4291 if (annotationBuilder_ ==
null) {
4292 if (value ==
null) {
4293 throw new NullPointerException();
4295 ensureAnnotationIsMutable();
4296 annotation_.add(index, value);
4299 annotationBuilder_.addMessage(index, value);
4307 com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4308 if (annotationBuilder_ ==
null) {
4309 ensureAnnotationIsMutable();
4310 annotation_.add(builderForValue.build());
4313 annotationBuilder_.addMessage(builderForValue.build());
4321 int index, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder builderForValue) {
4322 if (annotationBuilder_ ==
null) {
4323 ensureAnnotationIsMutable();
4324 annotation_.add(index, builderForValue.build());
4327 annotationBuilder_.addMessage(index, builderForValue.build());
4335 java.lang.Iterable<? extends com.google.ortools.linearsolver.MPModelProto.Annotation> values) {
4336 if (annotationBuilder_ ==
null) {
4337 ensureAnnotationIsMutable();
4338 com.google.protobuf.AbstractMessageLite.Builder.addAll(
4339 values, annotation_);
4342 annotationBuilder_.addAllMessages(values);
4350 if (annotationBuilder_ ==
null) {
4351 annotation_ = java.util.Collections.emptyList();
4352 bitField0_ = (bitField0_ & ~0x00000100);
4355 annotationBuilder_.clear();
4363 if (annotationBuilder_ ==
null) {
4364 ensureAnnotationIsMutable();
4365 annotation_.remove(index);
4368 annotationBuilder_.remove(index);
4377 return getAnnotationFieldBuilder().getBuilder(index);
4384 if (annotationBuilder_ ==
null) {
4385 return annotation_.get(index); }
else {
4386 return annotationBuilder_.getMessageOrBuilder(index);
4392 public java.util.List<? extends com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4394 if (annotationBuilder_ !=
null) {
4395 return annotationBuilder_.getMessageOrBuilderList();
4397 return java.util.Collections.unmodifiableList(annotation_);
4404 return getAnnotationFieldBuilder().addBuilder(
4405 com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4412 return getAnnotationFieldBuilder().addBuilder(
4413 index, com.google.ortools.linearsolver.MPModelProto.Annotation.getDefaultInstance());
4418 public java.util.List<com.google.ortools.linearsolver.MPModelProto.Annotation.Builder>
4420 return getAnnotationFieldBuilder().getBuilderList();
4422 private com.google.protobuf.RepeatedFieldBuilder<
4423 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>
4424 getAnnotationFieldBuilder() {
4425 if (annotationBuilder_ ==
null) {
4426 annotationBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
4427 com.google.ortools.linearsolver.MPModelProto.Annotation, com.google.ortools.linearsolver.MPModelProto.Annotation.Builder, com.google.ortools.linearsolver.MPModelProto.AnnotationOrBuilder>(
4429 ((bitField0_ & 0x00000100) != 0),
4430 getParentForChildren(),
4434 return annotationBuilder_;
4443 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPModelProto();
4447 return DEFAULT_INSTANCE;
4450 private static final com.google.protobuf.Parser<
MPModelProto>
4451 PARSER =
new com.google.protobuf.AbstractParser<
MPModelProto>() {
4454 com.google.protobuf.CodedInputStream input,
4455 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4456 throws com.google.protobuf.InvalidProtocolBufferException {
4459 builder.mergeFrom(input, extensionRegistry);
4460 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
4461 throw e.setUnfinishedMessage(builder.buildPartial());
4462 }
catch (com.google.protobuf.UninitializedMessageException e) {
4463 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4464 }
catch (java.io.IOException e) {
4465 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4466 .setUnfinishedMessage(builder.buildPartial());
4468 return builder.buildPartial();
4483 return DEFAULT_INSTANCE;