Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
CpModelProto.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/sat/cp_model.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.sat;
6
14public final class CpModelProto extends
15 com.google.protobuf.GeneratedMessage implements
16 // @@protoc_insertion_point(message_implements:operations_research.sat.CpModelProto)
18private static final long serialVersionUID = 0L;
19 static {
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
22 /* major= */ 4,
23 /* minor= */ 26,
24 /* patch= */ 1,
25 /* suffix= */ "",
26 CpModelProto.class.getName());
27 }
28 // Use CpModelProto.newBuilder() to construct.
29 private CpModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 super(builder);
31 }
32 private CpModelProto() {
33 name_ = "";
34 variables_ = java.util.Collections.emptyList();
35 constraints_ = java.util.Collections.emptyList();
36 searchStrategy_ = java.util.Collections.emptyList();
37 assumptions_ = emptyIntList();
38 }
39
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
43 }
44
45 @java.lang.Override
46 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
51 }
52
53 private int bitField0_;
54 public static final int NAME_FIELD_NUMBER = 1;
55 @SuppressWarnings("serial")
56 private volatile java.lang.Object name_ = "";
65 @java.lang.Override
66 public java.lang.String getName() {
67 java.lang.Object ref = name_;
68 if (ref instanceof java.lang.String) {
69 return (java.lang.String) ref;
70 } else {
71 com.google.protobuf.ByteString bs =
72 (com.google.protobuf.ByteString) ref;
73 java.lang.String s = bs.toStringUtf8();
74 name_ = s;
75 return s;
76 }
77 }
86 @java.lang.Override
87 public com.google.protobuf.ByteString
89 java.lang.Object ref = name_;
90 if (ref instanceof java.lang.String) {
91 com.google.protobuf.ByteString b =
92 com.google.protobuf.ByteString.copyFromUtf8(
93 (java.lang.String) ref);
94 name_ = b;
95 return b;
96 } else {
97 return (com.google.protobuf.ByteString) ref;
98 }
99 }
100
101 public static final int VARIABLES_FIELD_NUMBER = 2;
102 @SuppressWarnings("serial")
103 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_;
111 @java.lang.Override
112 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
113 return variables_;
114 }
122 @java.lang.Override
123 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
125 return variables_;
126 }
134 @java.lang.Override
135 public int getVariablesCount() {
136 return variables_.size();
137 }
145 @java.lang.Override
147 return variables_.get(index);
148 }
156 @java.lang.Override
158 int index) {
159 return variables_.get(index);
160 }
161
162 public static final int CONSTRAINTS_FIELD_NUMBER = 3;
163 @SuppressWarnings("serial")
164 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_;
168 @java.lang.Override
169 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
170 return constraints_;
171 }
175 @java.lang.Override
176 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
178 return constraints_;
179 }
183 @java.lang.Override
184 public int getConstraintsCount() {
185 return constraints_.size();
186 }
190 @java.lang.Override
192 return constraints_.get(index);
193 }
197 @java.lang.Override
199 int index) {
200 return constraints_.get(index);
201 }
202
203 public static final int OBJECTIVE_FIELD_NUMBER = 4;
213 @java.lang.Override
214 public boolean hasObjective() {
215 return ((bitField0_ & 0x00000001) != 0);
216 }
225 @java.lang.Override
227 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
228 }
236 @java.lang.Override
238 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
239 }
240
241 public static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER = 9;
242 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
263 @java.lang.Override
264 public boolean hasFloatingPointObjective() {
265 return ((bitField0_ & 0x00000002) != 0);
266 }
287 @java.lang.Override
289 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
290 }
310 @java.lang.Override
312 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
313 }
314
315 public static final int SEARCH_STRATEGY_FIELD_NUMBER = 5;
316 @SuppressWarnings("serial")
317 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_;
333 @java.lang.Override
334 public java.util.List<com.google.ortools.sat.DecisionStrategyProto> getSearchStrategyList() {
335 return searchStrategy_;
336 }
352 @java.lang.Override
353 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
355 return searchStrategy_;
356 }
372 @java.lang.Override
374 return searchStrategy_.size();
375 }
391 @java.lang.Override
393 return searchStrategy_.get(index);
394 }
410 @java.lang.Override
412 int index) {
413 return searchStrategy_.get(index);
414 }
415
416 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
436 @java.lang.Override
437 public boolean hasSolutionHint() {
438 return ((bitField0_ & 0x00000004) != 0);
439 }
458 @java.lang.Override
460 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
461 }
479 @java.lang.Override
481 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
482 }
483
484 public static final int ASSUMPTIONS_FIELD_NUMBER = 7;
485 @SuppressWarnings("serial")
486 private com.google.protobuf.Internal.IntList assumptions_ =
487 emptyIntList();
508 @java.lang.Override
509 public java.util.List<java.lang.Integer>
511 return assumptions_;
512 }
533 public int getAssumptionsCount() {
534 return assumptions_.size();
535 }
557 public int getAssumptions(int index) {
558 return assumptions_.getInt(index);
559 }
560 private int assumptionsMemoizedSerializedSize = -1;
561
562 public static final int SYMMETRY_FIELD_NUMBER = 8;
563 private com.google.ortools.sat.SymmetryProto symmetry_;
576 @java.lang.Override
577 public boolean hasSymmetry() {
578 return ((bitField0_ & 0x00000008) != 0);
579 }
592 @java.lang.Override
594 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
595 }
607 @java.lang.Override
609 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
610 }
611
612 private byte memoizedIsInitialized = -1;
613 @java.lang.Override
614 public final boolean isInitialized() {
615 byte isInitialized = memoizedIsInitialized;
616 if (isInitialized == 1) return true;
617 if (isInitialized == 0) return false;
618
619 memoizedIsInitialized = 1;
620 return true;
621 }
622
623 @java.lang.Override
624 public void writeTo(com.google.protobuf.CodedOutputStream output)
625 throws java.io.IOException {
627 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
628 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
629 }
630 for (int i = 0; i < variables_.size(); i++) {
631 output.writeMessage(2, variables_.get(i));
632 }
633 for (int i = 0; i < constraints_.size(); i++) {
634 output.writeMessage(3, constraints_.get(i));
635 }
636 if (((bitField0_ & 0x00000001) != 0)) {
637 output.writeMessage(4, getObjective());
638 }
639 for (int i = 0; i < searchStrategy_.size(); i++) {
640 output.writeMessage(5, searchStrategy_.get(i));
641 }
642 if (((bitField0_ & 0x00000004) != 0)) {
643 output.writeMessage(6, getSolutionHint());
644 }
645 if (getAssumptionsList().size() > 0) {
646 output.writeUInt32NoTag(58);
647 output.writeUInt32NoTag(assumptionsMemoizedSerializedSize);
648 }
649 for (int i = 0; i < assumptions_.size(); i++) {
650 output.writeInt32NoTag(assumptions_.getInt(i));
651 }
652 if (((bitField0_ & 0x00000008) != 0)) {
653 output.writeMessage(8, getSymmetry());
654 }
655 if (((bitField0_ & 0x00000002) != 0)) {
656 output.writeMessage(9, getFloatingPointObjective());
657 }
658 getUnknownFields().writeTo(output);
659 }
660
661 @java.lang.Override
662 public int getSerializedSize() {
663 int size = memoizedSize;
664 if (size != -1) return size;
665
666 size = 0;
667 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
668 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
669 }
670 for (int i = 0; i < variables_.size(); i++) {
671 size += com.google.protobuf.CodedOutputStream
672 .computeMessageSize(2, variables_.get(i));
673 }
674 for (int i = 0; i < constraints_.size(); i++) {
675 size += com.google.protobuf.CodedOutputStream
676 .computeMessageSize(3, constraints_.get(i));
677 }
678 if (((bitField0_ & 0x00000001) != 0)) {
679 size += com.google.protobuf.CodedOutputStream
680 .computeMessageSize(4, getObjective());
681 }
682 for (int i = 0; i < searchStrategy_.size(); i++) {
683 size += com.google.protobuf.CodedOutputStream
684 .computeMessageSize(5, searchStrategy_.get(i));
685 }
686 if (((bitField0_ & 0x00000004) != 0)) {
687 size += com.google.protobuf.CodedOutputStream
688 .computeMessageSize(6, getSolutionHint());
689 }
690 {
691 int dataSize = 0;
692 for (int i = 0; i < assumptions_.size(); i++) {
693 dataSize += com.google.protobuf.CodedOutputStream
694 .computeInt32SizeNoTag(assumptions_.getInt(i));
695 }
696 size += dataSize;
697 if (!getAssumptionsList().isEmpty()) {
698 size += 1;
699 size += com.google.protobuf.CodedOutputStream
700 .computeInt32SizeNoTag(dataSize);
701 }
702 assumptionsMemoizedSerializedSize = dataSize;
703 }
704 if (((bitField0_ & 0x00000008) != 0)) {
705 size += com.google.protobuf.CodedOutputStream
706 .computeMessageSize(8, getSymmetry());
707 }
708 if (((bitField0_ & 0x00000002) != 0)) {
709 size += com.google.protobuf.CodedOutputStream
710 .computeMessageSize(9, getFloatingPointObjective());
711 }
712 size += getUnknownFields().getSerializedSize();
713 memoizedSize = size;
714 return size;
715 }
716
717 @java.lang.Override
718 public boolean equals(final java.lang.Object obj) {
719 if (obj == this) {
720 return true;
721 }
722 if (!(obj instanceof com.google.ortools.sat.CpModelProto)) {
723 return super.equals(obj);
724 }
725 com.google.ortools.sat.CpModelProto other = (com.google.ortools.sat.CpModelProto) obj;
726
727 if (!getName()
728 .equals(other.getName())) return false;
729 if (!getVariablesList()
730 .equals(other.getVariablesList())) return false;
731 if (!getConstraintsList()
732 .equals(other.getConstraintsList())) return false;
733 if (hasObjective() != other.hasObjective()) return false;
734 if (hasObjective()) {
735 if (!getObjective()
736 .equals(other.getObjective())) return false;
737 }
738 if (hasFloatingPointObjective() != other.hasFloatingPointObjective()) return false;
741 .equals(other.getFloatingPointObjective())) return false;
742 }
744 .equals(other.getSearchStrategyList())) return false;
745 if (hasSolutionHint() != other.hasSolutionHint()) return false;
746 if (hasSolutionHint()) {
747 if (!getSolutionHint()
748 .equals(other.getSolutionHint())) return false;
749 }
750 if (!getAssumptionsList()
751 .equals(other.getAssumptionsList())) return false;
752 if (hasSymmetry() != other.hasSymmetry()) return false;
753 if (hasSymmetry()) {
754 if (!getSymmetry()
755 .equals(other.getSymmetry())) return false;
756 }
757 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
758 return true;
759 }
760
761 @java.lang.Override
762 public int hashCode() {
763 if (memoizedHashCode != 0) {
764 return memoizedHashCode;
765 }
766 int hash = 41;
767 hash = (19 * hash) + getDescriptor().hashCode();
768 hash = (37 * hash) + NAME_FIELD_NUMBER;
769 hash = (53 * hash) + getName().hashCode();
770 if (getVariablesCount() > 0) {
771 hash = (37 * hash) + VARIABLES_FIELD_NUMBER;
772 hash = (53 * hash) + getVariablesList().hashCode();
773 }
774 if (getConstraintsCount() > 0) {
775 hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
776 hash = (53 * hash) + getConstraintsList().hashCode();
777 }
778 if (hasObjective()) {
779 hash = (37 * hash) + OBJECTIVE_FIELD_NUMBER;
780 hash = (53 * hash) + getObjective().hashCode();
781 }
783 hash = (37 * hash) + FLOATING_POINT_OBJECTIVE_FIELD_NUMBER;
784 hash = (53 * hash) + getFloatingPointObjective().hashCode();
785 }
786 if (getSearchStrategyCount() > 0) {
787 hash = (37 * hash) + SEARCH_STRATEGY_FIELD_NUMBER;
788 hash = (53 * hash) + getSearchStrategyList().hashCode();
789 }
790 if (hasSolutionHint()) {
791 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
792 hash = (53 * hash) + getSolutionHint().hashCode();
793 }
794 if (getAssumptionsCount() > 0) {
795 hash = (37 * hash) + ASSUMPTIONS_FIELD_NUMBER;
796 hash = (53 * hash) + getAssumptionsList().hashCode();
797 }
798 if (hasSymmetry()) {
799 hash = (37 * hash) + SYMMETRY_FIELD_NUMBER;
800 hash = (53 * hash) + getSymmetry().hashCode();
801 }
802 hash = (29 * hash) + getUnknownFields().hashCode();
803 memoizedHashCode = hash;
804 return hash;
805 }
806
808 java.nio.ByteBuffer data)
809 throws com.google.protobuf.InvalidProtocolBufferException {
810 return PARSER.parseFrom(data);
811 }
813 java.nio.ByteBuffer data,
814 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
815 throws com.google.protobuf.InvalidProtocolBufferException {
816 return PARSER.parseFrom(data, extensionRegistry);
817 }
819 com.google.protobuf.ByteString data)
820 throws com.google.protobuf.InvalidProtocolBufferException {
821 return PARSER.parseFrom(data);
822 }
824 com.google.protobuf.ByteString data,
825 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
826 throws com.google.protobuf.InvalidProtocolBufferException {
827 return PARSER.parseFrom(data, extensionRegistry);
828 }
830 throws com.google.protobuf.InvalidProtocolBufferException {
831 return PARSER.parseFrom(data);
832 }
834 byte[] data,
835 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
836 throws com.google.protobuf.InvalidProtocolBufferException {
837 return PARSER.parseFrom(data, extensionRegistry);
838 }
839 public static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)
840 throws java.io.IOException {
841 return com.google.protobuf.GeneratedMessage
842 .parseWithIOException(PARSER, input);
843 }
845 java.io.InputStream input,
846 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
847 throws java.io.IOException {
848 return com.google.protobuf.GeneratedMessage
849 .parseWithIOException(PARSER, input, extensionRegistry);
850 }
851
852 public static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
853 throws java.io.IOException {
854 return com.google.protobuf.GeneratedMessage
855 .parseDelimitedWithIOException(PARSER, input);
856 }
857
859 java.io.InputStream input,
860 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
861 throws java.io.IOException {
862 return com.google.protobuf.GeneratedMessage
863 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
864 }
866 com.google.protobuf.CodedInputStream input)
867 throws java.io.IOException {
868 return com.google.protobuf.GeneratedMessage
869 .parseWithIOException(PARSER, input);
870 }
872 com.google.protobuf.CodedInputStream input,
873 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
874 throws java.io.IOException {
875 return com.google.protobuf.GeneratedMessage
876 .parseWithIOException(PARSER, input, extensionRegistry);
877 }
878
879 @java.lang.Override
880 public Builder newBuilderForType() { return newBuilder(); }
881 public static Builder newBuilder() {
882 return DEFAULT_INSTANCE.toBuilder();
883 }
884 public static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype) {
885 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
886 }
887 @java.lang.Override
889 return this == DEFAULT_INSTANCE
890 ? new Builder() : new Builder().mergeFrom(this);
891 }
892
893 @java.lang.Override
895 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
896 Builder builder = new Builder(parent);
897 return builder;
898 }
906 public static final class Builder extends
907 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
908 // @@protoc_insertion_point(builder_implements:operations_research.sat.CpModelProto)
909 com.google.ortools.sat.CpModelProtoOrBuilder {
910 public static final com.google.protobuf.Descriptors.Descriptor
912 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
913 }
914
915 @java.lang.Override
916 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
918 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
919 .ensureFieldAccessorsInitialized(
920 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
921 }
922
923 // Construct using com.google.ortools.sat.CpModelProto.newBuilder()
924 private Builder() {
925 maybeForceBuilderInitialization();
926 }
927
928 private Builder(
929 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
930 super(parent);
931 maybeForceBuilderInitialization();
932 }
933 private void maybeForceBuilderInitialization() {
934 if (com.google.protobuf.GeneratedMessage
935 .alwaysUseFieldBuilders) {
936 getVariablesFieldBuilder();
937 getConstraintsFieldBuilder();
938 getObjectiveFieldBuilder();
939 getFloatingPointObjectiveFieldBuilder();
940 getSearchStrategyFieldBuilder();
941 getSolutionHintFieldBuilder();
942 getSymmetryFieldBuilder();
943 }
944 }
945 @java.lang.Override
946 public Builder clear() {
947 super.clear();
948 bitField0_ = 0;
949 name_ = "";
950 if (variablesBuilder_ == null) {
951 variables_ = java.util.Collections.emptyList();
952 } else {
953 variables_ = null;
954 variablesBuilder_.clear();
955 }
956 bitField0_ = (bitField0_ & ~0x00000002);
957 if (constraintsBuilder_ == null) {
958 constraints_ = java.util.Collections.emptyList();
959 } else {
960 constraints_ = null;
961 constraintsBuilder_.clear();
962 }
963 bitField0_ = (bitField0_ & ~0x00000004);
964 objective_ = null;
965 if (objectiveBuilder_ != null) {
966 objectiveBuilder_.dispose();
967 objectiveBuilder_ = null;
968 }
969 floatingPointObjective_ = null;
970 if (floatingPointObjectiveBuilder_ != null) {
971 floatingPointObjectiveBuilder_.dispose();
972 floatingPointObjectiveBuilder_ = null;
973 }
974 if (searchStrategyBuilder_ == null) {
975 searchStrategy_ = java.util.Collections.emptyList();
976 } else {
977 searchStrategy_ = null;
978 searchStrategyBuilder_.clear();
979 }
980 bitField0_ = (bitField0_ & ~0x00000020);
981 solutionHint_ = null;
982 if (solutionHintBuilder_ != null) {
983 solutionHintBuilder_.dispose();
984 solutionHintBuilder_ = null;
985 }
986 assumptions_ = emptyIntList();
987 symmetry_ = null;
988 if (symmetryBuilder_ != null) {
989 symmetryBuilder_.dispose();
990 symmetryBuilder_ = null;
991 }
992 return this;
993 }
994
995 @java.lang.Override
996 public com.google.protobuf.Descriptors.Descriptor
998 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
999 }
1000
1001 @java.lang.Override
1003 return com.google.ortools.sat.CpModelProto.getDefaultInstance();
1004 }
1005
1006 @java.lang.Override
1009 if (!result.isInitialized()) {
1010 throw newUninitializedMessageException(result);
1011 }
1012 return result;
1013 }
1014
1015 @java.lang.Override
1017 com.google.ortools.sat.CpModelProto result = new com.google.ortools.sat.CpModelProto(this);
1018 buildPartialRepeatedFields(result);
1019 if (bitField0_ != 0) { buildPartial0(result); }
1020 onBuilt();
1021 return result;
1022 }
1023
1024 private void buildPartialRepeatedFields(com.google.ortools.sat.CpModelProto result) {
1025 if (variablesBuilder_ == null) {
1026 if (((bitField0_ & 0x00000002) != 0)) {
1027 variables_ = java.util.Collections.unmodifiableList(variables_);
1028 bitField0_ = (bitField0_ & ~0x00000002);
1029 }
1030 result.variables_ = variables_;
1031 } else {
1032 result.variables_ = variablesBuilder_.build();
1033 }
1034 if (constraintsBuilder_ == null) {
1035 if (((bitField0_ & 0x00000004) != 0)) {
1036 constraints_ = java.util.Collections.unmodifiableList(constraints_);
1037 bitField0_ = (bitField0_ & ~0x00000004);
1038 }
1039 result.constraints_ = constraints_;
1040 } else {
1041 result.constraints_ = constraintsBuilder_.build();
1042 }
1043 if (searchStrategyBuilder_ == null) {
1044 if (((bitField0_ & 0x00000020) != 0)) {
1045 searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
1046 bitField0_ = (bitField0_ & ~0x00000020);
1047 }
1048 result.searchStrategy_ = searchStrategy_;
1049 } else {
1050 result.searchStrategy_ = searchStrategyBuilder_.build();
1051 }
1052 }
1053
1054 private void buildPartial0(com.google.ortools.sat.CpModelProto result) {
1055 int from_bitField0_ = bitField0_;
1056 if (((from_bitField0_ & 0x00000001) != 0)) {
1057 result.name_ = name_;
1058 }
1059 int to_bitField0_ = 0;
1060 if (((from_bitField0_ & 0x00000008) != 0)) {
1061 result.objective_ = objectiveBuilder_ == null
1062 ? objective_
1063 : objectiveBuilder_.build();
1064 to_bitField0_ |= 0x00000001;
1065 }
1066 if (((from_bitField0_ & 0x00000010) != 0)) {
1067 result.floatingPointObjective_ = floatingPointObjectiveBuilder_ == null
1068 ? floatingPointObjective_
1069 : floatingPointObjectiveBuilder_.build();
1070 to_bitField0_ |= 0x00000002;
1071 }
1072 if (((from_bitField0_ & 0x00000040) != 0)) {
1073 result.solutionHint_ = solutionHintBuilder_ == null
1074 ? solutionHint_
1075 : solutionHintBuilder_.build();
1076 to_bitField0_ |= 0x00000004;
1077 }
1078 if (((from_bitField0_ & 0x00000080) != 0)) {
1079 assumptions_.makeImmutable();
1080 result.assumptions_ = assumptions_;
1081 }
1082 if (((from_bitField0_ & 0x00000100) != 0)) {
1083 result.symmetry_ = symmetryBuilder_ == null
1084 ? symmetry_
1085 : symmetryBuilder_.build();
1086 to_bitField0_ |= 0x00000008;
1087 }
1088 result.bitField0_ |= to_bitField0_;
1089 }
1090
1091 @java.lang.Override
1092 public Builder mergeFrom(com.google.protobuf.Message other) {
1093 if (other instanceof com.google.ortools.sat.CpModelProto) {
1094 return mergeFrom((com.google.ortools.sat.CpModelProto)other);
1095 } else {
1096 super.mergeFrom(other);
1097 return this;
1098 }
1099 }
1100
1101 public Builder mergeFrom(com.google.ortools.sat.CpModelProto other) {
1102 if (other == com.google.ortools.sat.CpModelProto.getDefaultInstance()) return this;
1103 if (!other.getName().isEmpty()) {
1104 name_ = other.name_;
1105 bitField0_ |= 0x00000001;
1106 onChanged();
1107 }
1108 if (variablesBuilder_ == null) {
1109 if (!other.variables_.isEmpty()) {
1110 if (variables_.isEmpty()) {
1111 variables_ = other.variables_;
1112 bitField0_ = (bitField0_ & ~0x00000002);
1113 } else {
1114 ensureVariablesIsMutable();
1115 variables_.addAll(other.variables_);
1116 }
1117 onChanged();
1118 }
1119 } else {
1120 if (!other.variables_.isEmpty()) {
1121 if (variablesBuilder_.isEmpty()) {
1122 variablesBuilder_.dispose();
1123 variablesBuilder_ = null;
1124 variables_ = other.variables_;
1125 bitField0_ = (bitField0_ & ~0x00000002);
1126 variablesBuilder_ =
1127 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1128 getVariablesFieldBuilder() : null;
1129 } else {
1130 variablesBuilder_.addAllMessages(other.variables_);
1131 }
1132 }
1133 }
1134 if (constraintsBuilder_ == null) {
1135 if (!other.constraints_.isEmpty()) {
1136 if (constraints_.isEmpty()) {
1137 constraints_ = other.constraints_;
1138 bitField0_ = (bitField0_ & ~0x00000004);
1139 } else {
1140 ensureConstraintsIsMutable();
1141 constraints_.addAll(other.constraints_);
1142 }
1143 onChanged();
1144 }
1145 } else {
1146 if (!other.constraints_.isEmpty()) {
1147 if (constraintsBuilder_.isEmpty()) {
1148 constraintsBuilder_.dispose();
1149 constraintsBuilder_ = null;
1150 constraints_ = other.constraints_;
1151 bitField0_ = (bitField0_ & ~0x00000004);
1152 constraintsBuilder_ =
1153 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1154 getConstraintsFieldBuilder() : null;
1155 } else {
1156 constraintsBuilder_.addAllMessages(other.constraints_);
1157 }
1158 }
1159 }
1160 if (other.hasObjective()) {
1161 mergeObjective(other.getObjective());
1162 }
1163 if (other.hasFloatingPointObjective()) {
1164 mergeFloatingPointObjective(other.getFloatingPointObjective());
1165 }
1166 if (searchStrategyBuilder_ == null) {
1167 if (!other.searchStrategy_.isEmpty()) {
1168 if (searchStrategy_.isEmpty()) {
1169 searchStrategy_ = other.searchStrategy_;
1170 bitField0_ = (bitField0_ & ~0x00000020);
1171 } else {
1172 ensureSearchStrategyIsMutable();
1173 searchStrategy_.addAll(other.searchStrategy_);
1174 }
1175 onChanged();
1176 }
1177 } else {
1178 if (!other.searchStrategy_.isEmpty()) {
1179 if (searchStrategyBuilder_.isEmpty()) {
1180 searchStrategyBuilder_.dispose();
1181 searchStrategyBuilder_ = null;
1182 searchStrategy_ = other.searchStrategy_;
1183 bitField0_ = (bitField0_ & ~0x00000020);
1184 searchStrategyBuilder_ =
1185 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1186 getSearchStrategyFieldBuilder() : null;
1187 } else {
1188 searchStrategyBuilder_.addAllMessages(other.searchStrategy_);
1189 }
1190 }
1191 }
1192 if (other.hasSolutionHint()) {
1193 mergeSolutionHint(other.getSolutionHint());
1194 }
1195 if (!other.assumptions_.isEmpty()) {
1196 if (assumptions_.isEmpty()) {
1197 assumptions_ = other.assumptions_;
1198 assumptions_.makeImmutable();
1199 bitField0_ |= 0x00000080;
1200 } else {
1201 ensureAssumptionsIsMutable();
1202 assumptions_.addAll(other.assumptions_);
1203 }
1204 onChanged();
1205 }
1206 if (other.hasSymmetry()) {
1207 mergeSymmetry(other.getSymmetry());
1208 }
1209 this.mergeUnknownFields(other.getUnknownFields());
1210 onChanged();
1211 return this;
1212 }
1213
1214 @java.lang.Override
1215 public final boolean isInitialized() {
1216 return true;
1217 }
1218
1219 @java.lang.Override
1221 com.google.protobuf.CodedInputStream input,
1222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1223 throws java.io.IOException {
1224 if (extensionRegistry == null) {
1225 throw new java.lang.NullPointerException();
1226 }
1227 try {
1228 boolean done = false;
1229 while (!done) {
1230 int tag = input.readTag();
1231 switch (tag) {
1232 case 0:
1233 done = true;
1234 break;
1235 case 10: {
1236 name_ = input.readStringRequireUtf8();
1237 bitField0_ |= 0x00000001;
1238 break;
1239 } // case 10
1240 case 18: {
1242 input.readMessage(
1243 com.google.ortools.sat.IntegerVariableProto.parser(),
1244 extensionRegistry);
1245 if (variablesBuilder_ == null) {
1246 ensureVariablesIsMutable();
1247 variables_.add(m);
1248 } else {
1249 variablesBuilder_.addMessage(m);
1250 }
1251 break;
1252 } // case 18
1253 case 26: {
1255 input.readMessage(
1256 com.google.ortools.sat.ConstraintProto.parser(),
1257 extensionRegistry);
1258 if (constraintsBuilder_ == null) {
1259 ensureConstraintsIsMutable();
1260 constraints_.add(m);
1261 } else {
1262 constraintsBuilder_.addMessage(m);
1263 }
1264 break;
1265 } // case 26
1266 case 34: {
1267 input.readMessage(
1268 getObjectiveFieldBuilder().getBuilder(),
1269 extensionRegistry);
1270 bitField0_ |= 0x00000008;
1271 break;
1272 } // case 34
1273 case 42: {
1275 input.readMessage(
1276 com.google.ortools.sat.DecisionStrategyProto.parser(),
1277 extensionRegistry);
1278 if (searchStrategyBuilder_ == null) {
1279 ensureSearchStrategyIsMutable();
1280 searchStrategy_.add(m);
1281 } else {
1282 searchStrategyBuilder_.addMessage(m);
1283 }
1284 break;
1285 } // case 42
1286 case 50: {
1287 input.readMessage(
1288 getSolutionHintFieldBuilder().getBuilder(),
1289 extensionRegistry);
1290 bitField0_ |= 0x00000040;
1291 break;
1292 } // case 50
1293 case 56: {
1294 int v = input.readInt32();
1295 ensureAssumptionsIsMutable();
1296 assumptions_.addInt(v);
1297 break;
1298 } // case 56
1299 case 58: {
1300 int length = input.readRawVarint32();
1301 int limit = input.pushLimit(length);
1302 ensureAssumptionsIsMutable();
1303 while (input.getBytesUntilLimit() > 0) {
1304 assumptions_.addInt(input.readInt32());
1305 }
1306 input.popLimit(limit);
1307 break;
1308 } // case 58
1309 case 66: {
1310 input.readMessage(
1311 getSymmetryFieldBuilder().getBuilder(),
1312 extensionRegistry);
1313 bitField0_ |= 0x00000100;
1314 break;
1315 } // case 66
1316 case 74: {
1317 input.readMessage(
1318 getFloatingPointObjectiveFieldBuilder().getBuilder(),
1319 extensionRegistry);
1320 bitField0_ |= 0x00000010;
1321 break;
1322 } // case 74
1323 default: {
1324 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1325 done = true; // was an endgroup tag
1326 }
1327 break;
1328 } // default:
1329 } // switch (tag)
1330 } // while (!done)
1331 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1332 throw e.unwrapIOException();
1333 } finally {
1334 onChanged();
1335 } // finally
1336 return this;
1337 }
1338 private int bitField0_;
1339
1340 private java.lang.Object name_ = "";
1349 public java.lang.String getName() {
1350 java.lang.Object ref = name_;
1351 if (!(ref instanceof java.lang.String)) {
1352 com.google.protobuf.ByteString bs =
1353 (com.google.protobuf.ByteString) ref;
1354 java.lang.String s = bs.toStringUtf8();
1355 name_ = s;
1356 return s;
1357 } else {
1358 return (java.lang.String) ref;
1359 }
1360 }
1369 public com.google.protobuf.ByteString
1371 java.lang.Object ref = name_;
1372 if (ref instanceof String) {
1373 com.google.protobuf.ByteString b =
1374 com.google.protobuf.ByteString.copyFromUtf8(
1375 (java.lang.String) ref);
1376 name_ = b;
1377 return b;
1378 } else {
1379 return (com.google.protobuf.ByteString) ref;
1380 }
1381 }
1392 java.lang.String value) {
1393 if (value == null) { throw new NullPointerException(); }
1394 name_ = value;
1395 bitField0_ |= 0x00000001;
1396 onChanged();
1397 return this;
1398 }
1408 name_ = getDefaultInstance().getName();
1409 bitField0_ = (bitField0_ & ~0x00000001);
1410 onChanged();
1411 return this;
1412 }
1423 com.google.protobuf.ByteString value) {
1424 if (value == null) { throw new NullPointerException(); }
1425 checkByteStringIsUtf8(value);
1426 name_ = value;
1427 bitField0_ |= 0x00000001;
1428 onChanged();
1429 return this;
1430 }
1431
1432 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_ =
1433 java.util.Collections.emptyList();
1434 private void ensureVariablesIsMutable() {
1435 if (!((bitField0_ & 0x00000002) != 0)) {
1436 variables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(variables_);
1437 bitField0_ |= 0x00000002;
1438 }
1439 }
1440
1441 private com.google.protobuf.RepeatedFieldBuilder<
1442 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> variablesBuilder_;
1443
1451 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
1452 if (variablesBuilder_ == null) {
1453 return java.util.Collections.unmodifiableList(variables_);
1454 } else {
1455 return variablesBuilder_.getMessageList();
1456 }
1457 }
1465 public int getVariablesCount() {
1466 if (variablesBuilder_ == null) {
1467 return variables_.size();
1468 } else {
1469 return variablesBuilder_.getCount();
1470 }
1471 }
1480 if (variablesBuilder_ == null) {
1481 return variables_.get(index);
1482 } else {
1483 return variablesBuilder_.getMessage(index);
1484 }
1485 }
1494 int index, com.google.ortools.sat.IntegerVariableProto value) {
1495 if (variablesBuilder_ == null) {
1496 if (value == null) {
1497 throw new NullPointerException();
1498 }
1499 ensureVariablesIsMutable();
1500 variables_.set(index, value);
1501 onChanged();
1502 } else {
1503 variablesBuilder_.setMessage(index, value);
1504 }
1505 return this;
1506 }
1515 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1516 if (variablesBuilder_ == null) {
1517 ensureVariablesIsMutable();
1518 variables_.set(index, builderForValue.build());
1519 onChanged();
1520 } else {
1521 variablesBuilder_.setMessage(index, builderForValue.build());
1522 }
1523 return this;
1524 }
1532 public Builder addVariables(com.google.ortools.sat.IntegerVariableProto value) {
1533 if (variablesBuilder_ == null) {
1534 if (value == null) {
1535 throw new NullPointerException();
1536 }
1537 ensureVariablesIsMutable();
1538 variables_.add(value);
1539 onChanged();
1540 } else {
1541 variablesBuilder_.addMessage(value);
1542 }
1543 return this;
1544 }
1553 int index, com.google.ortools.sat.IntegerVariableProto value) {
1554 if (variablesBuilder_ == null) {
1555 if (value == null) {
1556 throw new NullPointerException();
1557 }
1558 ensureVariablesIsMutable();
1559 variables_.add(index, value);
1560 onChanged();
1561 } else {
1562 variablesBuilder_.addMessage(index, value);
1563 }
1564 return this;
1565 }
1574 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1575 if (variablesBuilder_ == null) {
1576 ensureVariablesIsMutable();
1577 variables_.add(builderForValue.build());
1578 onChanged();
1579 } else {
1580 variablesBuilder_.addMessage(builderForValue.build());
1581 }
1582 return this;
1583 }
1592 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1593 if (variablesBuilder_ == null) {
1594 ensureVariablesIsMutable();
1595 variables_.add(index, builderForValue.build());
1596 onChanged();
1597 } else {
1598 variablesBuilder_.addMessage(index, builderForValue.build());
1599 }
1600 return this;
1601 }
1610 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
1611 if (variablesBuilder_ == null) {
1612 ensureVariablesIsMutable();
1613 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1614 values, variables_);
1615 onChanged();
1616 } else {
1617 variablesBuilder_.addAllMessages(values);
1618 }
1619 return this;
1620 }
1629 if (variablesBuilder_ == null) {
1630 variables_ = java.util.Collections.emptyList();
1631 bitField0_ = (bitField0_ & ~0x00000002);
1632 onChanged();
1633 } else {
1634 variablesBuilder_.clear();
1635 }
1636 return this;
1637 }
1645 public Builder removeVariables(int index) {
1646 if (variablesBuilder_ == null) {
1647 ensureVariablesIsMutable();
1648 variables_.remove(index);
1649 onChanged();
1650 } else {
1651 variablesBuilder_.remove(index);
1652 }
1653 return this;
1654 }
1663 int index) {
1664 return getVariablesFieldBuilder().getBuilder(index);
1665 }
1674 int index) {
1675 if (variablesBuilder_ == null) {
1676 return variables_.get(index); } else {
1677 return variablesBuilder_.getMessageOrBuilder(index);
1678 }
1679 }
1687 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1689 if (variablesBuilder_ != null) {
1690 return variablesBuilder_.getMessageOrBuilderList();
1691 } else {
1692 return java.util.Collections.unmodifiableList(variables_);
1693 }
1694 }
1703 return getVariablesFieldBuilder().addBuilder(
1704 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1705 }
1714 int index) {
1715 return getVariablesFieldBuilder().addBuilder(
1716 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1717 }
1725 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
1727 return getVariablesFieldBuilder().getBuilderList();
1728 }
1729 private com.google.protobuf.RepeatedFieldBuilder<
1730 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1731 getVariablesFieldBuilder() {
1732 if (variablesBuilder_ == null) {
1733 variablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1734 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
1735 variables_,
1736 ((bitField0_ & 0x00000002) != 0),
1737 getParentForChildren(),
1738 isClean());
1739 variables_ = null;
1740 }
1741 return variablesBuilder_;
1742 }
1743
1744 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_ =
1745 java.util.Collections.emptyList();
1746 private void ensureConstraintsIsMutable() {
1747 if (!((bitField0_ & 0x00000004) != 0)) {
1748 constraints_ = new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>(constraints_);
1749 bitField0_ |= 0x00000004;
1750 }
1751 }
1752
1753 private com.google.protobuf.RepeatedFieldBuilder<
1754 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder> constraintsBuilder_;
1755
1759 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
1760 if (constraintsBuilder_ == null) {
1761 return java.util.Collections.unmodifiableList(constraints_);
1762 } else {
1763 return constraintsBuilder_.getMessageList();
1764 }
1765 }
1769 public int getConstraintsCount() {
1770 if (constraintsBuilder_ == null) {
1771 return constraints_.size();
1772 } else {
1773 return constraintsBuilder_.getCount();
1774 }
1775 }
1780 if (constraintsBuilder_ == null) {
1781 return constraints_.get(index);
1782 } else {
1783 return constraintsBuilder_.getMessage(index);
1784 }
1785 }
1790 int index, com.google.ortools.sat.ConstraintProto value) {
1791 if (constraintsBuilder_ == null) {
1792 if (value == null) {
1793 throw new NullPointerException();
1794 }
1795 ensureConstraintsIsMutable();
1796 constraints_.set(index, value);
1797 onChanged();
1798 } else {
1799 constraintsBuilder_.setMessage(index, value);
1800 }
1801 return this;
1802 }
1807 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1808 if (constraintsBuilder_ == null) {
1809 ensureConstraintsIsMutable();
1810 constraints_.set(index, builderForValue.build());
1811 onChanged();
1812 } else {
1813 constraintsBuilder_.setMessage(index, builderForValue.build());
1814 }
1815 return this;
1816 }
1820 public Builder addConstraints(com.google.ortools.sat.ConstraintProto value) {
1821 if (constraintsBuilder_ == null) {
1822 if (value == null) {
1823 throw new NullPointerException();
1824 }
1825 ensureConstraintsIsMutable();
1826 constraints_.add(value);
1827 onChanged();
1828 } else {
1829 constraintsBuilder_.addMessage(value);
1830 }
1831 return this;
1832 }
1837 int index, com.google.ortools.sat.ConstraintProto value) {
1838 if (constraintsBuilder_ == null) {
1839 if (value == null) {
1840 throw new NullPointerException();
1841 }
1842 ensureConstraintsIsMutable();
1843 constraints_.add(index, value);
1844 onChanged();
1845 } else {
1846 constraintsBuilder_.addMessage(index, value);
1847 }
1848 return this;
1849 }
1854 com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1855 if (constraintsBuilder_ == null) {
1856 ensureConstraintsIsMutable();
1857 constraints_.add(builderForValue.build());
1858 onChanged();
1859 } else {
1860 constraintsBuilder_.addMessage(builderForValue.build());
1861 }
1862 return this;
1863 }
1868 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1869 if (constraintsBuilder_ == null) {
1870 ensureConstraintsIsMutable();
1871 constraints_.add(index, builderForValue.build());
1872 onChanged();
1873 } else {
1874 constraintsBuilder_.addMessage(index, builderForValue.build());
1875 }
1876 return this;
1877 }
1882 java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto> values) {
1883 if (constraintsBuilder_ == null) {
1884 ensureConstraintsIsMutable();
1885 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1886 values, constraints_);
1887 onChanged();
1888 } else {
1889 constraintsBuilder_.addAllMessages(values);
1890 }
1891 return this;
1892 }
1897 if (constraintsBuilder_ == null) {
1898 constraints_ = java.util.Collections.emptyList();
1899 bitField0_ = (bitField0_ & ~0x00000004);
1900 onChanged();
1901 } else {
1902 constraintsBuilder_.clear();
1903 }
1904 return this;
1905 }
1909 public Builder removeConstraints(int index) {
1910 if (constraintsBuilder_ == null) {
1911 ensureConstraintsIsMutable();
1912 constraints_.remove(index);
1913 onChanged();
1914 } else {
1915 constraintsBuilder_.remove(index);
1916 }
1917 return this;
1918 }
1923 int index) {
1924 return getConstraintsFieldBuilder().getBuilder(index);
1925 }
1930 int index) {
1931 if (constraintsBuilder_ == null) {
1932 return constraints_.get(index); } else {
1933 return constraintsBuilder_.getMessageOrBuilder(index);
1934 }
1935 }
1939 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
1941 if (constraintsBuilder_ != null) {
1942 return constraintsBuilder_.getMessageOrBuilderList();
1943 } else {
1944 return java.util.Collections.unmodifiableList(constraints_);
1945 }
1946 }
1951 return getConstraintsFieldBuilder().addBuilder(
1952 com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1953 }
1958 int index) {
1959 return getConstraintsFieldBuilder().addBuilder(
1960 index, com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1961 }
1965 public java.util.List<com.google.ortools.sat.ConstraintProto.Builder>
1967 return getConstraintsFieldBuilder().getBuilderList();
1968 }
1969 private com.google.protobuf.RepeatedFieldBuilder<
1970 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>
1971 getConstraintsFieldBuilder() {
1972 if (constraintsBuilder_ == null) {
1973 constraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1974 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>(
1975 constraints_,
1976 ((bitField0_ & 0x00000004) != 0),
1977 getParentForChildren(),
1978 isClean());
1979 constraints_ = null;
1980 }
1981 return constraintsBuilder_;
1982 }
1983
1984 private com.google.ortools.sat.CpObjectiveProto objective_;
1985 private com.google.protobuf.SingleFieldBuilder<
1986 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> objectiveBuilder_;
1995 public boolean hasObjective() {
1996 return ((bitField0_ & 0x00000008) != 0);
1997 }
2007 if (objectiveBuilder_ == null) {
2008 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2009 } else {
2010 return objectiveBuilder_.getMessage();
2011 }
2012 }
2020 public Builder setObjective(com.google.ortools.sat.CpObjectiveProto value) {
2021 if (objectiveBuilder_ == null) {
2022 if (value == null) {
2023 throw new NullPointerException();
2024 }
2025 objective_ = value;
2026 } else {
2027 objectiveBuilder_.setMessage(value);
2028 }
2029 bitField0_ |= 0x00000008;
2030 onChanged();
2031 return this;
2032 }
2041 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
2042 if (objectiveBuilder_ == null) {
2043 objective_ = builderForValue.build();
2044 } else {
2045 objectiveBuilder_.setMessage(builderForValue.build());
2046 }
2047 bitField0_ |= 0x00000008;
2048 onChanged();
2049 return this;
2050 }
2058 public Builder mergeObjective(com.google.ortools.sat.CpObjectiveProto value) {
2059 if (objectiveBuilder_ == null) {
2060 if (((bitField0_ & 0x00000008) != 0) &&
2061 objective_ != null &&
2062 objective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
2063 getObjectiveBuilder().mergeFrom(value);
2064 } else {
2065 objective_ = value;
2066 }
2067 } else {
2068 objectiveBuilder_.mergeFrom(value);
2069 }
2070 if (objective_ != null) {
2071 bitField0_ |= 0x00000008;
2072 onChanged();
2073 }
2074 return this;
2075 }
2084 bitField0_ = (bitField0_ & ~0x00000008);
2085 objective_ = null;
2086 if (objectiveBuilder_ != null) {
2087 objectiveBuilder_.dispose();
2088 objectiveBuilder_ = null;
2089 }
2090 onChanged();
2091 return this;
2092 }
2101 bitField0_ |= 0x00000008;
2102 onChanged();
2103 return getObjectiveFieldBuilder().getBuilder();
2104 }
2113 if (objectiveBuilder_ != null) {
2114 return objectiveBuilder_.getMessageOrBuilder();
2115 } else {
2116 return objective_ == null ?
2117 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2118 }
2119 }
2127 private com.google.protobuf.SingleFieldBuilder<
2128 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
2129 getObjectiveFieldBuilder() {
2130 if (objectiveBuilder_ == null) {
2131 objectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2132 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
2133 getObjective(),
2134 getParentForChildren(),
2135 isClean());
2136 objective_ = null;
2137 }
2138 return objectiveBuilder_;
2139 }
2140
2141 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
2142 private com.google.protobuf.SingleFieldBuilder<
2143 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder> floatingPointObjectiveBuilder_;
2164 public boolean hasFloatingPointObjective() {
2165 return ((bitField0_ & 0x00000010) != 0);
2166 }
2188 if (floatingPointObjectiveBuilder_ == null) {
2189 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2190 } else {
2191 return floatingPointObjectiveBuilder_.getMessage();
2192 }
2193 }
2213 public Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2214 if (floatingPointObjectiveBuilder_ == null) {
2215 if (value == null) {
2216 throw new NullPointerException();
2217 }
2218 floatingPointObjective_ = value;
2219 } else {
2220 floatingPointObjectiveBuilder_.setMessage(value);
2221 }
2222 bitField0_ |= 0x00000010;
2223 onChanged();
2224 return this;
2225 }
2246 com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue) {
2247 if (floatingPointObjectiveBuilder_ == null) {
2248 floatingPointObjective_ = builderForValue.build();
2249 } else {
2250 floatingPointObjectiveBuilder_.setMessage(builderForValue.build());
2251 }
2252 bitField0_ |= 0x00000010;
2253 onChanged();
2254 return this;
2255 }
2275 public Builder mergeFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2276 if (floatingPointObjectiveBuilder_ == null) {
2277 if (((bitField0_ & 0x00000010) != 0) &&
2278 floatingPointObjective_ != null &&
2279 floatingPointObjective_ != com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance()) {
2280 getFloatingPointObjectiveBuilder().mergeFrom(value);
2281 } else {
2282 floatingPointObjective_ = value;
2283 }
2284 } else {
2285 floatingPointObjectiveBuilder_.mergeFrom(value);
2286 }
2287 if (floatingPointObjective_ != null) {
2288 bitField0_ |= 0x00000010;
2289 onChanged();
2290 }
2291 return this;
2292 }
2313 bitField0_ = (bitField0_ & ~0x00000010);
2314 floatingPointObjective_ = null;
2315 if (floatingPointObjectiveBuilder_ != null) {
2316 floatingPointObjectiveBuilder_.dispose();
2317 floatingPointObjectiveBuilder_ = null;
2318 }
2319 onChanged();
2320 return this;
2321 }
2342 bitField0_ |= 0x00000010;
2343 onChanged();
2344 return getFloatingPointObjectiveFieldBuilder().getBuilder();
2345 }
2366 if (floatingPointObjectiveBuilder_ != null) {
2367 return floatingPointObjectiveBuilder_.getMessageOrBuilder();
2368 } else {
2369 return floatingPointObjective_ == null ?
2370 com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2371 }
2372 }
2392 private com.google.protobuf.SingleFieldBuilder<
2393 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>
2394 getFloatingPointObjectiveFieldBuilder() {
2395 if (floatingPointObjectiveBuilder_ == null) {
2396 floatingPointObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2397 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>(
2399 getParentForChildren(),
2400 isClean());
2401 floatingPointObjective_ = null;
2402 }
2403 return floatingPointObjectiveBuilder_;
2404 }
2405
2406 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_ =
2407 java.util.Collections.emptyList();
2408 private void ensureSearchStrategyIsMutable() {
2409 if (!((bitField0_ & 0x00000020) != 0)) {
2410 searchStrategy_ = new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>(searchStrategy_);
2411 bitField0_ |= 0x00000020;
2412 }
2413 }
2414
2415 private com.google.protobuf.RepeatedFieldBuilder<
2416 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder> searchStrategyBuilder_;
2417
2433 public java.util.List<com.google.ortools.sat.DecisionStrategyProto> getSearchStrategyList() {
2434 if (searchStrategyBuilder_ == null) {
2435 return java.util.Collections.unmodifiableList(searchStrategy_);
2436 } else {
2437 return searchStrategyBuilder_.getMessageList();
2438 }
2439 }
2456 if (searchStrategyBuilder_ == null) {
2457 return searchStrategy_.size();
2458 } else {
2459 return searchStrategyBuilder_.getCount();
2460 }
2461 }
2478 if (searchStrategyBuilder_ == null) {
2479 return searchStrategy_.get(index);
2480 } else {
2481 return searchStrategyBuilder_.getMessage(index);
2482 }
2483 }
2500 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2501 if (searchStrategyBuilder_ == null) {
2502 if (value == null) {
2503 throw new NullPointerException();
2504 }
2505 ensureSearchStrategyIsMutable();
2506 searchStrategy_.set(index, value);
2507 onChanged();
2508 } else {
2509 searchStrategyBuilder_.setMessage(index, value);
2510 }
2511 return this;
2512 }
2529 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2530 if (searchStrategyBuilder_ == null) {
2531 ensureSearchStrategyIsMutable();
2532 searchStrategy_.set(index, builderForValue.build());
2533 onChanged();
2534 } else {
2535 searchStrategyBuilder_.setMessage(index, builderForValue.build());
2536 }
2537 return this;
2538 }
2554 public Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value) {
2555 if (searchStrategyBuilder_ == null) {
2556 if (value == null) {
2557 throw new NullPointerException();
2558 }
2559 ensureSearchStrategyIsMutable();
2560 searchStrategy_.add(value);
2561 onChanged();
2562 } else {
2563 searchStrategyBuilder_.addMessage(value);
2564 }
2565 return this;
2566 }
2583 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2584 if (searchStrategyBuilder_ == null) {
2585 if (value == null) {
2586 throw new NullPointerException();
2587 }
2588 ensureSearchStrategyIsMutable();
2589 searchStrategy_.add(index, value);
2590 onChanged();
2591 } else {
2592 searchStrategyBuilder_.addMessage(index, value);
2593 }
2594 return this;
2595 }
2612 com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2613 if (searchStrategyBuilder_ == null) {
2614 ensureSearchStrategyIsMutable();
2615 searchStrategy_.add(builderForValue.build());
2616 onChanged();
2617 } else {
2618 searchStrategyBuilder_.addMessage(builderForValue.build());
2619 }
2620 return this;
2621 }
2638 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2639 if (searchStrategyBuilder_ == null) {
2640 ensureSearchStrategyIsMutable();
2641 searchStrategy_.add(index, builderForValue.build());
2642 onChanged();
2643 } else {
2644 searchStrategyBuilder_.addMessage(index, builderForValue.build());
2645 }
2646 return this;
2647 }
2664 java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto> values) {
2665 if (searchStrategyBuilder_ == null) {
2666 ensureSearchStrategyIsMutable();
2667 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2668 values, searchStrategy_);
2669 onChanged();
2670 } else {
2671 searchStrategyBuilder_.addAllMessages(values);
2672 }
2673 return this;
2674 }
2691 if (searchStrategyBuilder_ == null) {
2692 searchStrategy_ = java.util.Collections.emptyList();
2693 bitField0_ = (bitField0_ & ~0x00000020);
2694 onChanged();
2695 } else {
2696 searchStrategyBuilder_.clear();
2697 }
2698 return this;
2699 }
2715 public Builder removeSearchStrategy(int index) {
2716 if (searchStrategyBuilder_ == null) {
2717 ensureSearchStrategyIsMutable();
2718 searchStrategy_.remove(index);
2719 onChanged();
2720 } else {
2721 searchStrategyBuilder_.remove(index);
2722 }
2723 return this;
2724 }
2741 int index) {
2742 return getSearchStrategyFieldBuilder().getBuilder(index);
2743 }
2760 int index) {
2761 if (searchStrategyBuilder_ == null) {
2762 return searchStrategy_.get(index); } else {
2763 return searchStrategyBuilder_.getMessageOrBuilder(index);
2764 }
2765 }
2781 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2783 if (searchStrategyBuilder_ != null) {
2784 return searchStrategyBuilder_.getMessageOrBuilderList();
2785 } else {
2786 return java.util.Collections.unmodifiableList(searchStrategy_);
2787 }
2788 }
2805 return getSearchStrategyFieldBuilder().addBuilder(
2806 com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2807 }
2824 int index) {
2825 return getSearchStrategyFieldBuilder().addBuilder(
2826 index, com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2827 }
2843 public java.util.List<com.google.ortools.sat.DecisionStrategyProto.Builder>
2845 return getSearchStrategyFieldBuilder().getBuilderList();
2846 }
2847 private com.google.protobuf.RepeatedFieldBuilder<
2848 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2849 getSearchStrategyFieldBuilder() {
2850 if (searchStrategyBuilder_ == null) {
2851 searchStrategyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2852 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>(
2853 searchStrategy_,
2854 ((bitField0_ & 0x00000020) != 0),
2855 getParentForChildren(),
2856 isClean());
2857 searchStrategy_ = null;
2858 }
2859 return searchStrategyBuilder_;
2860 }
2861
2863 private com.google.protobuf.SingleFieldBuilder<
2864 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
2883 public boolean hasSolutionHint() {
2884 return ((bitField0_ & 0x00000040) != 0);
2885 }
2905 if (solutionHintBuilder_ == null) {
2906 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2907 } else {
2908 return solutionHintBuilder_.getMessage();
2909 }
2910 }
2928 public Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
2929 if (solutionHintBuilder_ == null) {
2930 if (value == null) {
2931 throw new NullPointerException();
2932 }
2933 solutionHint_ = value;
2934 } else {
2935 solutionHintBuilder_.setMessage(value);
2936 }
2937 bitField0_ |= 0x00000040;
2938 onChanged();
2939 return this;
2940 }
2959 com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue) {
2960 if (solutionHintBuilder_ == null) {
2961 solutionHint_ = builderForValue.build();
2962 } else {
2963 solutionHintBuilder_.setMessage(builderForValue.build());
2964 }
2965 bitField0_ |= 0x00000040;
2966 onChanged();
2967 return this;
2968 }
2986 public Builder mergeSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
2987 if (solutionHintBuilder_ == null) {
2988 if (((bitField0_ & 0x00000040) != 0) &&
2989 solutionHint_ != null &&
2990 solutionHint_ != com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance()) {
2991 getSolutionHintBuilder().mergeFrom(value);
2992 } else {
2993 solutionHint_ = value;
2994 }
2995 } else {
2996 solutionHintBuilder_.mergeFrom(value);
2997 }
2998 if (solutionHint_ != null) {
2999 bitField0_ |= 0x00000040;
3000 onChanged();
3001 }
3002 return this;
3003 }
3022 bitField0_ = (bitField0_ & ~0x00000040);
3023 solutionHint_ = null;
3024 if (solutionHintBuilder_ != null) {
3025 solutionHintBuilder_.dispose();
3026 solutionHintBuilder_ = null;
3027 }
3028 onChanged();
3029 return this;
3030 }
3049 bitField0_ |= 0x00000040;
3050 onChanged();
3051 return getSolutionHintFieldBuilder().getBuilder();
3052 }
3071 if (solutionHintBuilder_ != null) {
3072 return solutionHintBuilder_.getMessageOrBuilder();
3073 } else {
3074 return solutionHint_ == null ?
3075 com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3076 }
3077 }
3095 private com.google.protobuf.SingleFieldBuilder<
3096 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>
3097 getSolutionHintFieldBuilder() {
3098 if (solutionHintBuilder_ == null) {
3099 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3100 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>(
3102 getParentForChildren(),
3103 isClean());
3104 solutionHint_ = null;
3105 }
3106 return solutionHintBuilder_;
3107 }
3108
3109 private com.google.protobuf.Internal.IntList assumptions_ = emptyIntList();
3110 private void ensureAssumptionsIsMutable() {
3111 if (!assumptions_.isModifiable()) {
3112 assumptions_ = makeMutableCopy(assumptions_);
3113 }
3114 bitField0_ |= 0x00000080;
3115 }
3136 public java.util.List<java.lang.Integer>
3138 assumptions_.makeImmutable();
3139 return assumptions_;
3140 }
3161 public int getAssumptionsCount() {
3162 return assumptions_.size();
3163 }
3185 public int getAssumptions(int index) {
3186 return assumptions_.getInt(index);
3187 }
3211 int index, int value) {
3212
3213 ensureAssumptionsIsMutable();
3214 assumptions_.setInt(index, value);
3215 bitField0_ |= 0x00000080;
3216 onChanged();
3217 return this;
3218 }
3240 public Builder addAssumptions(int value) {
3241
3242 ensureAssumptionsIsMutable();
3243 assumptions_.addInt(value);
3244 bitField0_ |= 0x00000080;
3245 onChanged();
3246 return this;
3247 }
3270 java.lang.Iterable<? extends java.lang.Integer> values) {
3271 ensureAssumptionsIsMutable();
3272 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3273 values, assumptions_);
3274 bitField0_ |= 0x00000080;
3275 onChanged();
3276 return this;
3277 }
3299 assumptions_ = emptyIntList();
3300 bitField0_ = (bitField0_ & ~0x00000080);
3301 onChanged();
3302 return this;
3303 }
3304
3305 private com.google.ortools.sat.SymmetryProto symmetry_;
3306 private com.google.protobuf.SingleFieldBuilder<
3307 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder> symmetryBuilder_;
3320 public boolean hasSymmetry() {
3321 return ((bitField0_ & 0x00000100) != 0);
3322 }
3336 if (symmetryBuilder_ == null) {
3337 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3338 } else {
3339 return symmetryBuilder_.getMessage();
3340 }
3341 }
3353 public Builder setSymmetry(com.google.ortools.sat.SymmetryProto value) {
3354 if (symmetryBuilder_ == null) {
3355 if (value == null) {
3356 throw new NullPointerException();
3357 }
3358 symmetry_ = value;
3359 } else {
3360 symmetryBuilder_.setMessage(value);
3361 }
3362 bitField0_ |= 0x00000100;
3363 onChanged();
3364 return this;
3365 }
3378 com.google.ortools.sat.SymmetryProto.Builder builderForValue) {
3379 if (symmetryBuilder_ == null) {
3380 symmetry_ = builderForValue.build();
3381 } else {
3382 symmetryBuilder_.setMessage(builderForValue.build());
3383 }
3384 bitField0_ |= 0x00000100;
3385 onChanged();
3386 return this;
3387 }
3399 public Builder mergeSymmetry(com.google.ortools.sat.SymmetryProto value) {
3400 if (symmetryBuilder_ == null) {
3401 if (((bitField0_ & 0x00000100) != 0) &&
3402 symmetry_ != null &&
3403 symmetry_ != com.google.ortools.sat.SymmetryProto.getDefaultInstance()) {
3404 getSymmetryBuilder().mergeFrom(value);
3405 } else {
3406 symmetry_ = value;
3407 }
3408 } else {
3409 symmetryBuilder_.mergeFrom(value);
3410 }
3411 if (symmetry_ != null) {
3412 bitField0_ |= 0x00000100;
3413 onChanged();
3414 }
3415 return this;
3416 }
3429 bitField0_ = (bitField0_ & ~0x00000100);
3430 symmetry_ = null;
3431 if (symmetryBuilder_ != null) {
3432 symmetryBuilder_.dispose();
3433 symmetryBuilder_ = null;
3434 }
3435 onChanged();
3436 return this;
3437 }
3450 bitField0_ |= 0x00000100;
3451 onChanged();
3452 return getSymmetryFieldBuilder().getBuilder();
3453 }
3466 if (symmetryBuilder_ != null) {
3467 return symmetryBuilder_.getMessageOrBuilder();
3468 } else {
3469 return symmetry_ == null ?
3470 com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3471 }
3472 }
3484 private com.google.protobuf.SingleFieldBuilder<
3485 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>
3486 getSymmetryFieldBuilder() {
3487 if (symmetryBuilder_ == null) {
3488 symmetryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3489 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>(
3490 getSymmetry(),
3491 getParentForChildren(),
3492 isClean());
3493 symmetry_ = null;
3494 }
3495 return symmetryBuilder_;
3496 }
3497
3498 // @@protoc_insertion_point(builder_scope:operations_research.sat.CpModelProto)
3499 }
3500
3501 // @@protoc_insertion_point(class_scope:operations_research.sat.CpModelProto)
3502 private static final com.google.ortools.sat.CpModelProto DEFAULT_INSTANCE;
3503 static {
3504 DEFAULT_INSTANCE = new com.google.ortools.sat.CpModelProto();
3505 }
3506
3508 return DEFAULT_INSTANCE;
3509 }
3510
3511 private static final com.google.protobuf.Parser<CpModelProto>
3512 PARSER = new com.google.protobuf.AbstractParser<CpModelProto>() {
3513 @java.lang.Override
3514 public CpModelProto parsePartialFrom(
3515 com.google.protobuf.CodedInputStream input,
3516 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3517 throws com.google.protobuf.InvalidProtocolBufferException {
3518 Builder builder = newBuilder();
3519 try {
3520 builder.mergeFrom(input, extensionRegistry);
3521 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3522 throw e.setUnfinishedMessage(builder.buildPartial());
3523 } catch (com.google.protobuf.UninitializedMessageException e) {
3524 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3525 } catch (java.io.IOException e) {
3526 throw new com.google.protobuf.InvalidProtocolBufferException(e)
3527 .setUnfinishedMessage(builder.buildPartial());
3528 }
3529 return builder.buildPartial();
3530 }
3531 };
3532
3533 public static com.google.protobuf.Parser<CpModelProto> parser() {
3534 return PARSER;
3535 }
3536
3537 @java.lang.Override
3538 public com.google.protobuf.Parser<CpModelProto> getParserForType() {
3539 return PARSER;
3540 }
3541
3542 @java.lang.Override
3544 return DEFAULT_INSTANCE;
3545 }
3546
3547}
3548
Builder setVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder addVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
com.google.ortools.sat.FloatObjectiveProto getFloatingPointObjective()
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder(int index)
com.google.ortools.sat.SymmetryProto.Builder getSymmetryBuilder()
com.google.ortools.sat.DecisionStrategyProtoOrBuilder getSearchStrategyOrBuilder(int index)
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getVariablesOrBuilderList()
com.google.ortools.sat.CpObjectiveProto getObjective()
com.google.ortools.sat.SymmetryProto getSymmetry()
java.util.List< com.google.ortools.sat.DecisionStrategyProto > getSearchStrategyList()
Builder addVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
Builder setObjective(com.google.ortools.sat.CpObjectiveProto.Builder builderForValue)
com.google.ortools.sat.IntegerVariableProto getVariables(int index)
java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > getConstraintsOrBuilderList()
com.google.ortools.sat.PartialVariableAssignment.Builder getSolutionHintBuilder()
com.google.ortools.sat.DecisionStrategyProto getSearchStrategy(int index)
com.google.ortools.sat.ConstraintProto.Builder getConstraintsBuilder(int index)
Builder setSymmetry(com.google.ortools.sat.SymmetryProto value)
com.google.ortools.sat.CpModelProto getDefaultInstanceForType()
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder()
Builder addConstraints(int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
com.google.ortools.sat.ConstraintProtoOrBuilder getConstraintsOrBuilder(int index)
java.util.List< com.google.ortools.sat.ConstraintProto.Builder > getConstraintsBuilderList()
Builder addAllConstraints(java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto > values)
com.google.ortools.sat.PartialVariableAssignment getSolutionHint()
com.google.ortools.sat.CpModelProto build()
Builder setName(java.lang.String value)
java.util.List< java.lang.Integer > getAssumptionsList()
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder(int index)
com.google.ortools.sat.IntegerVariableProto.Builder getVariablesBuilder(int index)
com.google.ortools.sat.CpModelProto buildPartial()
com.google.ortools.sat.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
Builder setVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value)
Builder setSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto value)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder setConstraints(int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder(int index)
Builder addAllSearchStrategy(java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto > values)
com.google.ortools.sat.IntegerVariableProtoOrBuilder getVariablesOrBuilder(int index)
Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment value)
Builder setObjective(com.google.ortools.sat.CpObjectiveProto value)
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue)
java.util.List< com.google.ortools.sat.IntegerVariableProto.Builder > getVariablesBuilderList()
Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value)
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder addAllAssumptions(java.lang.Iterable<? extends java.lang.Integer > values)
Builder addConstraints(com.google.ortools.sat.ConstraintProto.Builder builderForValue)
com.google.ortools.sat.FloatObjectiveProto.Builder getFloatingPointObjectiveBuilder()
Builder mergeFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value)
java.util.List< com.google.ortools.sat.DecisionStrategyProto.Builder > getSearchStrategyBuilderList()
Builder setSymmetry(com.google.ortools.sat.SymmetryProto.Builder builderForValue)
com.google.ortools.sat.FloatObjectiveProtoOrBuilder getFloatingPointObjectiveOrBuilder()
Builder addAllVariables(java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
Builder setConstraints(int index, com.google.ortools.sat.ConstraintProto value)
Builder setNameBytes(com.google.protobuf.ByteString value)
com.google.protobuf.ByteString getNameBytes()
Builder mergeFrom(com.google.ortools.sat.CpModelProto other)
Builder setAssumptions(int index, int value)
Builder mergeSolutionHint(com.google.ortools.sat.PartialVariableAssignment value)
Builder addVariables(com.google.ortools.sat.IntegerVariableProto value)
Builder setSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > getSearchStrategyOrBuilderList()
Builder addConstraints(com.google.ortools.sat.ConstraintProto value)
Builder addSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
Builder addConstraints(int index, com.google.ortools.sat.ConstraintProto value)
Builder mergeObjective(com.google.ortools.sat.CpObjectiveProto value)
com.google.ortools.sat.CpObjectiveProto.Builder getObjectiveBuilder()
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder()
java.util.List< com.google.ortools.sat.IntegerVariableProto > getVariablesList()
Builder addVariables(com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
com.google.ortools.sat.SymmetryProtoOrBuilder getSymmetryOrBuilder()
com.google.ortools.sat.DecisionStrategyProto.Builder getSearchStrategyBuilder(int index)
Builder mergeSymmetry(com.google.ortools.sat.SymmetryProto value)
com.google.ortools.sat.CpObjectiveProtoOrBuilder getObjectiveOrBuilder()
Builder addSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto value)
com.google.ortools.sat.ConstraintProto getConstraints(int index)
Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
Builder mergeFrom(com.google.protobuf.Message other)
Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue)
java.util.List< com.google.ortools.sat.ConstraintProto > getConstraintsList()
com.google.ortools.sat.SymmetryProto getSymmetry()
java.util.List< com.google.ortools.sat.DecisionStrategyProto > getSearchStrategyList()
static com.google.ortools.sat.CpModelProto getDefaultInstance()
java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > getSearchStrategyOrBuilderList()
com.google.protobuf.ByteString getNameBytes()
com.google.ortools.sat.FloatObjectiveProtoOrBuilder getFloatingPointObjectiveOrBuilder()
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.CodedInputStream input)
com.google.ortools.sat.ConstraintProtoOrBuilder getConstraintsOrBuilder(int index)
static com.google.protobuf.Parser< CpModelProto > parser()
static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.CpModelProto parseFrom(java.nio.ByteBuffer data)
com.google.ortools.sat.CpObjectiveProto getObjective()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.CpModelProto getDefaultInstanceForType()
static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
com.google.ortools.sat.ConstraintProto getConstraints(int index)
com.google.ortools.sat.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
java.util.List< java.lang.Integer > getAssumptionsList()
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getVariablesOrBuilderList()
com.google.ortools.sat.DecisionStrategyProtoOrBuilder getSearchStrategyOrBuilder(int index)
static com.google.ortools.sat.CpModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER
java.util.List< com.google.ortools.sat.IntegerVariableProto > getVariablesList()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.sat.IntegerVariableProto getVariables(int index)
java.util.List< com.google.ortools.sat.ConstraintProto > getConstraintsList()
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.Parser< CpModelProto > getParserForType()
com.google.ortools.sat.SymmetryProtoOrBuilder getSymmetryOrBuilder()
boolean equals(final java.lang.Object obj)
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.ByteString data)
static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype)
com.google.ortools.sat.CpObjectiveProtoOrBuilder getObjectiveOrBuilder()
com.google.ortools.sat.PartialVariableAssignment getSolutionHint()
com.google.ortools.sat.FloatObjectiveProto getFloatingPointObjective()
java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > getConstraintsOrBuilderList()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.sat.IntegerVariableProtoOrBuilder getVariablesOrBuilder(int index)
void writeTo(com.google.protobuf.CodedOutputStream output)
com.google.ortools.sat.DecisionStrategyProto getSearchStrategy(int index)
static com.google.ortools.sat.CpModelProto parseFrom(byte[] data)
static com.google.ortools.sat.CpModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)