Google OR-Tools v9.9
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: 3.25.3
5package com.google.ortools.sat;
6
14public final class CpModelProto extends
15 com.google.protobuf.GeneratedMessageV3 implements
16 // @@protoc_insertion_point(message_implements:operations_research.sat.CpModelProto)
18private static final long serialVersionUID = 0L;
19 // Use CpModelProto.newBuilder() to construct.
20 private CpModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
21 super(builder);
22 }
23 private CpModelProto() {
24 name_ = "";
25 variables_ = java.util.Collections.emptyList();
26 constraints_ = java.util.Collections.emptyList();
27 searchStrategy_ = java.util.Collections.emptyList();
28 assumptions_ = emptyIntList();
29 }
30
31 @java.lang.Override
32 @SuppressWarnings({"unused"})
33 protected java.lang.Object newInstance(
34 UnusedPrivateParameter unused) {
35 return new CpModelProto();
36 }
37
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
41 }
42
43 @java.lang.Override
44 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
49 }
50
51 private int bitField0_;
52 public static final int NAME_FIELD_NUMBER = 1;
53 @SuppressWarnings("serial")
54 private volatile java.lang.Object name_ = "";
63 @java.lang.Override
64 public java.lang.String getName() {
65 java.lang.Object ref = name_;
66 if (ref instanceof java.lang.String) {
67 return (java.lang.String) ref;
68 } else {
69 com.google.protobuf.ByteString bs =
70 (com.google.protobuf.ByteString) ref;
71 java.lang.String s = bs.toStringUtf8();
72 name_ = s;
73 return s;
74 }
75 }
84 @java.lang.Override
85 public com.google.protobuf.ByteString
87 java.lang.Object ref = name_;
88 if (ref instanceof java.lang.String) {
89 com.google.protobuf.ByteString b =
90 com.google.protobuf.ByteString.copyFromUtf8(
91 (java.lang.String) ref);
92 name_ = b;
93 return b;
94 } else {
95 return (com.google.protobuf.ByteString) ref;
96 }
97 }
98
99 public static final int VARIABLES_FIELD_NUMBER = 2;
100 @SuppressWarnings("serial")
101 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_;
109 @java.lang.Override
110 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
111 return variables_;
112 }
120 @java.lang.Override
121 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
123 return variables_;
124 }
132 @java.lang.Override
133 public int getVariablesCount() {
134 return variables_.size();
135 }
143 @java.lang.Override
145 return variables_.get(index);
146 }
154 @java.lang.Override
156 int index) {
157 return variables_.get(index);
158 }
159
160 public static final int CONSTRAINTS_FIELD_NUMBER = 3;
161 @SuppressWarnings("serial")
162 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_;
166 @java.lang.Override
167 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
168 return constraints_;
169 }
173 @java.lang.Override
174 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
176 return constraints_;
177 }
181 @java.lang.Override
182 public int getConstraintsCount() {
183 return constraints_.size();
184 }
188 @java.lang.Override
190 return constraints_.get(index);
191 }
195 @java.lang.Override
197 int index) {
198 return constraints_.get(index);
199 }
200
201 public static final int OBJECTIVE_FIELD_NUMBER = 4;
211 @java.lang.Override
212 public boolean hasObjective() {
213 return ((bitField0_ & 0x00000001) != 0);
214 }
223 @java.lang.Override
225 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
226 }
234 @java.lang.Override
236 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
237 }
238
239 public static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER = 9;
240 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
261 @java.lang.Override
262 public boolean hasFloatingPointObjective() {
263 return ((bitField0_ & 0x00000002) != 0);
264 }
285 @java.lang.Override
287 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
288 }
308 @java.lang.Override
310 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
311 }
312
313 public static final int SEARCH_STRATEGY_FIELD_NUMBER = 5;
314 @SuppressWarnings("serial")
315 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_;
331 @java.lang.Override
332 public java.util.List<com.google.ortools.sat.DecisionStrategyProto> getSearchStrategyList() {
333 return searchStrategy_;
334 }
350 @java.lang.Override
351 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
353 return searchStrategy_;
354 }
370 @java.lang.Override
372 return searchStrategy_.size();
373 }
389 @java.lang.Override
391 return searchStrategy_.get(index);
392 }
408 @java.lang.Override
410 int index) {
411 return searchStrategy_.get(index);
412 }
413
414 public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
434 @java.lang.Override
435 public boolean hasSolutionHint() {
436 return ((bitField0_ & 0x00000004) != 0);
437 }
456 @java.lang.Override
458 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
459 }
477 @java.lang.Override
479 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
480 }
481
482 public static final int ASSUMPTIONS_FIELD_NUMBER = 7;
483 @SuppressWarnings("serial")
484 private com.google.protobuf.Internal.IntList assumptions_ =
485 emptyIntList();
506 @java.lang.Override
507 public java.util.List<java.lang.Integer>
509 return assumptions_;
510 }
531 public int getAssumptionsCount() {
532 return assumptions_.size();
533 }
555 public int getAssumptions(int index) {
556 return assumptions_.getInt(index);
557 }
558 private int assumptionsMemoizedSerializedSize = -1;
559
560 public static final int SYMMETRY_FIELD_NUMBER = 8;
561 private com.google.ortools.sat.SymmetryProto symmetry_;
574 @java.lang.Override
575 public boolean hasSymmetry() {
576 return ((bitField0_ & 0x00000008) != 0);
577 }
590 @java.lang.Override
592 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
593 }
605 @java.lang.Override
607 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
608 }
609
610 private byte memoizedIsInitialized = -1;
611 @java.lang.Override
612 public final boolean isInitialized() {
613 byte isInitialized = memoizedIsInitialized;
614 if (isInitialized == 1) return true;
615 if (isInitialized == 0) return false;
616
617 memoizedIsInitialized = 1;
618 return true;
619 }
620
621 @java.lang.Override
622 public void writeTo(com.google.protobuf.CodedOutputStream output)
623 throws java.io.IOException {
625 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
626 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
627 }
628 for (int i = 0; i < variables_.size(); i++) {
629 output.writeMessage(2, variables_.get(i));
630 }
631 for (int i = 0; i < constraints_.size(); i++) {
632 output.writeMessage(3, constraints_.get(i));
633 }
634 if (((bitField0_ & 0x00000001) != 0)) {
635 output.writeMessage(4, getObjective());
636 }
637 for (int i = 0; i < searchStrategy_.size(); i++) {
638 output.writeMessage(5, searchStrategy_.get(i));
639 }
640 if (((bitField0_ & 0x00000004) != 0)) {
641 output.writeMessage(6, getSolutionHint());
642 }
643 if (getAssumptionsList().size() > 0) {
644 output.writeUInt32NoTag(58);
645 output.writeUInt32NoTag(assumptionsMemoizedSerializedSize);
646 }
647 for (int i = 0; i < assumptions_.size(); i++) {
648 output.writeInt32NoTag(assumptions_.getInt(i));
649 }
650 if (((bitField0_ & 0x00000008) != 0)) {
651 output.writeMessage(8, getSymmetry());
652 }
653 if (((bitField0_ & 0x00000002) != 0)) {
654 output.writeMessage(9, getFloatingPointObjective());
655 }
656 getUnknownFields().writeTo(output);
657 }
658
659 @java.lang.Override
660 public int getSerializedSize() {
661 int size = memoizedSize;
662 if (size != -1) return size;
663
664 size = 0;
665 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
666 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
667 }
668 for (int i = 0; i < variables_.size(); i++) {
669 size += com.google.protobuf.CodedOutputStream
670 .computeMessageSize(2, variables_.get(i));
671 }
672 for (int i = 0; i < constraints_.size(); i++) {
673 size += com.google.protobuf.CodedOutputStream
674 .computeMessageSize(3, constraints_.get(i));
675 }
676 if (((bitField0_ & 0x00000001) != 0)) {
677 size += com.google.protobuf.CodedOutputStream
678 .computeMessageSize(4, getObjective());
679 }
680 for (int i = 0; i < searchStrategy_.size(); i++) {
681 size += com.google.protobuf.CodedOutputStream
682 .computeMessageSize(5, searchStrategy_.get(i));
683 }
684 if (((bitField0_ & 0x00000004) != 0)) {
685 size += com.google.protobuf.CodedOutputStream
686 .computeMessageSize(6, getSolutionHint());
687 }
688 {
689 int dataSize = 0;
690 for (int i = 0; i < assumptions_.size(); i++) {
691 dataSize += com.google.protobuf.CodedOutputStream
692 .computeInt32SizeNoTag(assumptions_.getInt(i));
693 }
694 size += dataSize;
695 if (!getAssumptionsList().isEmpty()) {
696 size += 1;
697 size += com.google.protobuf.CodedOutputStream
698 .computeInt32SizeNoTag(dataSize);
699 }
700 assumptionsMemoizedSerializedSize = dataSize;
701 }
702 if (((bitField0_ & 0x00000008) != 0)) {
703 size += com.google.protobuf.CodedOutputStream
704 .computeMessageSize(8, getSymmetry());
705 }
706 if (((bitField0_ & 0x00000002) != 0)) {
707 size += com.google.protobuf.CodedOutputStream
708 .computeMessageSize(9, getFloatingPointObjective());
709 }
710 size += getUnknownFields().getSerializedSize();
711 memoizedSize = size;
712 return size;
713 }
714
715 @java.lang.Override
716 public boolean equals(final java.lang.Object obj) {
717 if (obj == this) {
718 return true;
719 }
720 if (!(obj instanceof com.google.ortools.sat.CpModelProto)) {
721 return super.equals(obj);
722 }
723 com.google.ortools.sat.CpModelProto other = (com.google.ortools.sat.CpModelProto) obj;
724
725 if (!getName()
726 .equals(other.getName())) return false;
727 if (!getVariablesList()
728 .equals(other.getVariablesList())) return false;
729 if (!getConstraintsList()
730 .equals(other.getConstraintsList())) return false;
731 if (hasObjective() != other.hasObjective()) return false;
732 if (hasObjective()) {
733 if (!getObjective()
734 .equals(other.getObjective())) return false;
735 }
736 if (hasFloatingPointObjective() != other.hasFloatingPointObjective()) return false;
739 .equals(other.getFloatingPointObjective())) return false;
740 }
742 .equals(other.getSearchStrategyList())) return false;
743 if (hasSolutionHint() != other.hasSolutionHint()) return false;
744 if (hasSolutionHint()) {
745 if (!getSolutionHint()
746 .equals(other.getSolutionHint())) return false;
747 }
748 if (!getAssumptionsList()
749 .equals(other.getAssumptionsList())) return false;
750 if (hasSymmetry() != other.hasSymmetry()) return false;
751 if (hasSymmetry()) {
752 if (!getSymmetry()
753 .equals(other.getSymmetry())) return false;
754 }
755 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
756 return true;
757 }
758
759 @java.lang.Override
760 public int hashCode() {
761 if (memoizedHashCode != 0) {
762 return memoizedHashCode;
763 }
764 int hash = 41;
765 hash = (19 * hash) + getDescriptor().hashCode();
766 hash = (37 * hash) + NAME_FIELD_NUMBER;
767 hash = (53 * hash) + getName().hashCode();
768 if (getVariablesCount() > 0) {
769 hash = (37 * hash) + VARIABLES_FIELD_NUMBER;
770 hash = (53 * hash) + getVariablesList().hashCode();
771 }
772 if (getConstraintsCount() > 0) {
773 hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
774 hash = (53 * hash) + getConstraintsList().hashCode();
775 }
776 if (hasObjective()) {
777 hash = (37 * hash) + OBJECTIVE_FIELD_NUMBER;
778 hash = (53 * hash) + getObjective().hashCode();
779 }
781 hash = (37 * hash) + FLOATING_POINT_OBJECTIVE_FIELD_NUMBER;
782 hash = (53 * hash) + getFloatingPointObjective().hashCode();
783 }
784 if (getSearchStrategyCount() > 0) {
785 hash = (37 * hash) + SEARCH_STRATEGY_FIELD_NUMBER;
786 hash = (53 * hash) + getSearchStrategyList().hashCode();
787 }
788 if (hasSolutionHint()) {
789 hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
790 hash = (53 * hash) + getSolutionHint().hashCode();
791 }
792 if (getAssumptionsCount() > 0) {
793 hash = (37 * hash) + ASSUMPTIONS_FIELD_NUMBER;
794 hash = (53 * hash) + getAssumptionsList().hashCode();
795 }
796 if (hasSymmetry()) {
797 hash = (37 * hash) + SYMMETRY_FIELD_NUMBER;
798 hash = (53 * hash) + getSymmetry().hashCode();
799 }
800 hash = (29 * hash) + getUnknownFields().hashCode();
801 memoizedHashCode = hash;
802 return hash;
803 }
804
806 java.nio.ByteBuffer data)
807 throws com.google.protobuf.InvalidProtocolBufferException {
808 return PARSER.parseFrom(data);
809 }
811 java.nio.ByteBuffer data,
812 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
813 throws com.google.protobuf.InvalidProtocolBufferException {
814 return PARSER.parseFrom(data, extensionRegistry);
815 }
817 com.google.protobuf.ByteString data)
818 throws com.google.protobuf.InvalidProtocolBufferException {
819 return PARSER.parseFrom(data);
820 }
822 com.google.protobuf.ByteString data,
823 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
824 throws com.google.protobuf.InvalidProtocolBufferException {
825 return PARSER.parseFrom(data, extensionRegistry);
826 }
828 throws com.google.protobuf.InvalidProtocolBufferException {
829 return PARSER.parseFrom(data);
830 }
832 byte[] data,
833 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
834 throws com.google.protobuf.InvalidProtocolBufferException {
835 return PARSER.parseFrom(data, extensionRegistry);
836 }
837 public static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)
838 throws java.io.IOException {
839 return com.google.protobuf.GeneratedMessageV3
840 .parseWithIOException(PARSER, input);
841 }
843 java.io.InputStream input,
844 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
845 throws java.io.IOException {
846 return com.google.protobuf.GeneratedMessageV3
847 .parseWithIOException(PARSER, input, extensionRegistry);
848 }
849
850 public static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
851 throws java.io.IOException {
852 return com.google.protobuf.GeneratedMessageV3
853 .parseDelimitedWithIOException(PARSER, input);
854 }
855
857 java.io.InputStream input,
858 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
859 throws java.io.IOException {
860 return com.google.protobuf.GeneratedMessageV3
861 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
862 }
864 com.google.protobuf.CodedInputStream input)
865 throws java.io.IOException {
866 return com.google.protobuf.GeneratedMessageV3
867 .parseWithIOException(PARSER, input);
868 }
870 com.google.protobuf.CodedInputStream input,
871 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
872 throws java.io.IOException {
873 return com.google.protobuf.GeneratedMessageV3
874 .parseWithIOException(PARSER, input, extensionRegistry);
875 }
876
877 @java.lang.Override
878 public Builder newBuilderForType() { return newBuilder(); }
879 public static Builder newBuilder() {
880 return DEFAULT_INSTANCE.toBuilder();
881 }
882 public static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype) {
883 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
884 }
885 @java.lang.Override
887 return this == DEFAULT_INSTANCE
888 ? new Builder() : new Builder().mergeFrom(this);
889 }
890
891 @java.lang.Override
893 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
894 Builder builder = new Builder(parent);
895 return builder;
896 }
904 public static final class Builder extends
905 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
906 // @@protoc_insertion_point(builder_implements:operations_research.sat.CpModelProto)
907 com.google.ortools.sat.CpModelProtoOrBuilder {
908 public static final com.google.protobuf.Descriptors.Descriptor
910 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
911 }
912
913 @java.lang.Override
914 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
916 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
917 .ensureFieldAccessorsInitialized(
918 com.google.ortools.sat.CpModelProto.class, com.google.ortools.sat.CpModelProto.Builder.class);
919 }
920
921 // Construct using com.google.ortools.sat.CpModelProto.newBuilder()
922 private Builder() {
923 maybeForceBuilderInitialization();
924 }
925
926 private Builder(
927 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
928 super(parent);
929 maybeForceBuilderInitialization();
930 }
931 private void maybeForceBuilderInitialization() {
932 if (com.google.protobuf.GeneratedMessageV3
933 .alwaysUseFieldBuilders) {
934 getVariablesFieldBuilder();
935 getConstraintsFieldBuilder();
936 getObjectiveFieldBuilder();
937 getFloatingPointObjectiveFieldBuilder();
938 getSearchStrategyFieldBuilder();
939 getSolutionHintFieldBuilder();
940 getSymmetryFieldBuilder();
941 }
942 }
943 @java.lang.Override
944 public Builder clear() {
945 super.clear();
946 bitField0_ = 0;
947 name_ = "";
948 if (variablesBuilder_ == null) {
949 variables_ = java.util.Collections.emptyList();
950 } else {
951 variables_ = null;
952 variablesBuilder_.clear();
953 }
954 bitField0_ = (bitField0_ & ~0x00000002);
955 if (constraintsBuilder_ == null) {
956 constraints_ = java.util.Collections.emptyList();
957 } else {
958 constraints_ = null;
959 constraintsBuilder_.clear();
960 }
961 bitField0_ = (bitField0_ & ~0x00000004);
962 objective_ = null;
963 if (objectiveBuilder_ != null) {
964 objectiveBuilder_.dispose();
965 objectiveBuilder_ = null;
966 }
967 floatingPointObjective_ = null;
968 if (floatingPointObjectiveBuilder_ != null) {
969 floatingPointObjectiveBuilder_.dispose();
970 floatingPointObjectiveBuilder_ = null;
971 }
972 if (searchStrategyBuilder_ == null) {
973 searchStrategy_ = java.util.Collections.emptyList();
974 } else {
975 searchStrategy_ = null;
976 searchStrategyBuilder_.clear();
977 }
978 bitField0_ = (bitField0_ & ~0x00000020);
979 solutionHint_ = null;
980 if (solutionHintBuilder_ != null) {
981 solutionHintBuilder_.dispose();
982 solutionHintBuilder_ = null;
983 }
984 assumptions_ = emptyIntList();
985 symmetry_ = null;
986 if (symmetryBuilder_ != null) {
987 symmetryBuilder_.dispose();
988 symmetryBuilder_ = null;
989 }
990 return this;
991 }
992
993 @java.lang.Override
994 public com.google.protobuf.Descriptors.Descriptor
996 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
997 }
998
999 @java.lang.Override
1001 return com.google.ortools.sat.CpModelProto.getDefaultInstance();
1002 }
1003
1004 @java.lang.Override
1007 if (!result.isInitialized()) {
1008 throw newUninitializedMessageException(result);
1009 }
1010 return result;
1011 }
1012
1013 @java.lang.Override
1015 com.google.ortools.sat.CpModelProto result = new com.google.ortools.sat.CpModelProto(this);
1016 buildPartialRepeatedFields(result);
1017 if (bitField0_ != 0) { buildPartial0(result); }
1018 onBuilt();
1019 return result;
1020 }
1021
1022 private void buildPartialRepeatedFields(com.google.ortools.sat.CpModelProto result) {
1023 if (variablesBuilder_ == null) {
1024 if (((bitField0_ & 0x00000002) != 0)) {
1025 variables_ = java.util.Collections.unmodifiableList(variables_);
1026 bitField0_ = (bitField0_ & ~0x00000002);
1027 }
1028 result.variables_ = variables_;
1029 } else {
1030 result.variables_ = variablesBuilder_.build();
1031 }
1032 if (constraintsBuilder_ == null) {
1033 if (((bitField0_ & 0x00000004) != 0)) {
1034 constraints_ = java.util.Collections.unmodifiableList(constraints_);
1035 bitField0_ = (bitField0_ & ~0x00000004);
1036 }
1037 result.constraints_ = constraints_;
1038 } else {
1039 result.constraints_ = constraintsBuilder_.build();
1040 }
1041 if (searchStrategyBuilder_ == null) {
1042 if (((bitField0_ & 0x00000020) != 0)) {
1043 searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
1044 bitField0_ = (bitField0_ & ~0x00000020);
1045 }
1046 result.searchStrategy_ = searchStrategy_;
1047 } else {
1048 result.searchStrategy_ = searchStrategyBuilder_.build();
1049 }
1050 }
1051
1052 private void buildPartial0(com.google.ortools.sat.CpModelProto result) {
1053 int from_bitField0_ = bitField0_;
1054 if (((from_bitField0_ & 0x00000001) != 0)) {
1055 result.name_ = name_;
1056 }
1057 int to_bitField0_ = 0;
1058 if (((from_bitField0_ & 0x00000008) != 0)) {
1059 result.objective_ = objectiveBuilder_ == null
1060 ? objective_
1061 : objectiveBuilder_.build();
1062 to_bitField0_ |= 0x00000001;
1063 }
1064 if (((from_bitField0_ & 0x00000010) != 0)) {
1065 result.floatingPointObjective_ = floatingPointObjectiveBuilder_ == null
1066 ? floatingPointObjective_
1067 : floatingPointObjectiveBuilder_.build();
1068 to_bitField0_ |= 0x00000002;
1069 }
1070 if (((from_bitField0_ & 0x00000040) != 0)) {
1071 result.solutionHint_ = solutionHintBuilder_ == null
1072 ? solutionHint_
1073 : solutionHintBuilder_.build();
1074 to_bitField0_ |= 0x00000004;
1075 }
1076 if (((from_bitField0_ & 0x00000080) != 0)) {
1077 assumptions_.makeImmutable();
1078 result.assumptions_ = assumptions_;
1079 }
1080 if (((from_bitField0_ & 0x00000100) != 0)) {
1081 result.symmetry_ = symmetryBuilder_ == null
1082 ? symmetry_
1083 : symmetryBuilder_.build();
1084 to_bitField0_ |= 0x00000008;
1085 }
1086 result.bitField0_ |= to_bitField0_;
1087 }
1088
1089 @java.lang.Override
1090 public Builder clone() {
1091 return super.clone();
1092 }
1093 @java.lang.Override
1095 com.google.protobuf.Descriptors.FieldDescriptor field,
1096 java.lang.Object value) {
1097 return super.setField(field, value);
1098 }
1099 @java.lang.Override
1101 com.google.protobuf.Descriptors.FieldDescriptor field) {
1102 return super.clearField(field);
1103 }
1104 @java.lang.Override
1106 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1107 return super.clearOneof(oneof);
1108 }
1109 @java.lang.Override
1111 com.google.protobuf.Descriptors.FieldDescriptor field,
1112 int index, java.lang.Object value) {
1113 return super.setRepeatedField(field, index, value);
1114 }
1115 @java.lang.Override
1117 com.google.protobuf.Descriptors.FieldDescriptor field,
1118 java.lang.Object value) {
1119 return super.addRepeatedField(field, value);
1120 }
1121 @java.lang.Override
1122 public Builder mergeFrom(com.google.protobuf.Message other) {
1123 if (other instanceof com.google.ortools.sat.CpModelProto) {
1124 return mergeFrom((com.google.ortools.sat.CpModelProto)other);
1125 } else {
1126 super.mergeFrom(other);
1127 return this;
1128 }
1129 }
1130
1131 public Builder mergeFrom(com.google.ortools.sat.CpModelProto other) {
1132 if (other == com.google.ortools.sat.CpModelProto.getDefaultInstance()) return this;
1133 if (!other.getName().isEmpty()) {
1134 name_ = other.name_;
1135 bitField0_ |= 0x00000001;
1136 onChanged();
1137 }
1138 if (variablesBuilder_ == null) {
1139 if (!other.variables_.isEmpty()) {
1140 if (variables_.isEmpty()) {
1141 variables_ = other.variables_;
1142 bitField0_ = (bitField0_ & ~0x00000002);
1143 } else {
1144 ensureVariablesIsMutable();
1145 variables_.addAll(other.variables_);
1146 }
1147 onChanged();
1148 }
1149 } else {
1150 if (!other.variables_.isEmpty()) {
1151 if (variablesBuilder_.isEmpty()) {
1152 variablesBuilder_.dispose();
1153 variablesBuilder_ = null;
1154 variables_ = other.variables_;
1155 bitField0_ = (bitField0_ & ~0x00000002);
1156 variablesBuilder_ =
1157 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1158 getVariablesFieldBuilder() : null;
1159 } else {
1160 variablesBuilder_.addAllMessages(other.variables_);
1161 }
1162 }
1163 }
1164 if (constraintsBuilder_ == null) {
1165 if (!other.constraints_.isEmpty()) {
1166 if (constraints_.isEmpty()) {
1167 constraints_ = other.constraints_;
1168 bitField0_ = (bitField0_ & ~0x00000004);
1169 } else {
1170 ensureConstraintsIsMutable();
1171 constraints_.addAll(other.constraints_);
1172 }
1173 onChanged();
1174 }
1175 } else {
1176 if (!other.constraints_.isEmpty()) {
1177 if (constraintsBuilder_.isEmpty()) {
1178 constraintsBuilder_.dispose();
1179 constraintsBuilder_ = null;
1180 constraints_ = other.constraints_;
1181 bitField0_ = (bitField0_ & ~0x00000004);
1182 constraintsBuilder_ =
1183 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1184 getConstraintsFieldBuilder() : null;
1185 } else {
1186 constraintsBuilder_.addAllMessages(other.constraints_);
1187 }
1188 }
1189 }
1190 if (other.hasObjective()) {
1191 mergeObjective(other.getObjective());
1192 }
1193 if (other.hasFloatingPointObjective()) {
1194 mergeFloatingPointObjective(other.getFloatingPointObjective());
1195 }
1196 if (searchStrategyBuilder_ == null) {
1197 if (!other.searchStrategy_.isEmpty()) {
1198 if (searchStrategy_.isEmpty()) {
1199 searchStrategy_ = other.searchStrategy_;
1200 bitField0_ = (bitField0_ & ~0x00000020);
1201 } else {
1202 ensureSearchStrategyIsMutable();
1203 searchStrategy_.addAll(other.searchStrategy_);
1204 }
1205 onChanged();
1206 }
1207 } else {
1208 if (!other.searchStrategy_.isEmpty()) {
1209 if (searchStrategyBuilder_.isEmpty()) {
1210 searchStrategyBuilder_.dispose();
1211 searchStrategyBuilder_ = null;
1212 searchStrategy_ = other.searchStrategy_;
1213 bitField0_ = (bitField0_ & ~0x00000020);
1214 searchStrategyBuilder_ =
1215 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1216 getSearchStrategyFieldBuilder() : null;
1217 } else {
1218 searchStrategyBuilder_.addAllMessages(other.searchStrategy_);
1219 }
1220 }
1221 }
1222 if (other.hasSolutionHint()) {
1223 mergeSolutionHint(other.getSolutionHint());
1224 }
1225 if (!other.assumptions_.isEmpty()) {
1226 if (assumptions_.isEmpty()) {
1227 assumptions_ = other.assumptions_;
1228 assumptions_.makeImmutable();
1229 bitField0_ |= 0x00000080;
1230 } else {
1231 ensureAssumptionsIsMutable();
1232 assumptions_.addAll(other.assumptions_);
1233 }
1234 onChanged();
1235 }
1236 if (other.hasSymmetry()) {
1237 mergeSymmetry(other.getSymmetry());
1238 }
1239 this.mergeUnknownFields(other.getUnknownFields());
1240 onChanged();
1241 return this;
1242 }
1243
1244 @java.lang.Override
1245 public final boolean isInitialized() {
1246 return true;
1247 }
1248
1249 @java.lang.Override
1251 com.google.protobuf.CodedInputStream input,
1252 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1253 throws java.io.IOException {
1254 if (extensionRegistry == null) {
1255 throw new java.lang.NullPointerException();
1256 }
1257 try {
1258 boolean done = false;
1259 while (!done) {
1260 int tag = input.readTag();
1261 switch (tag) {
1262 case 0:
1263 done = true;
1264 break;
1265 case 10: {
1266 name_ = input.readStringRequireUtf8();
1267 bitField0_ |= 0x00000001;
1268 break;
1269 } // case 10
1270 case 18: {
1272 input.readMessage(
1273 com.google.ortools.sat.IntegerVariableProto.parser(),
1274 extensionRegistry);
1275 if (variablesBuilder_ == null) {
1276 ensureVariablesIsMutable();
1277 variables_.add(m);
1278 } else {
1279 variablesBuilder_.addMessage(m);
1280 }
1281 break;
1282 } // case 18
1283 case 26: {
1285 input.readMessage(
1286 com.google.ortools.sat.ConstraintProto.parser(),
1287 extensionRegistry);
1288 if (constraintsBuilder_ == null) {
1289 ensureConstraintsIsMutable();
1290 constraints_.add(m);
1291 } else {
1292 constraintsBuilder_.addMessage(m);
1293 }
1294 break;
1295 } // case 26
1296 case 34: {
1297 input.readMessage(
1298 getObjectiveFieldBuilder().getBuilder(),
1299 extensionRegistry);
1300 bitField0_ |= 0x00000008;
1301 break;
1302 } // case 34
1303 case 42: {
1305 input.readMessage(
1306 com.google.ortools.sat.DecisionStrategyProto.parser(),
1307 extensionRegistry);
1308 if (searchStrategyBuilder_ == null) {
1309 ensureSearchStrategyIsMutable();
1310 searchStrategy_.add(m);
1311 } else {
1312 searchStrategyBuilder_.addMessage(m);
1313 }
1314 break;
1315 } // case 42
1316 case 50: {
1317 input.readMessage(
1318 getSolutionHintFieldBuilder().getBuilder(),
1319 extensionRegistry);
1320 bitField0_ |= 0x00000040;
1321 break;
1322 } // case 50
1323 case 56: {
1324 int v = input.readInt32();
1325 ensureAssumptionsIsMutable();
1326 assumptions_.addInt(v);
1327 break;
1328 } // case 56
1329 case 58: {
1330 int length = input.readRawVarint32();
1331 int limit = input.pushLimit(length);
1332 ensureAssumptionsIsMutable();
1333 while (input.getBytesUntilLimit() > 0) {
1334 assumptions_.addInt(input.readInt32());
1335 }
1336 input.popLimit(limit);
1337 break;
1338 } // case 58
1339 case 66: {
1340 input.readMessage(
1341 getSymmetryFieldBuilder().getBuilder(),
1342 extensionRegistry);
1343 bitField0_ |= 0x00000100;
1344 break;
1345 } // case 66
1346 case 74: {
1347 input.readMessage(
1348 getFloatingPointObjectiveFieldBuilder().getBuilder(),
1349 extensionRegistry);
1350 bitField0_ |= 0x00000010;
1351 break;
1352 } // case 74
1353 default: {
1354 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1355 done = true; // was an endgroup tag
1356 }
1357 break;
1358 } // default:
1359 } // switch (tag)
1360 } // while (!done)
1361 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1362 throw e.unwrapIOException();
1363 } finally {
1364 onChanged();
1365 } // finally
1366 return this;
1367 }
1368 private int bitField0_;
1369
1370 private java.lang.Object name_ = "";
1379 public java.lang.String getName() {
1380 java.lang.Object ref = name_;
1381 if (!(ref instanceof java.lang.String)) {
1382 com.google.protobuf.ByteString bs =
1383 (com.google.protobuf.ByteString) ref;
1384 java.lang.String s = bs.toStringUtf8();
1385 name_ = s;
1386 return s;
1387 } else {
1388 return (java.lang.String) ref;
1389 }
1390 }
1399 public com.google.protobuf.ByteString
1401 java.lang.Object ref = name_;
1402 if (ref instanceof String) {
1403 com.google.protobuf.ByteString b =
1404 com.google.protobuf.ByteString.copyFromUtf8(
1405 (java.lang.String) ref);
1406 name_ = b;
1407 return b;
1408 } else {
1409 return (com.google.protobuf.ByteString) ref;
1410 }
1411 }
1422 java.lang.String value) {
1423 if (value == null) { throw new NullPointerException(); }
1424 name_ = value;
1425 bitField0_ |= 0x00000001;
1426 onChanged();
1427 return this;
1428 }
1438 name_ = getDefaultInstance().getName();
1439 bitField0_ = (bitField0_ & ~0x00000001);
1440 onChanged();
1441 return this;
1442 }
1453 com.google.protobuf.ByteString value) {
1454 if (value == null) { throw new NullPointerException(); }
1455 checkByteStringIsUtf8(value);
1456 name_ = value;
1457 bitField0_ |= 0x00000001;
1458 onChanged();
1459 return this;
1460 }
1461
1462 private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_ =
1463 java.util.Collections.emptyList();
1464 private void ensureVariablesIsMutable() {
1465 if (!((bitField0_ & 0x00000002) != 0)) {
1466 variables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(variables_);
1467 bitField0_ |= 0x00000002;
1468 }
1469 }
1470
1471 private com.google.protobuf.RepeatedFieldBuilderV3<
1472 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder> variablesBuilder_;
1473
1481 public java.util.List<com.google.ortools.sat.IntegerVariableProto> getVariablesList() {
1482 if (variablesBuilder_ == null) {
1483 return java.util.Collections.unmodifiableList(variables_);
1484 } else {
1485 return variablesBuilder_.getMessageList();
1486 }
1487 }
1495 public int getVariablesCount() {
1496 if (variablesBuilder_ == null) {
1497 return variables_.size();
1498 } else {
1499 return variablesBuilder_.getCount();
1500 }
1501 }
1510 if (variablesBuilder_ == null) {
1511 return variables_.get(index);
1512 } else {
1513 return variablesBuilder_.getMessage(index);
1514 }
1515 }
1524 int index, com.google.ortools.sat.IntegerVariableProto value) {
1525 if (variablesBuilder_ == null) {
1526 if (value == null) {
1527 throw new NullPointerException();
1528 }
1529 ensureVariablesIsMutable();
1530 variables_.set(index, value);
1531 onChanged();
1532 } else {
1533 variablesBuilder_.setMessage(index, value);
1534 }
1535 return this;
1536 }
1545 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1546 if (variablesBuilder_ == null) {
1547 ensureVariablesIsMutable();
1548 variables_.set(index, builderForValue.build());
1549 onChanged();
1550 } else {
1551 variablesBuilder_.setMessage(index, builderForValue.build());
1552 }
1553 return this;
1554 }
1562 public Builder addVariables(com.google.ortools.sat.IntegerVariableProto value) {
1563 if (variablesBuilder_ == null) {
1564 if (value == null) {
1565 throw new NullPointerException();
1566 }
1567 ensureVariablesIsMutable();
1568 variables_.add(value);
1569 onChanged();
1570 } else {
1571 variablesBuilder_.addMessage(value);
1572 }
1573 return this;
1574 }
1583 int index, com.google.ortools.sat.IntegerVariableProto value) {
1584 if (variablesBuilder_ == null) {
1585 if (value == null) {
1586 throw new NullPointerException();
1587 }
1588 ensureVariablesIsMutable();
1589 variables_.add(index, value);
1590 onChanged();
1591 } else {
1592 variablesBuilder_.addMessage(index, value);
1593 }
1594 return this;
1595 }
1604 com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1605 if (variablesBuilder_ == null) {
1606 ensureVariablesIsMutable();
1607 variables_.add(builderForValue.build());
1608 onChanged();
1609 } else {
1610 variablesBuilder_.addMessage(builderForValue.build());
1611 }
1612 return this;
1613 }
1622 int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1623 if (variablesBuilder_ == null) {
1624 ensureVariablesIsMutable();
1625 variables_.add(index, builderForValue.build());
1626 onChanged();
1627 } else {
1628 variablesBuilder_.addMessage(index, builderForValue.build());
1629 }
1630 return this;
1631 }
1640 java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
1641 if (variablesBuilder_ == null) {
1642 ensureVariablesIsMutable();
1643 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1644 values, variables_);
1645 onChanged();
1646 } else {
1647 variablesBuilder_.addAllMessages(values);
1648 }
1649 return this;
1650 }
1659 if (variablesBuilder_ == null) {
1660 variables_ = java.util.Collections.emptyList();
1661 bitField0_ = (bitField0_ & ~0x00000002);
1662 onChanged();
1663 } else {
1664 variablesBuilder_.clear();
1665 }
1666 return this;
1667 }
1675 public Builder removeVariables(int index) {
1676 if (variablesBuilder_ == null) {
1677 ensureVariablesIsMutable();
1678 variables_.remove(index);
1679 onChanged();
1680 } else {
1681 variablesBuilder_.remove(index);
1682 }
1683 return this;
1684 }
1693 int index) {
1694 return getVariablesFieldBuilder().getBuilder(index);
1695 }
1704 int index) {
1705 if (variablesBuilder_ == null) {
1706 return variables_.get(index); } else {
1707 return variablesBuilder_.getMessageOrBuilder(index);
1708 }
1709 }
1717 public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1719 if (variablesBuilder_ != null) {
1720 return variablesBuilder_.getMessageOrBuilderList();
1721 } else {
1722 return java.util.Collections.unmodifiableList(variables_);
1723 }
1724 }
1733 return getVariablesFieldBuilder().addBuilder(
1734 com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1735 }
1744 int index) {
1745 return getVariablesFieldBuilder().addBuilder(
1746 index, com.google.ortools.sat.IntegerVariableProto.getDefaultInstance());
1747 }
1755 public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
1757 return getVariablesFieldBuilder().getBuilderList();
1758 }
1759 private com.google.protobuf.RepeatedFieldBuilderV3<
1760 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1761 getVariablesFieldBuilder() {
1762 if (variablesBuilder_ == null) {
1763 variablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1764 com.google.ortools.sat.IntegerVariableProto, com.google.ortools.sat.IntegerVariableProto.Builder, com.google.ortools.sat.IntegerVariableProtoOrBuilder>(
1765 variables_,
1766 ((bitField0_ & 0x00000002) != 0),
1767 getParentForChildren(),
1768 isClean());
1769 variables_ = null;
1770 }
1771 return variablesBuilder_;
1772 }
1773
1774 private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_ =
1775 java.util.Collections.emptyList();
1776 private void ensureConstraintsIsMutable() {
1777 if (!((bitField0_ & 0x00000004) != 0)) {
1778 constraints_ = new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>(constraints_);
1779 bitField0_ |= 0x00000004;
1780 }
1781 }
1782
1783 private com.google.protobuf.RepeatedFieldBuilderV3<
1784 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder> constraintsBuilder_;
1785
1789 public java.util.List<com.google.ortools.sat.ConstraintProto> getConstraintsList() {
1790 if (constraintsBuilder_ == null) {
1791 return java.util.Collections.unmodifiableList(constraints_);
1792 } else {
1793 return constraintsBuilder_.getMessageList();
1794 }
1795 }
1799 public int getConstraintsCount() {
1800 if (constraintsBuilder_ == null) {
1801 return constraints_.size();
1802 } else {
1803 return constraintsBuilder_.getCount();
1804 }
1805 }
1810 if (constraintsBuilder_ == null) {
1811 return constraints_.get(index);
1812 } else {
1813 return constraintsBuilder_.getMessage(index);
1814 }
1815 }
1820 int index, com.google.ortools.sat.ConstraintProto value) {
1821 if (constraintsBuilder_ == null) {
1822 if (value == null) {
1823 throw new NullPointerException();
1824 }
1825 ensureConstraintsIsMutable();
1826 constraints_.set(index, value);
1827 onChanged();
1828 } else {
1829 constraintsBuilder_.setMessage(index, value);
1830 }
1831 return this;
1832 }
1837 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1838 if (constraintsBuilder_ == null) {
1839 ensureConstraintsIsMutable();
1840 constraints_.set(index, builderForValue.build());
1841 onChanged();
1842 } else {
1843 constraintsBuilder_.setMessage(index, builderForValue.build());
1844 }
1845 return this;
1846 }
1850 public Builder addConstraints(com.google.ortools.sat.ConstraintProto value) {
1851 if (constraintsBuilder_ == null) {
1852 if (value == null) {
1853 throw new NullPointerException();
1854 }
1855 ensureConstraintsIsMutable();
1856 constraints_.add(value);
1857 onChanged();
1858 } else {
1859 constraintsBuilder_.addMessage(value);
1860 }
1861 return this;
1862 }
1867 int index, com.google.ortools.sat.ConstraintProto value) {
1868 if (constraintsBuilder_ == null) {
1869 if (value == null) {
1870 throw new NullPointerException();
1871 }
1872 ensureConstraintsIsMutable();
1873 constraints_.add(index, value);
1874 onChanged();
1875 } else {
1876 constraintsBuilder_.addMessage(index, value);
1877 }
1878 return this;
1879 }
1884 com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1885 if (constraintsBuilder_ == null) {
1886 ensureConstraintsIsMutable();
1887 constraints_.add(builderForValue.build());
1888 onChanged();
1889 } else {
1890 constraintsBuilder_.addMessage(builderForValue.build());
1891 }
1892 return this;
1893 }
1898 int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1899 if (constraintsBuilder_ == null) {
1900 ensureConstraintsIsMutable();
1901 constraints_.add(index, builderForValue.build());
1902 onChanged();
1903 } else {
1904 constraintsBuilder_.addMessage(index, builderForValue.build());
1905 }
1906 return this;
1907 }
1912 java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto> values) {
1913 if (constraintsBuilder_ == null) {
1914 ensureConstraintsIsMutable();
1915 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1916 values, constraints_);
1917 onChanged();
1918 } else {
1919 constraintsBuilder_.addAllMessages(values);
1920 }
1921 return this;
1922 }
1927 if (constraintsBuilder_ == null) {
1928 constraints_ = java.util.Collections.emptyList();
1929 bitField0_ = (bitField0_ & ~0x00000004);
1930 onChanged();
1931 } else {
1932 constraintsBuilder_.clear();
1933 }
1934 return this;
1935 }
1939 public Builder removeConstraints(int index) {
1940 if (constraintsBuilder_ == null) {
1941 ensureConstraintsIsMutable();
1942 constraints_.remove(index);
1943 onChanged();
1944 } else {
1945 constraintsBuilder_.remove(index);
1946 }
1947 return this;
1948 }
1953 int index) {
1954 return getConstraintsFieldBuilder().getBuilder(index);
1955 }
1960 int index) {
1961 if (constraintsBuilder_ == null) {
1962 return constraints_.get(index); } else {
1963 return constraintsBuilder_.getMessageOrBuilder(index);
1964 }
1965 }
1969 public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
1971 if (constraintsBuilder_ != null) {
1972 return constraintsBuilder_.getMessageOrBuilderList();
1973 } else {
1974 return java.util.Collections.unmodifiableList(constraints_);
1975 }
1976 }
1981 return getConstraintsFieldBuilder().addBuilder(
1982 com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1983 }
1988 int index) {
1989 return getConstraintsFieldBuilder().addBuilder(
1990 index, com.google.ortools.sat.ConstraintProto.getDefaultInstance());
1991 }
1995 public java.util.List<com.google.ortools.sat.ConstraintProto.Builder>
1997 return getConstraintsFieldBuilder().getBuilderList();
1998 }
1999 private com.google.protobuf.RepeatedFieldBuilderV3<
2000 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>
2001 getConstraintsFieldBuilder() {
2002 if (constraintsBuilder_ == null) {
2003 constraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2004 com.google.ortools.sat.ConstraintProto, com.google.ortools.sat.ConstraintProto.Builder, com.google.ortools.sat.ConstraintProtoOrBuilder>(
2005 constraints_,
2006 ((bitField0_ & 0x00000004) != 0),
2007 getParentForChildren(),
2008 isClean());
2009 constraints_ = null;
2010 }
2011 return constraintsBuilder_;
2012 }
2013
2014 private com.google.ortools.sat.CpObjectiveProto objective_;
2015 private com.google.protobuf.SingleFieldBuilderV3<
2016 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder> objectiveBuilder_;
2025 public boolean hasObjective() {
2026 return ((bitField0_ & 0x00000008) != 0);
2027 }
2037 if (objectiveBuilder_ == null) {
2038 return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2039 } else {
2040 return objectiveBuilder_.getMessage();
2041 }
2042 }
2050 public Builder setObjective(com.google.ortools.sat.CpObjectiveProto value) {
2051 if (objectiveBuilder_ == null) {
2052 if (value == null) {
2053 throw new NullPointerException();
2054 }
2055 objective_ = value;
2056 } else {
2057 objectiveBuilder_.setMessage(value);
2058 }
2059 bitField0_ |= 0x00000008;
2060 onChanged();
2061 return this;
2062 }
2071 com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
2072 if (objectiveBuilder_ == null) {
2073 objective_ = builderForValue.build();
2074 } else {
2075 objectiveBuilder_.setMessage(builderForValue.build());
2076 }
2077 bitField0_ |= 0x00000008;
2078 onChanged();
2079 return this;
2080 }
2088 public Builder mergeObjective(com.google.ortools.sat.CpObjectiveProto value) {
2089 if (objectiveBuilder_ == null) {
2090 if (((bitField0_ & 0x00000008) != 0) &&
2091 objective_ != null &&
2092 objective_ != com.google.ortools.sat.CpObjectiveProto.getDefaultInstance()) {
2093 getObjectiveBuilder().mergeFrom(value);
2094 } else {
2095 objective_ = value;
2096 }
2097 } else {
2098 objectiveBuilder_.mergeFrom(value);
2099 }
2100 if (objective_ != null) {
2101 bitField0_ |= 0x00000008;
2102 onChanged();
2103 }
2104 return this;
2105 }
2114 bitField0_ = (bitField0_ & ~0x00000008);
2115 objective_ = null;
2116 if (objectiveBuilder_ != null) {
2117 objectiveBuilder_.dispose();
2118 objectiveBuilder_ = null;
2119 }
2120 onChanged();
2121 return this;
2122 }
2131 bitField0_ |= 0x00000008;
2132 onChanged();
2133 return getObjectiveFieldBuilder().getBuilder();
2134 }
2143 if (objectiveBuilder_ != null) {
2144 return objectiveBuilder_.getMessageOrBuilder();
2145 } else {
2146 return objective_ == null ?
2147 com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2148 }
2149 }
2157 private com.google.protobuf.SingleFieldBuilderV3<
2158 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>
2159 getObjectiveFieldBuilder() {
2160 if (objectiveBuilder_ == null) {
2161 objectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2162 com.google.ortools.sat.CpObjectiveProto, com.google.ortools.sat.CpObjectiveProto.Builder, com.google.ortools.sat.CpObjectiveProtoOrBuilder>(
2163 getObjective(),
2164 getParentForChildren(),
2165 isClean());
2166 objective_ = null;
2167 }
2168 return objectiveBuilder_;
2169 }
2170
2171 private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
2172 private com.google.protobuf.SingleFieldBuilderV3<
2173 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder> floatingPointObjectiveBuilder_;
2194 public boolean hasFloatingPointObjective() {
2195 return ((bitField0_ & 0x00000010) != 0);
2196 }
2218 if (floatingPointObjectiveBuilder_ == null) {
2219 return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2220 } else {
2221 return floatingPointObjectiveBuilder_.getMessage();
2222 }
2223 }
2243 public Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2244 if (floatingPointObjectiveBuilder_ == null) {
2245 if (value == null) {
2246 throw new NullPointerException();
2247 }
2248 floatingPointObjective_ = value;
2249 } else {
2250 floatingPointObjectiveBuilder_.setMessage(value);
2251 }
2252 bitField0_ |= 0x00000010;
2253 onChanged();
2254 return this;
2255 }
2276 com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue) {
2277 if (floatingPointObjectiveBuilder_ == null) {
2278 floatingPointObjective_ = builderForValue.build();
2279 } else {
2280 floatingPointObjectiveBuilder_.setMessage(builderForValue.build());
2281 }
2282 bitField0_ |= 0x00000010;
2283 onChanged();
2284 return this;
2285 }
2305 public Builder mergeFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value) {
2306 if (floatingPointObjectiveBuilder_ == null) {
2307 if (((bitField0_ & 0x00000010) != 0) &&
2308 floatingPointObjective_ != null &&
2309 floatingPointObjective_ != com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance()) {
2310 getFloatingPointObjectiveBuilder().mergeFrom(value);
2311 } else {
2312 floatingPointObjective_ = value;
2313 }
2314 } else {
2315 floatingPointObjectiveBuilder_.mergeFrom(value);
2316 }
2317 if (floatingPointObjective_ != null) {
2318 bitField0_ |= 0x00000010;
2319 onChanged();
2320 }
2321 return this;
2322 }
2343 bitField0_ = (bitField0_ & ~0x00000010);
2344 floatingPointObjective_ = null;
2345 if (floatingPointObjectiveBuilder_ != null) {
2346 floatingPointObjectiveBuilder_.dispose();
2347 floatingPointObjectiveBuilder_ = null;
2348 }
2349 onChanged();
2350 return this;
2351 }
2372 bitField0_ |= 0x00000010;
2373 onChanged();
2374 return getFloatingPointObjectiveFieldBuilder().getBuilder();
2375 }
2396 if (floatingPointObjectiveBuilder_ != null) {
2397 return floatingPointObjectiveBuilder_.getMessageOrBuilder();
2398 } else {
2399 return floatingPointObjective_ == null ?
2400 com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2401 }
2402 }
2422 private com.google.protobuf.SingleFieldBuilderV3<
2423 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>
2424 getFloatingPointObjectiveFieldBuilder() {
2425 if (floatingPointObjectiveBuilder_ == null) {
2426 floatingPointObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2427 com.google.ortools.sat.FloatObjectiveProto, com.google.ortools.sat.FloatObjectiveProto.Builder, com.google.ortools.sat.FloatObjectiveProtoOrBuilder>(
2429 getParentForChildren(),
2430 isClean());
2431 floatingPointObjective_ = null;
2432 }
2433 return floatingPointObjectiveBuilder_;
2434 }
2435
2436 private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_ =
2437 java.util.Collections.emptyList();
2438 private void ensureSearchStrategyIsMutable() {
2439 if (!((bitField0_ & 0x00000020) != 0)) {
2440 searchStrategy_ = new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>(searchStrategy_);
2441 bitField0_ |= 0x00000020;
2442 }
2443 }
2444
2445 private com.google.protobuf.RepeatedFieldBuilderV3<
2446 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder> searchStrategyBuilder_;
2447
2463 public java.util.List<com.google.ortools.sat.DecisionStrategyProto> getSearchStrategyList() {
2464 if (searchStrategyBuilder_ == null) {
2465 return java.util.Collections.unmodifiableList(searchStrategy_);
2466 } else {
2467 return searchStrategyBuilder_.getMessageList();
2468 }
2469 }
2486 if (searchStrategyBuilder_ == null) {
2487 return searchStrategy_.size();
2488 } else {
2489 return searchStrategyBuilder_.getCount();
2490 }
2491 }
2508 if (searchStrategyBuilder_ == null) {
2509 return searchStrategy_.get(index);
2510 } else {
2511 return searchStrategyBuilder_.getMessage(index);
2512 }
2513 }
2530 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2531 if (searchStrategyBuilder_ == null) {
2532 if (value == null) {
2533 throw new NullPointerException();
2534 }
2535 ensureSearchStrategyIsMutable();
2536 searchStrategy_.set(index, value);
2537 onChanged();
2538 } else {
2539 searchStrategyBuilder_.setMessage(index, value);
2540 }
2541 return this;
2542 }
2559 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2560 if (searchStrategyBuilder_ == null) {
2561 ensureSearchStrategyIsMutable();
2562 searchStrategy_.set(index, builderForValue.build());
2563 onChanged();
2564 } else {
2565 searchStrategyBuilder_.setMessage(index, builderForValue.build());
2566 }
2567 return this;
2568 }
2584 public Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value) {
2585 if (searchStrategyBuilder_ == null) {
2586 if (value == null) {
2587 throw new NullPointerException();
2588 }
2589 ensureSearchStrategyIsMutable();
2590 searchStrategy_.add(value);
2591 onChanged();
2592 } else {
2593 searchStrategyBuilder_.addMessage(value);
2594 }
2595 return this;
2596 }
2613 int index, com.google.ortools.sat.DecisionStrategyProto value) {
2614 if (searchStrategyBuilder_ == null) {
2615 if (value == null) {
2616 throw new NullPointerException();
2617 }
2618 ensureSearchStrategyIsMutable();
2619 searchStrategy_.add(index, value);
2620 onChanged();
2621 } else {
2622 searchStrategyBuilder_.addMessage(index, value);
2623 }
2624 return this;
2625 }
2642 com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2643 if (searchStrategyBuilder_ == null) {
2644 ensureSearchStrategyIsMutable();
2645 searchStrategy_.add(builderForValue.build());
2646 onChanged();
2647 } else {
2648 searchStrategyBuilder_.addMessage(builderForValue.build());
2649 }
2650 return this;
2651 }
2668 int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2669 if (searchStrategyBuilder_ == null) {
2670 ensureSearchStrategyIsMutable();
2671 searchStrategy_.add(index, builderForValue.build());
2672 onChanged();
2673 } else {
2674 searchStrategyBuilder_.addMessage(index, builderForValue.build());
2675 }
2676 return this;
2677 }
2694 java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto> values) {
2695 if (searchStrategyBuilder_ == null) {
2696 ensureSearchStrategyIsMutable();
2697 com.google.protobuf.AbstractMessageLite.Builder.addAll(
2698 values, searchStrategy_);
2699 onChanged();
2700 } else {
2701 searchStrategyBuilder_.addAllMessages(values);
2702 }
2703 return this;
2704 }
2721 if (searchStrategyBuilder_ == null) {
2722 searchStrategy_ = java.util.Collections.emptyList();
2723 bitField0_ = (bitField0_ & ~0x00000020);
2724 onChanged();
2725 } else {
2726 searchStrategyBuilder_.clear();
2727 }
2728 return this;
2729 }
2745 public Builder removeSearchStrategy(int index) {
2746 if (searchStrategyBuilder_ == null) {
2747 ensureSearchStrategyIsMutable();
2748 searchStrategy_.remove(index);
2749 onChanged();
2750 } else {
2751 searchStrategyBuilder_.remove(index);
2752 }
2753 return this;
2754 }
2771 int index) {
2772 return getSearchStrategyFieldBuilder().getBuilder(index);
2773 }
2790 int index) {
2791 if (searchStrategyBuilder_ == null) {
2792 return searchStrategy_.get(index); } else {
2793 return searchStrategyBuilder_.getMessageOrBuilder(index);
2794 }
2795 }
2811 public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2813 if (searchStrategyBuilder_ != null) {
2814 return searchStrategyBuilder_.getMessageOrBuilderList();
2815 } else {
2816 return java.util.Collections.unmodifiableList(searchStrategy_);
2817 }
2818 }
2835 return getSearchStrategyFieldBuilder().addBuilder(
2836 com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2837 }
2854 int index) {
2855 return getSearchStrategyFieldBuilder().addBuilder(
2856 index, com.google.ortools.sat.DecisionStrategyProto.getDefaultInstance());
2857 }
2873 public java.util.List<com.google.ortools.sat.DecisionStrategyProto.Builder>
2875 return getSearchStrategyFieldBuilder().getBuilderList();
2876 }
2877 private com.google.protobuf.RepeatedFieldBuilderV3<
2878 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
2879 getSearchStrategyFieldBuilder() {
2880 if (searchStrategyBuilder_ == null) {
2881 searchStrategyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2882 com.google.ortools.sat.DecisionStrategyProto, com.google.ortools.sat.DecisionStrategyProto.Builder, com.google.ortools.sat.DecisionStrategyProtoOrBuilder>(
2883 searchStrategy_,
2884 ((bitField0_ & 0x00000020) != 0),
2885 getParentForChildren(),
2886 isClean());
2887 searchStrategy_ = null;
2888 }
2889 return searchStrategyBuilder_;
2890 }
2891
2893 private com.google.protobuf.SingleFieldBuilderV3<
2894 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder> solutionHintBuilder_;
2913 public boolean hasSolutionHint() {
2914 return ((bitField0_ & 0x00000040) != 0);
2915 }
2935 if (solutionHintBuilder_ == null) {
2936 return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2937 } else {
2938 return solutionHintBuilder_.getMessage();
2939 }
2940 }
2958 public Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
2959 if (solutionHintBuilder_ == null) {
2960 if (value == null) {
2961 throw new NullPointerException();
2962 }
2963 solutionHint_ = value;
2964 } else {
2965 solutionHintBuilder_.setMessage(value);
2966 }
2967 bitField0_ |= 0x00000040;
2968 onChanged();
2969 return this;
2970 }
2989 com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue) {
2990 if (solutionHintBuilder_ == null) {
2991 solutionHint_ = builderForValue.build();
2992 } else {
2993 solutionHintBuilder_.setMessage(builderForValue.build());
2994 }
2995 bitField0_ |= 0x00000040;
2996 onChanged();
2997 return this;
2998 }
3016 public Builder mergeSolutionHint(com.google.ortools.sat.PartialVariableAssignment value) {
3017 if (solutionHintBuilder_ == null) {
3018 if (((bitField0_ & 0x00000040) != 0) &&
3019 solutionHint_ != null &&
3020 solutionHint_ != com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance()) {
3021 getSolutionHintBuilder().mergeFrom(value);
3022 } else {
3023 solutionHint_ = value;
3024 }
3025 } else {
3026 solutionHintBuilder_.mergeFrom(value);
3027 }
3028 if (solutionHint_ != null) {
3029 bitField0_ |= 0x00000040;
3030 onChanged();
3031 }
3032 return this;
3033 }
3052 bitField0_ = (bitField0_ & ~0x00000040);
3053 solutionHint_ = null;
3054 if (solutionHintBuilder_ != null) {
3055 solutionHintBuilder_.dispose();
3056 solutionHintBuilder_ = null;
3057 }
3058 onChanged();
3059 return this;
3060 }
3079 bitField0_ |= 0x00000040;
3080 onChanged();
3081 return getSolutionHintFieldBuilder().getBuilder();
3082 }
3101 if (solutionHintBuilder_ != null) {
3102 return solutionHintBuilder_.getMessageOrBuilder();
3103 } else {
3104 return solutionHint_ == null ?
3105 com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
3106 }
3107 }
3125 private com.google.protobuf.SingleFieldBuilderV3<
3126 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>
3127 getSolutionHintFieldBuilder() {
3128 if (solutionHintBuilder_ == null) {
3129 solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3130 com.google.ortools.sat.PartialVariableAssignment, com.google.ortools.sat.PartialVariableAssignment.Builder, com.google.ortools.sat.PartialVariableAssignmentOrBuilder>(
3132 getParentForChildren(),
3133 isClean());
3134 solutionHint_ = null;
3135 }
3136 return solutionHintBuilder_;
3137 }
3138
3139 private com.google.protobuf.Internal.IntList assumptions_ = emptyIntList();
3140 private void ensureAssumptionsIsMutable() {
3141 if (!assumptions_.isModifiable()) {
3142 assumptions_ = makeMutableCopy(assumptions_);
3143 }
3144 bitField0_ |= 0x00000080;
3145 }
3166 public java.util.List<java.lang.Integer>
3168 assumptions_.makeImmutable();
3169 return assumptions_;
3170 }
3191 public int getAssumptionsCount() {
3192 return assumptions_.size();
3193 }
3215 public int getAssumptions(int index) {
3216 return assumptions_.getInt(index);
3217 }
3241 int index, int value) {
3242
3243 ensureAssumptionsIsMutable();
3244 assumptions_.setInt(index, value);
3245 bitField0_ |= 0x00000080;
3246 onChanged();
3247 return this;
3248 }
3270 public Builder addAssumptions(int value) {
3271
3272 ensureAssumptionsIsMutable();
3273 assumptions_.addInt(value);
3274 bitField0_ |= 0x00000080;
3275 onChanged();
3276 return this;
3277 }
3300 java.lang.Iterable<? extends java.lang.Integer> values) {
3301 ensureAssumptionsIsMutable();
3302 com.google.protobuf.AbstractMessageLite.Builder.addAll(
3303 values, assumptions_);
3304 bitField0_ |= 0x00000080;
3305 onChanged();
3306 return this;
3307 }
3329 assumptions_ = emptyIntList();
3330 bitField0_ = (bitField0_ & ~0x00000080);
3331 onChanged();
3332 return this;
3333 }
3334
3335 private com.google.ortools.sat.SymmetryProto symmetry_;
3336 private com.google.protobuf.SingleFieldBuilderV3<
3337 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder> symmetryBuilder_;
3350 public boolean hasSymmetry() {
3351 return ((bitField0_ & 0x00000100) != 0);
3352 }
3366 if (symmetryBuilder_ == null) {
3367 return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3368 } else {
3369 return symmetryBuilder_.getMessage();
3370 }
3371 }
3383 public Builder setSymmetry(com.google.ortools.sat.SymmetryProto value) {
3384 if (symmetryBuilder_ == null) {
3385 if (value == null) {
3386 throw new NullPointerException();
3387 }
3388 symmetry_ = value;
3389 } else {
3390 symmetryBuilder_.setMessage(value);
3391 }
3392 bitField0_ |= 0x00000100;
3393 onChanged();
3394 return this;
3395 }
3408 com.google.ortools.sat.SymmetryProto.Builder builderForValue) {
3409 if (symmetryBuilder_ == null) {
3410 symmetry_ = builderForValue.build();
3411 } else {
3412 symmetryBuilder_.setMessage(builderForValue.build());
3413 }
3414 bitField0_ |= 0x00000100;
3415 onChanged();
3416 return this;
3417 }
3429 public Builder mergeSymmetry(com.google.ortools.sat.SymmetryProto value) {
3430 if (symmetryBuilder_ == null) {
3431 if (((bitField0_ & 0x00000100) != 0) &&
3432 symmetry_ != null &&
3433 symmetry_ != com.google.ortools.sat.SymmetryProto.getDefaultInstance()) {
3434 getSymmetryBuilder().mergeFrom(value);
3435 } else {
3436 symmetry_ = value;
3437 }
3438 } else {
3439 symmetryBuilder_.mergeFrom(value);
3440 }
3441 if (symmetry_ != null) {
3442 bitField0_ |= 0x00000100;
3443 onChanged();
3444 }
3445 return this;
3446 }
3459 bitField0_ = (bitField0_ & ~0x00000100);
3460 symmetry_ = null;
3461 if (symmetryBuilder_ != null) {
3462 symmetryBuilder_.dispose();
3463 symmetryBuilder_ = null;
3464 }
3465 onChanged();
3466 return this;
3467 }
3480 bitField0_ |= 0x00000100;
3481 onChanged();
3482 return getSymmetryFieldBuilder().getBuilder();
3483 }
3496 if (symmetryBuilder_ != null) {
3497 return symmetryBuilder_.getMessageOrBuilder();
3498 } else {
3499 return symmetry_ == null ?
3500 com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3501 }
3502 }
3514 private com.google.protobuf.SingleFieldBuilderV3<
3515 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>
3516 getSymmetryFieldBuilder() {
3517 if (symmetryBuilder_ == null) {
3518 symmetryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3519 com.google.ortools.sat.SymmetryProto, com.google.ortools.sat.SymmetryProto.Builder, com.google.ortools.sat.SymmetryProtoOrBuilder>(
3520 getSymmetry(),
3521 getParentForChildren(),
3522 isClean());
3523 symmetry_ = null;
3524 }
3525 return symmetryBuilder_;
3526 }
3527 @java.lang.Override
3529 final com.google.protobuf.UnknownFieldSet unknownFields) {
3530 return super.setUnknownFields(unknownFields);
3531 }
3532
3533 @java.lang.Override
3535 final com.google.protobuf.UnknownFieldSet unknownFields) {
3536 return super.mergeUnknownFields(unknownFields);
3537 }
3538
3539
3540 // @@protoc_insertion_point(builder_scope:operations_research.sat.CpModelProto)
3541 }
3542
3543 // @@protoc_insertion_point(class_scope:operations_research.sat.CpModelProto)
3544 private static final com.google.ortools.sat.CpModelProto DEFAULT_INSTANCE;
3545 static {
3546 DEFAULT_INSTANCE = new com.google.ortools.sat.CpModelProto();
3547 }
3548
3550 return DEFAULT_INSTANCE;
3551 }
3552
3553 private static final com.google.protobuf.Parser<CpModelProto>
3554 PARSER = new com.google.protobuf.AbstractParser<CpModelProto>() {
3555 @java.lang.Override
3556 public CpModelProto parsePartialFrom(
3557 com.google.protobuf.CodedInputStream input,
3558 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3559 throws com.google.protobuf.InvalidProtocolBufferException {
3560 Builder builder = newBuilder();
3561 try {
3562 builder.mergeFrom(input, extensionRegistry);
3563 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3564 throw e.setUnfinishedMessage(builder.buildPartial());
3565 } catch (com.google.protobuf.UninitializedMessageException e) {
3566 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3567 } catch (java.io.IOException e) {
3568 throw new com.google.protobuf.InvalidProtocolBufferException(e)
3569 .setUnfinishedMessage(builder.buildPartial());
3570 }
3571 return builder.buildPartial();
3572 }
3573 };
3574
3575 public static com.google.protobuf.Parser<CpModelProto> parser() {
3576 return PARSER;
3577 }
3578
3579 @java.lang.Override
3580 public com.google.protobuf.Parser<CpModelProto> getParserForType() {
3581 return PARSER;
3582 }
3583
3584 @java.lang.Override
3586 return DEFAULT_INSTANCE;
3587 }
3588
3589}
3590
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)
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
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()
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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 setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value)
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder setSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto value)
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 setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object 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 clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
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()
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
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()
java.lang.Object newInstance(UnusedPrivateParameter unused)
com.google.protobuf.GeneratedMessageV3.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()
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
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()
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)
boolean equals(final java.lang.Object obj)
boolean equals(final java.lang.Object obj)
boolean equals(final java.lang.Object obj)