Java Reference

Java Reference

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 package com.google.ortools.sat;
5 
13 public final class CpModelProto extends
14  com.google.protobuf.GeneratedMessageV3 implements
15  // @@protoc_insertion_point(message_implements:operations_research.sat.CpModelProto)
17 private static final long serialVersionUID = 0L;
18  // Use CpModelProto.newBuilder() to construct.
19  private CpModelProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20  super(builder);
21  }
22  private CpModelProto() {
23  name_ = "";
24  variables_ = java.util.Collections.emptyList();
25  constraints_ = java.util.Collections.emptyList();
26  searchStrategy_ = java.util.Collections.emptyList();
27  assumptions_ = emptyIntList();
28  }
29 
30  @java.lang.Override
31  @SuppressWarnings({"unused"})
32  protected java.lang.Object newInstance(
33  UnusedPrivateParameter unused) {
34  return new CpModelProto();
35  }
36 
37  @java.lang.Override
38  public final com.google.protobuf.UnknownFieldSet
40  return this.unknownFields;
41  }
42  private CpModelProto(
43  com.google.protobuf.CodedInputStream input,
44  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
45  throws com.google.protobuf.InvalidProtocolBufferException {
46  this();
47  if (extensionRegistry == null) {
48  throw new java.lang.NullPointerException();
49  }
50  int mutable_bitField0_ = 0;
51  com.google.protobuf.UnknownFieldSet.Builder unknownFields =
52  com.google.protobuf.UnknownFieldSet.newBuilder();
53  try {
54  boolean done = false;
55  while (!done) {
56  int tag = input.readTag();
57  switch (tag) {
58  case 0:
59  done = true;
60  break;
61  case 10: {
62  java.lang.String s = input.readStringRequireUtf8();
63 
64  name_ = s;
65  break;
66  }
67  case 18: {
68  if (!((mutable_bitField0_ & 0x00000001) != 0)) {
69  variables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>();
70  mutable_bitField0_ |= 0x00000001;
71  }
72  variables_.add(
73  input.readMessage(com.google.ortools.sat.IntegerVariableProto.parser(), extensionRegistry));
74  break;
75  }
76  case 26: {
77  if (!((mutable_bitField0_ & 0x00000002) != 0)) {
78  constraints_ = new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>();
79  mutable_bitField0_ |= 0x00000002;
80  }
81  constraints_.add(
82  input.readMessage(com.google.ortools.sat.ConstraintProto.parser(), extensionRegistry));
83  break;
84  }
85  case 34: {
86  com.google.ortools.sat.CpObjectiveProto.Builder subBuilder = null;
87  if (objective_ != null) {
88  subBuilder = objective_.toBuilder();
89  }
90  objective_ = input.readMessage(com.google.ortools.sat.CpObjectiveProto.parser(), extensionRegistry);
91  if (subBuilder != null) {
92  subBuilder.mergeFrom(objective_);
93  objective_ = subBuilder.buildPartial();
94  }
95 
96  break;
97  }
98  case 42: {
99  if (!((mutable_bitField0_ & 0x00000004) != 0)) {
100  searchStrategy_ = new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>();
101  mutable_bitField0_ |= 0x00000004;
102  }
103  searchStrategy_.add(
104  input.readMessage(com.google.ortools.sat.DecisionStrategyProto.parser(), extensionRegistry));
105  break;
106  }
107  case 50: {
109  if (solutionHint_ != null) {
110  subBuilder = solutionHint_.toBuilder();
111  }
112  solutionHint_ = input.readMessage(com.google.ortools.sat.PartialVariableAssignment.parser(), extensionRegistry);
113  if (subBuilder != null) {
114  subBuilder.mergeFrom(solutionHint_);
115  solutionHint_ = subBuilder.buildPartial();
116  }
117 
118  break;
119  }
120  case 56: {
121  if (!((mutable_bitField0_ & 0x00000008) != 0)) {
122  assumptions_ = newIntList();
123  mutable_bitField0_ |= 0x00000008;
124  }
125  assumptions_.addInt(input.readInt32());
126  break;
127  }
128  case 58: {
129  int length = input.readRawVarint32();
130  int limit = input.pushLimit(length);
131  if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
132  assumptions_ = newIntList();
133  mutable_bitField0_ |= 0x00000008;
134  }
135  while (input.getBytesUntilLimit() > 0) {
136  assumptions_.addInt(input.readInt32());
137  }
138  input.popLimit(limit);
139  break;
140  }
141  case 66: {
142  com.google.ortools.sat.SymmetryProto.Builder subBuilder = null;
143  if (symmetry_ != null) {
144  subBuilder = symmetry_.toBuilder();
145  }
146  symmetry_ = input.readMessage(com.google.ortools.sat.SymmetryProto.parser(), extensionRegistry);
147  if (subBuilder != null) {
148  subBuilder.mergeFrom(symmetry_);
149  symmetry_ = subBuilder.buildPartial();
150  }
151 
152  break;
153  }
154  case 74: {
155  com.google.ortools.sat.FloatObjectiveProto.Builder subBuilder = null;
156  if (floatingPointObjective_ != null) {
157  subBuilder = floatingPointObjective_.toBuilder();
158  }
159  floatingPointObjective_ = input.readMessage(com.google.ortools.sat.FloatObjectiveProto.parser(), extensionRegistry);
160  if (subBuilder != null) {
161  subBuilder.mergeFrom(floatingPointObjective_);
162  floatingPointObjective_ = subBuilder.buildPartial();
163  }
164 
165  break;
166  }
167  default: {
168  if (!parseUnknownField(
169  input, unknownFields, extensionRegistry, tag)) {
170  done = true;
171  }
172  break;
173  }
174  }
175  }
176  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
177  throw e.setUnfinishedMessage(this);
178  } catch (java.io.IOException e) {
179  throw new com.google.protobuf.InvalidProtocolBufferException(
180  e).setUnfinishedMessage(this);
181  } finally {
182  if (((mutable_bitField0_ & 0x00000001) != 0)) {
183  variables_ = java.util.Collections.unmodifiableList(variables_);
184  }
185  if (((mutable_bitField0_ & 0x00000002) != 0)) {
186  constraints_ = java.util.Collections.unmodifiableList(constraints_);
187  }
188  if (((mutable_bitField0_ & 0x00000004) != 0)) {
189  searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
190  }
191  if (((mutable_bitField0_ & 0x00000008) != 0)) {
192  assumptions_.makeImmutable(); // C
193  }
194  this.unknownFields = unknownFields.build();
195  makeExtensionsImmutable();
196  }
197  }
198  public static final com.google.protobuf.Descriptors.Descriptor
200  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
201  }
202 
203  @java.lang.Override
204  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
206  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
207  .ensureFieldAccessorsInitialized(
209  }
210 
211  public static final int NAME_FIELD_NUMBER = 1;
212  private volatile java.lang.Object name_;
221  @java.lang.Override
222  public java.lang.String getName() {
223  java.lang.Object ref = name_;
224  if (ref instanceof java.lang.String) {
225  return (java.lang.String) ref;
226  } else {
227  com.google.protobuf.ByteString bs =
228  (com.google.protobuf.ByteString) ref;
229  java.lang.String s = bs.toStringUtf8();
230  name_ = s;
231  return s;
232  }
233  }
242  @java.lang.Override
243  public com.google.protobuf.ByteString
245  java.lang.Object ref = name_;
246  if (ref instanceof java.lang.String) {
247  com.google.protobuf.ByteString b =
248  com.google.protobuf.ByteString.copyFromUtf8(
249  (java.lang.String) ref);
250  name_ = b;
251  return b;
252  } else {
253  return (com.google.protobuf.ByteString) ref;
254  }
255  }
256 
257  public static final int VARIABLES_FIELD_NUMBER = 2;
258  private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_;
266  @java.lang.Override
268  return variables_;
269  }
277  @java.lang.Override
278  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
280  return variables_;
281  }
289  @java.lang.Override
290  public int getVariablesCount() {
291  return variables_.size();
292  }
300  @java.lang.Override
302  return variables_.get(index);
303  }
311  @java.lang.Override
313  int index) {
314  return variables_.get(index);
315  }
316 
317  public static final int CONSTRAINTS_FIELD_NUMBER = 3;
318  private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_;
322  @java.lang.Override
324  return constraints_;
325  }
329  @java.lang.Override
330  public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
332  return constraints_;
333  }
337  @java.lang.Override
338  public int getConstraintsCount() {
339  return constraints_.size();
340  }
344  @java.lang.Override
346  return constraints_.get(index);
347  }
351  @java.lang.Override
353  int index) {
354  return constraints_.get(index);
355  }
356 
357  public static final int OBJECTIVE_FIELD_NUMBER = 4;
358  private com.google.ortools.sat.CpObjectiveProto objective_;
367  @java.lang.Override
368  public boolean hasObjective() {
369  return objective_ != null;
370  }
379  @java.lang.Override
381  return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
382  }
390  @java.lang.Override
392  return getObjective();
393  }
394 
395  public static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER = 9;
396  private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
415  @java.lang.Override
416  public boolean hasFloatingPointObjective() {
417  return floatingPointObjective_ != null;
418  }
437  @java.lang.Override
439  return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
440  }
458  @java.lang.Override
460  return getFloatingPointObjective();
461  }
462 
463  public static final int SEARCH_STRATEGY_FIELD_NUMBER = 5;
464  private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_;
479  @java.lang.Override
481  return searchStrategy_;
482  }
497  @java.lang.Override
498  public java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder>
500  return searchStrategy_;
501  }
516  @java.lang.Override
517  public int getSearchStrategyCount() {
518  return searchStrategy_.size();
519  }
534  @java.lang.Override
536  return searchStrategy_.get(index);
537  }
552  @java.lang.Override
554  int index) {
555  return searchStrategy_.get(index);
556  }
557 
558  public static final int SOLUTION_HINT_FIELD_NUMBER = 6;
559  private com.google.ortools.sat.PartialVariableAssignment solutionHint_;
576  @java.lang.Override
577  public boolean hasSolutionHint() {
578  return solutionHint_ != null;
579  }
596  @java.lang.Override
598  return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
599  }
615  @java.lang.Override
617  return getSolutionHint();
618  }
619 
620  public static final int ASSUMPTIONS_FIELD_NUMBER = 7;
621  private com.google.protobuf.Internal.IntList assumptions_;
640  @java.lang.Override
641  public java.util.List<java.lang.Integer>
643  return assumptions_;
644  }
663  public int getAssumptionsCount() {
664  return assumptions_.size();
665  }
685  public int getAssumptions(int index) {
686  return assumptions_.getInt(index);
687  }
688  private int assumptionsMemoizedSerializedSize = -1;
689 
690  public static final int SYMMETRY_FIELD_NUMBER = 8;
691  private com.google.ortools.sat.SymmetryProto symmetry_;
703  @java.lang.Override
704  public boolean hasSymmetry() {
705  return symmetry_ != null;
706  }
718  @java.lang.Override
720  return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
721  }
732  @java.lang.Override
734  return getSymmetry();
735  }
736 
737  private byte memoizedIsInitialized = -1;
738  @java.lang.Override
739  public final boolean isInitialized() {
740  byte isInitialized = memoizedIsInitialized;
741  if (isInitialized == 1) return true;
742  if (isInitialized == 0) return false;
743 
744  memoizedIsInitialized = 1;
745  return true;
746  }
747 
748  @java.lang.Override
749  public void writeTo(com.google.protobuf.CodedOutputStream output)
750  throws java.io.IOException {
752  if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
753  com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
754  }
755  for (int i = 0; i < variables_.size(); i++) {
756  output.writeMessage(2, variables_.get(i));
757  }
758  for (int i = 0; i < constraints_.size(); i++) {
759  output.writeMessage(3, constraints_.get(i));
760  }
761  if (objective_ != null) {
762  output.writeMessage(4, getObjective());
763  }
764  for (int i = 0; i < searchStrategy_.size(); i++) {
765  output.writeMessage(5, searchStrategy_.get(i));
766  }
767  if (solutionHint_ != null) {
768  output.writeMessage(6, getSolutionHint());
769  }
770  if (getAssumptionsList().size() > 0) {
771  output.writeUInt32NoTag(58);
772  output.writeUInt32NoTag(assumptionsMemoizedSerializedSize);
773  }
774  for (int i = 0; i < assumptions_.size(); i++) {
775  output.writeInt32NoTag(assumptions_.getInt(i));
776  }
777  if (symmetry_ != null) {
778  output.writeMessage(8, getSymmetry());
779  }
780  if (floatingPointObjective_ != null) {
781  output.writeMessage(9, getFloatingPointObjective());
782  }
783  unknownFields.writeTo(output);
784  }
785 
786  @java.lang.Override
787  public int getSerializedSize() {
788  int size = memoizedSize;
789  if (size != -1) return size;
790 
791  size = 0;
792  if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
793  size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
794  }
795  for (int i = 0; i < variables_.size(); i++) {
796  size += com.google.protobuf.CodedOutputStream
797  .computeMessageSize(2, variables_.get(i));
798  }
799  for (int i = 0; i < constraints_.size(); i++) {
800  size += com.google.protobuf.CodedOutputStream
801  .computeMessageSize(3, constraints_.get(i));
802  }
803  if (objective_ != null) {
804  size += com.google.protobuf.CodedOutputStream
805  .computeMessageSize(4, getObjective());
806  }
807  for (int i = 0; i < searchStrategy_.size(); i++) {
808  size += com.google.protobuf.CodedOutputStream
809  .computeMessageSize(5, searchStrategy_.get(i));
810  }
811  if (solutionHint_ != null) {
812  size += com.google.protobuf.CodedOutputStream
813  .computeMessageSize(6, getSolutionHint());
814  }
815  {
816  int dataSize = 0;
817  for (int i = 0; i < assumptions_.size(); i++) {
818  dataSize += com.google.protobuf.CodedOutputStream
819  .computeInt32SizeNoTag(assumptions_.getInt(i));
820  }
821  size += dataSize;
822  if (!getAssumptionsList().isEmpty()) {
823  size += 1;
824  size += com.google.protobuf.CodedOutputStream
825  .computeInt32SizeNoTag(dataSize);
826  }
827  assumptionsMemoizedSerializedSize = dataSize;
828  }
829  if (symmetry_ != null) {
830  size += com.google.protobuf.CodedOutputStream
831  .computeMessageSize(8, getSymmetry());
832  }
833  if (floatingPointObjective_ != null) {
834  size += com.google.protobuf.CodedOutputStream
835  .computeMessageSize(9, getFloatingPointObjective());
836  }
837  size += unknownFields.getSerializedSize();
838  memoizedSize = size;
839  return size;
840  }
841 
842  @java.lang.Override
843  public boolean equals(final java.lang.Object obj) {
844  if (obj == this) {
845  return true;
846  }
847  if (!(obj instanceof com.google.ortools.sat.CpModelProto)) {
848  return super.equals(obj);
849  }
851 
852  if (!getName()
853  .equals(other.getName())) return false;
854  if (!getVariablesList()
855  .equals(other.getVariablesList())) return false;
856  if (!getConstraintsList()
857  .equals(other.getConstraintsList())) return false;
858  if (hasObjective() != other.hasObjective()) return false;
859  if (hasObjective()) {
860  if (!getObjective()
861  .equals(other.getObjective())) return false;
862  }
863  if (hasFloatingPointObjective() != other.hasFloatingPointObjective()) return false;
866  .equals(other.getFloatingPointObjective())) return false;
867  }
868  if (!getSearchStrategyList()
869  .equals(other.getSearchStrategyList())) return false;
870  if (hasSolutionHint() != other.hasSolutionHint()) return false;
871  if (hasSolutionHint()) {
872  if (!getSolutionHint()
873  .equals(other.getSolutionHint())) return false;
874  }
875  if (!getAssumptionsList()
876  .equals(other.getAssumptionsList())) return false;
877  if (hasSymmetry() != other.hasSymmetry()) return false;
878  if (hasSymmetry()) {
879  if (!getSymmetry()
880  .equals(other.getSymmetry())) return false;
881  }
882  if (!unknownFields.equals(other.unknownFields)) return false;
883  return true;
884  }
885 
886  @java.lang.Override
887  public int hashCode() {
888  if (memoizedHashCode != 0) {
889  return memoizedHashCode;
890  }
891  int hash = 41;
892  hash = (19 * hash) + getDescriptor().hashCode();
893  hash = (37 * hash) + NAME_FIELD_NUMBER;
894  hash = (53 * hash) + getName().hashCode();
895  if (getVariablesCount() > 0) {
896  hash = (37 * hash) + VARIABLES_FIELD_NUMBER;
897  hash = (53 * hash) + getVariablesList().hashCode();
898  }
899  if (getConstraintsCount() > 0) {
900  hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER;
901  hash = (53 * hash) + getConstraintsList().hashCode();
902  }
903  if (hasObjective()) {
904  hash = (37 * hash) + OBJECTIVE_FIELD_NUMBER;
905  hash = (53 * hash) + getObjective().hashCode();
906  }
908  hash = (37 * hash) + FLOATING_POINT_OBJECTIVE_FIELD_NUMBER;
909  hash = (53 * hash) + getFloatingPointObjective().hashCode();
910  }
911  if (getSearchStrategyCount() > 0) {
912  hash = (37 * hash) + SEARCH_STRATEGY_FIELD_NUMBER;
913  hash = (53 * hash) + getSearchStrategyList().hashCode();
914  }
915  if (hasSolutionHint()) {
916  hash = (37 * hash) + SOLUTION_HINT_FIELD_NUMBER;
917  hash = (53 * hash) + getSolutionHint().hashCode();
918  }
919  if (getAssumptionsCount() > 0) {
920  hash = (37 * hash) + ASSUMPTIONS_FIELD_NUMBER;
921  hash = (53 * hash) + getAssumptionsList().hashCode();
922  }
923  if (hasSymmetry()) {
924  hash = (37 * hash) + SYMMETRY_FIELD_NUMBER;
925  hash = (53 * hash) + getSymmetry().hashCode();
926  }
927  hash = (29 * hash) + unknownFields.hashCode();
928  memoizedHashCode = hash;
929  return hash;
930  }
931 
933  java.nio.ByteBuffer data)
934  throws com.google.protobuf.InvalidProtocolBufferException {
935  return PARSER.parseFrom(data);
936  }
938  java.nio.ByteBuffer data,
939  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
940  throws com.google.protobuf.InvalidProtocolBufferException {
941  return PARSER.parseFrom(data, extensionRegistry);
942  }
944  com.google.protobuf.ByteString data)
945  throws com.google.protobuf.InvalidProtocolBufferException {
946  return PARSER.parseFrom(data);
947  }
949  com.google.protobuf.ByteString data,
950  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
951  throws com.google.protobuf.InvalidProtocolBufferException {
952  return PARSER.parseFrom(data, extensionRegistry);
953  }
954  public static com.google.ortools.sat.CpModelProto parseFrom(byte[] data)
955  throws com.google.protobuf.InvalidProtocolBufferException {
956  return PARSER.parseFrom(data);
957  }
959  byte[] data,
960  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
961  throws com.google.protobuf.InvalidProtocolBufferException {
962  return PARSER.parseFrom(data, extensionRegistry);
963  }
964  public static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)
965  throws java.io.IOException {
966  return com.google.protobuf.GeneratedMessageV3
967  .parseWithIOException(PARSER, input);
968  }
970  java.io.InputStream input,
971  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
972  throws java.io.IOException {
973  return com.google.protobuf.GeneratedMessageV3
974  .parseWithIOException(PARSER, input, extensionRegistry);
975  }
976  public static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
977  throws java.io.IOException {
978  return com.google.protobuf.GeneratedMessageV3
979  .parseDelimitedWithIOException(PARSER, input);
980  }
982  java.io.InputStream input,
983  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
984  throws java.io.IOException {
985  return com.google.protobuf.GeneratedMessageV3
986  .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
987  }
989  com.google.protobuf.CodedInputStream input)
990  throws java.io.IOException {
991  return com.google.protobuf.GeneratedMessageV3
992  .parseWithIOException(PARSER, input);
993  }
995  com.google.protobuf.CodedInputStream input,
996  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
997  throws java.io.IOException {
998  return com.google.protobuf.GeneratedMessageV3
999  .parseWithIOException(PARSER, input, extensionRegistry);
1000  }
1001 
1002  @java.lang.Override
1003  public Builder newBuilderForType() { return newBuilder(); }
1004  public static Builder newBuilder() {
1005  return DEFAULT_INSTANCE.toBuilder();
1006  }
1007  public static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype) {
1008  return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1009  }
1010  @java.lang.Override
1011  public Builder toBuilder() {
1012  return this == DEFAULT_INSTANCE
1013  ? new Builder() : new Builder().mergeFrom(this);
1014  }
1015 
1016  @java.lang.Override
1018  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1019  Builder builder = new Builder(parent);
1020  return builder;
1021  }
1029  public static final class Builder extends
1030  com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
1031  // @@protoc_insertion_point(builder_implements:operations_research.sat.CpModelProto)
1032  com.google.ortools.sat.CpModelProtoOrBuilder {
1033  public static final com.google.protobuf.Descriptors.Descriptor
1035  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
1036  }
1037 
1038  @java.lang.Override
1039  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
1041  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_fieldAccessorTable
1042  .ensureFieldAccessorsInitialized(
1044  }
1045 
1046  // Construct using com.google.ortools.sat.CpModelProto.newBuilder()
1047  private Builder() {
1048  maybeForceBuilderInitialization();
1049  }
1050 
1051  private Builder(
1052  com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1053  super(parent);
1054  maybeForceBuilderInitialization();
1055  }
1056  private void maybeForceBuilderInitialization() {
1057  if (com.google.protobuf.GeneratedMessageV3
1058  .alwaysUseFieldBuilders) {
1059  getVariablesFieldBuilder();
1060  getConstraintsFieldBuilder();
1061  getSearchStrategyFieldBuilder();
1062  }
1063  }
1064  @java.lang.Override
1065  public Builder clear() {
1066  super.clear();
1067  name_ = "";
1068 
1069  if (variablesBuilder_ == null) {
1070  variables_ = java.util.Collections.emptyList();
1071  bitField0_ = (bitField0_ & ~0x00000001);
1072  } else {
1073  variablesBuilder_.clear();
1074  }
1075  if (constraintsBuilder_ == null) {
1076  constraints_ = java.util.Collections.emptyList();
1077  bitField0_ = (bitField0_ & ~0x00000002);
1078  } else {
1079  constraintsBuilder_.clear();
1080  }
1081  if (objectiveBuilder_ == null) {
1082  objective_ = null;
1083  } else {
1084  objective_ = null;
1085  objectiveBuilder_ = null;
1086  }
1087  if (floatingPointObjectiveBuilder_ == null) {
1088  floatingPointObjective_ = null;
1089  } else {
1090  floatingPointObjective_ = null;
1091  floatingPointObjectiveBuilder_ = null;
1092  }
1093  if (searchStrategyBuilder_ == null) {
1094  searchStrategy_ = java.util.Collections.emptyList();
1095  bitField0_ = (bitField0_ & ~0x00000004);
1096  } else {
1097  searchStrategyBuilder_.clear();
1098  }
1099  if (solutionHintBuilder_ == null) {
1100  solutionHint_ = null;
1101  } else {
1102  solutionHint_ = null;
1103  solutionHintBuilder_ = null;
1104  }
1105  assumptions_ = emptyIntList();
1106  bitField0_ = (bitField0_ & ~0x00000008);
1107  if (symmetryBuilder_ == null) {
1108  symmetry_ = null;
1109  } else {
1110  symmetry_ = null;
1111  symmetryBuilder_ = null;
1112  }
1113  return this;
1114  }
1115 
1116  @java.lang.Override
1117  public com.google.protobuf.Descriptors.Descriptor
1119  return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_CpModelProto_descriptor;
1120  }
1121 
1122  @java.lang.Override
1125  }
1126 
1127  @java.lang.Override
1130  if (!result.isInitialized()) {
1131  throw newUninitializedMessageException(result);
1132  }
1133  return result;
1134  }
1135 
1136  @java.lang.Override
1139  int from_bitField0_ = bitField0_;
1140  result.name_ = name_;
1141  if (variablesBuilder_ == null) {
1142  if (((bitField0_ & 0x00000001) != 0)) {
1143  variables_ = java.util.Collections.unmodifiableList(variables_);
1144  bitField0_ = (bitField0_ & ~0x00000001);
1145  }
1146  result.variables_ = variables_;
1147  } else {
1148  result.variables_ = variablesBuilder_.build();
1149  }
1150  if (constraintsBuilder_ == null) {
1151  if (((bitField0_ & 0x00000002) != 0)) {
1152  constraints_ = java.util.Collections.unmodifiableList(constraints_);
1153  bitField0_ = (bitField0_ & ~0x00000002);
1154  }
1155  result.constraints_ = constraints_;
1156  } else {
1157  result.constraints_ = constraintsBuilder_.build();
1158  }
1159  if (objectiveBuilder_ == null) {
1160  result.objective_ = objective_;
1161  } else {
1162  result.objective_ = objectiveBuilder_.build();
1163  }
1164  if (floatingPointObjectiveBuilder_ == null) {
1165  result.floatingPointObjective_ = floatingPointObjective_;
1166  } else {
1167  result.floatingPointObjective_ = floatingPointObjectiveBuilder_.build();
1168  }
1169  if (searchStrategyBuilder_ == null) {
1170  if (((bitField0_ & 0x00000004) != 0)) {
1171  searchStrategy_ = java.util.Collections.unmodifiableList(searchStrategy_);
1172  bitField0_ = (bitField0_ & ~0x00000004);
1173  }
1174  result.searchStrategy_ = searchStrategy_;
1175  } else {
1176  result.searchStrategy_ = searchStrategyBuilder_.build();
1177  }
1178  if (solutionHintBuilder_ == null) {
1179  result.solutionHint_ = solutionHint_;
1180  } else {
1181  result.solutionHint_ = solutionHintBuilder_.build();
1182  }
1183  if (((bitField0_ & 0x00000008) != 0)) {
1184  assumptions_.makeImmutable();
1185  bitField0_ = (bitField0_ & ~0x00000008);
1186  }
1187  result.assumptions_ = assumptions_;
1188  if (symmetryBuilder_ == null) {
1189  result.symmetry_ = symmetry_;
1190  } else {
1191  result.symmetry_ = symmetryBuilder_.build();
1192  }
1193  onBuilt();
1194  return result;
1195  }
1196 
1197  @java.lang.Override
1198  public Builder clone() {
1199  return super.clone();
1200  }
1201  @java.lang.Override
1203  com.google.protobuf.Descriptors.FieldDescriptor field,
1204  java.lang.Object value) {
1205  return super.setField(field, value);
1206  }
1207  @java.lang.Override
1209  com.google.protobuf.Descriptors.FieldDescriptor field) {
1210  return super.clearField(field);
1211  }
1212  @java.lang.Override
1214  com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1215  return super.clearOneof(oneof);
1216  }
1217  @java.lang.Override
1219  com.google.protobuf.Descriptors.FieldDescriptor field,
1220  int index, java.lang.Object value) {
1221  return super.setRepeatedField(field, index, value);
1222  }
1223  @java.lang.Override
1225  com.google.protobuf.Descriptors.FieldDescriptor field,
1226  java.lang.Object value) {
1227  return super.addRepeatedField(field, value);
1228  }
1229  @java.lang.Override
1230  public Builder mergeFrom(com.google.protobuf.Message other) {
1231  if (other instanceof com.google.ortools.sat.CpModelProto) {
1232  return mergeFrom((com.google.ortools.sat.CpModelProto)other);
1233  } else {
1234  super.mergeFrom(other);
1235  return this;
1236  }
1237  }
1238 
1240  if (other == com.google.ortools.sat.CpModelProto.getDefaultInstance()) return this;
1241  if (!other.getName().isEmpty()) {
1242  name_ = other.name_;
1243  onChanged();
1244  }
1245  if (variablesBuilder_ == null) {
1246  if (!other.variables_.isEmpty()) {
1247  if (variables_.isEmpty()) {
1248  variables_ = other.variables_;
1249  bitField0_ = (bitField0_ & ~0x00000001);
1250  } else {
1251  ensureVariablesIsMutable();
1252  variables_.addAll(other.variables_);
1253  }
1254  onChanged();
1255  }
1256  } else {
1257  if (!other.variables_.isEmpty()) {
1258  if (variablesBuilder_.isEmpty()) {
1259  variablesBuilder_.dispose();
1260  variablesBuilder_ = null;
1261  variables_ = other.variables_;
1262  bitField0_ = (bitField0_ & ~0x00000001);
1263  variablesBuilder_ =
1264  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1265  getVariablesFieldBuilder() : null;
1266  } else {
1267  variablesBuilder_.addAllMessages(other.variables_);
1268  }
1269  }
1270  }
1271  if (constraintsBuilder_ == null) {
1272  if (!other.constraints_.isEmpty()) {
1273  if (constraints_.isEmpty()) {
1274  constraints_ = other.constraints_;
1275  bitField0_ = (bitField0_ & ~0x00000002);
1276  } else {
1277  ensureConstraintsIsMutable();
1278  constraints_.addAll(other.constraints_);
1279  }
1280  onChanged();
1281  }
1282  } else {
1283  if (!other.constraints_.isEmpty()) {
1284  if (constraintsBuilder_.isEmpty()) {
1285  constraintsBuilder_.dispose();
1286  constraintsBuilder_ = null;
1287  constraints_ = other.constraints_;
1288  bitField0_ = (bitField0_ & ~0x00000002);
1289  constraintsBuilder_ =
1290  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1291  getConstraintsFieldBuilder() : null;
1292  } else {
1293  constraintsBuilder_.addAllMessages(other.constraints_);
1294  }
1295  }
1296  }
1297  if (other.hasObjective()) {
1298  mergeObjective(other.getObjective());
1299  }
1300  if (other.hasFloatingPointObjective()) {
1301  mergeFloatingPointObjective(other.getFloatingPointObjective());
1302  }
1303  if (searchStrategyBuilder_ == null) {
1304  if (!other.searchStrategy_.isEmpty()) {
1305  if (searchStrategy_.isEmpty()) {
1306  searchStrategy_ = other.searchStrategy_;
1307  bitField0_ = (bitField0_ & ~0x00000004);
1308  } else {
1309  ensureSearchStrategyIsMutable();
1310  searchStrategy_.addAll(other.searchStrategy_);
1311  }
1312  onChanged();
1313  }
1314  } else {
1315  if (!other.searchStrategy_.isEmpty()) {
1316  if (searchStrategyBuilder_.isEmpty()) {
1317  searchStrategyBuilder_.dispose();
1318  searchStrategyBuilder_ = null;
1319  searchStrategy_ = other.searchStrategy_;
1320  bitField0_ = (bitField0_ & ~0x00000004);
1321  searchStrategyBuilder_ =
1322  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
1323  getSearchStrategyFieldBuilder() : null;
1324  } else {
1325  searchStrategyBuilder_.addAllMessages(other.searchStrategy_);
1326  }
1327  }
1328  }
1329  if (other.hasSolutionHint()) {
1330  mergeSolutionHint(other.getSolutionHint());
1331  }
1332  if (!other.assumptions_.isEmpty()) {
1333  if (assumptions_.isEmpty()) {
1334  assumptions_ = other.assumptions_;
1335  bitField0_ = (bitField0_ & ~0x00000008);
1336  } else {
1337  ensureAssumptionsIsMutable();
1338  assumptions_.addAll(other.assumptions_);
1339  }
1340  onChanged();
1341  }
1342  if (other.hasSymmetry()) {
1343  mergeSymmetry(other.getSymmetry());
1344  }
1345  this.mergeUnknownFields(other.unknownFields);
1346  onChanged();
1347  return this;
1348  }
1349 
1350  @java.lang.Override
1351  public final boolean isInitialized() {
1352  return true;
1353  }
1354 
1355  @java.lang.Override
1357  com.google.protobuf.CodedInputStream input,
1358  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1359  throws java.io.IOException {
1360  com.google.ortools.sat.CpModelProto parsedMessage = null;
1361  try {
1362  parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1363  } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1364  parsedMessage = (com.google.ortools.sat.CpModelProto) e.getUnfinishedMessage();
1365  throw e.unwrapIOException();
1366  } finally {
1367  if (parsedMessage != null) {
1368  mergeFrom(parsedMessage);
1369  }
1370  }
1371  return this;
1372  }
1373  private int bitField0_;
1374 
1375  private java.lang.Object name_ = "";
1384  public java.lang.String getName() {
1385  java.lang.Object ref = name_;
1386  if (!(ref instanceof java.lang.String)) {
1387  com.google.protobuf.ByteString bs =
1388  (com.google.protobuf.ByteString) ref;
1389  java.lang.String s = bs.toStringUtf8();
1390  name_ = s;
1391  return s;
1392  } else {
1393  return (java.lang.String) ref;
1394  }
1395  }
1404  public com.google.protobuf.ByteString
1406  java.lang.Object ref = name_;
1407  if (ref instanceof String) {
1408  com.google.protobuf.ByteString b =
1409  com.google.protobuf.ByteString.copyFromUtf8(
1410  (java.lang.String) ref);
1411  name_ = b;
1412  return b;
1413  } else {
1414  return (com.google.protobuf.ByteString) ref;
1415  }
1416  }
1427  java.lang.String value) {
1428  if (value == null) {
1429  throw new NullPointerException();
1430  }
1431 
1432  name_ = value;
1433  onChanged();
1434  return this;
1435  }
1444  public Builder clearName() {
1445 
1446  name_ = getDefaultInstance().getName();
1447  onChanged();
1448  return this;
1449  }
1460  com.google.protobuf.ByteString value) {
1461  if (value == null) {
1462  throw new NullPointerException();
1463  }
1464  checkByteStringIsUtf8(value);
1465 
1466  name_ = value;
1467  onChanged();
1468  return this;
1469  }
1470 
1471  private java.util.List<com.google.ortools.sat.IntegerVariableProto> variables_ =
1472  java.util.Collections.emptyList();
1473  private void ensureVariablesIsMutable() {
1474  if (!((bitField0_ & 0x00000001) != 0)) {
1475  variables_ = new java.util.ArrayList<com.google.ortools.sat.IntegerVariableProto>(variables_);
1476  bitField0_ |= 0x00000001;
1477  }
1478  }
1479 
1480  private com.google.protobuf.RepeatedFieldBuilderV3<
1482 
1491  if (variablesBuilder_ == null) {
1492  return java.util.Collections.unmodifiableList(variables_);
1493  } else {
1494  return variablesBuilder_.getMessageList();
1495  }
1496  }
1504  public int getVariablesCount() {
1505  if (variablesBuilder_ == null) {
1506  return variables_.size();
1507  } else {
1508  return variablesBuilder_.getCount();
1509  }
1510  }
1519  if (variablesBuilder_ == null) {
1520  return variables_.get(index);
1521  } else {
1522  return variablesBuilder_.getMessage(index);
1523  }
1524  }
1533  int index, com.google.ortools.sat.IntegerVariableProto value) {
1534  if (variablesBuilder_ == null) {
1535  if (value == null) {
1536  throw new NullPointerException();
1537  }
1538  ensureVariablesIsMutable();
1539  variables_.set(index, value);
1540  onChanged();
1541  } else {
1542  variablesBuilder_.setMessage(index, value);
1543  }
1544  return this;
1545  }
1554  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1555  if (variablesBuilder_ == null) {
1556  ensureVariablesIsMutable();
1557  variables_.set(index, builderForValue.build());
1558  onChanged();
1559  } else {
1560  variablesBuilder_.setMessage(index, builderForValue.build());
1561  }
1562  return this;
1563  }
1572  if (variablesBuilder_ == null) {
1573  if (value == null) {
1574  throw new NullPointerException();
1575  }
1576  ensureVariablesIsMutable();
1577  variables_.add(value);
1578  onChanged();
1579  } else {
1580  variablesBuilder_.addMessage(value);
1581  }
1582  return this;
1583  }
1592  int index, com.google.ortools.sat.IntegerVariableProto value) {
1593  if (variablesBuilder_ == null) {
1594  if (value == null) {
1595  throw new NullPointerException();
1596  }
1597  ensureVariablesIsMutable();
1598  variables_.add(index, value);
1599  onChanged();
1600  } else {
1601  variablesBuilder_.addMessage(index, value);
1602  }
1603  return this;
1604  }
1613  com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1614  if (variablesBuilder_ == null) {
1615  ensureVariablesIsMutable();
1616  variables_.add(builderForValue.build());
1617  onChanged();
1618  } else {
1619  variablesBuilder_.addMessage(builderForValue.build());
1620  }
1621  return this;
1622  }
1631  int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue) {
1632  if (variablesBuilder_ == null) {
1633  ensureVariablesIsMutable();
1634  variables_.add(index, builderForValue.build());
1635  onChanged();
1636  } else {
1637  variablesBuilder_.addMessage(index, builderForValue.build());
1638  }
1639  return this;
1640  }
1649  java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto> values) {
1650  if (variablesBuilder_ == null) {
1651  ensureVariablesIsMutable();
1652  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1653  values, variables_);
1654  onChanged();
1655  } else {
1656  variablesBuilder_.addAllMessages(values);
1657  }
1658  return this;
1659  }
1668  if (variablesBuilder_ == null) {
1669  variables_ = java.util.Collections.emptyList();
1670  bitField0_ = (bitField0_ & ~0x00000001);
1671  onChanged();
1672  } else {
1673  variablesBuilder_.clear();
1674  }
1675  return this;
1676  }
1684  public Builder removeVariables(int index) {
1685  if (variablesBuilder_ == null) {
1686  ensureVariablesIsMutable();
1687  variables_.remove(index);
1688  onChanged();
1689  } else {
1690  variablesBuilder_.remove(index);
1691  }
1692  return this;
1693  }
1702  int index) {
1703  return getVariablesFieldBuilder().getBuilder(index);
1704  }
1713  int index) {
1714  if (variablesBuilder_ == null) {
1715  return variables_.get(index); } else {
1716  return variablesBuilder_.getMessageOrBuilder(index);
1717  }
1718  }
1726  public java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder>
1728  if (variablesBuilder_ != null) {
1729  return variablesBuilder_.getMessageOrBuilderList();
1730  } else {
1731  return java.util.Collections.unmodifiableList(variables_);
1732  }
1733  }
1742  return getVariablesFieldBuilder().addBuilder(
1744  }
1753  int index) {
1754  return getVariablesFieldBuilder().addBuilder(
1756  }
1764  public java.util.List<com.google.ortools.sat.IntegerVariableProto.Builder>
1766  return getVariablesFieldBuilder().getBuilderList();
1767  }
1768  private com.google.protobuf.RepeatedFieldBuilderV3<
1770  getVariablesFieldBuilder() {
1771  if (variablesBuilder_ == null) {
1772  variablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
1774  variables_,
1775  ((bitField0_ & 0x00000001) != 0),
1776  getParentForChildren(),
1777  isClean());
1778  variables_ = null;
1779  }
1780  return variablesBuilder_;
1781  }
1782 
1783  private java.util.List<com.google.ortools.sat.ConstraintProto> constraints_ =
1784  java.util.Collections.emptyList();
1785  private void ensureConstraintsIsMutable() {
1786  if (!((bitField0_ & 0x00000002) != 0)) {
1787  constraints_ = new java.util.ArrayList<com.google.ortools.sat.ConstraintProto>(constraints_);
1788  bitField0_ |= 0x00000002;
1789  }
1790  }
1791 
1792  private com.google.protobuf.RepeatedFieldBuilderV3<
1794 
1799  if (constraintsBuilder_ == null) {
1800  return java.util.Collections.unmodifiableList(constraints_);
1801  } else {
1802  return constraintsBuilder_.getMessageList();
1803  }
1804  }
1808  public int getConstraintsCount() {
1809  if (constraintsBuilder_ == null) {
1810  return constraints_.size();
1811  } else {
1812  return constraintsBuilder_.getCount();
1813  }
1814  }
1819  if (constraintsBuilder_ == null) {
1820  return constraints_.get(index);
1821  } else {
1822  return constraintsBuilder_.getMessage(index);
1823  }
1824  }
1829  int index, com.google.ortools.sat.ConstraintProto value) {
1830  if (constraintsBuilder_ == null) {
1831  if (value == null) {
1832  throw new NullPointerException();
1833  }
1834  ensureConstraintsIsMutable();
1835  constraints_.set(index, value);
1836  onChanged();
1837  } else {
1838  constraintsBuilder_.setMessage(index, value);
1839  }
1840  return this;
1841  }
1846  int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1847  if (constraintsBuilder_ == null) {
1848  ensureConstraintsIsMutable();
1849  constraints_.set(index, builderForValue.build());
1850  onChanged();
1851  } else {
1852  constraintsBuilder_.setMessage(index, builderForValue.build());
1853  }
1854  return this;
1855  }
1860  if (constraintsBuilder_ == null) {
1861  if (value == null) {
1862  throw new NullPointerException();
1863  }
1864  ensureConstraintsIsMutable();
1865  constraints_.add(value);
1866  onChanged();
1867  } else {
1868  constraintsBuilder_.addMessage(value);
1869  }
1870  return this;
1871  }
1876  int index, com.google.ortools.sat.ConstraintProto value) {
1877  if (constraintsBuilder_ == null) {
1878  if (value == null) {
1879  throw new NullPointerException();
1880  }
1881  ensureConstraintsIsMutable();
1882  constraints_.add(index, value);
1883  onChanged();
1884  } else {
1885  constraintsBuilder_.addMessage(index, value);
1886  }
1887  return this;
1888  }
1893  com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1894  if (constraintsBuilder_ == null) {
1895  ensureConstraintsIsMutable();
1896  constraints_.add(builderForValue.build());
1897  onChanged();
1898  } else {
1899  constraintsBuilder_.addMessage(builderForValue.build());
1900  }
1901  return this;
1902  }
1907  int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue) {
1908  if (constraintsBuilder_ == null) {
1909  ensureConstraintsIsMutable();
1910  constraints_.add(index, builderForValue.build());
1911  onChanged();
1912  } else {
1913  constraintsBuilder_.addMessage(index, builderForValue.build());
1914  }
1915  return this;
1916  }
1921  java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto> values) {
1922  if (constraintsBuilder_ == null) {
1923  ensureConstraintsIsMutable();
1924  com.google.protobuf.AbstractMessageLite.Builder.addAll(
1925  values, constraints_);
1926  onChanged();
1927  } else {
1928  constraintsBuilder_.addAllMessages(values);
1929  }
1930  return this;
1931  }
1936  if (constraintsBuilder_ == null) {
1937  constraints_ = java.util.Collections.emptyList();
1938  bitField0_ = (bitField0_ & ~0x00000002);
1939  onChanged();
1940  } else {
1941  constraintsBuilder_.clear();
1942  }
1943  return this;
1944  }
1948  public Builder removeConstraints(int index) {
1949  if (constraintsBuilder_ == null) {
1950  ensureConstraintsIsMutable();
1951  constraints_.remove(index);
1952  onChanged();
1953  } else {
1954  constraintsBuilder_.remove(index);
1955  }
1956  return this;
1957  }
1962  int index) {
1963  return getConstraintsFieldBuilder().getBuilder(index);
1964  }
1969  int index) {
1970  if (constraintsBuilder_ == null) {
1971  return constraints_.get(index); } else {
1972  return constraintsBuilder_.getMessageOrBuilder(index);
1973  }
1974  }
1978  public java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder>
1980  if (constraintsBuilder_ != null) {
1981  return constraintsBuilder_.getMessageOrBuilderList();
1982  } else {
1983  return java.util.Collections.unmodifiableList(constraints_);
1984  }
1985  }
1990  return getConstraintsFieldBuilder().addBuilder(
1992  }
1997  int index) {
1998  return getConstraintsFieldBuilder().addBuilder(
2000  }
2004  public java.util.List<com.google.ortools.sat.ConstraintProto.Builder>
2006  return getConstraintsFieldBuilder().getBuilderList();
2007  }
2008  private com.google.protobuf.RepeatedFieldBuilderV3<
2010  getConstraintsFieldBuilder() {
2011  if (constraintsBuilder_ == null) {
2012  constraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2014  constraints_,
2015  ((bitField0_ & 0x00000002) != 0),
2016  getParentForChildren(),
2017  isClean());
2018  constraints_ = null;
2019  }
2020  return constraintsBuilder_;
2021  }
2022 
2023  private com.google.ortools.sat.CpObjectiveProto objective_;
2024  private com.google.protobuf.SingleFieldBuilderV3<
2034  public boolean hasObjective() {
2035  return objectiveBuilder_ != null || objective_ != null;
2036  }
2046  if (objectiveBuilder_ == null) {
2047  return objective_ == null ? com.google.ortools.sat.CpObjectiveProto.getDefaultInstance() : objective_;
2048  } else {
2049  return objectiveBuilder_.getMessage();
2050  }
2051  }
2060  if (objectiveBuilder_ == null) {
2061  if (value == null) {
2062  throw new NullPointerException();
2063  }
2064  objective_ = value;
2065  onChanged();
2066  } else {
2067  objectiveBuilder_.setMessage(value);
2068  }
2069 
2070  return this;
2071  }
2080  com.google.ortools.sat.CpObjectiveProto.Builder builderForValue) {
2081  if (objectiveBuilder_ == null) {
2082  objective_ = builderForValue.build();
2083  onChanged();
2084  } else {
2085  objectiveBuilder_.setMessage(builderForValue.build());
2086  }
2087 
2088  return this;
2089  }
2098  if (objectiveBuilder_ == null) {
2099  if (objective_ != null) {
2100  objective_ =
2102  } else {
2103  objective_ = value;
2104  }
2105  onChanged();
2106  } else {
2107  objectiveBuilder_.mergeFrom(value);
2108  }
2109 
2110  return this;
2111  }
2120  if (objectiveBuilder_ == null) {
2121  objective_ = null;
2122  onChanged();
2123  } else {
2124  objective_ = null;
2125  objectiveBuilder_ = null;
2126  }
2127 
2128  return this;
2129  }
2138 
2139  onChanged();
2140  return getObjectiveFieldBuilder().getBuilder();
2141  }
2150  if (objectiveBuilder_ != null) {
2151  return objectiveBuilder_.getMessageOrBuilder();
2152  } else {
2153  return objective_ == null ?
2155  }
2156  }
2164  private com.google.protobuf.SingleFieldBuilderV3<
2166  getObjectiveFieldBuilder() {
2167  if (objectiveBuilder_ == null) {
2168  objectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2170  getObjective(),
2171  getParentForChildren(),
2172  isClean());
2173  objective_ = null;
2174  }
2175  return objectiveBuilder_;
2176  }
2177 
2178  private com.google.ortools.sat.FloatObjectiveProto floatingPointObjective_;
2179  private com.google.protobuf.SingleFieldBuilderV3<
2199  public boolean hasFloatingPointObjective() {
2200  return floatingPointObjectiveBuilder_ != null || floatingPointObjective_ != null;
2201  }
2221  if (floatingPointObjectiveBuilder_ == null) {
2222  return floatingPointObjective_ == null ? com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2223  } else {
2224  return floatingPointObjectiveBuilder_.getMessage();
2225  }
2226  }
2245  if (floatingPointObjectiveBuilder_ == null) {
2246  if (value == null) {
2247  throw new NullPointerException();
2248  }
2249  floatingPointObjective_ = value;
2250  onChanged();
2251  } else {
2252  floatingPointObjectiveBuilder_.setMessage(value);
2253  }
2254 
2255  return this;
2256  }
2275  com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue) {
2276  if (floatingPointObjectiveBuilder_ == null) {
2277  floatingPointObjective_ = builderForValue.build();
2278  onChanged();
2279  } else {
2280  floatingPointObjectiveBuilder_.setMessage(builderForValue.build());
2281  }
2282 
2283  return this;
2284  }
2303  if (floatingPointObjectiveBuilder_ == null) {
2304  if (floatingPointObjective_ != null) {
2305  floatingPointObjective_ =
2306  com.google.ortools.sat.FloatObjectiveProto.newBuilder(floatingPointObjective_).mergeFrom(value).buildPartial();
2307  } else {
2308  floatingPointObjective_ = value;
2309  }
2310  onChanged();
2311  } else {
2312  floatingPointObjectiveBuilder_.mergeFrom(value);
2313  }
2314 
2315  return this;
2316  }
2335  if (floatingPointObjectiveBuilder_ == null) {
2336  floatingPointObjective_ = null;
2337  onChanged();
2338  } else {
2339  floatingPointObjective_ = null;
2340  floatingPointObjectiveBuilder_ = null;
2341  }
2342 
2343  return this;
2344  }
2363 
2364  onChanged();
2365  return getFloatingPointObjectiveFieldBuilder().getBuilder();
2366  }
2385  if (floatingPointObjectiveBuilder_ != null) {
2386  return floatingPointObjectiveBuilder_.getMessageOrBuilder();
2387  } else {
2388  return floatingPointObjective_ == null ?
2389  com.google.ortools.sat.FloatObjectiveProto.getDefaultInstance() : floatingPointObjective_;
2390  }
2391  }
2409  private com.google.protobuf.SingleFieldBuilderV3<
2411  getFloatingPointObjectiveFieldBuilder() {
2412  if (floatingPointObjectiveBuilder_ == null) {
2413  floatingPointObjectiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
2416  getParentForChildren(),
2417  isClean());
2418  floatingPointObjective_ = null;
2419  }
2420  return floatingPointObjectiveBuilder_;
2421  }
2422 
2423  private java.util.List<com.google.ortools.sat.DecisionStrategyProto> searchStrategy_ =
2424  java.util.Collections.emptyList();
2425  private void ensureSearchStrategyIsMutable() {
2426  if (!((bitField0_ & 0x00000004) != 0)) {
2427  searchStrategy_ = new java.util.ArrayList<com.google.ortools.sat.DecisionStrategyProto>(searchStrategy_);
2428  bitField0_ |= 0x00000004;
2429  }
2430  }
2431 
2432  private com.google.protobuf.RepeatedFieldBuilderV3<
2434 
2450  if (searchStrategyBuilder_ == null) {
2451  return java.util.Collections.unmodifiableList(searchStrategy_);
2452  } else {
2453  return searchStrategyBuilder_.getMessageList();
2454  }
2455  }
2470  public int getSearchStrategyCount() {
2471  if (searchStrategyBuilder_ == null) {
2472  return searchStrategy_.size();
2473  } else {
2474  return searchStrategyBuilder_.getCount();
2475  }
2476  }
2492  if (searchStrategyBuilder_ == null) {
2493  return searchStrategy_.get(index);
2494  } else {
2495  return searchStrategyBuilder_.getMessage(index);
2496  }
2497  }
2513  int index, com.google.ortools.sat.DecisionStrategyProto value) {
2514  if (searchStrategyBuilder_ == null) {
2515  if (value == null) {
2516  throw new NullPointerException();
2517  }
2518  ensureSearchStrategyIsMutable();
2519  searchStrategy_.set(index, value);
2520  onChanged();
2521  } else {
2522  searchStrategyBuilder_.setMessage(index, value);
2523  }
2524  return this;
2525  }
2541  int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2542  if (searchStrategyBuilder_ == null) {
2543  ensureSearchStrategyIsMutable();
2544  searchStrategy_.set(index, builderForValue.build());
2545  onChanged();
2546  } else {
2547  searchStrategyBuilder_.setMessage(index, builderForValue.build());
2548  }
2549  return this;
2550  }
2566  if (searchStrategyBuilder_ == null) {
2567  if (value == null) {
2568  throw new NullPointerException();
2569  }
2570  ensureSearchStrategyIsMutable();
2571  searchStrategy_.add(value);
2572  onChanged();
2573  } else {
2574  searchStrategyBuilder_.addMessage(value);
2575  }
2576  return this;
2577  }
2593  int index, com.google.ortools.sat.DecisionStrategyProto value) {
2594  if (searchStrategyBuilder_ == null) {
2595  if (value == null) {
2596  throw new NullPointerException();
2597  }
2598  ensureSearchStrategyIsMutable();
2599  searchStrategy_.add(index, value);
2600  onChanged();
2601  } else {
2602  searchStrategyBuilder_.addMessage(index, value);
2603  }
2604  return this;
2605  }
2621  com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2622  if (searchStrategyBuilder_ == null) {
2623  ensureSearchStrategyIsMutable();
2624  searchStrategy_.add(builderForValue.build());
2625  onChanged();
2626  } else {
2627  searchStrategyBuilder_.addMessage(builderForValue.build());
2628  }
2629  return this;
2630  }
2646  int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue) {
2647  if (searchStrategyBuilder_ == null) {
2648  ensureSearchStrategyIsMutable();
2649  searchStrategy_.add(index, builderForValue.build());
2650  onChanged();
2651  } else {
2652  searchStrategyBuilder_.addMessage(index, builderForValue.build());
2653  }
2654  return this;
2655  }
2671  java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto> values) {
2672  if (searchStrategyBuilder_ == null) {
2673  ensureSearchStrategyIsMutable();
2674  com.google.protobuf.AbstractMessageLite.Builder.addAll(
2675  values, searchStrategy_);
2676  onChanged();
2677  } else {
2678  searchStrategyBuilder_.addAllMessages(values);
2679  }
2680  return this;
2681  }
2697  if (searchStrategyBuilder_ == null) {
2698  searchStrategy_ = java.util.Collections.emptyList();
2699  bitField0_ = (bitField0_ & ~0x00000004);
2700  onChanged();
2701  } else {
2702  searchStrategyBuilder_.clear();
2703  }
2704  return this;
2705  }
2720  public Builder removeSearchStrategy(int index) {
2721  if (searchStrategyBuilder_ == null) {
2722  ensureSearchStrategyIsMutable();
2723  searchStrategy_.remove(index);
2724  onChanged();
2725  } else {
2726  searchStrategyBuilder_.remove(index);
2727  }
2728  return this;
2729  }
2745  int index) {
2746  return getSearchStrategyFieldBuilder().getBuilder(index);
2747  }
2763  int index) {
2764  if (searchStrategyBuilder_ == null) {
2765  return searchStrategy_.get(index); } else {
2766  return searchStrategyBuilder_.getMessageOrBuilder(index);
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  }
2806  return getSearchStrategyFieldBuilder().addBuilder(
2808  }
2824  int index) {
2825  return getSearchStrategyFieldBuilder().addBuilder(
2827  }
2842  public java.util.List<com.google.ortools.sat.DecisionStrategyProto.Builder>
2844  return getSearchStrategyFieldBuilder().getBuilderList();
2845  }
2846  private com.google.protobuf.RepeatedFieldBuilderV3<
2848  getSearchStrategyFieldBuilder() {
2849  if (searchStrategyBuilder_ == null) {
2850  searchStrategyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
2852  searchStrategy_,
2853  ((bitField0_ & 0x00000004) != 0),
2854  getParentForChildren(),
2855  isClean());
2856  searchStrategy_ = null;
2857  }
2858  return searchStrategyBuilder_;
2859  }
2860 
2861  private com.google.ortools.sat.PartialVariableAssignment solutionHint_;
2862  private com.google.protobuf.SingleFieldBuilderV3<
2880  public boolean hasSolutionHint() {
2881  return solutionHintBuilder_ != null || solutionHint_ != null;
2882  }
2900  if (solutionHintBuilder_ == null) {
2901  return solutionHint_ == null ? com.google.ortools.sat.PartialVariableAssignment.getDefaultInstance() : solutionHint_;
2902  } else {
2903  return solutionHintBuilder_.getMessage();
2904  }
2905  }
2922  if (solutionHintBuilder_ == null) {
2923  if (value == null) {
2924  throw new NullPointerException();
2925  }
2926  solutionHint_ = value;
2927  onChanged();
2928  } else {
2929  solutionHintBuilder_.setMessage(value);
2930  }
2931 
2932  return this;
2933  }
2951  if (solutionHintBuilder_ == null) {
2952  solutionHint_ = builderForValue.build();
2953  onChanged();
2954  } else {
2955  solutionHintBuilder_.setMessage(builderForValue.build());
2956  }
2957 
2958  return this;
2959  }
2976  if (solutionHintBuilder_ == null) {
2977  if (solutionHint_ != null) {
2978  solutionHint_ =
2980  } else {
2981  solutionHint_ = value;
2982  }
2983  onChanged();
2984  } else {
2985  solutionHintBuilder_.mergeFrom(value);
2986  }
2987 
2988  return this;
2989  }
3006  if (solutionHintBuilder_ == null) {
3007  solutionHint_ = null;
3008  onChanged();
3009  } else {
3010  solutionHint_ = null;
3011  solutionHintBuilder_ = null;
3012  }
3013 
3014  return this;
3015  }
3032 
3033  onChanged();
3034  return getSolutionHintFieldBuilder().getBuilder();
3035  }
3052  if (solutionHintBuilder_ != null) {
3053  return solutionHintBuilder_.getMessageOrBuilder();
3054  } else {
3055  return solutionHint_ == null ?
3057  }
3058  }
3074  private com.google.protobuf.SingleFieldBuilderV3<
3076  getSolutionHintFieldBuilder() {
3077  if (solutionHintBuilder_ == null) {
3078  solutionHintBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3080  getSolutionHint(),
3081  getParentForChildren(),
3082  isClean());
3083  solutionHint_ = null;
3084  }
3085  return solutionHintBuilder_;
3086  }
3087 
3088  private com.google.protobuf.Internal.IntList assumptions_ = emptyIntList();
3089  private void ensureAssumptionsIsMutable() {
3090  if (!((bitField0_ & 0x00000008) != 0)) {
3091  assumptions_ = mutableCopy(assumptions_);
3092  bitField0_ |= 0x00000008;
3093  }
3094  }
3113  public java.util.List<java.lang.Integer>
3115  return ((bitField0_ & 0x00000008) != 0) ?
3116  java.util.Collections.unmodifiableList(assumptions_) : assumptions_;
3117  }
3136  public int getAssumptionsCount() {
3137  return assumptions_.size();
3138  }
3158  public int getAssumptions(int index) {
3159  return assumptions_.getInt(index);
3160  }
3182  int index, int value) {
3183  ensureAssumptionsIsMutable();
3184  assumptions_.setInt(index, value);
3185  onChanged();
3186  return this;
3187  }
3207  public Builder addAssumptions(int value) {
3208  ensureAssumptionsIsMutable();
3209  assumptions_.addInt(value);
3210  onChanged();
3211  return this;
3212  }
3233  java.lang.Iterable<? extends java.lang.Integer> values) {
3234  ensureAssumptionsIsMutable();
3235  com.google.protobuf.AbstractMessageLite.Builder.addAll(
3236  values, assumptions_);
3237  onChanged();
3238  return this;
3239  }
3259  assumptions_ = emptyIntList();
3260  bitField0_ = (bitField0_ & ~0x00000008);
3261  onChanged();
3262  return this;
3263  }
3264 
3265  private com.google.ortools.sat.SymmetryProto symmetry_;
3266  private com.google.protobuf.SingleFieldBuilderV3<
3279  public boolean hasSymmetry() {
3280  return symmetryBuilder_ != null || symmetry_ != null;
3281  }
3294  if (symmetryBuilder_ == null) {
3295  return symmetry_ == null ? com.google.ortools.sat.SymmetryProto.getDefaultInstance() : symmetry_;
3296  } else {
3297  return symmetryBuilder_.getMessage();
3298  }
3299  }
3311  if (symmetryBuilder_ == null) {
3312  if (value == null) {
3313  throw new NullPointerException();
3314  }
3315  symmetry_ = value;
3316  onChanged();
3317  } else {
3318  symmetryBuilder_.setMessage(value);
3319  }
3320 
3321  return this;
3322  }
3334  com.google.ortools.sat.SymmetryProto.Builder builderForValue) {
3335  if (symmetryBuilder_ == null) {
3336  symmetry_ = builderForValue.build();
3337  onChanged();
3338  } else {
3339  symmetryBuilder_.setMessage(builderForValue.build());
3340  }
3341 
3342  return this;
3343  }
3355  if (symmetryBuilder_ == null) {
3356  if (symmetry_ != null) {
3357  symmetry_ =
3359  } else {
3360  symmetry_ = value;
3361  }
3362  onChanged();
3363  } else {
3364  symmetryBuilder_.mergeFrom(value);
3365  }
3366 
3367  return this;
3368  }
3380  if (symmetryBuilder_ == null) {
3381  symmetry_ = null;
3382  onChanged();
3383  } else {
3384  symmetry_ = null;
3385  symmetryBuilder_ = null;
3386  }
3387 
3388  return this;
3389  }
3401 
3402  onChanged();
3403  return getSymmetryFieldBuilder().getBuilder();
3404  }
3416  if (symmetryBuilder_ != null) {
3417  return symmetryBuilder_.getMessageOrBuilder();
3418  } else {
3419  return symmetry_ == null ?
3421  }
3422  }
3433  private com.google.protobuf.SingleFieldBuilderV3<
3435  getSymmetryFieldBuilder() {
3436  if (symmetryBuilder_ == null) {
3437  symmetryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
3439  getSymmetry(),
3440  getParentForChildren(),
3441  isClean());
3442  symmetry_ = null;
3443  }
3444  return symmetryBuilder_;
3445  }
3446  @java.lang.Override
3448  final com.google.protobuf.UnknownFieldSet unknownFields) {
3449  return super.setUnknownFields(unknownFields);
3450  }
3451 
3452  @java.lang.Override
3454  final com.google.protobuf.UnknownFieldSet unknownFields) {
3455  return super.mergeUnknownFields(unknownFields);
3456  }
3457 
3458 
3459  // @@protoc_insertion_point(builder_scope:operations_research.sat.CpModelProto)
3460  }
3461 
3462  // @@protoc_insertion_point(class_scope:operations_research.sat.CpModelProto)
3463  private static final com.google.ortools.sat.CpModelProto DEFAULT_INSTANCE;
3464  static {
3465  DEFAULT_INSTANCE = new com.google.ortools.sat.CpModelProto();
3466  }
3467 
3469  return DEFAULT_INSTANCE;
3470  }
3471 
3472  private static final com.google.protobuf.Parser<CpModelProto>
3473  PARSER = new com.google.protobuf.AbstractParser<CpModelProto>() {
3474  @java.lang.Override
3475  public CpModelProto parsePartialFrom(
3476  com.google.protobuf.CodedInputStream input,
3477  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3478  throws com.google.protobuf.InvalidProtocolBufferException {
3479  return new CpModelProto(input, extensionRegistry);
3480  }
3481  };
3482 
3483  public static com.google.protobuf.Parser<CpModelProto> parser() {
3484  return PARSER;
3485  }
3486 
3487  @java.lang.Override
3488  public com.google.protobuf.Parser<CpModelProto> getParserForType() {
3489  return PARSER;
3490  }
3491 
3492  @java.lang.Override
3494  return DEFAULT_INSTANCE;
3495  }
3496 
3497 }
3498 
.lang.Override java.lang.String getName()
static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input)
com.google.ortools.sat.FloatObjectiveProto getFloatingPointObjective()
static com.google.ortools.sat.DecisionStrategyProto getDefaultInstance()
static com.google.ortools.sat.CpModelProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.ByteString getNameBytes()
Builder addSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto value)
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.sat.CpModelProto getDefaultInstance()
static com.google.protobuf.Parser< PartialVariableAssignment > parser()
.lang.Override com.google.ortools.sat.FloatObjectiveProto buildPartial()
static com.google.ortools.sat.CpObjectiveProto getDefaultInstance()
Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment value)
.lang.Override boolean equals(final java.lang.Object obj)
Builder clearConstraints()
repeated .operations_research.sat.ConstraintProto constraints = 3;
Builder setSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
Builder addVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
.lang.Override boolean hasSymmetry()
Builder addVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
Builder addVariables(com.google.ortools.sat.IntegerVariableProto value)
.lang.Override java.util.List< java.lang.Integer > getAssumptionsList()
Builder addAllAssumptions(java.lang.Iterable<? extends java.lang.Integer > values)
static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override com.google.ortools.sat.FloatObjectiveProto getFloatingPointObjective()
Builder setSymmetry(com.google.ortools.sat.SymmetryProto value)
Builder setSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto value)
com.google.ortools.sat.ConstraintProtoOrBuilder getConstraintsOrBuilder(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override boolean hasObjective()
.lang.Override final boolean isInitialized()
static final int FLOATING_POINT_OBJECTIVE_FIELD_NUMBER
static com.google.ortools.sat.PartialVariableAssignment getDefaultInstance()
Builder addConstraints(int index, com.google.ortools.sat.ConstraintProto value)
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override com.google.protobuf.ByteString getNameBytes()
java.util.List< com.google.ortools.sat.IntegerVariableProto.Builder > getVariablesBuilderList()
Builder mergeObjective(com.google.ortools.sat.CpObjectiveProto value)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Override int getVariablesCount()
com.google.ortools.sat.SymmetryProto getSymmetry()
static com.google.ortools.sat.IntegerVariableProto getDefaultInstance()
.lang.Override Builder toBuilder()
Builder setVariables(int index, com.google.ortools.sat.IntegerVariableProto value)
static com.google.ortools.sat.CpModelProto parseFrom(java.nio.ByteBuffer data)
.lang.Override boolean hasFloatingPointObjective()
com.google.ortools.sat.DecisionStrategyProtoOrBuilder getSearchStrategyOrBuilder(int index)
java.util.List< com.google.ortools.sat.ConstraintProto.Builder > getConstraintsBuilderList()
repeated .operations_research.sat.ConstraintProto constraints = 3;
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.ByteString data)
java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getVariablesOrBuilderList()
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder(int index)
.lang.Override Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder addConstraints(com.google.ortools.sat.ConstraintProto.Builder builderForValue)
repeated .operations_research.sat.ConstraintProto constraints = 3;
static com.google.protobuf.Parser< IntegerVariableProto > parser()
com.google.ortools.sat.IntegerVariableProto.Builder getVariablesBuilder(int index)
com.google.ortools.sat.PartialVariableAssignment.Builder getSolutionHintBuilder()
.lang.Override com.google.ortools.sat.CpModelProto buildPartial()
.lang.Override Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
static com.google.ortools.sat.SymmetryProto getDefaultInstance()
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder(int index)
Builder mergeSolutionHint(com.google.ortools.sat.PartialVariableAssignment value)
Builder mergeFrom(com.google.ortools.sat.CpModelProto other)
com.google.ortools.sat.IntegerVariableProtoOrBuilder getVariablesOrBuilder(int index)
Builder addAllVariables(java.lang.Iterable<? extends com.google.ortools.sat.IntegerVariableProto > values)
com.google.ortools.sat.DecisionStrategyProto.Builder getSearchStrategyBuilder(int index)
Builder setConstraints(int index, com.google.ortools.sat.ConstraintProto value)
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.ConstraintProto.Builder getConstraintsBuilder(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value)
int getConstraintsCount()
repeated .operations_research.sat.ConstraintProto constraints = 3;
static com.google.protobuf.Parser< CpObjectiveProto > parser()
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override java.util.List< com.google.ortools.sat.DecisionStrategyProto > getSearchStrategyList()
static com.google.protobuf.Parser< SymmetryProto > parser()
Builder addConstraints(int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > getSearchStrategyOrBuilderList()
.lang.Override int getConstraintsCount()
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override com.google.ortools.sat.CpObjectiveProto getObjective()
Builder mergeFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto value)
.lang.Override com.google.ortools.sat.CpObjectiveProto buildPartial()
.lang.Override com.google.ortools.sat.DecisionStrategyProtoOrBuilder getSearchStrategyOrBuilder(int index)
.lang.Override com.google.ortools.sat.SymmetryProtoOrBuilder getSymmetryOrBuilder()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.sat.FloatObjectiveProto.Builder getFloatingPointObjectiveBuilder()
.lang.Override com.google.ortools.sat.ConstraintProtoOrBuilder getConstraintsOrBuilder(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.FloatObjectiveProtoOrBuilder getFloatingPointObjectiveOrBuilder()
java.util.List< java.lang.Integer > getAssumptionsList()
.lang.Override int getSearchStrategyCount()
.lang.Override com.google.ortools.sat.IntegerVariableProto getVariables(int index)
static com.google.protobuf.Parser< CpModelProto > parser()
static com.google.protobuf.Parser< DecisionStrategyProto > parser()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
static com.google.ortools.sat.CpModelProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override java.lang.Object newInstance(UnusedPrivateParameter unused)
.lang.Override final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
.lang.Override Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
com.google.ortools.sat.DecisionStrategyProto getSearchStrategy(int index)
Builder addAllConstraints(java.lang.Iterable<? extends com.google.ortools.sat.ConstraintProto > values)
repeated .operations_research.sat.ConstraintProto constraints = 3;
Builder addVariables(com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
.lang.Override com.google.ortools.sat.CpObjectiveProtoOrBuilder getObjectiveOrBuilder()
Builder addConstraints(com.google.ortools.sat.ConstraintProto value)
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
Builder removeConstraints(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
static com.google.ortools.sat.CpModelProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override boolean equals(final java.lang.Object obj)
Builder setSymmetry(com.google.ortools.sat.SymmetryProto.Builder builderForValue)
.lang.Override com.google.ortools.sat.IntegerVariableProtoOrBuilder getVariablesOrBuilder(int index)
static com.google.protobuf.Parser< FloatObjectiveProto > parser()
java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > getConstraintsOrBuilderList()
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
.lang.Override com.google.ortools.sat.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
.lang.Override java.util.List< com.google.ortools.sat.IntegerVariableProto > getVariablesList()
com.google.ortools.sat.DecisionStrategyProto.Builder addSearchStrategyBuilder()
Builder addSearchStrategy(int index, com.google.ortools.sat.DecisionStrategyProto.Builder builderForValue)
.lang.Override Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
.lang.Override com.google.protobuf.Parser< CpModelProto > getParserForType()
java.util.List< com.google.ortools.sat.IntegerVariableProto > getVariablesList()
.lang.Override int getSerializedSize()
.lang.Override com.google.ortools.sat.CpModelProto build()
java.util.List< com.google.ortools.sat.ConstraintProto > getConstraintsList()
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.CpObjectiveProto.Builder getObjectiveBuilder()
.lang.Override java.util.List<? extends com.google.ortools.sat.IntegerVariableProtoOrBuilder > getVariablesOrBuilderList()
.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields()
.lang.Override void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.sat.ConstraintProto getDefaultInstance()
Builder setVariables(int index, com.google.ortools.sat.IntegerVariableProto.Builder builderForValue)
.lang.Override Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
.lang.Override com.google.ortools.sat.CpModelProto getDefaultInstanceForType()
static Builder newBuilder(com.google.ortools.sat.CpModelProto prototype)
Builder setAssumptions(int index, int value)
.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
.lang.Override com.google.ortools.sat.DecisionStrategyProto getSearchStrategy(int index)
Builder addSearchStrategy(com.google.ortools.sat.DecisionStrategyProto value)
com.google.ortools.sat.PartialVariableAssignmentOrBuilder getSolutionHintOrBuilder()
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
static final int SEARCH_STRATEGY_FIELD_NUMBER
Builder mergeSymmetry(com.google.ortools.sat.SymmetryProto value)
.lang.Override com.google.ortools.sat.SymmetryProto getSymmetry()
static com.google.ortools.sat.FloatObjectiveProto getDefaultInstance()
.lang.Override Builder newBuilderForType()
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.sat.PartialVariableAssignment getSolutionHint()
Builder setFloatingPointObjective(com.google.ortools.sat.FloatObjectiveProto.Builder builderForValue)
com.google.ortools.sat.CpObjectiveProto getObjective()
Builder setSolutionHint(com.google.ortools.sat.PartialVariableAssignment.Builder builderForValue)
Builder addAllSearchStrategy(java.lang.Iterable<? extends com.google.ortools.sat.DecisionStrategyProto > values)
com.google.ortools.sat.IntegerVariableProto getVariables(int index)
static com.google.ortools.sat.CpModelProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
.lang.Override Builder mergeFrom(com.google.protobuf.Message other)
.lang.Override java.util.List< com.google.ortools.sat.ConstraintProto > getConstraintsList()
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override Builder toBuilder()
.lang.Override Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder setName(java.lang.String value)
com.google.ortools.sat.ConstraintProto getConstraints(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.SymmetryProtoOrBuilder getSymmetryOrBuilder()
com.google.ortools.sat.IntegerVariableProto.Builder addVariablesBuilder()
com.google.ortools.sat.SymmetryProto.Builder getSymmetryBuilder()
java.util.List< com.google.ortools.sat.DecisionStrategyProto > getSearchStrategyList()
.lang.Override com.google.ortools.sat.PartialVariableAssignment getSolutionHint()
.lang.Override boolean equals(final java.lang.Object obj)
.lang.Override com.google.ortools.sat.SymmetryProto buildPartial()
.lang.Override com.google.ortools.sat.ConstraintProto getConstraints(int index)
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.CpObjectiveProtoOrBuilder getObjectiveOrBuilder()
java.util.List< com.google.ortools.sat.DecisionStrategyProto.Builder > getSearchStrategyBuilderList()
java.util.List<? extends com.google.ortools.sat.DecisionStrategyProtoOrBuilder > getSearchStrategyOrBuilderList()
.lang.Override com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
.lang.Override final boolean isInitialized()
Builder setObjective(com.google.ortools.sat.CpObjectiveProto.Builder builderForValue)
.lang.Override com.google.ortools.sat.FloatObjectiveProtoOrBuilder getFloatingPointObjectiveOrBuilder()
Builder setConstraints(int index, com.google.ortools.sat.ConstraintProto.Builder builderForValue)
repeated .operations_research.sat.ConstraintProto constraints = 3;
static com.google.ortools.sat.CpModelProto parseFrom(byte[] data)
.lang.Override java.util.List<? extends com.google.ortools.sat.ConstraintProtoOrBuilder > getConstraintsOrBuilderList()
repeated .operations_research.sat.ConstraintProto constraints = 3;
com.google.ortools.sat.ConstraintProto.Builder addConstraintsBuilder()
repeated .operations_research.sat.ConstraintProto constraints = 3;
.lang.Override com.google.ortools.sat.PartialVariableAssignment buildPartial()
Builder setNameBytes(com.google.protobuf.ByteString value)
.lang.Override boolean hasSolutionHint()
static com.google.protobuf.Parser< ConstraintProto > parser()
static com.google.ortools.sat.CpModelProto parseDelimitedFrom(java.io.InputStream input)
.lang.Override com.google.ortools.sat.CpModelProto getDefaultInstanceForType()
Builder setObjective(com.google.ortools.sat.CpObjectiveProto value)