Google OR-Tools v9.14
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// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/sat/cp_model.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.sat;
7
15@com.google.protobuf.Generated
16public final class CpModelProto extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.sat.CpModelProto)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 CpModelProto.class.getName());
29 }
30 // Use CpModelProto.newBuilder() to construct.
31 private CpModelProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private CpModelProto() {
35 name_ = "";
36 variables_ = java.util.Collections.emptyList();
37 constraints_ = java.util.Collections.emptyList();
38 searchStrategy_ = java.util.Collections.emptyList();
39 assumptions_ = emptyIntList();
40 }
41
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
45 }
46
47 @java.lang.Override
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
53 }
54
55 private int bitField0_;
56 public static final int NAME_FIELD_NUMBER = 1;
57 @SuppressWarnings("serial")
58 private volatile java.lang.Object name_ = "";
67 @java.lang.Override
68 public java.lang.String getName() {
69 java.lang.Object ref = name_;
70 if (ref instanceof java.lang.String) {
71 return (java.lang.String) ref;
72 } else {
73 com.google.protobuf.ByteString bs =
74 (com.google.protobuf.ByteString) ref;
75 java.lang.String s = bs.toStringUtf8();
76 name_ = s;
77 return s;
78 }
79 }
80
88 @java.lang.Override
89 public com.google.protobuf.ByteString
91 java.lang.Object ref = name_;
92 if (ref instanceof java.lang.String) {
93 com.google.protobuf.ByteString b =
94 com.google.protobuf.ByteString.copyFromUtf8(
95 (java.lang.String) ref);
96 name_ = b;
97 return b;
98 } else {
99 return (com.google.protobuf.ByteString) ref;
100 }
101 }
102
103 public static final int VARIABLES_FIELD_NUMBER = 2;
104 @SuppressWarnings("serial")
105 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_;
113 @java.lang.Override
114 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
115 return variables_;
116 }
117
124 @java.lang.Override
125 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
127 return variables_;
128 }
129
136 @java.lang.Override
137 public int getVariablesCount() {
138 return variables_.size();
139 }
140
147 @java.lang.Override
149 return variables_.get(index);
150 }
151
158 @java.lang.Override
160 int index) {
161 return variables_.get(index);
162 }
163
164 public static final int CONSTRAINTS_FIELD_NUMBER = 3;
165 @SuppressWarnings("serial")
166 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_;
170 @java.lang.Override
171 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
172 return constraints_;
173 }
174
177 @java.lang.Override
178 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
180 return constraints_;
181 }
182
185 @java.lang.Override
186 public int getConstraintsCount() {
187 return constraints_.size();
188 }
189
192 @java.lang.Override
194 return constraints_.get(index);
195 }
196
199 @java.lang.Override
201 int index) {
202 return constraints_.get(index);
203 }
204
205 public static final int OBJECTIVE_FIELD_NUMBER = 4;
215 @java.lang.Override
216 public boolean hasObjective() {
217 return ((bitField0_ & 0x00000001) != 0);
218 }
219
227 @java.lang.Override
229 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
230 }
231
238 @java.lang.Override
240 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
241 }
242
243 public static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER = 9;
244 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
265 @java.lang.Override
266 public boolean hasFloatingPointObjective() {
267 return ((bitField0_ & 0x00000002) != 0);
268 }
269
289 @java.lang.Override
291 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
292 }
293
312 @java.lang.Override
314 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
315 }
316
317 public static final int SEARCH_STRATEGY_FIELD_NUMBER = 5;
318 @SuppressWarnings("serial")
319 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_;
335 @java.lang.Override
337 return searchStrategy_;
338 }
339
354 @java.lang.Override
355 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
357 return searchStrategy_;
358 }
359
374 @java.lang.Override
376 return searchStrategy_.size();
377 }
378
393 @java.lang.Override
395 return searchStrategy_.get(index);
396 }
397
412 @java.lang.Override
414 int index) {
415 return searchStrategy_.get(index);
416 }
417
418 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
438 @java.lang.Override
439 public boolean hasSolutionHint() {
440 return ((bitField0_ & 0x00000004) != 0);
441 }
442
460 @java.lang.Override
462 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
463 }
464
481 @java.lang.Override
483 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
484 }
485
486 public static final int ASSUMPTIONS_FIELD_NUMBER = 7;
487 @SuppressWarnings("serial")
488 private com.google.protobuf.Internal.IntList assumptions_ =
489 emptyIntList();
510 @java.lang.Override
511 public java.util.List<java.lang.Integer>
513 return assumptions_;
514 }
515
535 public int getAssumptionsCount() {
536 return assumptions_.size();
537 }
538
559 public int getAssumptions(int index) {
560 return assumptions_.getInt(index);
561 }
562 private int assumptionsMemoizedSerializedSize = -1;
563
564 public static final int SYMMETRY_FIELD_NUMBER = 8;
565 private com.google.ortools.sat.SymmetryProto symmetry_;
578 @java.lang.Override
579 public boolean hasSymmetry() {
580 return ((bitField0_ & 0x00000008) != 0);
581 }
582
594 @java.lang.Override
596 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
597 }
598
609 @java.lang.Override
611 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
612 }
613
614 private byte memoizedIsInitialized = -1;
615 @java.lang.Override
616 public final boolean isInitialized() {
617 byte isInitialized = memoizedIsInitialized;
618 if (isInitialized == 1) return true;
619 if (isInitialized == 0) return false;
620
621 memoizedIsInitialized = 1;
622 return true;
623 }
624
625 @java.lang.Override
626 public void writeTo(com.google.protobuf.CodedOutputStream output)
627 throws java.io.IOException {
629 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
630 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
631 }
632 for (int i = 0; i < variables_.size(); i++) {
633 output.writeMessage(2, variables_.get(i));
634 }
635 for (int i = 0; i < constraints_.size(); i++) {
636 output.writeMessage(3, constraints_.get(i));
637 }
638 if (((bitField0_ & 0x00000001) != 0)) {
639 output.writeMessage(4, getObjective());
640 }
641 for (int i = 0; i < searchStrategy_.size(); i++) {
642 output.writeMessage(5, searchStrategy_.get(i));
643 }
644 if (((bitField0_ & 0x00000004) != 0)) {
645 output.writeMessage(6, getSolutionHint());
646 }
647 if (getAssumptionsList().size() > 0) {
648 output.writeUInt32NoTag(58);
649 output.writeUInt32NoTag(assumptionsMemoizedSerializedSize);
650 }
651 for (int i = 0; i < assumptions_.size(); i++) {
652 output.writeInt32NoTag(assumptions_.getInt(i));
653 }
654 if (((bitField0_ & 0x00000008) != 0)) {
655 output.writeMessage(8, getSymmetry());
656 }
657 if (((bitField0_ & 0x00000002) != 0)) {
658 output.writeMessage(9, getFloatingPointObjective());
659 }
660 getUnknownFields().writeTo(output);
661 }
662
663 @java.lang.Override
664 public int getSerializedSize() {
665 int size = memoizedSize;
666 if (size != -1) return size;
667
668 size = 0;
669 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
670 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
671 }
672 for (int i = 0; i < variables_.size(); i++) {
673 size += com.google.protobuf.CodedOutputStream
674 .computeMessageSize(2, variables_.get(i));
675 }
676 for (int i = 0; i < constraints_.size(); i++) {
677 size += com.google.protobuf.CodedOutputStream
678 .computeMessageSize(3, constraints_.get(i));
679 }
680 if (((bitField0_ & 0x00000001) != 0)) {
681 size += com.google.protobuf.CodedOutputStream
682 .computeMessageSize(4, getObjective());
683 }
684 for (int i = 0; i < searchStrategy_.size(); i++) {
685 size += com.google.protobuf.CodedOutputStream
686 .computeMessageSize(5, searchStrategy_.get(i));
687 }
688 if (((bitField0_ & 0x00000004) != 0)) {
689 size += com.google.protobuf.CodedOutputStream
690 .computeMessageSize(6, getSolutionHint());
691 }
692 {
693 int dataSize = 0;
694 for (int i = 0; i < assumptions_.size(); i++) {
695 dataSize += com.google.protobuf.CodedOutputStream
696 .computeInt32SizeNoTag(assumptions_.getInt(i));
697 }
698 size += dataSize;
699 if (!getAssumptionsList().isEmpty()) {
700 size += 1;
701 size += com.google.protobuf.CodedOutputStream
702 .computeInt32SizeNoTag(dataSize);
703 }
704 assumptionsMemoizedSerializedSize = dataSize;
705 }
706 if (((bitField0_ & 0x00000008) != 0)) {
707 size += com.google.protobuf.CodedOutputStream
708 .computeMessageSize(8, getSymmetry());
709 }
710 if (((bitField0_ & 0x00000002) != 0)) {
711 size += com.google.protobuf.CodedOutputStream
712 .computeMessageSize(9, getFloatingPointObjective());
713 }
714 size += getUnknownFields().getSerializedSize();
715 memoizedSize = size;
716 return size;
717 }
718
719 @java.lang.Override
720 public boolean equals(final java.lang.Object obj) {
721 if (obj == this) {
722 return true;
723 }
724 if (!(obj instanceof com.google.ortools.sat.CpModelProto)) {
725 return super.equals(obj);
726 }
727 com.google.ortools.sat.CpModelProto other = (com.google.ortools.sat.CpModelProto) obj;
728
729 if (!getName()
730 .equals(other.getName())) return false;
731 if (!getVariablesList()
732 .equals(other.getVariablesList())) return false;
733 if (!getConstraintsList()
734 .equals(other.getConstraintsList())) return false;
735 if (hasObjective() != other.hasObjective()) return false;
736 if (hasObjective()) {
737 if (!getObjective()
738 .equals(other.getObjective())) return false;
739 }
740 if (hasFloatingPointObjective() != other.hasFloatingPointObjective()) return false;
743 .equals(other.getFloatingPointObjective())) return false;
744 }
746 .equals(other.getSearchStrategyList())) return false;
747 if (hasSolutionHint() != other.hasSolutionHint()) return false;
748 if (hasSolutionHint()) {
749 if (!getSolutionHint()
750 .equals(other.getSolutionHint())) return false;
751 }
752 if (!getAssumptionsList()
753 .equals(other.getAssumptionsList())) return false;
754 if (hasSymmetry() != other.hasSymmetry()) return false;
755 if (hasSymmetry()) {
756 if (!getSymmetry()
757 .equals(other.getSymmetry())) return false;
758 }
759 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
760 return true;
761 }
762
763 @java.lang.Override
764 public int hashCode() {
765 if (memoizedHashCode != 0) {
766 return memoizedHashCode;
767 }
768 int hash = 41;
769 hash = (19 * hash) + getDescriptor().hashCode();
770 hash = (37 * hash) + NAME_FIELD_NUMBER;
771 hash = (53 * hash) + getName().hashCode();
772 if (getVariablesCount() > 0) {
773 hash = (37 * hash) + VARIABLES_FIELD_NUMBER;
774 hash = (53 * hash) + getVariablesList().hashCode();
775 }
776 if (getConstraintsCount() > 0) {
777 hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
778 hash = (53 * hash) + getConstraintsList().hashCode();
779 }
780 if (hasObjective()) {
781 hash = (37 * hash) + OBJECTIVE_FIELD_NUMBER;
782 hash = (53 * hash) + getObjective().hashCode();
783 }
785 hash = (37 * hash) + FLOATING_POINT_OBJECTIVE_FIELD_NUMBER;
786 hash = (53 * hash) + getFloatingPointObjective().hashCode();
787 }
788 if (getSearchStrategyCount() > 0) {
789 hash = (37 * hash) + SEARCH_STRATEGY_FIELD_NUMBER;
790 hash = (53 * hash) + getSearchStrategyList().hashCode();
791 }
792 if (hasSolutionHint()) {
793 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
794 hash = (53 * hash) + getSolutionHint().hashCode();
795 }
796 if (getAssumptionsCount() > 0) {
797 hash = (37 * hash) + ASSUMPTIONS_FIELD_NUMBER;
798 hash = (53 * hash) + getAssumptionsList().hashCode();
799 }
800 if (hasSymmetry()) {
801 hash = (37 * hash) + SYMMETRY_FIELD_NUMBER;
802 hash = (53 * hash) + getSymmetry().hashCode();
803 }
804 hash = (29 * hash) + getUnknownFields().hashCode();
805 memoizedHashCode = hash;
806 return hash;
807 }
808
810 java.nio.ByteBuffer data)
811 throws com.google.protobuf.InvalidProtocolBufferException {
812 return PARSER.parseFrom(data);
813 }
815 java.nio.ByteBuffer data,
816 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
817 throws com.google.protobuf.InvalidProtocolBufferException {
818 return PARSER.parseFrom(data, extensionRegistry);
819 }
821 com.google.protobuf.ByteString data)
822 throws com.google.protobuf.InvalidProtocolBufferException {
823 return PARSER.parseFrom(data);
824 }
826 com.google.protobuf.ByteString data,
827 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
828 throws com.google.protobuf.InvalidProtocolBufferException {
829 return PARSER.parseFrom(data, extensionRegistry);
830 }
832 throws com.google.protobuf.InvalidProtocolBufferException {
833 return PARSER.parseFrom(data);
834 }
836 byte[] data,
837 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
838 throws com.google.protobuf.InvalidProtocolBufferException {
839 return PARSER.parseFrom(data, extensionRegistry);
840 }
841 public static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)
842 throws java.io.IOException {
843 return com.google.protobuf.GeneratedMessage
844 .parseWithIOException(PARSER, input);
845 }
847 java.io.InputStream input,
848 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
849 throws java.io.IOException {
850 return com.google.protobuf.GeneratedMessage
851 .parseWithIOException(PARSER, input, extensionRegistry);
852 }
853
854 public static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
855 throws java.io.IOException {
856 return com.google.protobuf.GeneratedMessage
857 .parseDelimitedWithIOException(PARSER, input);
858 }
859
861 java.io.InputStream input,
862 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
863 throws java.io.IOException {
864 return com.google.protobuf.GeneratedMessage
865 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
866 }
868 com.google.protobuf.CodedInputStream input)
869 throws java.io.IOException {
870 return com.google.protobuf.GeneratedMessage
871 .parseWithIOException(PARSER, input);
872 }
874 com.google.protobuf.CodedInputStream input,
875 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
876 throws java.io.IOException {
877 return com.google.protobuf.GeneratedMessage
878 .parseWithIOException(PARSER, input, extensionRegistry);
879 }
880
881 @java.lang.Override
882 public Builder newBuilderForType() { return newBuilder(); }
883 public static Builder newBuilder() {
884 return DEFAULT_INSTANCE.toBuilder();
885 }
886 public static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype) {
887 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
888 }
889 @java.lang.Override
891 return this == DEFAULT_INSTANCE
892 ? new Builder() : new Builder().mergeFrom(this);
893 }
894
895 @java.lang.Override
897 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
898 Builder builder = new Builder(parent);
899 return builder;
900 }
901
908 public static final class Builder extends
909 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
910 // @@protoc_insertion_point(builder_implements:operations_research.sat.CpModelProto)
912 public static final com.google.protobuf.Descriptors.Descriptor
914 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
915 }
916
917 @java.lang.Override
918 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
920 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
921 .ensureFieldAccessorsInitialized(
922 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
923 }
924
925 // Construct using com.google.ortools.sat.CpModelProto.newBuilder()
926 private Builder() {
927 maybeForceBuilderInitialization();
928 }
929
930 private Builder(
931 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
932 super(parent);
933 maybeForceBuilderInitialization();
934 }
935 private void maybeForceBuilderInitialization() {
936 if (com.google.protobuf.GeneratedMessage
937 .alwaysUseFieldBuilders) {
938 internalGetVariablesFieldBuilder();
939 internalGetConstraintsFieldBuilder();
940 internalGetObjectiveFieldBuilder();
941 internalGetFloatingPointObjectiveFieldBuilder();
942 internalGetSearchStrategyFieldBuilder();
943 internalGetSolutionHintFieldBuilder();
944 internalGetSymmetryFieldBuilder();
945 }
946 }
947 @java.lang.Override
948 public Builder clear() {
949 super.clear();
950 bitField0_ = 0;
951 name_ = "";
952 if (variablesBuilder_ == null) {
953 variables_ = java.util.Collections.emptyList();
954 } else {
955 variables_ = null;
956 variablesBuilder_.clear();
957 }
958 bitField0_ = (bitField0_ & ~0x00000002);
959 if (constraintsBuilder_ == null) {
960 constraints_ = java.util.Collections.emptyList();
961 } else {
962 constraints_ = null;
963 constraintsBuilder_.clear();
964 }
965 bitField0_ = (bitField0_ & ~0x00000004);
966 objective_ = null;
967 if (objectiveBuilder_ != null) {
968 objectiveBuilder_.dispose();
969 objectiveBuilder_ = null;
970 }
971 floatingPointObjective_ = null;
972 if (floatingPointObjectiveBuilder_ != null) {
973 floatingPointObjectiveBuilder_.dispose();
974 floatingPointObjectiveBuilder_ = null;
975 }
976 if (searchStrategyBuilder_ == null) {
977 searchStrategy_ = java.util.Collections.emptyList();
978 } else {
979 searchStrategy_ = null;
980 searchStrategyBuilder_.clear();
981 }
982 bitField0_ = (bitField0_ & ~0x00000020);
983 solutionHint_ = null;
984 if (solutionHintBuilder_ != null) {
985 solutionHintBuilder_.dispose();
986 solutionHintBuilder_ = null;
987 }
988 assumptions_ = emptyIntList();
989 symmetry_ = null;
990 if (symmetryBuilder_ != null) {
991 symmetryBuilder_.dispose();
992 symmetryBuilder_ = null;
993 }
994 return this;
995 }
996
997 @java.lang.Override
998 public com.google.protobuf.Descriptors.Descriptor
1000 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
1001 }
1002
1003 @java.lang.Override
1005 return com.google.ortools.sat.CpModelProto.getDefaultInstance();
1006 }
1007
1008 @java.lang.Override
1011 if (!result.isInitialized()) {
1012 throw newUninitializedMessageException(result);
1013 }
1014 return result;
1015 }
1016
1017 @java.lang.Override
1019 com.google.ortools.sat.CpModelProto result = new com.google.ortools.sat.CpModelProto(this);
1020 buildPartialRepeatedFields(result);
1021 if (bitField0_ != 0) { buildPartial0(result); }
1022 onBuilt();
1023 return result;
1024 }
1025
1026 private void buildPartialRepeatedFields(com.google.ortools.sat.CpModelProto result) {
1027 if (variablesBuilder_ == null) {
1028 if (((bitField0_ & 0x00000002) != 0)) {
1029 variables_ = java.util.Collections.unmodifiableList(variables_);
1030 bitField0_ = (bitField0_ & ~0x00000002);
1031 }
1032 result.variables_ = variables_;
1033 } else {
1034 result.variables_ = variablesBuilder_.build();
1035 }
1036 if (constraintsBuilder_ == null) {
1037 if (((bitField0_ & 0x00000004) != 0)) {
1038 constraints_ = java.util.Collections.unmodifiableList(constraints_);
1039 bitField0_ = (bitField0_ & ~0x00000004);
1040 }
1041 result.constraints_ = constraints_;
1042 } else {
1043 result.constraints_ = constraintsBuilder_.build();
1044 }
1045 if (searchStrategyBuilder_ == null) {
1046 if (((bitField0_ & 0x00000020) != 0)) {
1047 searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
1048 bitField0_ = (bitField0_ & ~0x00000020);
1049 }
1050 result.searchStrategy_ = searchStrategy_;
1051 } else {
1052 result.searchStrategy_ = searchStrategyBuilder_.build();
1053 }
1054 }
1055
1056 private void buildPartial0(com.google.ortools.sat.CpModelProto result) {
1057 int from_bitField0_ = bitField0_;
1058 if (((from_bitField0_ & 0x00000001) != 0)) {
1059 result.name_ = name_;
1060 }
1061 int to_bitField0_ = 0;
1062 if (((from_bitField0_ & 0x00000008) != 0)) {
1063 result.objective_ = objectiveBuilder_ == null
1064 ? objective_
1065 : objectiveBuilder_.build();
1066 to_bitField0_ |= 0x00000001;
1067 }
1068 if (((from_bitField0_ & 0x00000010) != 0)) {
1069 result.floatingPointObjective_ = floatingPointObjectiveBuilder_ == null
1070 ? floatingPointObjective_
1071 : floatingPointObjectiveBuilder_.build();
1072 to_bitField0_ |= 0x00000002;
1073 }
1074 if (((from_bitField0_ & 0x00000040) != 0)) {
1075 result.solutionHint_ = solutionHintBuilder_ == null
1076 ? solutionHint_
1077 : solutionHintBuilder_.build();
1078 to_bitField0_ |= 0x00000004;
1079 }
1080 if (((from_bitField0_ & 0x00000080) != 0)) {
1081 assumptions_.makeImmutable();
1082 result.assumptions_ = assumptions_;
1083 }
1084 if (((from_bitField0_ & 0x00000100) != 0)) {
1085 result.symmetry_ = symmetryBuilder_ == null
1086 ? symmetry_
1087 : symmetryBuilder_.build();
1088 to_bitField0_ |= 0x00000008;
1089 }
1090 result.bitField0_ |= to_bitField0_;
1091 }
1092
1093 @java.lang.Override
1094 public Builder mergeFrom(com.google.protobuf.Message other) {
1095 if (other instanceof com.google.ortools.sat.CpModelProto) {
1096 return mergeFrom((com.google.ortools.sat.CpModelProto)other);
1097 } else {
1098 super.mergeFrom(other);
1099 return this;
1100 }
1101 }
1102
1103 public Builder mergeFrom(com.google.ortools.sat.CpModelProto other) {
1104 if (other == com.google.ortools.sat.CpModelProto.getDefaultInstance()) return this;
1105 if (!other.getName().isEmpty()) {
1106 name_ = other.name_;
1107 bitField0_ |= 0x00000001;
1108 onChanged();
1109 }
1110 if (variablesBuilder_ == null) {
1111 if (!other.variables_.isEmpty()) {
1112 if (variables_.isEmpty()) {
1113 variables_ = other.variables_;
1114 bitField0_ = (bitField0_ & ~0x00000002);
1115 } else {
1116 ensureVariablesIsMutable();
1117 variables_.addAll(other.variables_);
1118 }
1119 onChanged();
1120 }
1121 } else {
1122 if (!other.variables_.isEmpty()) {
1123 if (variablesBuilder_.isEmpty()) {
1124 variablesBuilder_.dispose();
1125 variablesBuilder_ = null;
1126 variables_ = other.variables_;
1127 bitField0_ = (bitField0_ & ~0x00000002);
1128 variablesBuilder_ =
1129 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1130 internalGetVariablesFieldBuilder() : null;
1131 } else {
1132 variablesBuilder_.addAllMessages(other.variables_);
1133 }
1134 }
1135 }
1136 if (constraintsBuilder_ == null) {
1137 if (!other.constraints_.isEmpty()) {
1138 if (constraints_.isEmpty()) {
1139 constraints_ = other.constraints_;
1140 bitField0_ = (bitField0_ & ~0x00000004);
1141 } else {
1142 ensureConstraintsIsMutable();
1143 constraints_.addAll(other.constraints_);
1144 }
1145 onChanged();
1146 }
1147 } else {
1148 if (!other.constraints_.isEmpty()) {
1149 if (constraintsBuilder_.isEmpty()) {
1150 constraintsBuilder_.dispose();
1151 constraintsBuilder_ = null;
1152 constraints_ = other.constraints_;
1153 bitField0_ = (bitField0_ & ~0x00000004);
1154 constraintsBuilder_ =
1155 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1156 internalGetConstraintsFieldBuilder() : null;
1157 } else {
1158 constraintsBuilder_.addAllMessages(other.constraints_);
1159 }
1160 }
1161 }
1162 if (other.hasObjective()) {
1163 mergeObjective(other.getObjective());
1164 }
1165 if (other.hasFloatingPointObjective()) {
1166 mergeFloatingPointObjective(other.getFloatingPointObjective());
1167 }
1168 if (searchStrategyBuilder_ == null) {
1169 if (!other.searchStrategy_.isEmpty()) {
1170 if (searchStrategy_.isEmpty()) {
1171 searchStrategy_ = other.searchStrategy_;
1172 bitField0_ = (bitField0_ & ~0x00000020);
1173 } else {
1174 ensureSearchStrategyIsMutable();
1175 searchStrategy_.addAll(other.searchStrategy_);
1176 }
1177 onChanged();
1178 }
1179 } else {
1180 if (!other.searchStrategy_.isEmpty()) {
1181 if (searchStrategyBuilder_.isEmpty()) {
1182 searchStrategyBuilder_.dispose();
1183 searchStrategyBuilder_ = null;
1184 searchStrategy_ = other.searchStrategy_;
1185 bitField0_ = (bitField0_ & ~0x00000020);
1186 searchStrategyBuilder_ =
1187 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
1188 internalGetSearchStrategyFieldBuilder() : null;
1189 } else {
1190 searchStrategyBuilder_.addAllMessages(other.searchStrategy_);
1191 }
1192 }
1193 }
1194 if (other.hasSolutionHint()) {
1195 mergeSolutionHint(other.getSolutionHint());
1196 }
1197 if (!other.assumptions_.isEmpty()) {
1198 if (assumptions_.isEmpty()) {
1199 assumptions_ = other.assumptions_;
1200 assumptions_.makeImmutable();
1201 bitField0_ |= 0x00000080;
1202 } else {
1203 ensureAssumptionsIsMutable();
1204 assumptions_.addAll(other.assumptions_);
1205 }
1206 onChanged();
1207 }
1208 if (other.hasSymmetry()) {
1209 mergeSymmetry(other.getSymmetry());
1210 }
1211 this.mergeUnknownFields(other.getUnknownFields());
1212 onChanged();
1213 return this;
1214 }
1215
1216 @java.lang.Override
1217 public final boolean isInitialized() {
1218 return true;
1219 }
1220
1221 @java.lang.Override
1222 public Builder mergeFrom(
1223 com.google.protobuf.CodedInputStream input,
1224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1225 throws java.io.IOException {
1226 if (extensionRegistry == null) {
1227 throw new java.lang.NullPointerException();
1228 }
1229 try {
1230 boolean done = false;
1231 while (!done) {
1232 int tag = input.readTag();
1233 switch (tag) {
1234 case 0:
1235 done = true;
1236 break;
1237 case 10: {
1238 name_ = input.readStringRequireUtf8();
1239 bitField0_ |= 0x00000001;
1240 break;
1241 } // case 10
1242 case 18: {
1244 input.readMessage(
1245 com.google.ortools.sat.IntegerVariableProto.parser(),
1246 extensionRegistry);
1247 if (variablesBuilder_ == null) {
1248 ensureVariablesIsMutable();
1249 variables_.add(m);
1250 } else {
1251 variablesBuilder_.addMessage(m);
1252 }
1253 break;
1254 } // case 18
1255 case 26: {
1257 input.readMessage(
1258 com.google.ortools.sat.ConstraintProto.parser(),
1259 extensionRegistry);
1260 if (constraintsBuilder_ == null) {
1261 ensureConstraintsIsMutable();
1262 constraints_.add(m);
1263 } else {
1264 constraintsBuilder_.addMessage(m);
1265 }
1266 break;
1267 } // case 26
1268 case 34: {
1269 input.readMessage(
1270 internalGetObjectiveFieldBuilder().getBuilder(),
1271 extensionRegistry);
1272 bitField0_ |= 0x00000008;
1273 break;
1274 } // case 34
1275 case 42: {
1277 input.readMessage(
1278 com.google.ortools.sat.DecisionStrategyProto.parser(),
1279 extensionRegistry);
1280 if (searchStrategyBuilder_ == null) {
1281 ensureSearchStrategyIsMutable();
1282 searchStrategy_.add(m);
1283 } else {
1284 searchStrategyBuilder_.addMessage(m);
1285 }
1286 break;
1287 } // case 42
1288 case 50: {
1289 input.readMessage(
1290 internalGetSolutionHintFieldBuilder().getBuilder(),
1291 extensionRegistry);
1292 bitField0_ |= 0x00000040;
1293 break;
1294 } // case 50
1295 case 56: {
1296 int v = input.readInt32();
1297 ensureAssumptionsIsMutable();
1298 assumptions_.addInt(v);
1299 break;
1300 } // case 56
1301 case 58: {
1302 int length = input.readRawVarint32();
1303 int limit = input.pushLimit(length);
1304 ensureAssumptionsIsMutable();
1305 while (input.getBytesUntilLimit() > 0) {
1306 assumptions_.addInt(input.readInt32());
1307 }
1308 input.popLimit(limit);
1309 break;
1310 } // case 58
1311 case 66: {
1312 input.readMessage(
1313 internalGetSymmetryFieldBuilder().getBuilder(),
1314 extensionRegistry);
1315 bitField0_ |= 0x00000100;
1316 break;
1317 } // case 66
1318 case 74: {
1319 input.readMessage(
1320 internalGetFloatingPointObjectiveFieldBuilder().getBuilder(),
1321 extensionRegistry);
1322 bitField0_ |= 0x00000010;
1323 break;
1324 } // case 74
1325 default: {
1326 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1327 done = true; // was an endgroup tag
1328 }
1329 break;
1330 } // default:
1331 } // switch (tag)
1332 } // while (!done)
1333 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1334 throw e.unwrapIOException();
1335 } finally {
1336 onChanged();
1337 } // finally
1338 return this;
1339 }
1340 private int bitField0_;
1341
1342 private java.lang.Object name_ = "";
1351 public java.lang.String getName() {
1352 java.lang.Object ref = name_;
1353 if (!(ref instanceof java.lang.String)) {
1354 com.google.protobuf.ByteString bs =
1355 (com.google.protobuf.ByteString) ref;
1356 java.lang.String s = bs.toStringUtf8();
1357 name_ = s;
1358 return s;
1359 } else {
1360 return (java.lang.String) ref;
1361 }
1362 }
1363
1371 public com.google.protobuf.ByteString
1373 java.lang.Object ref = name_;
1374 if (ref instanceof String) {
1375 com.google.protobuf.ByteString b =
1376 com.google.protobuf.ByteString.copyFromUtf8(
1377 (java.lang.String) ref);
1378 name_ = b;
1379 return b;
1380 } else {
1381 return (com.google.protobuf.ByteString) ref;
1382 }
1383 }
1384
1393 public Builder setName(
1394 java.lang.String value) {
1395 if (value == null) { throw new NullPointerException(); }
1396 name_ = value;
1397 bitField0_ |= 0x00000001;
1398 onChanged();
1399 return this;
1400 }
1401
1409 public Builder clearName() {
1410 name_ = getDefaultInstance().getName();
1411 bitField0_ = (bitField0_ & ~0x00000001);
1412 onChanged();
1413 return this;
1414 }
1415
1424 public Builder setNameBytes(
1425 com.google.protobuf.ByteString value) {
1426 if (value == null) { throw new NullPointerException(); }
1427 checkByteStringIsUtf8(value);
1428 name_ = value;
1429 bitField0_ |= 0x00000001;
1430 onChanged();
1431 return this;
1432 }
1433
1434 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_ =
1435 java.util.Collections.emptyList();
1436 private void ensureVariablesIsMutable() {
1437 if (!((bitField0_ & 0x00000002) != 0)) {
1438 variables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(variables_);
1439 bitField0_ |= 0x00000002;
1440 }
1441 }
1442
1443 private com.google.protobuf.RepeatedFieldBuilder<
1444 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> variablesBuilder_;
1445
1453 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
1454 if (variablesBuilder_ == null) {
1455 return java.util.Collections.unmodifiableList(variables_);
1456 } else {
1457 return variablesBuilder_.getMessageList();
1458 }
1459 }
1460
1467 public int getVariablesCount() {
1468 if (variablesBuilder_ == null) {
1469 return variables_.size();
1470 } else {
1471 return variablesBuilder_.getCount();
1472 }
1473 }
1474
1482 if (variablesBuilder_ == null) {
1483 return variables_.get(index);
1484 } else {
1485 return variablesBuilder_.getMessage(index);
1486 }
1487 }
1488
1495 public Builder setVariables(
1496 int index, com.google.ortools.sat.IntegerVariableProto value) {
1497 if (variablesBuilder_ == null) {
1498 if (value == null) {
1499 throw new NullPointerException();
1500 }
1501 ensureVariablesIsMutable();
1502 variables_.set(index, value);
1503 onChanged();
1504 } else {
1505 variablesBuilder_.setMessage(index, value);
1506 }
1507 return this;
1508 }
1509
1516 public Builder setVariables(
1517 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1518 if (variablesBuilder_ == null) {
1519 ensureVariablesIsMutable();
1520 variables_.set(index, builderForValue.build());
1521 onChanged();
1522 } else {
1523 variablesBuilder_.setMessage(index, builderForValue.build());
1524 }
1525 return this;
1526 }
1527
1534 public Builder addVariables(com.google.ortools.sat.IntegerVariableProto value) {
1535 if (variablesBuilder_ == null) {
1536 if (value == null) {
1537 throw new NullPointerException();
1538 }
1539 ensureVariablesIsMutable();
1540 variables_.add(value);
1541 onChanged();
1542 } else {
1543 variablesBuilder_.addMessage(value);
1544 }
1545 return this;
1546 }
1547
1554 public Builder addVariables(
1555 int index, com.google.ortools.sat.IntegerVariableProto value) {
1556 if (variablesBuilder_ == null) {
1557 if (value == null) {
1558 throw new NullPointerException();
1559 }
1560 ensureVariablesIsMutable();
1561 variables_.add(index, value);
1562 onChanged();
1563 } else {
1564 variablesBuilder_.addMessage(index, value);
1565 }
1566 return this;
1567 }
1568
1575 public Builder addVariables(
1576 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1577 if (variablesBuilder_ == null) {
1578 ensureVariablesIsMutable();
1579 variables_.add(builderForValue.build());
1580 onChanged();
1581 } else {
1582 variablesBuilder_.addMessage(builderForValue.build());
1583 }
1584 return this;
1585 }
1586
1593 public Builder addVariables(
1594 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1595 if (variablesBuilder_ == null) {
1596 ensureVariablesIsMutable();
1597 variables_.add(index, builderForValue.build());
1598 onChanged();
1599 } else {
1600 variablesBuilder_.addMessage(index, builderForValue.build());
1601 }
1602 return this;
1603 }
1604
1611 public Builder addAllVariables(
1612 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
1613 if (variablesBuilder_ == null) {
1614 ensureVariablesIsMutable();
1615 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1616 values, variables_);
1617 onChanged();
1618 } else {
1619 variablesBuilder_.addAllMessages(values);
1620 }
1621 return this;
1622 }
1623
1630 public Builder clearVariables() {
1631 if (variablesBuilder_ == null) {
1632 variables_ = java.util.Collections.emptyList();
1633 bitField0_ = (bitField0_ & ~0x00000002);
1634 onChanged();
1635 } else {
1636 variablesBuilder_.clear();
1637 }
1638 return this;
1639 }
1640
1647 public Builder removeVariables(int index) {
1648 if (variablesBuilder_ == null) {
1649 ensureVariablesIsMutable();
1650 variables_.remove(index);
1651 onChanged();
1652 } else {
1653 variablesBuilder_.remove(index);
1654 }
1655 return this;
1656 }
1657
1665 int index) {
1666 return internalGetVariablesFieldBuilder().getBuilder(index);
1667 }
1668
1676 int index) {
1677 if (variablesBuilder_ == null) {
1678 return variables_.get(index); } else {
1679 return variablesBuilder_.getMessageOrBuilder(index);
1680 }
1681 }
1682
1689 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1691 if (variablesBuilder_ != null) {
1692 return variablesBuilder_.getMessageOrBuilderList();
1693 } else {
1694 return java.util.Collections.unmodifiableList(variables_);
1695 }
1696 }
1697
1705 return internalGetVariablesFieldBuilder().addBuilder(
1706 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1707 }
1708
1716 int index) {
1717 return internalGetVariablesFieldBuilder().addBuilder(
1718 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1719 }
1720
1727 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
1729 return internalGetVariablesFieldBuilder().getBuilderList();
1730 }
1731 private com.google.protobuf.RepeatedFieldBuilder<
1732 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1733 internalGetVariablesFieldBuilder() {
1734 if (variablesBuilder_ == null) {
1735 variablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1736 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
1737 variables_,
1738 ((bitField0_ & 0x00000002) != 0),
1739 getParentForChildren(),
1740 isClean());
1741 variables_ = null;
1742 }
1743 return variablesBuilder_;
1744 }
1745
1746 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_ =
1747 java.util.Collections.emptyList();
1748 private void ensureConstraintsIsMutable() {
1749 if (!((bitField0_ & 0x00000004) != 0)) {
1750 constraints_ = new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>(constraints_);
1751 bitField0_ |= 0x00000004;
1752 }
1753 }
1754
1755 private com.google.protobuf.RepeatedFieldBuilder<
1756 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder> constraintsBuilder_;
1757
1761 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
1762 if (constraintsBuilder_ == null) {
1763 return java.util.Collections.unmodifiableList(constraints_);
1764 } else {
1765 return constraintsBuilder_.getMessageList();
1766 }
1767 }
1768
1771 public int getConstraintsCount() {
1772 if (constraintsBuilder_ == null) {
1773 return constraints_.size();
1774 } else {
1775 return constraintsBuilder_.getCount();
1776 }
1777 }
1778
1782 if (constraintsBuilder_ == null) {
1783 return constraints_.get(index);
1784 } else {
1785 return constraintsBuilder_.getMessage(index);
1786 }
1787 }
1788
1791 public Builder setConstraints(
1792 int index, com.google.ortools.sat.ConstraintProto value) {
1793 if (constraintsBuilder_ == null) {
1794 if (value == null) {
1795 throw new NullPointerException();
1796 }
1797 ensureConstraintsIsMutable();
1798 constraints_.set(index, value);
1799 onChanged();
1800 } else {
1801 constraintsBuilder_.setMessage(index, value);
1802 }
1803 return this;
1804 }
1805
1808 public Builder setConstraints(
1809 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1810 if (constraintsBuilder_ == null) {
1811 ensureConstraintsIsMutable();
1812 constraints_.set(index, builderForValue.build());
1813 onChanged();
1814 } else {
1815 constraintsBuilder_.setMessage(index, builderForValue.build());
1816 }
1817 return this;
1818 }
1819
1822 public Builder addConstraints(com.google.ortools.sat.ConstraintProto value) {
1823 if (constraintsBuilder_ == null) {
1824 if (value == null) {
1825 throw new NullPointerException();
1826 }
1827 ensureConstraintsIsMutable();
1828 constraints_.add(value);
1829 onChanged();
1830 } else {
1831 constraintsBuilder_.addMessage(value);
1832 }
1833 return this;
1834 }
1835
1838 public Builder addConstraints(
1839 int index, com.google.ortools.sat.ConstraintProto value) {
1840 if (constraintsBuilder_ == null) {
1841 if (value == null) {
1842 throw new NullPointerException();
1843 }
1844 ensureConstraintsIsMutable();
1845 constraints_.add(index, value);
1846 onChanged();
1847 } else {
1848 constraintsBuilder_.addMessage(index, value);
1849 }
1850 return this;
1851 }
1852
1855 public Builder addConstraints(
1856 com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1857 if (constraintsBuilder_ == null) {
1858 ensureConstraintsIsMutable();
1859 constraints_.add(builderForValue.build());
1860 onChanged();
1861 } else {
1862 constraintsBuilder_.addMessage(builderForValue.build());
1863 }
1864 return this;
1865 }
1866
1869 public Builder addConstraints(
1870 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1871 if (constraintsBuilder_ == null) {
1872 ensureConstraintsIsMutable();
1873 constraints_.add(index, builderForValue.build());
1874 onChanged();
1875 } else {
1876 constraintsBuilder_.addMessage(index, builderForValue.build());
1877 }
1878 return this;
1879 }
1880
1883 public Builder addAllConstraints(
1884 java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto> values) {
1885 if (constraintsBuilder_ == null) {
1886 ensureConstraintsIsMutable();
1887 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1888 values, constraints_);
1889 onChanged();
1890 } else {
1891 constraintsBuilder_.addAllMessages(values);
1892 }
1893 return this;
1894 }
1895
1898 public Builder clearConstraints() {
1899 if (constraintsBuilder_ == null) {
1900 constraints_ = java.util.Collections.emptyList();
1901 bitField0_ = (bitField0_ & ~0x00000004);
1902 onChanged();
1903 } else {
1904 constraintsBuilder_.clear();
1905 }
1906 return this;
1907 }
1908
1911 public Builder removeConstraints(int index) {
1912 if (constraintsBuilder_ == null) {
1913 ensureConstraintsIsMutable();
1914 constraints_.remove(index);
1915 onChanged();
1916 } else {
1917 constraintsBuilder_.remove(index);
1918 }
1919 return this;
1920 }
1921
1925 int index) {
1926 return internalGetConstraintsFieldBuilder().getBuilder(index);
1927 }
1928
1932 int index) {
1933 if (constraintsBuilder_ == null) {
1934 return constraints_.get(index); } else {
1935 return constraintsBuilder_.getMessageOrBuilder(index);
1936 }
1937 }
1938
1941 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
1943 if (constraintsBuilder_ != null) {
1944 return constraintsBuilder_.getMessageOrBuilderList();
1945 } else {
1946 return java.util.Collections.unmodifiableList(constraints_);
1947 }
1948 }
1949
1953 return internalGetConstraintsFieldBuilder().addBuilder(
1954 com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1955 }
1956
1960 int index) {
1961 return internalGetConstraintsFieldBuilder().addBuilder(
1962 index, com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1963 }
1964
1967 public java.util.List<com.google.ortools.sat.ConstraintProto.Builder>
1969 return internalGetConstraintsFieldBuilder().getBuilderList();
1970 }
1971 private com.google.protobuf.RepeatedFieldBuilder<
1972 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>
1973 internalGetConstraintsFieldBuilder() {
1974 if (constraintsBuilder_ == null) {
1975 constraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
1976 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>(
1977 constraints_,
1978 ((bitField0_ & 0x00000004) != 0),
1979 getParentForChildren(),
1980 isClean());
1981 constraints_ = null;
1982 }
1983 return constraintsBuilder_;
1984 }
1985
1986 private com.google.ortools.sat.CpObjectiveProto objective_;
1987 private com.google.protobuf.SingleFieldBuilder<
1988 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> objectiveBuilder_;
1997 public boolean hasObjective() {
1998 return ((bitField0_ & 0x00000008) != 0);
1999 }
2000
2009 if (objectiveBuilder_ == null) {
2010 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2011 } else {
2012 return objectiveBuilder_.getMessage();
2013 }
2014 }
2015
2022 public Builder setObjective(com.google.ortools.sat.CpObjectiveProto value) {
2023 if (objectiveBuilder_ == null) {
2024 if (value == null) {
2025 throw new NullPointerException();
2026 }
2027 objective_ = value;
2028 } else {
2029 objectiveBuilder_.setMessage(value);
2030 }
2031 bitField0_ |= 0x00000008;
2032 onChanged();
2033 return this;
2034 }
2035
2042 public Builder setObjective(
2043 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
2044 if (objectiveBuilder_ == null) {
2045 objective_ = builderForValue.build();
2046 } else {
2047 objectiveBuilder_.setMessage(builderForValue.build());
2048 }
2049 bitField0_ |= 0x00000008;
2050 onChanged();
2051 return this;
2052 }
2053
2060 public Builder mergeObjective(com.google.ortools.sat.CpObjectiveProto value) {
2061 if (objectiveBuilder_ == null) {
2062 if (((bitField0_ & 0x00000008) != 0) &&
2063 objective_ != null &&
2064 objective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
2065 getObjectiveBuilder().mergeFrom(value);
2066 } else {
2067 objective_ = value;
2068 }
2069 } else {
2070 objectiveBuilder_.mergeFrom(value);
2071 }
2072 if (objective_ != null) {
2073 bitField0_ |= 0x00000008;
2074 onChanged();
2075 }
2076 return this;
2077 }
2078
2085 public Builder clearObjective() {
2086 bitField0_ = (bitField0_ & ~0x00000008);
2087 objective_ = null;
2088 if (objectiveBuilder_ != null) {
2089 objectiveBuilder_.dispose();
2090 objectiveBuilder_ = null;
2091 }
2092 onChanged();
2093 return this;
2094 }
2095
2103 bitField0_ |= 0x00000008;
2104 onChanged();
2105 return internalGetObjectiveFieldBuilder().getBuilder();
2106 }
2107
2115 if (objectiveBuilder_ != null) {
2116 return objectiveBuilder_.getMessageOrBuilder();
2117 } else {
2118 return objective_ == null ?
2119 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2120 }
2121 }
2122
2129 private com.google.protobuf.SingleFieldBuilder<
2130 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
2131 internalGetObjectiveFieldBuilder() {
2132 if (objectiveBuilder_ == null) {
2133 objectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2134 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
2135 getObjective(),
2136 getParentForChildren(),
2137 isClean());
2138 objective_ = null;
2139 }
2140 return objectiveBuilder_;
2141 }
2142
2143 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
2144 private com.google.protobuf.SingleFieldBuilder<
2145 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder> floatingPointObjectiveBuilder_;
2166 public boolean hasFloatingPointObjective() {
2167 return ((bitField0_ & 0x00000010) != 0);
2168 }
2169
2190 if (floatingPointObjectiveBuilder_ == null) {
2191 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2192 } else {
2193 return floatingPointObjectiveBuilder_.getMessage();
2194 }
2195 }
2196
2215 public Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2216 if (floatingPointObjectiveBuilder_ == null) {
2217 if (value == null) {
2218 throw new NullPointerException();
2219 }
2220 floatingPointObjective_ = value;
2221 } else {
2222 floatingPointObjectiveBuilder_.setMessage(value);
2223 }
2224 bitField0_ |= 0x00000010;
2225 onChanged();
2226 return this;
2227 }
2228
2248 com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue) {
2249 if (floatingPointObjectiveBuilder_ == null) {
2250 floatingPointObjective_ = builderForValue.build();
2251 } else {
2252 floatingPointObjectiveBuilder_.setMessage(builderForValue.build());
2253 }
2254 bitField0_ |= 0x00000010;
2255 onChanged();
2256 return this;
2257 }
2258
2277 public Builder mergeFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2278 if (floatingPointObjectiveBuilder_ == null) {
2279 if (((bitField0_ & 0x00000010) != 0) &&
2280 floatingPointObjective_ != null &&
2281 floatingPointObjective_ != com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance()) {
2282 getFloatingPointObjectiveBuilder().mergeFrom(value);
2283 } else {
2284 floatingPointObjective_ = value;
2285 }
2286 } else {
2287 floatingPointObjectiveBuilder_.mergeFrom(value);
2288 }
2289 if (floatingPointObjective_ != null) {
2290 bitField0_ |= 0x00000010;
2291 onChanged();
2292 }
2293 return this;
2294 }
2295
2315 bitField0_ = (bitField0_ & ~0x00000010);
2316 floatingPointObjective_ = null;
2317 if (floatingPointObjectiveBuilder_ != null) {
2318 floatingPointObjectiveBuilder_.dispose();
2319 floatingPointObjectiveBuilder_ = null;
2320 }
2321 onChanged();
2322 return this;
2323 }
2324
2344 bitField0_ |= 0x00000010;
2345 onChanged();
2346 return internalGetFloatingPointObjectiveFieldBuilder().getBuilder();
2347 }
2348
2368 if (floatingPointObjectiveBuilder_ != null) {
2369 return floatingPointObjectiveBuilder_.getMessageOrBuilder();
2370 } else {
2371 return floatingPointObjective_ == null ?
2372 com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2373 }
2374 }
2375
2394 private com.google.protobuf.SingleFieldBuilder<
2395 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>
2396 internalGetFloatingPointObjectiveFieldBuilder() {
2397 if (floatingPointObjectiveBuilder_ == null) {
2398 floatingPointObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2399 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>(
2401 getParentForChildren(),
2402 isClean());
2403 floatingPointObjective_ = null;
2404 }
2405 return floatingPointObjectiveBuilder_;
2406 }
2407
2408 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_ =
2409 java.util.Collections.emptyList();
2410 private void ensureSearchStrategyIsMutable() {
2411 if (!((bitField0_ & 0x00000020) != 0)) {
2412 searchStrategy_ = new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>(searchStrategy_);
2413 bitField0_ |= 0x00000020;
2414 }
2415 }
2416
2417 private com.google.protobuf.RepeatedFieldBuilder<
2418 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder> searchStrategyBuilder_;
2419
2435 public java.util.List<com.google.ortools.sat.DecisionStrategyProto> getSearchStrategyList() {
2436 if (searchStrategyBuilder_ == null) {
2437 return java.util.Collections.unmodifiableList(searchStrategy_);
2438 } else {
2439 return searchStrategyBuilder_.getMessageList();
2440 }
2441 }
2442
2458 if (searchStrategyBuilder_ == null) {
2459 return searchStrategy_.size();
2460 } else {
2461 return searchStrategyBuilder_.getCount();
2462 }
2463 }
2464
2480 if (searchStrategyBuilder_ == null) {
2481 return searchStrategy_.get(index);
2482 } else {
2483 return searchStrategyBuilder_.getMessage(index);
2484 }
2485 }
2486
2501 public Builder setSearchStrategy(
2502 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2503 if (searchStrategyBuilder_ == null) {
2504 if (value == null) {
2505 throw new NullPointerException();
2506 }
2507 ensureSearchStrategyIsMutable();
2508 searchStrategy_.set(index, value);
2509 onChanged();
2510 } else {
2511 searchStrategyBuilder_.setMessage(index, value);
2512 }
2513 return this;
2514 }
2515
2530 public Builder setSearchStrategy(
2531 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2532 if (searchStrategyBuilder_ == null) {
2533 ensureSearchStrategyIsMutable();
2534 searchStrategy_.set(index, builderForValue.build());
2535 onChanged();
2536 } else {
2537 searchStrategyBuilder_.setMessage(index, builderForValue.build());
2538 }
2539 return this;
2540 }
2541
2556 public Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value) {
2557 if (searchStrategyBuilder_ == null) {
2558 if (value == null) {
2559 throw new NullPointerException();
2560 }
2561 ensureSearchStrategyIsMutable();
2562 searchStrategy_.add(value);
2563 onChanged();
2564 } else {
2565 searchStrategyBuilder_.addMessage(value);
2566 }
2567 return this;
2568 }
2569
2584 public Builder addSearchStrategy(
2585 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2586 if (searchStrategyBuilder_ == null) {
2587 if (value == null) {
2588 throw new NullPointerException();
2589 }
2590 ensureSearchStrategyIsMutable();
2591 searchStrategy_.add(index, value);
2592 onChanged();
2593 } else {
2594 searchStrategyBuilder_.addMessage(index, value);
2595 }
2596 return this;
2597 }
2598
2613 public Builder addSearchStrategy(
2614 com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2615 if (searchStrategyBuilder_ == null) {
2616 ensureSearchStrategyIsMutable();
2617 searchStrategy_.add(builderForValue.build());
2618 onChanged();
2619 } else {
2620 searchStrategyBuilder_.addMessage(builderForValue.build());
2621 }
2622 return this;
2623 }
2624
2639 public Builder addSearchStrategy(
2640 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2641 if (searchStrategyBuilder_ == null) {
2642 ensureSearchStrategyIsMutable();
2643 searchStrategy_.add(index, builderForValue.build());
2644 onChanged();
2645 } else {
2646 searchStrategyBuilder_.addMessage(index, builderForValue.build());
2647 }
2648 return this;
2649 }
2650
2665 public Builder addAllSearchStrategy(
2666 java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto> values) {
2667 if (searchStrategyBuilder_ == null) {
2668 ensureSearchStrategyIsMutable();
2669 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2670 values, searchStrategy_);
2671 onChanged();
2672 } else {
2673 searchStrategyBuilder_.addAllMessages(values);
2674 }
2675 return this;
2676 }
2677
2692 public Builder clearSearchStrategy() {
2693 if (searchStrategyBuilder_ == null) {
2694 searchStrategy_ = java.util.Collections.emptyList();
2695 bitField0_ = (bitField0_ & ~0x00000020);
2696 onChanged();
2697 } else {
2698 searchStrategyBuilder_.clear();
2699 }
2700 return this;
2701 }
2702
2717 public Builder removeSearchStrategy(int index) {
2718 if (searchStrategyBuilder_ == null) {
2719 ensureSearchStrategyIsMutable();
2720 searchStrategy_.remove(index);
2721 onChanged();
2722 } else {
2723 searchStrategyBuilder_.remove(index);
2724 }
2725 return this;
2726 }
2727
2743 int index) {
2744 return internalGetSearchStrategyFieldBuilder().getBuilder(index);
2745 }
2746
2762 int index) {
2763 if (searchStrategyBuilder_ == null) {
2764 return searchStrategy_.get(index); } else {
2765 return searchStrategyBuilder_.getMessageOrBuilder(index);
2766 }
2767 }
2768
2783 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2785 if (searchStrategyBuilder_ != null) {
2786 return searchStrategyBuilder_.getMessageOrBuilderList();
2787 } else {
2788 return java.util.Collections.unmodifiableList(searchStrategy_);
2789 }
2790 }
2791
2807 return internalGetSearchStrategyFieldBuilder().addBuilder(
2808 com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2809 }
2810
2826 int index) {
2827 return internalGetSearchStrategyFieldBuilder().addBuilder(
2828 index, com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2829 }
2830
2845 public java.util.List<com.google.ortools.sat.DecisionStrategyProto.Builder>
2847 return internalGetSearchStrategyFieldBuilder().getBuilderList();
2848 }
2849 private com.google.protobuf.RepeatedFieldBuilder<
2850 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2851 internalGetSearchStrategyFieldBuilder() {
2852 if (searchStrategyBuilder_ == null) {
2853 searchStrategyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
2854 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>(
2855 searchStrategy_,
2856 ((bitField0_ & 0x00000020) != 0),
2857 getParentForChildren(),
2858 isClean());
2859 searchStrategy_ = null;
2860 }
2861 return searchStrategyBuilder_;
2862 }
2863
2865 private com.google.protobuf.SingleFieldBuilder<
2866 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
2885 public boolean hasSolutionHint() {
2886 return ((bitField0_ & 0x00000040) != 0);
2887 }
2888
2907 if (solutionHintBuilder_ == null) {
2908 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2909 } else {
2910 return solutionHintBuilder_.getMessage();
2911 }
2912 }
2913
2930 public Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
2931 if (solutionHintBuilder_ == null) {
2932 if (value == null) {
2933 throw new NullPointerException();
2934 }
2935 solutionHint_ = value;
2936 } else {
2937 solutionHintBuilder_.setMessage(value);
2938 }
2939 bitField0_ |= 0x00000040;
2940 onChanged();
2941 return this;
2942 }
2943
2960 public Builder setSolutionHint(
2961 com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue) {
2962 if (solutionHintBuilder_ == null) {
2963 solutionHint_ = builderForValue.build();
2964 } else {
2965 solutionHintBuilder_.setMessage(builderForValue.build());
2966 }
2967 bitField0_ |= 0x00000040;
2968 onChanged();
2969 return this;
2970 }
2971
2988 public Builder mergeSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
2989 if (solutionHintBuilder_ == null) {
2990 if (((bitField0_ & 0x00000040) != 0) &&
2991 solutionHint_ != null &&
2992 solutionHint_ != com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance()) {
2993 getSolutionHintBuilder().mergeFrom(value);
2994 } else {
2995 solutionHint_ = value;
2996 }
2997 } else {
2998 solutionHintBuilder_.mergeFrom(value);
2999 }
3000 if (solutionHint_ != null) {
3001 bitField0_ |= 0x00000040;
3002 onChanged();
3003 }
3004 return this;
3005 }
3006
3023 public Builder clearSolutionHint() {
3024 bitField0_ = (bitField0_ & ~0x00000040);
3025 solutionHint_ = null;
3026 if (solutionHintBuilder_ != null) {
3027 solutionHintBuilder_.dispose();
3028 solutionHintBuilder_ = null;
3029 }
3030 onChanged();
3031 return this;
3032 }
3033
3051 bitField0_ |= 0x00000040;
3052 onChanged();
3053 return internalGetSolutionHintFieldBuilder().getBuilder();
3054 }
3055
3073 if (solutionHintBuilder_ != null) {
3074 return solutionHintBuilder_.getMessageOrBuilder();
3075 } else {
3076 return solutionHint_ == null ?
3077 com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3078 }
3079 }
3080
3097 private com.google.protobuf.SingleFieldBuilder<
3098 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>
3099 internalGetSolutionHintFieldBuilder() {
3100 if (solutionHintBuilder_ == null) {
3101 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3102 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>(
3104 getParentForChildren(),
3105 isClean());
3106 solutionHint_ = null;
3107 }
3108 return solutionHintBuilder_;
3109 }
3110
3111 private com.google.protobuf.Internal.IntList assumptions_ = emptyIntList();
3112 private void ensureAssumptionsIsMutable() {
3113 if (!assumptions_.isModifiable()) {
3114 assumptions_ = makeMutableCopy(assumptions_);
3115 }
3116 bitField0_ |= 0x00000080;
3117 }
3138 public java.util.List<java.lang.Integer>
3140 assumptions_.makeImmutable();
3141 return assumptions_;
3142 }
3143
3163 public int getAssumptionsCount() {
3164 return assumptions_.size();
3165 }
3166
3187 public int getAssumptions(int index) {
3188 return assumptions_.getInt(index);
3189 }
3190
3212 public Builder setAssumptions(
3213 int index, int value) {
3214
3215 ensureAssumptionsIsMutable();
3216 assumptions_.setInt(index, value);
3217 bitField0_ |= 0x00000080;
3218 onChanged();
3219 return this;
3220 }
3221
3242 public Builder addAssumptions(int value) {
3243
3244 ensureAssumptionsIsMutable();
3245 assumptions_.addInt(value);
3246 bitField0_ |= 0x00000080;
3247 onChanged();
3248 return this;
3249 }
3250
3271 public Builder addAllAssumptions(
3272 java.lang.Iterable<? extends java.lang.Integer> values) {
3273 ensureAssumptionsIsMutable();
3274 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3275 values, assumptions_);
3276 bitField0_ |= 0x00000080;
3277 onChanged();
3278 return this;
3279 }
3280
3300 public Builder clearAssumptions() {
3301 assumptions_ = emptyIntList();
3302 bitField0_ = (bitField0_ & ~0x00000080);
3303 onChanged();
3304 return this;
3305 }
3306
3307 private com.google.ortools.sat.SymmetryProto symmetry_;
3308 private com.google.protobuf.SingleFieldBuilder<
3309 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder> symmetryBuilder_;
3322 public boolean hasSymmetry() {
3323 return ((bitField0_ & 0x00000100) != 0);
3324 }
3325
3338 if (symmetryBuilder_ == null) {
3339 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3340 } else {
3341 return symmetryBuilder_.getMessage();
3342 }
3343 }
3344
3355 public Builder setSymmetry(com.google.ortools.sat.SymmetryProto value) {
3356 if (symmetryBuilder_ == null) {
3357 if (value == null) {
3358 throw new NullPointerException();
3359 }
3360 symmetry_ = value;
3361 } else {
3362 symmetryBuilder_.setMessage(value);
3363 }
3364 bitField0_ |= 0x00000100;
3365 onChanged();
3366 return this;
3367 }
3368
3379 public Builder setSymmetry(
3380 com.google.ortools.sat.SymmetryProto.Builder builderForValue) {
3381 if (symmetryBuilder_ == null) {
3382 symmetry_ = builderForValue.build();
3383 } else {
3384 symmetryBuilder_.setMessage(builderForValue.build());
3385 }
3386 bitField0_ |= 0x00000100;
3387 onChanged();
3388 return this;
3389 }
3390
3401 public Builder mergeSymmetry(com.google.ortools.sat.SymmetryProto value) {
3402 if (symmetryBuilder_ == null) {
3403 if (((bitField0_ & 0x00000100) != 0) &&
3404 symmetry_ != null &&
3405 symmetry_ != com.google.ortools.sat.SymmetryProto.getDefaultInstance()) {
3406 getSymmetryBuilder().mergeFrom(value);
3407 } else {
3408 symmetry_ = value;
3409 }
3410 } else {
3411 symmetryBuilder_.mergeFrom(value);
3412 }
3413 if (symmetry_ != null) {
3414 bitField0_ |= 0x00000100;
3415 onChanged();
3416 }
3417 return this;
3418 }
3419
3430 public Builder clearSymmetry() {
3431 bitField0_ = (bitField0_ & ~0x00000100);
3432 symmetry_ = null;
3433 if (symmetryBuilder_ != null) {
3434 symmetryBuilder_.dispose();
3435 symmetryBuilder_ = null;
3436 }
3437 onChanged();
3438 return this;
3439 }
3440
3452 bitField0_ |= 0x00000100;
3453 onChanged();
3454 return internalGetSymmetryFieldBuilder().getBuilder();
3455 }
3456
3468 if (symmetryBuilder_ != null) {
3469 return symmetryBuilder_.getMessageOrBuilder();
3470 } else {
3471 return symmetry_ == null ?
3472 com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3473 }
3474 }
3475
3486 private com.google.protobuf.SingleFieldBuilder<
3487 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>
3488 internalGetSymmetryFieldBuilder() {
3489 if (symmetryBuilder_ == null) {
3490 symmetryBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3491 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>(
3492 getSymmetry(),
3493 getParentForChildren(),
3494 isClean());
3495 symmetry_ = null;
3496 }
3497 return symmetryBuilder_;
3498 }
3499
3500 // @@protoc_insertion_point(builder_scope:operations_research.sat.CpModelProto)
3501 }
3502
3503 // @@protoc_insertion_point(class_scope:operations_research.sat.CpModelProto)
3504 private static final com.google.ortools.sat.CpModelProto DEFAULT_INSTANCE;
3505 static {
3506 DEFAULT_INSTANCE = new com.google.ortools.sat.CpModelProto();
3507 }
3508
3510 return DEFAULT_INSTANCE;
3511 }
3512
3513 private static final com.google.protobuf.Parser<CpModelProto>
3514 PARSER = new com.google.protobuf.AbstractParser<CpModelProto>() {
3515 @java.lang.Override
3516 public CpModelProto parsePartialFrom(
3517 com.google.protobuf.CodedInputStream input,
3518 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3519 throws com.google.protobuf.InvalidProtocolBufferException {
3520 Builder builder = newBuilder();
3521 try {
3522 builder.mergeFrom(input, extensionRegistry);
3523 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3524 throw e.setUnfinishedMessage(builder.buildPartial());
3525 } catch (com.google.protobuf.UninitializedMessageException e) {
3526 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3527 } catch (java.io.IOException e) {
3528 throw new com.google.protobuf.InvalidProtocolBufferException(e)
3529 .setUnfinishedMessage(builder.buildPartial());
3530 }
3531 return builder.buildPartial();
3532 }
3533 };
3534
3535 public static com.google.protobuf.Parser<CpModelProto> parser() {
3536 return PARSER;
3537 }
3538
3539 @java.lang.Override
3540 public com.google.protobuf.Parser<CpModelProto> getParserForType() {
3541 return PARSER;
3542 }
3543
3544 @java.lang.Override
3546 return DEFAULT_INSTANCE;
3547 }
3548
3549}
3550
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)