com.google.ortools.sat.ConstraintProto Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ortools/sat/cp_model.proto
package com.google.ortools.sat;
/**
*
* Next id: 29
*
*
* Protobuf type {@code operations_research.sat.ConstraintProto}
*/
public final class ConstraintProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:operations_research.sat.ConstraintProto)
ConstraintProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConstraintProto.newBuilder() to construct.
private ConstraintProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConstraintProto() {
name_ = "";
enforcementLiteral_ = emptyIntList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConstraintProto();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConstraintProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 16: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
enforcementLiteral_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
enforcementLiteral_.addInt(input.readInt32());
break;
}
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
enforcementLiteral_ = newIntList();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
enforcementLiteral_.addInt(input.readInt32());
}
input.popLimit(limit);
break;
}
case 26: {
com.google.ortools.sat.BoolArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 3) {
subBuilder = ((com.google.ortools.sat.BoolArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.BoolArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.BoolArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 3;
break;
}
case 34: {
com.google.ortools.sat.BoolArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 4) {
subBuilder = ((com.google.ortools.sat.BoolArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.BoolArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.BoolArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 4;
break;
}
case 42: {
com.google.ortools.sat.BoolArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 5) {
subBuilder = ((com.google.ortools.sat.BoolArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.BoolArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.BoolArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 5;
break;
}
case 58: {
com.google.ortools.sat.IntegerArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 7) {
subBuilder = ((com.google.ortools.sat.IntegerArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntegerArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntegerArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 7;
break;
}
case 66: {
com.google.ortools.sat.IntegerArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 8) {
subBuilder = ((com.google.ortools.sat.IntegerArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntegerArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntegerArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 8;
break;
}
case 74: {
com.google.ortools.sat.IntegerArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 9) {
subBuilder = ((com.google.ortools.sat.IntegerArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntegerArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntegerArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 9;
break;
}
case 82: {
com.google.ortools.sat.IntegerArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 10) {
subBuilder = ((com.google.ortools.sat.IntegerArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntegerArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntegerArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 10;
break;
}
case 90: {
com.google.ortools.sat.IntegerArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 11) {
subBuilder = ((com.google.ortools.sat.IntegerArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntegerArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntegerArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 11;
break;
}
case 98: {
com.google.ortools.sat.LinearConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 12) {
subBuilder = ((com.google.ortools.sat.LinearConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.LinearConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.LinearConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 12;
break;
}
case 106: {
com.google.ortools.sat.AllDifferentConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 13) {
subBuilder = ((com.google.ortools.sat.AllDifferentConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.AllDifferentConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 13;
break;
}
case 114: {
com.google.ortools.sat.ElementConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 14) {
subBuilder = ((com.google.ortools.sat.ElementConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.ElementConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.ElementConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 14;
break;
}
case 122: {
com.google.ortools.sat.CircuitConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 15) {
subBuilder = ((com.google.ortools.sat.CircuitConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.CircuitConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.CircuitConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 15;
break;
}
case 130: {
com.google.ortools.sat.TableConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 16) {
subBuilder = ((com.google.ortools.sat.TableConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.TableConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.TableConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 16;
break;
}
case 138: {
com.google.ortools.sat.AutomatonConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 17) {
subBuilder = ((com.google.ortools.sat.AutomatonConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.AutomatonConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.AutomatonConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 17;
break;
}
case 146: {
com.google.ortools.sat.InverseConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 18) {
subBuilder = ((com.google.ortools.sat.InverseConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.InverseConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.InverseConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 18;
break;
}
case 154: {
com.google.ortools.sat.IntervalConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 19) {
subBuilder = ((com.google.ortools.sat.IntervalConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.IntervalConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.IntervalConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 19;
break;
}
case 162: {
com.google.ortools.sat.NoOverlapConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 20) {
subBuilder = ((com.google.ortools.sat.NoOverlapConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.NoOverlapConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 20;
break;
}
case 170: {
com.google.ortools.sat.NoOverlap2DConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 21) {
subBuilder = ((com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.NoOverlap2DConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 21;
break;
}
case 178: {
com.google.ortools.sat.CumulativeConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 22) {
subBuilder = ((com.google.ortools.sat.CumulativeConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.CumulativeConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.CumulativeConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 22;
break;
}
case 186: {
com.google.ortools.sat.RoutesConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 23) {
subBuilder = ((com.google.ortools.sat.RoutesConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.RoutesConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.RoutesConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 23;
break;
}
case 194: {
com.google.ortools.sat.ReservoirConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 24) {
subBuilder = ((com.google.ortools.sat.ReservoirConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.ReservoirConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.ReservoirConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 24;
break;
}
case 202: {
com.google.ortools.sat.CircuitCoveringConstraintProto.Builder subBuilder = null;
if (constraintCase_ == 25) {
subBuilder = ((com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.CircuitCoveringConstraintProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 25;
break;
}
case 210: {
com.google.ortools.sat.BoolArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 26) {
subBuilder = ((com.google.ortools.sat.BoolArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.BoolArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.BoolArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 26;
break;
}
case 218: {
com.google.ortools.sat.LinearArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 27) {
subBuilder = ((com.google.ortools.sat.LinearArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.LinearArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.LinearArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 27;
break;
}
case 226: {
com.google.ortools.sat.LinearArgumentProto.Builder subBuilder = null;
if (constraintCase_ == 28) {
subBuilder = ((com.google.ortools.sat.LinearArgumentProto) constraint_).toBuilder();
}
constraint_ =
input.readMessage(com.google.ortools.sat.LinearArgumentProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.ortools.sat.LinearArgumentProto) constraint_);
constraint_ = subBuilder.buildPartial();
}
constraintCase_ = 28;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
enforcementLiteral_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.sat.ConstraintProto.class, com.google.ortools.sat.ConstraintProto.Builder.class);
}
private int constraintCase_ = 0;
private java.lang.Object constraint_;
public enum ConstraintCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
BOOL_OR(3),
BOOL_AND(4),
AT_MOST_ONE(26),
BOOL_XOR(5),
INT_DIV(7),
INT_MOD(8),
INT_MAX(9),
LIN_MAX(27),
INT_MIN(10),
LIN_MIN(28),
INT_PROD(11),
LINEAR(12),
ALL_DIFF(13),
ELEMENT(14),
CIRCUIT(15),
ROUTES(23),
CIRCUIT_COVERING(25),
TABLE(16),
AUTOMATON(17),
INVERSE(18),
RESERVOIR(24),
INTERVAL(19),
NO_OVERLAP(20),
NO_OVERLAP_2D(21),
CUMULATIVE(22),
CONSTRAINT_NOT_SET(0);
private final int value;
private ConstraintCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ConstraintCase valueOf(int value) {
return forNumber(value);
}
public static ConstraintCase forNumber(int value) {
switch (value) {
case 3: return BOOL_OR;
case 4: return BOOL_AND;
case 26: return AT_MOST_ONE;
case 5: return BOOL_XOR;
case 7: return INT_DIV;
case 8: return INT_MOD;
case 9: return INT_MAX;
case 27: return LIN_MAX;
case 10: return INT_MIN;
case 28: return LIN_MIN;
case 11: return INT_PROD;
case 12: return LINEAR;
case 13: return ALL_DIFF;
case 14: return ELEMENT;
case 15: return CIRCUIT;
case 23: return ROUTES;
case 25: return CIRCUIT_COVERING;
case 16: return TABLE;
case 17: return AUTOMATON;
case 18: return INVERSE;
case 24: return RESERVOIR;
case 19: return INTERVAL;
case 20: return NO_OVERLAP;
case 21: return NO_OVERLAP_2D;
case 22: return CUMULATIVE;
case 0: return CONSTRAINT_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ConstraintCase
getConstraintCase() {
return ConstraintCase.forNumber(
constraintCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENFORCEMENT_LITERAL_FIELD_NUMBER = 2;
private com.google.protobuf.Internal.IntList enforcementLiteral_;
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @return A list containing the enforcementLiteral.
*/
@java.lang.Override
public java.util.List
getEnforcementLiteralList() {
return enforcementLiteral_;
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @return The count of enforcementLiteral.
*/
public int getEnforcementLiteralCount() {
return enforcementLiteral_.size();
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @param index The index of the element to return.
* @return The enforcementLiteral at the given index.
*/
public int getEnforcementLiteral(int index) {
return enforcementLiteral_.getInt(index);
}
private int enforcementLiteralMemoizedSerializedSize = -1;
public static final int BOOL_OR_FIELD_NUMBER = 3;
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
* @return Whether the boolOr field is set.
*/
@java.lang.Override
public boolean hasBoolOr() {
return constraintCase_ == 3;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
* @return The boolOr.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolOr() {
if (constraintCase_ == 3) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder() {
if (constraintCase_ == 3) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
public static final int BOOL_AND_FIELD_NUMBER = 4;
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
* @return Whether the boolAnd field is set.
*/
@java.lang.Override
public boolean hasBoolAnd() {
return constraintCase_ == 4;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
* @return The boolAnd.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolAnd() {
if (constraintCase_ == 4) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder() {
if (constraintCase_ == 4) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
public static final int AT_MOST_ONE_FIELD_NUMBER = 26;
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
* @return Whether the atMostOne field is set.
*/
@java.lang.Override
public boolean hasAtMostOne() {
return constraintCase_ == 26;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
* @return The atMostOne.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getAtMostOne() {
if (constraintCase_ == 26) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder() {
if (constraintCase_ == 26) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
public static final int BOOL_XOR_FIELD_NUMBER = 5;
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
* @return Whether the boolXor field is set.
*/
@java.lang.Override
public boolean hasBoolXor() {
return constraintCase_ == 5;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
* @return The boolXor.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolXor() {
if (constraintCase_ == 5) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder() {
if (constraintCase_ == 5) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
public static final int INT_DIV_FIELD_NUMBER = 7;
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
* @return Whether the intDiv field is set.
*/
@java.lang.Override
public boolean hasIntDiv() {
return constraintCase_ == 7;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
* @return The intDiv.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntDiv() {
if (constraintCase_ == 7) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntDivOrBuilder() {
if (constraintCase_ == 7) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
public static final int INT_MOD_FIELD_NUMBER = 8;
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
* @return Whether the intMod field is set.
*/
@java.lang.Override
public boolean hasIntMod() {
return constraintCase_ == 8;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
* @return The intMod.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMod() {
if (constraintCase_ == 8) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntModOrBuilder() {
if (constraintCase_ == 8) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
public static final int INT_MAX_FIELD_NUMBER = 9;
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
* @return Whether the intMax field is set.
*/
@java.lang.Override
public boolean hasIntMax() {
return constraintCase_ == 9;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
* @return The intMax.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMax() {
if (constraintCase_ == 9) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntMaxOrBuilder() {
if (constraintCase_ == 9) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
public static final int LIN_MAX_FIELD_NUMBER = 27;
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
* @return Whether the linMax field is set.
*/
@java.lang.Override
public boolean hasLinMax() {
return constraintCase_ == 27;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
* @return The linMax.
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProto getLinMax() {
if (constraintCase_ == 27) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder() {
if (constraintCase_ == 27) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
public static final int INT_MIN_FIELD_NUMBER = 10;
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
* @return Whether the intMin field is set.
*/
@java.lang.Override
public boolean hasIntMin() {
return constraintCase_ == 10;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
* @return The intMin.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMin() {
if (constraintCase_ == 10) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntMinOrBuilder() {
if (constraintCase_ == 10) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
public static final int LIN_MIN_FIELD_NUMBER = 28;
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
* @return Whether the linMin field is set.
*/
@java.lang.Override
public boolean hasLinMin() {
return constraintCase_ == 28;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
* @return The linMin.
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProto getLinMin() {
if (constraintCase_ == 28) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMinOrBuilder() {
if (constraintCase_ == 28) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
public static final int INT_PROD_FIELD_NUMBER = 11;
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
* @return Whether the intProd field is set.
*/
@java.lang.Override
public boolean hasIntProd() {
return constraintCase_ == 11;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
* @return The intProd.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntProd() {
if (constraintCase_ == 11) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntProdOrBuilder() {
if (constraintCase_ == 11) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
public static final int LINEAR_FIELD_NUMBER = 12;
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
* @return Whether the linear field is set.
*/
@java.lang.Override
public boolean hasLinear() {
return constraintCase_ == 12;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
* @return The linear.
*/
@java.lang.Override
public com.google.ortools.sat.LinearConstraintProto getLinear() {
if (constraintCase_ == 12) {
return (com.google.ortools.sat.LinearConstraintProto) constraint_;
}
return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
@java.lang.Override
public com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder() {
if (constraintCase_ == 12) {
return (com.google.ortools.sat.LinearConstraintProto) constraint_;
}
return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
}
public static final int ALL_DIFF_FIELD_NUMBER = 13;
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
* @return Whether the allDiff field is set.
*/
@java.lang.Override
public boolean hasAllDiff() {
return constraintCase_ == 13;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
* @return The allDiff.
*/
@java.lang.Override
public com.google.ortools.sat.AllDifferentConstraintProto getAllDiff() {
if (constraintCase_ == 13) {
return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
}
return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
@java.lang.Override
public com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder() {
if (constraintCase_ == 13) {
return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
}
return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
}
public static final int ELEMENT_FIELD_NUMBER = 14;
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
* @return Whether the element field is set.
*/
@java.lang.Override
public boolean hasElement() {
return constraintCase_ == 14;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
* @return The element.
*/
@java.lang.Override
public com.google.ortools.sat.ElementConstraintProto getElement() {
if (constraintCase_ == 14) {
return (com.google.ortools.sat.ElementConstraintProto) constraint_;
}
return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
@java.lang.Override
public com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder() {
if (constraintCase_ == 14) {
return (com.google.ortools.sat.ElementConstraintProto) constraint_;
}
return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
}
public static final int CIRCUIT_FIELD_NUMBER = 15;
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
* @return Whether the circuit field is set.
*/
@java.lang.Override
public boolean hasCircuit() {
return constraintCase_ == 15;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
* @return The circuit.
*/
@java.lang.Override
public com.google.ortools.sat.CircuitConstraintProto getCircuit() {
if (constraintCase_ == 15) {
return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
@java.lang.Override
public com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder() {
if (constraintCase_ == 15) {
return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
}
public static final int ROUTES_FIELD_NUMBER = 23;
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
* @return Whether the routes field is set.
*/
@java.lang.Override
public boolean hasRoutes() {
return constraintCase_ == 23;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
* @return The routes.
*/
@java.lang.Override
public com.google.ortools.sat.RoutesConstraintProto getRoutes() {
if (constraintCase_ == 23) {
return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
}
return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
@java.lang.Override
public com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder() {
if (constraintCase_ == 23) {
return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
}
return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
}
public static final int CIRCUIT_COVERING_FIELD_NUMBER = 25;
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
* @return Whether the circuitCovering field is set.
*/
@java.lang.Override
public boolean hasCircuitCovering() {
return constraintCase_ == 25;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
* @return The circuitCovering.
*/
@java.lang.Override
public com.google.ortools.sat.CircuitCoveringConstraintProto getCircuitCovering() {
if (constraintCase_ == 25) {
return (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
@java.lang.Override
public com.google.ortools.sat.CircuitCoveringConstraintProtoOrBuilder getCircuitCoveringOrBuilder() {
if (constraintCase_ == 25) {
return (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
}
public static final int TABLE_FIELD_NUMBER = 16;
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
* @return Whether the table field is set.
*/
@java.lang.Override
public boolean hasTable() {
return constraintCase_ == 16;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
* @return The table.
*/
@java.lang.Override
public com.google.ortools.sat.TableConstraintProto getTable() {
if (constraintCase_ == 16) {
return (com.google.ortools.sat.TableConstraintProto) constraint_;
}
return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
@java.lang.Override
public com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder() {
if (constraintCase_ == 16) {
return (com.google.ortools.sat.TableConstraintProto) constraint_;
}
return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
}
public static final int AUTOMATON_FIELD_NUMBER = 17;
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
* @return Whether the automaton field is set.
*/
@java.lang.Override
public boolean hasAutomaton() {
return constraintCase_ == 17;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
* @return The automaton.
*/
@java.lang.Override
public com.google.ortools.sat.AutomatonConstraintProto getAutomaton() {
if (constraintCase_ == 17) {
return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
}
return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
@java.lang.Override
public com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder() {
if (constraintCase_ == 17) {
return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
}
return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
}
public static final int INVERSE_FIELD_NUMBER = 18;
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
* @return Whether the inverse field is set.
*/
@java.lang.Override
public boolean hasInverse() {
return constraintCase_ == 18;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
* @return The inverse.
*/
@java.lang.Override
public com.google.ortools.sat.InverseConstraintProto getInverse() {
if (constraintCase_ == 18) {
return (com.google.ortools.sat.InverseConstraintProto) constraint_;
}
return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
@java.lang.Override
public com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder() {
if (constraintCase_ == 18) {
return (com.google.ortools.sat.InverseConstraintProto) constraint_;
}
return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
}
public static final int RESERVOIR_FIELD_NUMBER = 24;
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
* @return Whether the reservoir field is set.
*/
@java.lang.Override
public boolean hasReservoir() {
return constraintCase_ == 24;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
* @return The reservoir.
*/
@java.lang.Override
public com.google.ortools.sat.ReservoirConstraintProto getReservoir() {
if (constraintCase_ == 24) {
return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
}
return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
@java.lang.Override
public com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder() {
if (constraintCase_ == 24) {
return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
}
return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
}
public static final int INTERVAL_FIELD_NUMBER = 19;
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
* @return Whether the interval field is set.
*/
@java.lang.Override
public boolean hasInterval() {
return constraintCase_ == 19;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
* @return The interval.
*/
@java.lang.Override
public com.google.ortools.sat.IntervalConstraintProto getInterval() {
if (constraintCase_ == 19) {
return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
}
return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
@java.lang.Override
public com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder() {
if (constraintCase_ == 19) {
return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
}
return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
}
public static final int NO_OVERLAP_FIELD_NUMBER = 20;
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
* @return Whether the noOverlap field is set.
*/
@java.lang.Override
public boolean hasNoOverlap() {
return constraintCase_ == 20;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
* @return The noOverlap.
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap() {
if (constraintCase_ == 20) {
return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder() {
if (constraintCase_ == 20) {
return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
}
public static final int NO_OVERLAP_2D_FIELD_NUMBER = 21;
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
* @return Whether the noOverlap2d field is set.
*/
@java.lang.Override
public boolean hasNoOverlap2D() {
return constraintCase_ == 21;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
* @return The noOverlap2d.
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D() {
if (constraintCase_ == 21) {
return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder() {
if (constraintCase_ == 21) {
return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
public static final int CUMULATIVE_FIELD_NUMBER = 22;
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
* @return Whether the cumulative field is set.
*/
@java.lang.Override
public boolean hasCumulative() {
return constraintCase_ == 22;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
* @return The cumulative.
*/
@java.lang.Override
public com.google.ortools.sat.CumulativeConstraintProto getCumulative() {
if (constraintCase_ == 22) {
return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
}
return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
@java.lang.Override
public com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder() {
if (constraintCase_ == 22) {
return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
}
return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (getEnforcementLiteralList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(enforcementLiteralMemoizedSerializedSize);
}
for (int i = 0; i < enforcementLiteral_.size(); i++) {
output.writeInt32NoTag(enforcementLiteral_.getInt(i));
}
if (constraintCase_ == 3) {
output.writeMessage(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 4) {
output.writeMessage(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 5) {
output.writeMessage(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 7) {
output.writeMessage(7, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 8) {
output.writeMessage(8, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 9) {
output.writeMessage(9, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 10) {
output.writeMessage(10, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 11) {
output.writeMessage(11, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 12) {
output.writeMessage(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
}
if (constraintCase_ == 13) {
output.writeMessage(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
}
if (constraintCase_ == 14) {
output.writeMessage(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
}
if (constraintCase_ == 15) {
output.writeMessage(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
}
if (constraintCase_ == 16) {
output.writeMessage(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
}
if (constraintCase_ == 17) {
output.writeMessage(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
}
if (constraintCase_ == 18) {
output.writeMessage(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
}
if (constraintCase_ == 19) {
output.writeMessage(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
}
if (constraintCase_ == 20) {
output.writeMessage(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
}
if (constraintCase_ == 21) {
output.writeMessage(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
}
if (constraintCase_ == 22) {
output.writeMessage(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
}
if (constraintCase_ == 23) {
output.writeMessage(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
}
if (constraintCase_ == 24) {
output.writeMessage(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
}
if (constraintCase_ == 25) {
output.writeMessage(25, (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_);
}
if (constraintCase_ == 26) {
output.writeMessage(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 27) {
output.writeMessage(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
}
if (constraintCase_ == 28) {
output.writeMessage(28, (com.google.ortools.sat.LinearArgumentProto) constraint_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < enforcementLiteral_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(enforcementLiteral_.getInt(i));
}
size += dataSize;
if (!getEnforcementLiteralList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
enforcementLiteralMemoizedSerializedSize = dataSize;
}
if (constraintCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (com.google.ortools.sat.IntegerArgumentProto) constraint_);
}
if (constraintCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (com.google.ortools.sat.LinearConstraintProto) constraint_);
}
if (constraintCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, (com.google.ortools.sat.AllDifferentConstraintProto) constraint_);
}
if (constraintCase_ == 14) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, (com.google.ortools.sat.ElementConstraintProto) constraint_);
}
if (constraintCase_ == 15) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, (com.google.ortools.sat.CircuitConstraintProto) constraint_);
}
if (constraintCase_ == 16) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, (com.google.ortools.sat.TableConstraintProto) constraint_);
}
if (constraintCase_ == 17) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, (com.google.ortools.sat.AutomatonConstraintProto) constraint_);
}
if (constraintCase_ == 18) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, (com.google.ortools.sat.InverseConstraintProto) constraint_);
}
if (constraintCase_ == 19) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(19, (com.google.ortools.sat.IntervalConstraintProto) constraint_);
}
if (constraintCase_ == 20) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, (com.google.ortools.sat.NoOverlapConstraintProto) constraint_);
}
if (constraintCase_ == 21) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_);
}
if (constraintCase_ == 22) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, (com.google.ortools.sat.CumulativeConstraintProto) constraint_);
}
if (constraintCase_ == 23) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(23, (com.google.ortools.sat.RoutesConstraintProto) constraint_);
}
if (constraintCase_ == 24) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, (com.google.ortools.sat.ReservoirConstraintProto) constraint_);
}
if (constraintCase_ == 25) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(25, (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_);
}
if (constraintCase_ == 26) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(26, (com.google.ortools.sat.BoolArgumentProto) constraint_);
}
if (constraintCase_ == 27) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, (com.google.ortools.sat.LinearArgumentProto) constraint_);
}
if (constraintCase_ == 28) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(28, (com.google.ortools.sat.LinearArgumentProto) constraint_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ortools.sat.ConstraintProto)) {
return super.equals(obj);
}
com.google.ortools.sat.ConstraintProto other = (com.google.ortools.sat.ConstraintProto) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getEnforcementLiteralList()
.equals(other.getEnforcementLiteralList())) return false;
if (!getConstraintCase().equals(other.getConstraintCase())) return false;
switch (constraintCase_) {
case 3:
if (!getBoolOr()
.equals(other.getBoolOr())) return false;
break;
case 4:
if (!getBoolAnd()
.equals(other.getBoolAnd())) return false;
break;
case 26:
if (!getAtMostOne()
.equals(other.getAtMostOne())) return false;
break;
case 5:
if (!getBoolXor()
.equals(other.getBoolXor())) return false;
break;
case 7:
if (!getIntDiv()
.equals(other.getIntDiv())) return false;
break;
case 8:
if (!getIntMod()
.equals(other.getIntMod())) return false;
break;
case 9:
if (!getIntMax()
.equals(other.getIntMax())) return false;
break;
case 27:
if (!getLinMax()
.equals(other.getLinMax())) return false;
break;
case 10:
if (!getIntMin()
.equals(other.getIntMin())) return false;
break;
case 28:
if (!getLinMin()
.equals(other.getLinMin())) return false;
break;
case 11:
if (!getIntProd()
.equals(other.getIntProd())) return false;
break;
case 12:
if (!getLinear()
.equals(other.getLinear())) return false;
break;
case 13:
if (!getAllDiff()
.equals(other.getAllDiff())) return false;
break;
case 14:
if (!getElement()
.equals(other.getElement())) return false;
break;
case 15:
if (!getCircuit()
.equals(other.getCircuit())) return false;
break;
case 23:
if (!getRoutes()
.equals(other.getRoutes())) return false;
break;
case 25:
if (!getCircuitCovering()
.equals(other.getCircuitCovering())) return false;
break;
case 16:
if (!getTable()
.equals(other.getTable())) return false;
break;
case 17:
if (!getAutomaton()
.equals(other.getAutomaton())) return false;
break;
case 18:
if (!getInverse()
.equals(other.getInverse())) return false;
break;
case 24:
if (!getReservoir()
.equals(other.getReservoir())) return false;
break;
case 19:
if (!getInterval()
.equals(other.getInterval())) return false;
break;
case 20:
if (!getNoOverlap()
.equals(other.getNoOverlap())) return false;
break;
case 21:
if (!getNoOverlap2D()
.equals(other.getNoOverlap2D())) return false;
break;
case 22:
if (!getCumulative()
.equals(other.getCumulative())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getEnforcementLiteralCount() > 0) {
hash = (37 * hash) + ENFORCEMENT_LITERAL_FIELD_NUMBER;
hash = (53 * hash) + getEnforcementLiteralList().hashCode();
}
switch (constraintCase_) {
case 3:
hash = (37 * hash) + BOOL_OR_FIELD_NUMBER;
hash = (53 * hash) + getBoolOr().hashCode();
break;
case 4:
hash = (37 * hash) + BOOL_AND_FIELD_NUMBER;
hash = (53 * hash) + getBoolAnd().hashCode();
break;
case 26:
hash = (37 * hash) + AT_MOST_ONE_FIELD_NUMBER;
hash = (53 * hash) + getAtMostOne().hashCode();
break;
case 5:
hash = (37 * hash) + BOOL_XOR_FIELD_NUMBER;
hash = (53 * hash) + getBoolXor().hashCode();
break;
case 7:
hash = (37 * hash) + INT_DIV_FIELD_NUMBER;
hash = (53 * hash) + getIntDiv().hashCode();
break;
case 8:
hash = (37 * hash) + INT_MOD_FIELD_NUMBER;
hash = (53 * hash) + getIntMod().hashCode();
break;
case 9:
hash = (37 * hash) + INT_MAX_FIELD_NUMBER;
hash = (53 * hash) + getIntMax().hashCode();
break;
case 27:
hash = (37 * hash) + LIN_MAX_FIELD_NUMBER;
hash = (53 * hash) + getLinMax().hashCode();
break;
case 10:
hash = (37 * hash) + INT_MIN_FIELD_NUMBER;
hash = (53 * hash) + getIntMin().hashCode();
break;
case 28:
hash = (37 * hash) + LIN_MIN_FIELD_NUMBER;
hash = (53 * hash) + getLinMin().hashCode();
break;
case 11:
hash = (37 * hash) + INT_PROD_FIELD_NUMBER;
hash = (53 * hash) + getIntProd().hashCode();
break;
case 12:
hash = (37 * hash) + LINEAR_FIELD_NUMBER;
hash = (53 * hash) + getLinear().hashCode();
break;
case 13:
hash = (37 * hash) + ALL_DIFF_FIELD_NUMBER;
hash = (53 * hash) + getAllDiff().hashCode();
break;
case 14:
hash = (37 * hash) + ELEMENT_FIELD_NUMBER;
hash = (53 * hash) + getElement().hashCode();
break;
case 15:
hash = (37 * hash) + CIRCUIT_FIELD_NUMBER;
hash = (53 * hash) + getCircuit().hashCode();
break;
case 23:
hash = (37 * hash) + ROUTES_FIELD_NUMBER;
hash = (53 * hash) + getRoutes().hashCode();
break;
case 25:
hash = (37 * hash) + CIRCUIT_COVERING_FIELD_NUMBER;
hash = (53 * hash) + getCircuitCovering().hashCode();
break;
case 16:
hash = (37 * hash) + TABLE_FIELD_NUMBER;
hash = (53 * hash) + getTable().hashCode();
break;
case 17:
hash = (37 * hash) + AUTOMATON_FIELD_NUMBER;
hash = (53 * hash) + getAutomaton().hashCode();
break;
case 18:
hash = (37 * hash) + INVERSE_FIELD_NUMBER;
hash = (53 * hash) + getInverse().hashCode();
break;
case 24:
hash = (37 * hash) + RESERVOIR_FIELD_NUMBER;
hash = (53 * hash) + getReservoir().hashCode();
break;
case 19:
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getInterval().hashCode();
break;
case 20:
hash = (37 * hash) + NO_OVERLAP_FIELD_NUMBER;
hash = (53 * hash) + getNoOverlap().hashCode();
break;
case 21:
hash = (37 * hash) + NO_OVERLAP_2D_FIELD_NUMBER;
hash = (53 * hash) + getNoOverlap2D().hashCode();
break;
case 22:
hash = (37 * hash) + CUMULATIVE_FIELD_NUMBER;
hash = (53 * hash) + getCumulative().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ortools.sat.ConstraintProto parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ortools.sat.ConstraintProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ortools.sat.ConstraintProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Next id: 29
*
*
* Protobuf type {@code operations_research.sat.ConstraintProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:operations_research.sat.ConstraintProto)
com.google.ortools.sat.ConstraintProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ortools.sat.ConstraintProto.class, com.google.ortools.sat.ConstraintProto.Builder.class);
}
// Construct using com.google.ortools.sat.ConstraintProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
enforcementLiteral_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
constraintCase_ = 0;
constraint_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_ConstraintProto_descriptor;
}
@java.lang.Override
public com.google.ortools.sat.ConstraintProto getDefaultInstanceForType() {
return com.google.ortools.sat.ConstraintProto.getDefaultInstance();
}
@java.lang.Override
public com.google.ortools.sat.ConstraintProto build() {
com.google.ortools.sat.ConstraintProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ortools.sat.ConstraintProto buildPartial() {
com.google.ortools.sat.ConstraintProto result = new com.google.ortools.sat.ConstraintProto(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
if (((bitField0_ & 0x00000001) != 0)) {
enforcementLiteral_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.enforcementLiteral_ = enforcementLiteral_;
if (constraintCase_ == 3) {
if (boolOrBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = boolOrBuilder_.build();
}
}
if (constraintCase_ == 4) {
if (boolAndBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = boolAndBuilder_.build();
}
}
if (constraintCase_ == 26) {
if (atMostOneBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = atMostOneBuilder_.build();
}
}
if (constraintCase_ == 5) {
if (boolXorBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = boolXorBuilder_.build();
}
}
if (constraintCase_ == 7) {
if (intDivBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intDivBuilder_.build();
}
}
if (constraintCase_ == 8) {
if (intModBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intModBuilder_.build();
}
}
if (constraintCase_ == 9) {
if (intMaxBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intMaxBuilder_.build();
}
}
if (constraintCase_ == 27) {
if (linMaxBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = linMaxBuilder_.build();
}
}
if (constraintCase_ == 10) {
if (intMinBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intMinBuilder_.build();
}
}
if (constraintCase_ == 28) {
if (linMinBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = linMinBuilder_.build();
}
}
if (constraintCase_ == 11) {
if (intProdBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intProdBuilder_.build();
}
}
if (constraintCase_ == 12) {
if (linearBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = linearBuilder_.build();
}
}
if (constraintCase_ == 13) {
if (allDiffBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = allDiffBuilder_.build();
}
}
if (constraintCase_ == 14) {
if (elementBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = elementBuilder_.build();
}
}
if (constraintCase_ == 15) {
if (circuitBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = circuitBuilder_.build();
}
}
if (constraintCase_ == 23) {
if (routesBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = routesBuilder_.build();
}
}
if (constraintCase_ == 25) {
if (circuitCoveringBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = circuitCoveringBuilder_.build();
}
}
if (constraintCase_ == 16) {
if (tableBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = tableBuilder_.build();
}
}
if (constraintCase_ == 17) {
if (automatonBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = automatonBuilder_.build();
}
}
if (constraintCase_ == 18) {
if (inverseBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = inverseBuilder_.build();
}
}
if (constraintCase_ == 24) {
if (reservoirBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = reservoirBuilder_.build();
}
}
if (constraintCase_ == 19) {
if (intervalBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = intervalBuilder_.build();
}
}
if (constraintCase_ == 20) {
if (noOverlapBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = noOverlapBuilder_.build();
}
}
if (constraintCase_ == 21) {
if (noOverlap2DBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = noOverlap2DBuilder_.build();
}
}
if (constraintCase_ == 22) {
if (cumulativeBuilder_ == null) {
result.constraint_ = constraint_;
} else {
result.constraint_ = cumulativeBuilder_.build();
}
}
result.constraintCase_ = constraintCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ortools.sat.ConstraintProto) {
return mergeFrom((com.google.ortools.sat.ConstraintProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ortools.sat.ConstraintProto other) {
if (other == com.google.ortools.sat.ConstraintProto.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.enforcementLiteral_.isEmpty()) {
if (enforcementLiteral_.isEmpty()) {
enforcementLiteral_ = other.enforcementLiteral_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEnforcementLiteralIsMutable();
enforcementLiteral_.addAll(other.enforcementLiteral_);
}
onChanged();
}
switch (other.getConstraintCase()) {
case BOOL_OR: {
mergeBoolOr(other.getBoolOr());
break;
}
case BOOL_AND: {
mergeBoolAnd(other.getBoolAnd());
break;
}
case AT_MOST_ONE: {
mergeAtMostOne(other.getAtMostOne());
break;
}
case BOOL_XOR: {
mergeBoolXor(other.getBoolXor());
break;
}
case INT_DIV: {
mergeIntDiv(other.getIntDiv());
break;
}
case INT_MOD: {
mergeIntMod(other.getIntMod());
break;
}
case INT_MAX: {
mergeIntMax(other.getIntMax());
break;
}
case LIN_MAX: {
mergeLinMax(other.getLinMax());
break;
}
case INT_MIN: {
mergeIntMin(other.getIntMin());
break;
}
case LIN_MIN: {
mergeLinMin(other.getLinMin());
break;
}
case INT_PROD: {
mergeIntProd(other.getIntProd());
break;
}
case LINEAR: {
mergeLinear(other.getLinear());
break;
}
case ALL_DIFF: {
mergeAllDiff(other.getAllDiff());
break;
}
case ELEMENT: {
mergeElement(other.getElement());
break;
}
case CIRCUIT: {
mergeCircuit(other.getCircuit());
break;
}
case ROUTES: {
mergeRoutes(other.getRoutes());
break;
}
case CIRCUIT_COVERING: {
mergeCircuitCovering(other.getCircuitCovering());
break;
}
case TABLE: {
mergeTable(other.getTable());
break;
}
case AUTOMATON: {
mergeAutomaton(other.getAutomaton());
break;
}
case INVERSE: {
mergeInverse(other.getInverse());
break;
}
case RESERVOIR: {
mergeReservoir(other.getReservoir());
break;
}
case INTERVAL: {
mergeInterval(other.getInterval());
break;
}
case NO_OVERLAP: {
mergeNoOverlap(other.getNoOverlap());
break;
}
case NO_OVERLAP_2D: {
mergeNoOverlap2D(other.getNoOverlap2D());
break;
}
case CUMULATIVE: {
mergeCumulative(other.getCumulative());
break;
}
case CONSTRAINT_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.ortools.sat.ConstraintProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.ortools.sat.ConstraintProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int constraintCase_ = 0;
private java.lang.Object constraint_;
public ConstraintCase
getConstraintCase() {
return ConstraintCase.forNumber(
constraintCase_);
}
public Builder clearConstraint() {
constraintCase_ = 0;
constraint_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* For debug/logging only. Can be empty.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList enforcementLiteral_ = emptyIntList();
private void ensureEnforcementLiteralIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
enforcementLiteral_ = mutableCopy(enforcementLiteral_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @return A list containing the enforcementLiteral.
*/
public java.util.List
getEnforcementLiteralList() {
return ((bitField0_ & 0x00000001) != 0) ?
java.util.Collections.unmodifiableList(enforcementLiteral_) : enforcementLiteral_;
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @return The count of enforcementLiteral.
*/
public int getEnforcementLiteralCount() {
return enforcementLiteral_.size();
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @param index The index of the element to return.
* @return The enforcementLiteral at the given index.
*/
public int getEnforcementLiteral(int index) {
return enforcementLiteral_.getInt(index);
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @param index The index to set the value at.
* @param value The enforcementLiteral to set.
* @return This builder for chaining.
*/
public Builder setEnforcementLiteral(
int index, int value) {
ensureEnforcementLiteralIsMutable();
enforcementLiteral_.setInt(index, value);
onChanged();
return this;
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @param value The enforcementLiteral to add.
* @return This builder for chaining.
*/
public Builder addEnforcementLiteral(int value) {
ensureEnforcementLiteralIsMutable();
enforcementLiteral_.addInt(value);
onChanged();
return this;
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @param values The enforcementLiteral to add.
* @return This builder for chaining.
*/
public Builder addAllEnforcementLiteral(
java.lang.Iterable extends java.lang.Integer> values) {
ensureEnforcementLiteralIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, enforcementLiteral_);
onChanged();
return this;
}
/**
*
* The constraint will be enforced iff all literals listed here are true. If
* this is empty, then the constraint will always be enforced. An enforced
* constraint must be satisfied, and an un-enforced one will simply be
* ignored.
* This is also called half-reification. To have an equivalence between a
* literal and a constraint (full reification), one must add both a constraint
* (controlled by a literal l) and its negation (controlled by the negation of
* l).
* Important: as of September 2018, only a few constraint support enforcement:
* - bool_or, bool_and, linear: fully supported.
* - interval: only support a single enforcement literal.
* - other: no support (but can be added on a per-demand basis).
*
*
* repeated int32 enforcement_literal = 2;
* @return This builder for chaining.
*/
public Builder clearEnforcementLiteral() {
enforcementLiteral_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolOrBuilder_;
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
* @return Whether the boolOr field is set.
*/
@java.lang.Override
public boolean hasBoolOr() {
return constraintCase_ == 3;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
* @return The boolOr.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolOr() {
if (boolOrBuilder_ == null) {
if (constraintCase_ == 3) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 3) {
return boolOrBuilder_.getMessage();
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
public Builder setBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
if (boolOrBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
boolOrBuilder_.setMessage(value);
}
constraintCase_ = 3;
return this;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
public Builder setBoolOr(
com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
if (boolOrBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
boolOrBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 3;
return this;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
public Builder mergeBoolOr(com.google.ortools.sat.BoolArgumentProto value) {
if (boolOrBuilder_ == null) {
if (constraintCase_ == 3 &&
constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 3) {
boolOrBuilder_.mergeFrom(value);
}
boolOrBuilder_.setMessage(value);
}
constraintCase_ = 3;
return this;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
public Builder clearBoolOr() {
if (boolOrBuilder_ == null) {
if (constraintCase_ == 3) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 3) {
constraintCase_ = 0;
constraint_ = null;
}
boolOrBuilder_.clear();
}
return this;
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
public com.google.ortools.sat.BoolArgumentProto.Builder getBoolOrBuilder() {
return getBoolOrFieldBuilder().getBuilder();
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder() {
if ((constraintCase_ == 3) && (boolOrBuilder_ != null)) {
return boolOrBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 3) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_or constraint forces at least one literal to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_or = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
getBoolOrFieldBuilder() {
if (boolOrBuilder_ == null) {
if (!(constraintCase_ == 3)) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
boolOrBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
(com.google.ortools.sat.BoolArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 3;
onChanged();;
return boolOrBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolAndBuilder_;
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
* @return Whether the boolAnd field is set.
*/
@java.lang.Override
public boolean hasBoolAnd() {
return constraintCase_ == 4;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
* @return The boolAnd.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolAnd() {
if (boolAndBuilder_ == null) {
if (constraintCase_ == 4) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 4) {
return boolAndBuilder_.getMessage();
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
public Builder setBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
if (boolAndBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
boolAndBuilder_.setMessage(value);
}
constraintCase_ = 4;
return this;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
public Builder setBoolAnd(
com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
if (boolAndBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
boolAndBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 4;
return this;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
public Builder mergeBoolAnd(com.google.ortools.sat.BoolArgumentProto value) {
if (boolAndBuilder_ == null) {
if (constraintCase_ == 4 &&
constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 4) {
boolAndBuilder_.mergeFrom(value);
}
boolAndBuilder_.setMessage(value);
}
constraintCase_ = 4;
return this;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
public Builder clearBoolAnd() {
if (boolAndBuilder_ == null) {
if (constraintCase_ == 4) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 4) {
constraintCase_ = 0;
constraint_ = null;
}
boolAndBuilder_.clear();
}
return this;
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
public com.google.ortools.sat.BoolArgumentProto.Builder getBoolAndBuilder() {
return getBoolAndFieldBuilder().getBuilder();
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder() {
if ((constraintCase_ == 4) && (boolAndBuilder_ != null)) {
return boolAndBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 4) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_and constraint forces all of the literals to be true.
* This is a "redundant" constraint in the sense that this can easily be
* encoded with many bool_or. It is just more space efficient and handled
* slightly differently internally.
*
*
* .operations_research.sat.BoolArgumentProto bool_and = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
getBoolAndFieldBuilder() {
if (boolAndBuilder_ == null) {
if (!(constraintCase_ == 4)) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
boolAndBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
(com.google.ortools.sat.BoolArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 4;
onChanged();;
return boolAndBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> atMostOneBuilder_;
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
* @return Whether the atMostOne field is set.
*/
@java.lang.Override
public boolean hasAtMostOne() {
return constraintCase_ == 26;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
* @return The atMostOne.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getAtMostOne() {
if (atMostOneBuilder_ == null) {
if (constraintCase_ == 26) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 26) {
return atMostOneBuilder_.getMessage();
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
public Builder setAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
if (atMostOneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
atMostOneBuilder_.setMessage(value);
}
constraintCase_ = 26;
return this;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
public Builder setAtMostOne(
com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
if (atMostOneBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
atMostOneBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 26;
return this;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
public Builder mergeAtMostOne(com.google.ortools.sat.BoolArgumentProto value) {
if (atMostOneBuilder_ == null) {
if (constraintCase_ == 26 &&
constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 26) {
atMostOneBuilder_.mergeFrom(value);
}
atMostOneBuilder_.setMessage(value);
}
constraintCase_ = 26;
return this;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
public Builder clearAtMostOne() {
if (atMostOneBuilder_ == null) {
if (constraintCase_ == 26) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 26) {
constraintCase_ = 0;
constraint_ = null;
}
atMostOneBuilder_.clear();
}
return this;
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
public com.google.ortools.sat.BoolArgumentProto.Builder getAtMostOneBuilder() {
return getAtMostOneFieldBuilder().getBuilder();
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder() {
if ((constraintCase_ == 26) && (atMostOneBuilder_ != null)) {
return atMostOneBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 26) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The at_most_one constraint enforces that no more than one literal is
* true at the same time. Note that an at most one constraint of length n
* could be encoded with n bool_and constraint with n-1 term on the right
* hand side. So in a sense, this constraint contribute directly to the
* "implication-graph" or the 2-SAT part of the model.
*
*
* .operations_research.sat.BoolArgumentProto at_most_one = 26;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
getAtMostOneFieldBuilder() {
if (atMostOneBuilder_ == null) {
if (!(constraintCase_ == 26)) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
atMostOneBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
(com.google.ortools.sat.BoolArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 26;
onChanged();;
return atMostOneBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder> boolXorBuilder_;
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
* @return Whether the boolXor field is set.
*/
@java.lang.Override
public boolean hasBoolXor() {
return constraintCase_ == 5;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
* @return The boolXor.
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProto getBoolXor() {
if (boolXorBuilder_ == null) {
if (constraintCase_ == 5) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 5) {
return boolXorBuilder_.getMessage();
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
public Builder setBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
if (boolXorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
boolXorBuilder_.setMessage(value);
}
constraintCase_ = 5;
return this;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
public Builder setBoolXor(
com.google.ortools.sat.BoolArgumentProto.Builder builderForValue) {
if (boolXorBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
boolXorBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 5;
return this;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
public Builder mergeBoolXor(com.google.ortools.sat.BoolArgumentProto value) {
if (boolXorBuilder_ == null) {
if (constraintCase_ == 5 &&
constraint_ != com.google.ortools.sat.BoolArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.newBuilder((com.google.ortools.sat.BoolArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 5) {
boolXorBuilder_.mergeFrom(value);
}
boolXorBuilder_.setMessage(value);
}
constraintCase_ = 5;
return this;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
public Builder clearBoolXor() {
if (boolXorBuilder_ == null) {
if (constraintCase_ == 5) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 5) {
constraintCase_ = 0;
constraint_ = null;
}
boolXorBuilder_.clear();
}
return this;
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
public com.google.ortools.sat.BoolArgumentProto.Builder getBoolXorBuilder() {
return getBoolXorFieldBuilder().getBuilder();
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
@java.lang.Override
public com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder() {
if ((constraintCase_ == 5) && (boolXorBuilder_ != null)) {
return boolXorBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 5) {
return (com.google.ortools.sat.BoolArgumentProto) constraint_;
}
return com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
}
/**
*
* The bool_xor constraint forces an odd number of the literals to be true.
*
*
* .operations_research.sat.BoolArgumentProto bool_xor = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>
getBoolXorFieldBuilder() {
if (boolXorBuilder_ == null) {
if (!(constraintCase_ == 5)) {
constraint_ = com.google.ortools.sat.BoolArgumentProto.getDefaultInstance();
}
boolXorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.BoolArgumentProto, com.google.ortools.sat.BoolArgumentProto.Builder, com.google.ortools.sat.BoolArgumentProtoOrBuilder>(
(com.google.ortools.sat.BoolArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 5;
onChanged();;
return boolXorBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder> intDivBuilder_;
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
* @return Whether the intDiv field is set.
*/
@java.lang.Override
public boolean hasIntDiv() {
return constraintCase_ == 7;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
* @return The intDiv.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntDiv() {
if (intDivBuilder_ == null) {
if (constraintCase_ == 7) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 7) {
return intDivBuilder_.getMessage();
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
public Builder setIntDiv(com.google.ortools.sat.IntegerArgumentProto value) {
if (intDivBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intDivBuilder_.setMessage(value);
}
constraintCase_ = 7;
return this;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
public Builder setIntDiv(
com.google.ortools.sat.IntegerArgumentProto.Builder builderForValue) {
if (intDivBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intDivBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 7;
return this;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
public Builder mergeIntDiv(com.google.ortools.sat.IntegerArgumentProto value) {
if (intDivBuilder_ == null) {
if (constraintCase_ == 7 &&
constraint_ != com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.newBuilder((com.google.ortools.sat.IntegerArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 7) {
intDivBuilder_.mergeFrom(value);
}
intDivBuilder_.setMessage(value);
}
constraintCase_ = 7;
return this;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
public Builder clearIntDiv() {
if (intDivBuilder_ == null) {
if (constraintCase_ == 7) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 7) {
constraintCase_ = 0;
constraint_ = null;
}
intDivBuilder_.clear();
}
return this;
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
public com.google.ortools.sat.IntegerArgumentProto.Builder getIntDivBuilder() {
return getIntDivFieldBuilder().getBuilder();
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntDivOrBuilder() {
if ((constraintCase_ == 7) && (intDivBuilder_ != null)) {
return intDivBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 7) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_div constraint forces the target to equal vars[0] / vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_div = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>
getIntDivFieldBuilder() {
if (intDivBuilder_ == null) {
if (!(constraintCase_ == 7)) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
intDivBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>(
(com.google.ortools.sat.IntegerArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 7;
onChanged();;
return intDivBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder> intModBuilder_;
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
* @return Whether the intMod field is set.
*/
@java.lang.Override
public boolean hasIntMod() {
return constraintCase_ == 8;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
* @return The intMod.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMod() {
if (intModBuilder_ == null) {
if (constraintCase_ == 8) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 8) {
return intModBuilder_.getMessage();
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
public Builder setIntMod(com.google.ortools.sat.IntegerArgumentProto value) {
if (intModBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intModBuilder_.setMessage(value);
}
constraintCase_ = 8;
return this;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
public Builder setIntMod(
com.google.ortools.sat.IntegerArgumentProto.Builder builderForValue) {
if (intModBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intModBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 8;
return this;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
public Builder mergeIntMod(com.google.ortools.sat.IntegerArgumentProto value) {
if (intModBuilder_ == null) {
if (constraintCase_ == 8 &&
constraint_ != com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.newBuilder((com.google.ortools.sat.IntegerArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 8) {
intModBuilder_.mergeFrom(value);
}
intModBuilder_.setMessage(value);
}
constraintCase_ = 8;
return this;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
public Builder clearIntMod() {
if (intModBuilder_ == null) {
if (constraintCase_ == 8) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 8) {
constraintCase_ = 0;
constraint_ = null;
}
intModBuilder_.clear();
}
return this;
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
public com.google.ortools.sat.IntegerArgumentProto.Builder getIntModBuilder() {
return getIntModFieldBuilder().getBuilder();
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntModOrBuilder() {
if ((constraintCase_ == 8) && (intModBuilder_ != null)) {
return intModBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 8) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_mod constraint forces the target to equal vars[0] % vars[1].
*
*
* .operations_research.sat.IntegerArgumentProto int_mod = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>
getIntModFieldBuilder() {
if (intModBuilder_ == null) {
if (!(constraintCase_ == 8)) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
intModBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>(
(com.google.ortools.sat.IntegerArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 8;
onChanged();;
return intModBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder> intMaxBuilder_;
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
* @return Whether the intMax field is set.
*/
@java.lang.Override
public boolean hasIntMax() {
return constraintCase_ == 9;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
* @return The intMax.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMax() {
if (intMaxBuilder_ == null) {
if (constraintCase_ == 9) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 9) {
return intMaxBuilder_.getMessage();
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
public Builder setIntMax(com.google.ortools.sat.IntegerArgumentProto value) {
if (intMaxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intMaxBuilder_.setMessage(value);
}
constraintCase_ = 9;
return this;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
public Builder setIntMax(
com.google.ortools.sat.IntegerArgumentProto.Builder builderForValue) {
if (intMaxBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intMaxBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 9;
return this;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
public Builder mergeIntMax(com.google.ortools.sat.IntegerArgumentProto value) {
if (intMaxBuilder_ == null) {
if (constraintCase_ == 9 &&
constraint_ != com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.newBuilder((com.google.ortools.sat.IntegerArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 9) {
intMaxBuilder_.mergeFrom(value);
}
intMaxBuilder_.setMessage(value);
}
constraintCase_ = 9;
return this;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
public Builder clearIntMax() {
if (intMaxBuilder_ == null) {
if (constraintCase_ == 9) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 9) {
constraintCase_ = 0;
constraint_ = null;
}
intMaxBuilder_.clear();
}
return this;
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
public com.google.ortools.sat.IntegerArgumentProto.Builder getIntMaxBuilder() {
return getIntMaxFieldBuilder().getBuilder();
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntMaxOrBuilder() {
if ((constraintCase_ == 9) && (intMaxBuilder_ != null)) {
return intMaxBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 9) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_max constraint forces the target to equal the maximum of all
* variables.
* TODO(user): Remove int_max in favor of lin_max.
*
*
* .operations_research.sat.IntegerArgumentProto int_max = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>
getIntMaxFieldBuilder() {
if (intMaxBuilder_ == null) {
if (!(constraintCase_ == 9)) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
intMaxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>(
(com.google.ortools.sat.IntegerArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 9;
onChanged();;
return intMaxBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> linMaxBuilder_;
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
* @return Whether the linMax field is set.
*/
@java.lang.Override
public boolean hasLinMax() {
return constraintCase_ == 27;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
* @return The linMax.
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProto getLinMax() {
if (linMaxBuilder_ == null) {
if (constraintCase_ == 27) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 27) {
return linMaxBuilder_.getMessage();
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
public Builder setLinMax(com.google.ortools.sat.LinearArgumentProto value) {
if (linMaxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
linMaxBuilder_.setMessage(value);
}
constraintCase_ = 27;
return this;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
public Builder setLinMax(
com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
if (linMaxBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
linMaxBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 27;
return this;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
public Builder mergeLinMax(com.google.ortools.sat.LinearArgumentProto value) {
if (linMaxBuilder_ == null) {
if (constraintCase_ == 27 &&
constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 27) {
linMaxBuilder_.mergeFrom(value);
}
linMaxBuilder_.setMessage(value);
}
constraintCase_ = 27;
return this;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
public Builder clearLinMax() {
if (linMaxBuilder_ == null) {
if (constraintCase_ == 27) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 27) {
constraintCase_ = 0;
constraint_ = null;
}
linMaxBuilder_.clear();
}
return this;
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
public com.google.ortools.sat.LinearArgumentProto.Builder getLinMaxBuilder() {
return getLinMaxFieldBuilder().getBuilder();
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder() {
if ((constraintCase_ == 27) && (linMaxBuilder_ != null)) {
return linMaxBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 27) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
}
/**
*
* The lin_max constraint forces the target to equal the maximum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_max = 27;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
getLinMaxFieldBuilder() {
if (linMaxBuilder_ == null) {
if (!(constraintCase_ == 27)) {
constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
linMaxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
(com.google.ortools.sat.LinearArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 27;
onChanged();;
return linMaxBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder> intMinBuilder_;
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
* @return Whether the intMin field is set.
*/
@java.lang.Override
public boolean hasIntMin() {
return constraintCase_ == 10;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
* @return The intMin.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntMin() {
if (intMinBuilder_ == null) {
if (constraintCase_ == 10) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 10) {
return intMinBuilder_.getMessage();
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
public Builder setIntMin(com.google.ortools.sat.IntegerArgumentProto value) {
if (intMinBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intMinBuilder_.setMessage(value);
}
constraintCase_ = 10;
return this;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
public Builder setIntMin(
com.google.ortools.sat.IntegerArgumentProto.Builder builderForValue) {
if (intMinBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intMinBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 10;
return this;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
public Builder mergeIntMin(com.google.ortools.sat.IntegerArgumentProto value) {
if (intMinBuilder_ == null) {
if (constraintCase_ == 10 &&
constraint_ != com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.newBuilder((com.google.ortools.sat.IntegerArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 10) {
intMinBuilder_.mergeFrom(value);
}
intMinBuilder_.setMessage(value);
}
constraintCase_ = 10;
return this;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
public Builder clearIntMin() {
if (intMinBuilder_ == null) {
if (constraintCase_ == 10) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 10) {
constraintCase_ = 0;
constraint_ = null;
}
intMinBuilder_.clear();
}
return this;
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
public com.google.ortools.sat.IntegerArgumentProto.Builder getIntMinBuilder() {
return getIntMinFieldBuilder().getBuilder();
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntMinOrBuilder() {
if ((constraintCase_ == 10) && (intMinBuilder_ != null)) {
return intMinBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 10) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_min constraint forces the target to equal the minimum of all
* variables.
* TODO(user): Remove int_min in favor of lin_min.
*
*
* .operations_research.sat.IntegerArgumentProto int_min = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>
getIntMinFieldBuilder() {
if (intMinBuilder_ == null) {
if (!(constraintCase_ == 10)) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
intMinBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>(
(com.google.ortools.sat.IntegerArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 10;
onChanged();;
return intMinBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder> linMinBuilder_;
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
* @return Whether the linMin field is set.
*/
@java.lang.Override
public boolean hasLinMin() {
return constraintCase_ == 28;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
* @return The linMin.
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProto getLinMin() {
if (linMinBuilder_ == null) {
if (constraintCase_ == 28) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 28) {
return linMinBuilder_.getMessage();
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
public Builder setLinMin(com.google.ortools.sat.LinearArgumentProto value) {
if (linMinBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
linMinBuilder_.setMessage(value);
}
constraintCase_ = 28;
return this;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
public Builder setLinMin(
com.google.ortools.sat.LinearArgumentProto.Builder builderForValue) {
if (linMinBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
linMinBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 28;
return this;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
public Builder mergeLinMin(com.google.ortools.sat.LinearArgumentProto value) {
if (linMinBuilder_ == null) {
if (constraintCase_ == 28 &&
constraint_ != com.google.ortools.sat.LinearArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.LinearArgumentProto.newBuilder((com.google.ortools.sat.LinearArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 28) {
linMinBuilder_.mergeFrom(value);
}
linMinBuilder_.setMessage(value);
}
constraintCase_ = 28;
return this;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
public Builder clearLinMin() {
if (linMinBuilder_ == null) {
if (constraintCase_ == 28) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 28) {
constraintCase_ = 0;
constraint_ = null;
}
linMinBuilder_.clear();
}
return this;
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
public com.google.ortools.sat.LinearArgumentProto.Builder getLinMinBuilder() {
return getLinMinFieldBuilder().getBuilder();
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
@java.lang.Override
public com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMinOrBuilder() {
if ((constraintCase_ == 28) && (linMinBuilder_ != null)) {
return linMinBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 28) {
return (com.google.ortools.sat.LinearArgumentProto) constraint_;
}
return com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
}
/**
*
* The lin_min constraint forces the target to equal the minimum of all
* linear expressions.
*
*
* .operations_research.sat.LinearArgumentProto lin_min = 28;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>
getLinMinFieldBuilder() {
if (linMinBuilder_ == null) {
if (!(constraintCase_ == 28)) {
constraint_ = com.google.ortools.sat.LinearArgumentProto.getDefaultInstance();
}
linMinBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearArgumentProto, com.google.ortools.sat.LinearArgumentProto.Builder, com.google.ortools.sat.LinearArgumentProtoOrBuilder>(
(com.google.ortools.sat.LinearArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 28;
onChanged();;
return linMinBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder> intProdBuilder_;
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
* @return Whether the intProd field is set.
*/
@java.lang.Override
public boolean hasIntProd() {
return constraintCase_ == 11;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
* @return The intProd.
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProto getIntProd() {
if (intProdBuilder_ == null) {
if (constraintCase_ == 11) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
} else {
if (constraintCase_ == 11) {
return intProdBuilder_.getMessage();
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
public Builder setIntProd(com.google.ortools.sat.IntegerArgumentProto value) {
if (intProdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intProdBuilder_.setMessage(value);
}
constraintCase_ = 11;
return this;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
public Builder setIntProd(
com.google.ortools.sat.IntegerArgumentProto.Builder builderForValue) {
if (intProdBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intProdBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 11;
return this;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
public Builder mergeIntProd(com.google.ortools.sat.IntegerArgumentProto value) {
if (intProdBuilder_ == null) {
if (constraintCase_ == 11 &&
constraint_ != com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.newBuilder((com.google.ortools.sat.IntegerArgumentProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 11) {
intProdBuilder_.mergeFrom(value);
}
intProdBuilder_.setMessage(value);
}
constraintCase_ = 11;
return this;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
public Builder clearIntProd() {
if (intProdBuilder_ == null) {
if (constraintCase_ == 11) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 11) {
constraintCase_ = 0;
constraint_ = null;
}
intProdBuilder_.clear();
}
return this;
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
public com.google.ortools.sat.IntegerArgumentProto.Builder getIntProdBuilder() {
return getIntProdFieldBuilder().getBuilder();
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
@java.lang.Override
public com.google.ortools.sat.IntegerArgumentProtoOrBuilder getIntProdOrBuilder() {
if ((constraintCase_ == 11) && (intProdBuilder_ != null)) {
return intProdBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 11) {
return (com.google.ortools.sat.IntegerArgumentProto) constraint_;
}
return com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
}
/**
*
* The int_prod constraint forces the target to equal the product of all
* variables.
*
*
* .operations_research.sat.IntegerArgumentProto int_prod = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>
getIntProdFieldBuilder() {
if (intProdBuilder_ == null) {
if (!(constraintCase_ == 11)) {
constraint_ = com.google.ortools.sat.IntegerArgumentProto.getDefaultInstance();
}
intProdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntegerArgumentProto, com.google.ortools.sat.IntegerArgumentProto.Builder, com.google.ortools.sat.IntegerArgumentProtoOrBuilder>(
(com.google.ortools.sat.IntegerArgumentProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 11;
onChanged();;
return intProdBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder> linearBuilder_;
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
* @return Whether the linear field is set.
*/
@java.lang.Override
public boolean hasLinear() {
return constraintCase_ == 12;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
* @return The linear.
*/
@java.lang.Override
public com.google.ortools.sat.LinearConstraintProto getLinear() {
if (linearBuilder_ == null) {
if (constraintCase_ == 12) {
return (com.google.ortools.sat.LinearConstraintProto) constraint_;
}
return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 12) {
return linearBuilder_.getMessage();
}
return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
}
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
public Builder setLinear(com.google.ortools.sat.LinearConstraintProto value) {
if (linearBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
linearBuilder_.setMessage(value);
}
constraintCase_ = 12;
return this;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
public Builder setLinear(
com.google.ortools.sat.LinearConstraintProto.Builder builderForValue) {
if (linearBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
linearBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 12;
return this;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
public Builder mergeLinear(com.google.ortools.sat.LinearConstraintProto value) {
if (linearBuilder_ == null) {
if (constraintCase_ == 12 &&
constraint_ != com.google.ortools.sat.LinearConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.LinearConstraintProto.newBuilder((com.google.ortools.sat.LinearConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 12) {
linearBuilder_.mergeFrom(value);
}
linearBuilder_.setMessage(value);
}
constraintCase_ = 12;
return this;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
public Builder clearLinear() {
if (linearBuilder_ == null) {
if (constraintCase_ == 12) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 12) {
constraintCase_ = 0;
constraint_ = null;
}
linearBuilder_.clear();
}
return this;
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
public com.google.ortools.sat.LinearConstraintProto.Builder getLinearBuilder() {
return getLinearFieldBuilder().getBuilder();
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
@java.lang.Override
public com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder() {
if ((constraintCase_ == 12) && (linearBuilder_ != null)) {
return linearBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 12) {
return (com.google.ortools.sat.LinearConstraintProto) constraint_;
}
return com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
}
}
/**
*
* The linear constraint enforces a linear inequality among the variables,
* such as 0 <= x + 2y <= 10.
*
*
* .operations_research.sat.LinearConstraintProto linear = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>
getLinearFieldBuilder() {
if (linearBuilder_ == null) {
if (!(constraintCase_ == 12)) {
constraint_ = com.google.ortools.sat.LinearConstraintProto.getDefaultInstance();
}
linearBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.LinearConstraintProto, com.google.ortools.sat.LinearConstraintProto.Builder, com.google.ortools.sat.LinearConstraintProtoOrBuilder>(
(com.google.ortools.sat.LinearConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 12;
onChanged();;
return linearBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder> allDiffBuilder_;
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
* @return Whether the allDiff field is set.
*/
@java.lang.Override
public boolean hasAllDiff() {
return constraintCase_ == 13;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
* @return The allDiff.
*/
@java.lang.Override
public com.google.ortools.sat.AllDifferentConstraintProto getAllDiff() {
if (allDiffBuilder_ == null) {
if (constraintCase_ == 13) {
return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
}
return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 13) {
return allDiffBuilder_.getMessage();
}
return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
}
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
public Builder setAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
if (allDiffBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
allDiffBuilder_.setMessage(value);
}
constraintCase_ = 13;
return this;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
public Builder setAllDiff(
com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue) {
if (allDiffBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
allDiffBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 13;
return this;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
public Builder mergeAllDiff(com.google.ortools.sat.AllDifferentConstraintProto value) {
if (allDiffBuilder_ == null) {
if (constraintCase_ == 13 &&
constraint_ != com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.newBuilder((com.google.ortools.sat.AllDifferentConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 13) {
allDiffBuilder_.mergeFrom(value);
}
allDiffBuilder_.setMessage(value);
}
constraintCase_ = 13;
return this;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
public Builder clearAllDiff() {
if (allDiffBuilder_ == null) {
if (constraintCase_ == 13) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 13) {
constraintCase_ = 0;
constraint_ = null;
}
allDiffBuilder_.clear();
}
return this;
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
public com.google.ortools.sat.AllDifferentConstraintProto.Builder getAllDiffBuilder() {
return getAllDiffFieldBuilder().getBuilder();
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
@java.lang.Override
public com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder() {
if ((constraintCase_ == 13) && (allDiffBuilder_ != null)) {
return allDiffBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 13) {
return (com.google.ortools.sat.AllDifferentConstraintProto) constraint_;
}
return com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
}
}
/**
*
* The all_diff constraint forces all variables to take different values.
*
*
* .operations_research.sat.AllDifferentConstraintProto all_diff = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>
getAllDiffFieldBuilder() {
if (allDiffBuilder_ == null) {
if (!(constraintCase_ == 13)) {
constraint_ = com.google.ortools.sat.AllDifferentConstraintProto.getDefaultInstance();
}
allDiffBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AllDifferentConstraintProto, com.google.ortools.sat.AllDifferentConstraintProto.Builder, com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder>(
(com.google.ortools.sat.AllDifferentConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 13;
onChanged();;
return allDiffBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder> elementBuilder_;
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
* @return Whether the element field is set.
*/
@java.lang.Override
public boolean hasElement() {
return constraintCase_ == 14;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
* @return The element.
*/
@java.lang.Override
public com.google.ortools.sat.ElementConstraintProto getElement() {
if (elementBuilder_ == null) {
if (constraintCase_ == 14) {
return (com.google.ortools.sat.ElementConstraintProto) constraint_;
}
return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 14) {
return elementBuilder_.getMessage();
}
return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
}
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
public Builder setElement(com.google.ortools.sat.ElementConstraintProto value) {
if (elementBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
elementBuilder_.setMessage(value);
}
constraintCase_ = 14;
return this;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
public Builder setElement(
com.google.ortools.sat.ElementConstraintProto.Builder builderForValue) {
if (elementBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
elementBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 14;
return this;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
public Builder mergeElement(com.google.ortools.sat.ElementConstraintProto value) {
if (elementBuilder_ == null) {
if (constraintCase_ == 14 &&
constraint_ != com.google.ortools.sat.ElementConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.ElementConstraintProto.newBuilder((com.google.ortools.sat.ElementConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 14) {
elementBuilder_.mergeFrom(value);
}
elementBuilder_.setMessage(value);
}
constraintCase_ = 14;
return this;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
public Builder clearElement() {
if (elementBuilder_ == null) {
if (constraintCase_ == 14) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 14) {
constraintCase_ = 0;
constraint_ = null;
}
elementBuilder_.clear();
}
return this;
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
public com.google.ortools.sat.ElementConstraintProto.Builder getElementBuilder() {
return getElementFieldBuilder().getBuilder();
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
@java.lang.Override
public com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder() {
if ((constraintCase_ == 14) && (elementBuilder_ != null)) {
return elementBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 14) {
return (com.google.ortools.sat.ElementConstraintProto) constraint_;
}
return com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
}
}
/**
*
* The element constraint forces the variable with the given index
* to be equal to the target.
*
*
* .operations_research.sat.ElementConstraintProto element = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>
getElementFieldBuilder() {
if (elementBuilder_ == null) {
if (!(constraintCase_ == 14)) {
constraint_ = com.google.ortools.sat.ElementConstraintProto.getDefaultInstance();
}
elementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ElementConstraintProto, com.google.ortools.sat.ElementConstraintProto.Builder, com.google.ortools.sat.ElementConstraintProtoOrBuilder>(
(com.google.ortools.sat.ElementConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 14;
onChanged();;
return elementBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder> circuitBuilder_;
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
* @return Whether the circuit field is set.
*/
@java.lang.Override
public boolean hasCircuit() {
return constraintCase_ == 15;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
* @return The circuit.
*/
@java.lang.Override
public com.google.ortools.sat.CircuitConstraintProto getCircuit() {
if (circuitBuilder_ == null) {
if (constraintCase_ == 15) {
return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 15) {
return circuitBuilder_.getMessage();
}
return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
}
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
public Builder setCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
if (circuitBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
circuitBuilder_.setMessage(value);
}
constraintCase_ = 15;
return this;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
public Builder setCircuit(
com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue) {
if (circuitBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
circuitBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 15;
return this;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
public Builder mergeCircuit(com.google.ortools.sat.CircuitConstraintProto value) {
if (circuitBuilder_ == null) {
if (constraintCase_ == 15 &&
constraint_ != com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.CircuitConstraintProto.newBuilder((com.google.ortools.sat.CircuitConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 15) {
circuitBuilder_.mergeFrom(value);
}
circuitBuilder_.setMessage(value);
}
constraintCase_ = 15;
return this;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
public Builder clearCircuit() {
if (circuitBuilder_ == null) {
if (constraintCase_ == 15) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 15) {
constraintCase_ = 0;
constraint_ = null;
}
circuitBuilder_.clear();
}
return this;
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
public com.google.ortools.sat.CircuitConstraintProto.Builder getCircuitBuilder() {
return getCircuitFieldBuilder().getBuilder();
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
@java.lang.Override
public com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder() {
if ((constraintCase_ == 15) && (circuitBuilder_ != null)) {
return circuitBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 15) {
return (com.google.ortools.sat.CircuitConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
}
}
/**
*
* The circuit constraint takes a graph and forces the arcs present
* (with arc presence indicated by a literal) to form a unique cycle.
*
*
* .operations_research.sat.CircuitConstraintProto circuit = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>
getCircuitFieldBuilder() {
if (circuitBuilder_ == null) {
if (!(constraintCase_ == 15)) {
constraint_ = com.google.ortools.sat.CircuitConstraintProto.getDefaultInstance();
}
circuitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitConstraintProto, com.google.ortools.sat.CircuitConstraintProto.Builder, com.google.ortools.sat.CircuitConstraintProtoOrBuilder>(
(com.google.ortools.sat.CircuitConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 15;
onChanged();;
return circuitBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder> routesBuilder_;
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
* @return Whether the routes field is set.
*/
@java.lang.Override
public boolean hasRoutes() {
return constraintCase_ == 23;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
* @return The routes.
*/
@java.lang.Override
public com.google.ortools.sat.RoutesConstraintProto getRoutes() {
if (routesBuilder_ == null) {
if (constraintCase_ == 23) {
return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
}
return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 23) {
return routesBuilder_.getMessage();
}
return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
}
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
public Builder setRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
routesBuilder_.setMessage(value);
}
constraintCase_ = 23;
return this;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
public Builder setRoutes(
com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue) {
if (routesBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
routesBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 23;
return this;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
public Builder mergeRoutes(com.google.ortools.sat.RoutesConstraintProto value) {
if (routesBuilder_ == null) {
if (constraintCase_ == 23 &&
constraint_ != com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.RoutesConstraintProto.newBuilder((com.google.ortools.sat.RoutesConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 23) {
routesBuilder_.mergeFrom(value);
}
routesBuilder_.setMessage(value);
}
constraintCase_ = 23;
return this;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
public Builder clearRoutes() {
if (routesBuilder_ == null) {
if (constraintCase_ == 23) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 23) {
constraintCase_ = 0;
constraint_ = null;
}
routesBuilder_.clear();
}
return this;
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
public com.google.ortools.sat.RoutesConstraintProto.Builder getRoutesBuilder() {
return getRoutesFieldBuilder().getBuilder();
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
@java.lang.Override
public com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder() {
if ((constraintCase_ == 23) && (routesBuilder_ != null)) {
return routesBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 23) {
return (com.google.ortools.sat.RoutesConstraintProto) constraint_;
}
return com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
}
}
/**
*
* The routes constraint implements the vehicle routing problem.
*
*
* .operations_research.sat.RoutesConstraintProto routes = 23;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>
getRoutesFieldBuilder() {
if (routesBuilder_ == null) {
if (!(constraintCase_ == 23)) {
constraint_ = com.google.ortools.sat.RoutesConstraintProto.getDefaultInstance();
}
routesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.RoutesConstraintProto, com.google.ortools.sat.RoutesConstraintProto.Builder, com.google.ortools.sat.RoutesConstraintProtoOrBuilder>(
(com.google.ortools.sat.RoutesConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 23;
onChanged();;
return routesBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitCoveringConstraintProto, com.google.ortools.sat.CircuitCoveringConstraintProto.Builder, com.google.ortools.sat.CircuitCoveringConstraintProtoOrBuilder> circuitCoveringBuilder_;
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
* @return Whether the circuitCovering field is set.
*/
@java.lang.Override
public boolean hasCircuitCovering() {
return constraintCase_ == 25;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
* @return The circuitCovering.
*/
@java.lang.Override
public com.google.ortools.sat.CircuitCoveringConstraintProto getCircuitCovering() {
if (circuitCoveringBuilder_ == null) {
if (constraintCase_ == 25) {
return (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 25) {
return circuitCoveringBuilder_.getMessage();
}
return com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
}
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
public Builder setCircuitCovering(com.google.ortools.sat.CircuitCoveringConstraintProto value) {
if (circuitCoveringBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
circuitCoveringBuilder_.setMessage(value);
}
constraintCase_ = 25;
return this;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
public Builder setCircuitCovering(
com.google.ortools.sat.CircuitCoveringConstraintProto.Builder builderForValue) {
if (circuitCoveringBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
circuitCoveringBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 25;
return this;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
public Builder mergeCircuitCovering(com.google.ortools.sat.CircuitCoveringConstraintProto value) {
if (circuitCoveringBuilder_ == null) {
if (constraintCase_ == 25 &&
constraint_ != com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.CircuitCoveringConstraintProto.newBuilder((com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 25) {
circuitCoveringBuilder_.mergeFrom(value);
}
circuitCoveringBuilder_.setMessage(value);
}
constraintCase_ = 25;
return this;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
public Builder clearCircuitCovering() {
if (circuitCoveringBuilder_ == null) {
if (constraintCase_ == 25) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 25) {
constraintCase_ = 0;
constraint_ = null;
}
circuitCoveringBuilder_.clear();
}
return this;
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
public com.google.ortools.sat.CircuitCoveringConstraintProto.Builder getCircuitCoveringBuilder() {
return getCircuitCoveringFieldBuilder().getBuilder();
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
@java.lang.Override
public com.google.ortools.sat.CircuitCoveringConstraintProtoOrBuilder getCircuitCoveringOrBuilder() {
if ((constraintCase_ == 25) && (circuitCoveringBuilder_ != null)) {
return circuitCoveringBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 25) {
return (com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_;
}
return com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
}
}
/**
*
* The circuit_covering constraint is similar to the circuit constraint,
* but allows multiple non-overlapping cycles instead of just one.
*
*
* .operations_research.sat.CircuitCoveringConstraintProto circuit_covering = 25;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitCoveringConstraintProto, com.google.ortools.sat.CircuitCoveringConstraintProto.Builder, com.google.ortools.sat.CircuitCoveringConstraintProtoOrBuilder>
getCircuitCoveringFieldBuilder() {
if (circuitCoveringBuilder_ == null) {
if (!(constraintCase_ == 25)) {
constraint_ = com.google.ortools.sat.CircuitCoveringConstraintProto.getDefaultInstance();
}
circuitCoveringBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CircuitCoveringConstraintProto, com.google.ortools.sat.CircuitCoveringConstraintProto.Builder, com.google.ortools.sat.CircuitCoveringConstraintProtoOrBuilder>(
(com.google.ortools.sat.CircuitCoveringConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 25;
onChanged();;
return circuitCoveringBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder> tableBuilder_;
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
* @return Whether the table field is set.
*/
@java.lang.Override
public boolean hasTable() {
return constraintCase_ == 16;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
* @return The table.
*/
@java.lang.Override
public com.google.ortools.sat.TableConstraintProto getTable() {
if (tableBuilder_ == null) {
if (constraintCase_ == 16) {
return (com.google.ortools.sat.TableConstraintProto) constraint_;
}
return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 16) {
return tableBuilder_.getMessage();
}
return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
}
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
public Builder setTable(com.google.ortools.sat.TableConstraintProto value) {
if (tableBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
tableBuilder_.setMessage(value);
}
constraintCase_ = 16;
return this;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
public Builder setTable(
com.google.ortools.sat.TableConstraintProto.Builder builderForValue) {
if (tableBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
tableBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 16;
return this;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
public Builder mergeTable(com.google.ortools.sat.TableConstraintProto value) {
if (tableBuilder_ == null) {
if (constraintCase_ == 16 &&
constraint_ != com.google.ortools.sat.TableConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.TableConstraintProto.newBuilder((com.google.ortools.sat.TableConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 16) {
tableBuilder_.mergeFrom(value);
}
tableBuilder_.setMessage(value);
}
constraintCase_ = 16;
return this;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
public Builder clearTable() {
if (tableBuilder_ == null) {
if (constraintCase_ == 16) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 16) {
constraintCase_ = 0;
constraint_ = null;
}
tableBuilder_.clear();
}
return this;
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
public com.google.ortools.sat.TableConstraintProto.Builder getTableBuilder() {
return getTableFieldBuilder().getBuilder();
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
@java.lang.Override
public com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder() {
if ((constraintCase_ == 16) && (tableBuilder_ != null)) {
return tableBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 16) {
return (com.google.ortools.sat.TableConstraintProto) constraint_;
}
return com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
}
}
/**
*
* The table constraint enforces what values a tuple of variables may
* take.
*
*
* .operations_research.sat.TableConstraintProto table = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>
getTableFieldBuilder() {
if (tableBuilder_ == null) {
if (!(constraintCase_ == 16)) {
constraint_ = com.google.ortools.sat.TableConstraintProto.getDefaultInstance();
}
tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.TableConstraintProto, com.google.ortools.sat.TableConstraintProto.Builder, com.google.ortools.sat.TableConstraintProtoOrBuilder>(
(com.google.ortools.sat.TableConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 16;
onChanged();;
return tableBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder> automatonBuilder_;
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
* @return Whether the automaton field is set.
*/
@java.lang.Override
public boolean hasAutomaton() {
return constraintCase_ == 17;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
* @return The automaton.
*/
@java.lang.Override
public com.google.ortools.sat.AutomatonConstraintProto getAutomaton() {
if (automatonBuilder_ == null) {
if (constraintCase_ == 17) {
return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
}
return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 17) {
return automatonBuilder_.getMessage();
}
return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
}
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
public Builder setAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
if (automatonBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
automatonBuilder_.setMessage(value);
}
constraintCase_ = 17;
return this;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
public Builder setAutomaton(
com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue) {
if (automatonBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
automatonBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 17;
return this;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
public Builder mergeAutomaton(com.google.ortools.sat.AutomatonConstraintProto value) {
if (automatonBuilder_ == null) {
if (constraintCase_ == 17 &&
constraint_ != com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.AutomatonConstraintProto.newBuilder((com.google.ortools.sat.AutomatonConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 17) {
automatonBuilder_.mergeFrom(value);
}
automatonBuilder_.setMessage(value);
}
constraintCase_ = 17;
return this;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
public Builder clearAutomaton() {
if (automatonBuilder_ == null) {
if (constraintCase_ == 17) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 17) {
constraintCase_ = 0;
constraint_ = null;
}
automatonBuilder_.clear();
}
return this;
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
public com.google.ortools.sat.AutomatonConstraintProto.Builder getAutomatonBuilder() {
return getAutomatonFieldBuilder().getBuilder();
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
@java.lang.Override
public com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder() {
if ((constraintCase_ == 17) && (automatonBuilder_ != null)) {
return automatonBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 17) {
return (com.google.ortools.sat.AutomatonConstraintProto) constraint_;
}
return com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
}
}
/**
*
* The automaton constraint forces a sequence of variables to be accepted
* by an automaton.
*
*
* .operations_research.sat.AutomatonConstraintProto automaton = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>
getAutomatonFieldBuilder() {
if (automatonBuilder_ == null) {
if (!(constraintCase_ == 17)) {
constraint_ = com.google.ortools.sat.AutomatonConstraintProto.getDefaultInstance();
}
automatonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.AutomatonConstraintProto, com.google.ortools.sat.AutomatonConstraintProto.Builder, com.google.ortools.sat.AutomatonConstraintProtoOrBuilder>(
(com.google.ortools.sat.AutomatonConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 17;
onChanged();;
return automatonBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder> inverseBuilder_;
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
* @return Whether the inverse field is set.
*/
@java.lang.Override
public boolean hasInverse() {
return constraintCase_ == 18;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
* @return The inverse.
*/
@java.lang.Override
public com.google.ortools.sat.InverseConstraintProto getInverse() {
if (inverseBuilder_ == null) {
if (constraintCase_ == 18) {
return (com.google.ortools.sat.InverseConstraintProto) constraint_;
}
return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 18) {
return inverseBuilder_.getMessage();
}
return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
}
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
public Builder setInverse(com.google.ortools.sat.InverseConstraintProto value) {
if (inverseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
inverseBuilder_.setMessage(value);
}
constraintCase_ = 18;
return this;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
public Builder setInverse(
com.google.ortools.sat.InverseConstraintProto.Builder builderForValue) {
if (inverseBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
inverseBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 18;
return this;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
public Builder mergeInverse(com.google.ortools.sat.InverseConstraintProto value) {
if (inverseBuilder_ == null) {
if (constraintCase_ == 18 &&
constraint_ != com.google.ortools.sat.InverseConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.InverseConstraintProto.newBuilder((com.google.ortools.sat.InverseConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 18) {
inverseBuilder_.mergeFrom(value);
}
inverseBuilder_.setMessage(value);
}
constraintCase_ = 18;
return this;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
public Builder clearInverse() {
if (inverseBuilder_ == null) {
if (constraintCase_ == 18) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 18) {
constraintCase_ = 0;
constraint_ = null;
}
inverseBuilder_.clear();
}
return this;
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
public com.google.ortools.sat.InverseConstraintProto.Builder getInverseBuilder() {
return getInverseFieldBuilder().getBuilder();
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
@java.lang.Override
public com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder() {
if ((constraintCase_ == 18) && (inverseBuilder_ != null)) {
return inverseBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 18) {
return (com.google.ortools.sat.InverseConstraintProto) constraint_;
}
return com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
}
}
/**
*
* The inverse constraint forces two arrays to be inverses of each other:
* the values of one are the indices of the other, and vice versa.
*
*
* .operations_research.sat.InverseConstraintProto inverse = 18;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>
getInverseFieldBuilder() {
if (inverseBuilder_ == null) {
if (!(constraintCase_ == 18)) {
constraint_ = com.google.ortools.sat.InverseConstraintProto.getDefaultInstance();
}
inverseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.InverseConstraintProto, com.google.ortools.sat.InverseConstraintProto.Builder, com.google.ortools.sat.InverseConstraintProtoOrBuilder>(
(com.google.ortools.sat.InverseConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 18;
onChanged();;
return inverseBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder> reservoirBuilder_;
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
* @return Whether the reservoir field is set.
*/
@java.lang.Override
public boolean hasReservoir() {
return constraintCase_ == 24;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
* @return The reservoir.
*/
@java.lang.Override
public com.google.ortools.sat.ReservoirConstraintProto getReservoir() {
if (reservoirBuilder_ == null) {
if (constraintCase_ == 24) {
return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
}
return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 24) {
return reservoirBuilder_.getMessage();
}
return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
}
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
public Builder setReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
if (reservoirBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
reservoirBuilder_.setMessage(value);
}
constraintCase_ = 24;
return this;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
public Builder setReservoir(
com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue) {
if (reservoirBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
reservoirBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 24;
return this;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
public Builder mergeReservoir(com.google.ortools.sat.ReservoirConstraintProto value) {
if (reservoirBuilder_ == null) {
if (constraintCase_ == 24 &&
constraint_ != com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.ReservoirConstraintProto.newBuilder((com.google.ortools.sat.ReservoirConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 24) {
reservoirBuilder_.mergeFrom(value);
}
reservoirBuilder_.setMessage(value);
}
constraintCase_ = 24;
return this;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
public Builder clearReservoir() {
if (reservoirBuilder_ == null) {
if (constraintCase_ == 24) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 24) {
constraintCase_ = 0;
constraint_ = null;
}
reservoirBuilder_.clear();
}
return this;
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
public com.google.ortools.sat.ReservoirConstraintProto.Builder getReservoirBuilder() {
return getReservoirFieldBuilder().getBuilder();
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
@java.lang.Override
public com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder() {
if ((constraintCase_ == 24) && (reservoirBuilder_ != null)) {
return reservoirBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 24) {
return (com.google.ortools.sat.ReservoirConstraintProto) constraint_;
}
return com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
}
}
/**
*
* The reservoir constraint forces the sum of a set of active demands
* to always be between a specified minimum and maximum value during
* specific times.
*
*
* .operations_research.sat.ReservoirConstraintProto reservoir = 24;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>
getReservoirFieldBuilder() {
if (reservoirBuilder_ == null) {
if (!(constraintCase_ == 24)) {
constraint_ = com.google.ortools.sat.ReservoirConstraintProto.getDefaultInstance();
}
reservoirBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.ReservoirConstraintProto, com.google.ortools.sat.ReservoirConstraintProto.Builder, com.google.ortools.sat.ReservoirConstraintProtoOrBuilder>(
(com.google.ortools.sat.ReservoirConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 24;
onChanged();;
return reservoirBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder> intervalBuilder_;
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
* @return Whether the interval field is set.
*/
@java.lang.Override
public boolean hasInterval() {
return constraintCase_ == 19;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
* @return The interval.
*/
@java.lang.Override
public com.google.ortools.sat.IntervalConstraintProto getInterval() {
if (intervalBuilder_ == null) {
if (constraintCase_ == 19) {
return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
}
return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 19) {
return intervalBuilder_.getMessage();
}
return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
}
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
public Builder setInterval(com.google.ortools.sat.IntervalConstraintProto value) {
if (intervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
intervalBuilder_.setMessage(value);
}
constraintCase_ = 19;
return this;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
public Builder setInterval(
com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue) {
if (intervalBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
intervalBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 19;
return this;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
public Builder mergeInterval(com.google.ortools.sat.IntervalConstraintProto value) {
if (intervalBuilder_ == null) {
if (constraintCase_ == 19 &&
constraint_ != com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.IntervalConstraintProto.newBuilder((com.google.ortools.sat.IntervalConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 19) {
intervalBuilder_.mergeFrom(value);
}
intervalBuilder_.setMessage(value);
}
constraintCase_ = 19;
return this;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
public Builder clearInterval() {
if (intervalBuilder_ == null) {
if (constraintCase_ == 19) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 19) {
constraintCase_ = 0;
constraint_ = null;
}
intervalBuilder_.clear();
}
return this;
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
public com.google.ortools.sat.IntervalConstraintProto.Builder getIntervalBuilder() {
return getIntervalFieldBuilder().getBuilder();
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
@java.lang.Override
public com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder() {
if ((constraintCase_ == 19) && (intervalBuilder_ != null)) {
return intervalBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 19) {
return (com.google.ortools.sat.IntervalConstraintProto) constraint_;
}
return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
}
}
/**
*
* The interval constraint takes a start, end, and size, and forces
* start + size == end.
*
*
* .operations_research.sat.IntervalConstraintProto interval = 19;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>
getIntervalFieldBuilder() {
if (intervalBuilder_ == null) {
if (!(constraintCase_ == 19)) {
constraint_ = com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
}
intervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.IntervalConstraintProto, com.google.ortools.sat.IntervalConstraintProto.Builder, com.google.ortools.sat.IntervalConstraintProtoOrBuilder>(
(com.google.ortools.sat.IntervalConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 19;
onChanged();;
return intervalBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder> noOverlapBuilder_;
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
* @return Whether the noOverlap field is set.
*/
@java.lang.Override
public boolean hasNoOverlap() {
return constraintCase_ == 20;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
* @return The noOverlap.
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap() {
if (noOverlapBuilder_ == null) {
if (constraintCase_ == 20) {
return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 20) {
return noOverlapBuilder_.getMessage();
}
return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
}
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
public Builder setNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
if (noOverlapBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
noOverlapBuilder_.setMessage(value);
}
constraintCase_ = 20;
return this;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
public Builder setNoOverlap(
com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue) {
if (noOverlapBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
noOverlapBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 20;
return this;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
public Builder mergeNoOverlap(com.google.ortools.sat.NoOverlapConstraintProto value) {
if (noOverlapBuilder_ == null) {
if (constraintCase_ == 20 &&
constraint_ != com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.newBuilder((com.google.ortools.sat.NoOverlapConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 20) {
noOverlapBuilder_.mergeFrom(value);
}
noOverlapBuilder_.setMessage(value);
}
constraintCase_ = 20;
return this;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
public Builder clearNoOverlap() {
if (noOverlapBuilder_ == null) {
if (constraintCase_ == 20) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 20) {
constraintCase_ = 0;
constraint_ = null;
}
noOverlapBuilder_.clear();
}
return this;
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
public com.google.ortools.sat.NoOverlapConstraintProto.Builder getNoOverlapBuilder() {
return getNoOverlapFieldBuilder().getBuilder();
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder() {
if ((constraintCase_ == 20) && (noOverlapBuilder_ != null)) {
return noOverlapBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 20) {
return (com.google.ortools.sat.NoOverlapConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
}
}
/**
*
* The no_overlap constraint prevents a set of intervals from
* overlapping; in scheduling, this is called a disjunctive
* constraint.
*
*
* .operations_research.sat.NoOverlapConstraintProto no_overlap = 20;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>
getNoOverlapFieldBuilder() {
if (noOverlapBuilder_ == null) {
if (!(constraintCase_ == 20)) {
constraint_ = com.google.ortools.sat.NoOverlapConstraintProto.getDefaultInstance();
}
noOverlapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlapConstraintProto, com.google.ortools.sat.NoOverlapConstraintProto.Builder, com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder>(
(com.google.ortools.sat.NoOverlapConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 20;
onChanged();;
return noOverlapBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder> noOverlap2DBuilder_;
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
* @return Whether the noOverlap2d field is set.
*/
@java.lang.Override
public boolean hasNoOverlap2D() {
return constraintCase_ == 21;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
* @return The noOverlap2d.
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D() {
if (noOverlap2DBuilder_ == null) {
if (constraintCase_ == 21) {
return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 21) {
return noOverlap2DBuilder_.getMessage();
}
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
public Builder setNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
if (noOverlap2DBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
noOverlap2DBuilder_.setMessage(value);
}
constraintCase_ = 21;
return this;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
public Builder setNoOverlap2D(
com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue) {
if (noOverlap2DBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
noOverlap2DBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 21;
return this;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
public Builder mergeNoOverlap2D(com.google.ortools.sat.NoOverlap2DConstraintProto value) {
if (noOverlap2DBuilder_ == null) {
if (constraintCase_ == 21 &&
constraint_ != com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.newBuilder((com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 21) {
noOverlap2DBuilder_.mergeFrom(value);
}
noOverlap2DBuilder_.setMessage(value);
}
constraintCase_ = 21;
return this;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
public Builder clearNoOverlap2D() {
if (noOverlap2DBuilder_ == null) {
if (constraintCase_ == 21) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 21) {
constraintCase_ = 0;
constraint_ = null;
}
noOverlap2DBuilder_.clear();
}
return this;
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
public com.google.ortools.sat.NoOverlap2DConstraintProto.Builder getNoOverlap2DBuilder() {
return getNoOverlap2DFieldBuilder().getBuilder();
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
@java.lang.Override
public com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder() {
if ((constraintCase_ == 21) && (noOverlap2DBuilder_ != null)) {
return noOverlap2DBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 21) {
return (com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_;
}
return com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
}
/**
*
* The no_overlap_2d constraint prevents a set of boxes from overlapping.
*
*
* .operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>
getNoOverlap2DFieldBuilder() {
if (noOverlap2DBuilder_ == null) {
if (!(constraintCase_ == 21)) {
constraint_ = com.google.ortools.sat.NoOverlap2DConstraintProto.getDefaultInstance();
}
noOverlap2DBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.NoOverlap2DConstraintProto, com.google.ortools.sat.NoOverlap2DConstraintProto.Builder, com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder>(
(com.google.ortools.sat.NoOverlap2DConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 21;
onChanged();;
return noOverlap2DBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder> cumulativeBuilder_;
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
* @return Whether the cumulative field is set.
*/
@java.lang.Override
public boolean hasCumulative() {
return constraintCase_ == 22;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
* @return The cumulative.
*/
@java.lang.Override
public com.google.ortools.sat.CumulativeConstraintProto getCumulative() {
if (cumulativeBuilder_ == null) {
if (constraintCase_ == 22) {
return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
}
return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
} else {
if (constraintCase_ == 22) {
return cumulativeBuilder_.getMessage();
}
return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
}
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
public Builder setCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
if (cumulativeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
constraint_ = value;
onChanged();
} else {
cumulativeBuilder_.setMessage(value);
}
constraintCase_ = 22;
return this;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
public Builder setCumulative(
com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue) {
if (cumulativeBuilder_ == null) {
constraint_ = builderForValue.build();
onChanged();
} else {
cumulativeBuilder_.setMessage(builderForValue.build());
}
constraintCase_ = 22;
return this;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
public Builder mergeCumulative(com.google.ortools.sat.CumulativeConstraintProto value) {
if (cumulativeBuilder_ == null) {
if (constraintCase_ == 22 &&
constraint_ != com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance()) {
constraint_ = com.google.ortools.sat.CumulativeConstraintProto.newBuilder((com.google.ortools.sat.CumulativeConstraintProto) constraint_)
.mergeFrom(value).buildPartial();
} else {
constraint_ = value;
}
onChanged();
} else {
if (constraintCase_ == 22) {
cumulativeBuilder_.mergeFrom(value);
}
cumulativeBuilder_.setMessage(value);
}
constraintCase_ = 22;
return this;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
public Builder clearCumulative() {
if (cumulativeBuilder_ == null) {
if (constraintCase_ == 22) {
constraintCase_ = 0;
constraint_ = null;
onChanged();
}
} else {
if (constraintCase_ == 22) {
constraintCase_ = 0;
constraint_ = null;
}
cumulativeBuilder_.clear();
}
return this;
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
public com.google.ortools.sat.CumulativeConstraintProto.Builder getCumulativeBuilder() {
return getCumulativeFieldBuilder().getBuilder();
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
@java.lang.Override
public com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder() {
if ((constraintCase_ == 22) && (cumulativeBuilder_ != null)) {
return cumulativeBuilder_.getMessageOrBuilder();
} else {
if (constraintCase_ == 22) {
return (com.google.ortools.sat.CumulativeConstraintProto) constraint_;
}
return com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
}
}
/**
*
* The cumulative constraint ensures that for any integer point, the sum
* of the demands of the intervals containing that point does not exceed
* the capacity.
*
*
* .operations_research.sat.CumulativeConstraintProto cumulative = 22;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>
getCumulativeFieldBuilder() {
if (cumulativeBuilder_ == null) {
if (!(constraintCase_ == 22)) {
constraint_ = com.google.ortools.sat.CumulativeConstraintProto.getDefaultInstance();
}
cumulativeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ortools.sat.CumulativeConstraintProto, com.google.ortools.sat.CumulativeConstraintProto.Builder, com.google.ortools.sat.CumulativeConstraintProtoOrBuilder>(
(com.google.ortools.sat.CumulativeConstraintProto) constraint_,
getParentForChildren(),
isClean());
constraint_ = null;
}
constraintCase_ = 22;
onChanged();;
return cumulativeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:operations_research.sat.ConstraintProto)
}
// @@protoc_insertion_point(class_scope:operations_research.sat.ConstraintProto)
private static final com.google.ortools.sat.ConstraintProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ortools.sat.ConstraintProto();
}
public static com.google.ortools.sat.ConstraintProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConstraintProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConstraintProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ortools.sat.ConstraintProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy