Class ConstraintProto
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.ortools.sat.ConstraintProto
- All Implemented Interfaces:
ConstraintProtoOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
@Generated
public final class ConstraintProto
extends com.google.protobuf.GeneratedMessage
implements ConstraintProtoOrBuilder
Next id: 31Protobuf type
operations_research.sat.ConstraintProto
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Next id: 31static enum
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>, BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,
BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The all_diff constraint forces all variables to take different values.The all_diff constraint forces all variables to take different values.The at_most_one constraint enforces that no more than one literal is true at the same time.The at_most_one constraint enforces that no more than one literal is true at the same time.The automaton constraint forces a sequence of variables to be accepted by an automaton.The automaton constraint forces a sequence of variables to be accepted by an automaton.The bool_and constraint forces all of the literals to be true.The bool_and constraint forces all of the literals to be true.The bool_or constraint forces at least one literal to be true.The bool_or constraint forces at least one literal to be true.The bool_xor constraint forces an odd number of the literals to be true.The bool_xor constraint forces an odd number of the literals to be true.The circuit constraint takes a graph and forces the arcs present (with arc presence indicated by a literal) to form a unique cycle.The circuit constraint takes a graph and forces the arcs present (with arc presence indicated by a literal) to form a unique cycle.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.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.static ConstraintProto
static final com.google.protobuf.Descriptors.Descriptor
This constraint is not meant to be used and will be rejected by the solver.This constraint is not meant to be used and will be rejected by the solver.The element constraint forces the variable with the given index to be equal to the target.The element constraint forces the variable with the given index to be equal to the target.int
getEnforcementLiteral
(int index) The constraint will be enforced iff all literals listed here are true.int
The constraint will be enforced iff all literals listed here are true.The constraint will be enforced iff all literals listed here are true.The exactly_one constraint force exactly one literal to true and no more.The exactly_one constraint force exactly one literal to true and no more.The int_div constraint forces the target to equal exprs[0] / exprs[1].The int_div constraint forces the target to equal exprs[0] / exprs[1].The interval constraint takes a start, end, and size, and forces start + size == end.The interval constraint takes a start, end, and size, and forces start + size == end.The int_mod constraint forces the target to equal exprs[0] % exprs[1].The int_mod constraint forces the target to equal exprs[0] % exprs[1].The int_prod constraint forces the target to equal the product of all variables.The int_prod constraint forces the target to equal the product of all variables.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.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.The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.The lin_max constraint forces the target to equal the maximum of all linear expressions.The lin_max constraint forces the target to equal the maximum of all linear expressions.getName()
For debug/logging only.com.google.protobuf.ByteString
For debug/logging only.The no_overlap constraint prevents a set of intervals from overlapping; in scheduling, this is called a disjunctive constraint.The no_overlap_2d constraint prevents a set of boxes from overlapping.The no_overlap_2d constraint prevents a set of boxes from overlapping.The no_overlap constraint prevents a set of intervals from overlapping; in scheduling, this is called a disjunctive constraint.com.google.protobuf.Parser
<ConstraintProto> 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.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.The routes constraint implements the vehicle routing problem.The routes constraint implements the vehicle routing problem.int
getTable()
The table constraint enforces what values a tuple of variables may take.The table constraint enforces what values a tuple of variables may take.boolean
The all_diff constraint forces all variables to take different values.boolean
The at_most_one constraint enforces that no more than one literal is true at the same time.boolean
The automaton constraint forces a sequence of variables to be accepted by an automaton.boolean
The bool_and constraint forces all of the literals to be true.boolean
The bool_or constraint forces at least one literal to be true.boolean
The bool_xor constraint forces an odd number of the literals to be true.boolean
The circuit constraint takes a graph and forces the arcs present (with arc presence indicated by a literal) to form a unique cycle.boolean
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.boolean
This constraint is not meant to be used and will be rejected by the solver.boolean
The element constraint forces the variable with the given index to be equal to the target.boolean
The exactly_one constraint force exactly one literal to true and no more.int
hashCode()
boolean
The int_div constraint forces the target to equal exprs[0] / exprs[1].boolean
The interval constraint takes a start, end, and size, and forces start + size == end.boolean
The int_mod constraint forces the target to equal exprs[0] % exprs[1].boolean
The int_prod constraint forces the target to equal the product of all variables.boolean
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.boolean
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.boolean
The lin_max constraint forces the target to equal the maximum of all linear expressions.boolean
The no_overlap constraint prevents a set of intervals from overlapping; in scheduling, this is called a disjunctive constraint.boolean
The no_overlap_2d constraint prevents a set of boxes from overlapping.boolean
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.boolean
The routes constraint implements the vehicle routing problem.boolean
hasTable()
The table constraint enforces what values a tuple of variables may take.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static ConstraintProto.Builder
static ConstraintProto.Builder
newBuilder
(ConstraintProto prototype) protected ConstraintProto.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static ConstraintProto
parseDelimitedFrom
(InputStream input) static ConstraintProto
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ConstraintProto
parseFrom
(byte[] data) static ConstraintProto
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ConstraintProto
parseFrom
(com.google.protobuf.ByteString data) static ConstraintProto
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ConstraintProto
parseFrom
(com.google.protobuf.CodedInputStream input) static ConstraintProto
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ConstraintProto
parseFrom
(InputStream input) static ConstraintProto
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ConstraintProto
parseFrom
(ByteBuffer data) static ConstraintProto
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<ConstraintProto> parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
ENFORCEMENT_LITERAL_FIELD_NUMBER
public static final int ENFORCEMENT_LITERAL_FIELD_NUMBER- See Also:
-
BOOL_OR_FIELD_NUMBER
public static final int BOOL_OR_FIELD_NUMBER- See Also:
-
BOOL_AND_FIELD_NUMBER
public static final int BOOL_AND_FIELD_NUMBER- See Also:
-
AT_MOST_ONE_FIELD_NUMBER
public static final int AT_MOST_ONE_FIELD_NUMBER- See Also:
-
EXACTLY_ONE_FIELD_NUMBER
public static final int EXACTLY_ONE_FIELD_NUMBER- See Also:
-
BOOL_XOR_FIELD_NUMBER
public static final int BOOL_XOR_FIELD_NUMBER- See Also:
-
INT_DIV_FIELD_NUMBER
public static final int INT_DIV_FIELD_NUMBER- See Also:
-
INT_MOD_FIELD_NUMBER
public static final int INT_MOD_FIELD_NUMBER- See Also:
-
INT_PROD_FIELD_NUMBER
public static final int INT_PROD_FIELD_NUMBER- See Also:
-
LIN_MAX_FIELD_NUMBER
public static final int LIN_MAX_FIELD_NUMBER- See Also:
-
LINEAR_FIELD_NUMBER
public static final int LINEAR_FIELD_NUMBER- See Also:
-
ALL_DIFF_FIELD_NUMBER
public static final int ALL_DIFF_FIELD_NUMBER- See Also:
-
ELEMENT_FIELD_NUMBER
public static final int ELEMENT_FIELD_NUMBER- See Also:
-
CIRCUIT_FIELD_NUMBER
public static final int CIRCUIT_FIELD_NUMBER- See Also:
-
ROUTES_FIELD_NUMBER
public static final int ROUTES_FIELD_NUMBER- See Also:
-
TABLE_FIELD_NUMBER
public static final int TABLE_FIELD_NUMBER- See Also:
-
AUTOMATON_FIELD_NUMBER
public static final int AUTOMATON_FIELD_NUMBER- See Also:
-
INVERSE_FIELD_NUMBER
public static final int INVERSE_FIELD_NUMBER- See Also:
-
RESERVOIR_FIELD_NUMBER
public static final int RESERVOIR_FIELD_NUMBER- See Also:
-
INTERVAL_FIELD_NUMBER
public static final int INTERVAL_FIELD_NUMBER- See Also:
-
NO_OVERLAP_FIELD_NUMBER
public static final int NO_OVERLAP_FIELD_NUMBER- See Also:
-
NO_OVERLAP_2D_FIELD_NUMBER
public static final int NO_OVERLAP_2D_FIELD_NUMBER- See Also:
-
CUMULATIVE_FIELD_NUMBER
public static final int CUMULATIVE_FIELD_NUMBER- See Also:
-
DUMMY_CONSTRAINT_FIELD_NUMBER
public static final int DUMMY_CONSTRAINT_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage
-
getConstraintCase
- Specified by:
getConstraintCase
in interfaceConstraintProtoOrBuilder
-
getName
For debug/logging only. Can be empty.
string name = 1;
- Specified by:
getName
in interfaceConstraintProtoOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()For debug/logging only. Can be empty.
string name = 1;
- Specified by:
getNameBytes
in interfaceConstraintProtoOrBuilder
- Returns:
- The bytes for name.
-
getEnforcementLiteralList
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;
- Specified by:
getEnforcementLiteralList
in interfaceConstraintProtoOrBuilder
- Returns:
- A list containing the enforcementLiteral.
-
getEnforcementLiteralCount
public int getEnforcementLiteralCount()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;
- Specified by:
getEnforcementLiteralCount
in interfaceConstraintProtoOrBuilder
- Returns:
- The count of enforcementLiteral.
-
getEnforcementLiteral
public int getEnforcementLiteral(int 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;
- Specified by:
getEnforcementLiteral
in interfaceConstraintProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The enforcementLiteral at the given index.
-
hasBoolOr
public boolean hasBoolOr()The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;
- Specified by:
hasBoolOr
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the boolOr field is set.
-
getBoolOr
The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;
- Specified by:
getBoolOr
in interfaceConstraintProtoOrBuilder
- Returns:
- The boolOr.
-
getBoolOrOrBuilder
The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;
- Specified by:
getBoolOrOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasBoolAnd
public boolean hasBoolAnd()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 or at_most_one. It is just more space efficient and handled slightly differently internally.
.operations_research.sat.BoolArgumentProto bool_and = 4;
- Specified by:
hasBoolAnd
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the boolAnd field is set.
-
getBoolAnd
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 or at_most_one. It is just more space efficient and handled slightly differently internally.
.operations_research.sat.BoolArgumentProto bool_and = 4;
- Specified by:
getBoolAnd
in interfaceConstraintProtoOrBuilder
- Returns:
- The boolAnd.
-
getBoolAndOrBuilder
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 or at_most_one. It is just more space efficient and handled slightly differently internally.
.operations_research.sat.BoolArgumentProto bool_and = 4;
- Specified by:
getBoolAndOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasAtMostOne
public boolean hasAtMostOne()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. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto at_most_one = 26;
- Specified by:
hasAtMostOne
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the atMostOne field is set.
-
getAtMostOne
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. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto at_most_one = 26;
- Specified by:
getAtMostOne
in interfaceConstraintProtoOrBuilder
- Returns:
- The atMostOne.
-
getAtMostOneOrBuilder
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. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto at_most_one = 26;
- Specified by:
getAtMostOneOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasExactlyOne
public boolean hasExactlyOne()The exactly_one constraint force exactly one literal to true and no more. Anytime a bool_or (it could have been called at_least_one) is included into an at_most_one, then the bool_or is actually an exactly one constraint, and the extra literal in the at_most_one can be set to false. So in this sense, this constraint is not really needed. it is just here for a better description of the problem structure and to facilitate some algorithm. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto exactly_one = 29;
- Specified by:
hasExactlyOne
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the exactlyOne field is set.
-
getExactlyOne
The exactly_one constraint force exactly one literal to true and no more. Anytime a bool_or (it could have been called at_least_one) is included into an at_most_one, then the bool_or is actually an exactly one constraint, and the extra literal in the at_most_one can be set to false. So in this sense, this constraint is not really needed. it is just here for a better description of the problem structure and to facilitate some algorithm. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto exactly_one = 29;
- Specified by:
getExactlyOne
in interfaceConstraintProtoOrBuilder
- Returns:
- The exactlyOne.
-
getExactlyOneOrBuilder
The exactly_one constraint force exactly one literal to true and no more. Anytime a bool_or (it could have been called at_least_one) is included into an at_most_one, then the bool_or is actually an exactly one constraint, and the extra literal in the at_most_one can be set to false. So in this sense, this constraint is not really needed. it is just here for a better description of the problem structure and to facilitate some algorithm. This constraint does not support enforcement_literal. Just use a linear constraint if you need to enforce it. You also do not need to use it directly, we will extract it from the model in most situations.
.operations_research.sat.BoolArgumentProto exactly_one = 29;
- Specified by:
getExactlyOneOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasBoolXor
public boolean hasBoolXor()The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;
- Specified by:
hasBoolXor
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the boolXor field is set.
-
getBoolXor
The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;
- Specified by:
getBoolXor
in interfaceConstraintProtoOrBuilder
- Returns:
- The boolXor.
-
getBoolXorOrBuilder
The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;
- Specified by:
getBoolXorOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasIntDiv
public boolean hasIntDiv()The int_div constraint forces the target to equal exprs[0] / exprs[1]. The division is "rounded" towards zero, so we can have for instance (2 = 12 / 5) or (-3 = -10 / 3). If you only want exact integer division, then you should use instead of t = a / b, the int_prod constraint a = b * t. If 0 belongs to the domain of exprs[1], then the model is deemed invalid.
.operations_research.sat.LinearArgumentProto int_div = 7;
- Specified by:
hasIntDiv
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the intDiv field is set.
-
getIntDiv
The int_div constraint forces the target to equal exprs[0] / exprs[1]. The division is "rounded" towards zero, so we can have for instance (2 = 12 / 5) or (-3 = -10 / 3). If you only want exact integer division, then you should use instead of t = a / b, the int_prod constraint a = b * t. If 0 belongs to the domain of exprs[1], then the model is deemed invalid.
.operations_research.sat.LinearArgumentProto int_div = 7;
- Specified by:
getIntDiv
in interfaceConstraintProtoOrBuilder
- Returns:
- The intDiv.
-
getIntDivOrBuilder
The int_div constraint forces the target to equal exprs[0] / exprs[1]. The division is "rounded" towards zero, so we can have for instance (2 = 12 / 5) or (-3 = -10 / 3). If you only want exact integer division, then you should use instead of t = a / b, the int_prod constraint a = b * t. If 0 belongs to the domain of exprs[1], then the model is deemed invalid.
.operations_research.sat.LinearArgumentProto int_div = 7;
- Specified by:
getIntDivOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasIntMod
public boolean hasIntMod()The int_mod constraint forces the target to equal exprs[0] % exprs[1]. The domain of exprs[1] must be strictly positive. The sign of the target is the same as the sign of exprs[0].
.operations_research.sat.LinearArgumentProto int_mod = 8;
- Specified by:
hasIntMod
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the intMod field is set.
-
getIntMod
The int_mod constraint forces the target to equal exprs[0] % exprs[1]. The domain of exprs[1] must be strictly positive. The sign of the target is the same as the sign of exprs[0].
.operations_research.sat.LinearArgumentProto int_mod = 8;
- Specified by:
getIntMod
in interfaceConstraintProtoOrBuilder
- Returns:
- The intMod.
-
getIntModOrBuilder
The int_mod constraint forces the target to equal exprs[0] % exprs[1]. The domain of exprs[1] must be strictly positive. The sign of the target is the same as the sign of exprs[0].
.operations_research.sat.LinearArgumentProto int_mod = 8;
- Specified by:
getIntModOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasIntProd
public boolean hasIntProd()The int_prod constraint forces the target to equal the product of all variables. By convention, because we can just remove term equal to one, the empty product forces the target to be one. Note that the solver checks for potential integer overflow. So the product of the maximum absolute value of all the terms (using the initial domain) should fit on an int64. Otherwise the model will be declared invalid.
.operations_research.sat.LinearArgumentProto int_prod = 11;
- Specified by:
hasIntProd
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the intProd field is set.
-
getIntProd
The int_prod constraint forces the target to equal the product of all variables. By convention, because we can just remove term equal to one, the empty product forces the target to be one. Note that the solver checks for potential integer overflow. So the product of the maximum absolute value of all the terms (using the initial domain) should fit on an int64. Otherwise the model will be declared invalid.
.operations_research.sat.LinearArgumentProto int_prod = 11;
- Specified by:
getIntProd
in interfaceConstraintProtoOrBuilder
- Returns:
- The intProd.
-
getIntProdOrBuilder
The int_prod constraint forces the target to equal the product of all variables. By convention, because we can just remove term equal to one, the empty product forces the target to be one. Note that the solver checks for potential integer overflow. So the product of the maximum absolute value of all the terms (using the initial domain) should fit on an int64. Otherwise the model will be declared invalid.
.operations_research.sat.LinearArgumentProto int_prod = 11;
- Specified by:
getIntProdOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasLinMax
public boolean hasLinMax()The lin_max constraint forces the target to equal the maximum of all linear expressions. Note that this can model a minimum simply by negating all expressions.
.operations_research.sat.LinearArgumentProto lin_max = 27;
- Specified by:
hasLinMax
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the linMax field is set.
-
getLinMax
The lin_max constraint forces the target to equal the maximum of all linear expressions. Note that this can model a minimum simply by negating all expressions.
.operations_research.sat.LinearArgumentProto lin_max = 27;
- Specified by:
getLinMax
in interfaceConstraintProtoOrBuilder
- Returns:
- The linMax.
-
getLinMaxOrBuilder
The lin_max constraint forces the target to equal the maximum of all linear expressions. Note that this can model a minimum simply by negating all expressions.
.operations_research.sat.LinearArgumentProto lin_max = 27;
- Specified by:
getLinMaxOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasLinear
public boolean hasLinear()The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;
- Specified by:
hasLinear
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the linear field is set.
-
getLinear
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;
- Specified by:
getLinear
in interfaceConstraintProtoOrBuilder
- Returns:
- The linear.
-
getLinearOrBuilder
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;
- Specified by:
getLinearOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasAllDiff
public boolean hasAllDiff()The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;
- Specified by:
hasAllDiff
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the allDiff field is set.
-
getAllDiff
The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;
- Specified by:
getAllDiff
in interfaceConstraintProtoOrBuilder
- Returns:
- The allDiff.
-
getAllDiffOrBuilder
The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;
- Specified by:
getAllDiffOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasElement
public boolean hasElement()The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;
- Specified by:
hasElement
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the element field is set.
-
getElement
The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;
- Specified by:
getElement
in interfaceConstraintProtoOrBuilder
- Returns:
- The element.
-
getElementOrBuilder
The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;
- Specified by:
getElementOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasCircuit
public boolean hasCircuit()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;
- Specified by:
hasCircuit
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the circuit field is set.
-
getCircuit
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;
- Specified by:
getCircuit
in interfaceConstraintProtoOrBuilder
- Returns:
- The circuit.
-
getCircuitOrBuilder
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;
- Specified by:
getCircuitOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasRoutes
public boolean hasRoutes()The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;
- Specified by:
hasRoutes
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the routes field is set.
-
getRoutes
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;
- Specified by:
getRoutes
in interfaceConstraintProtoOrBuilder
- Returns:
- The routes.
-
getRoutesOrBuilder
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;
- Specified by:
getRoutesOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasTable
public boolean hasTable()The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;
- Specified by:
hasTable
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the table field is set.
-
getTable
The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;
- Specified by:
getTable
in interfaceConstraintProtoOrBuilder
- Returns:
- The table.
-
getTableOrBuilder
The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;
- Specified by:
getTableOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasAutomaton
public boolean hasAutomaton()The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;
- Specified by:
hasAutomaton
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the automaton field is set.
-
getAutomaton
The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;
- Specified by:
getAutomaton
in interfaceConstraintProtoOrBuilder
- Returns:
- The automaton.
-
getAutomatonOrBuilder
The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;
- Specified by:
getAutomatonOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasInverse
public boolean hasInverse()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;
- Specified by:
hasInverse
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the inverse field is set.
-
getInverse
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;
- Specified by:
getInverse
in interfaceConstraintProtoOrBuilder
- Returns:
- The inverse.
-
getInverseOrBuilder
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;
- Specified by:
getInverseOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasReservoir
public boolean hasReservoir()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;
- Specified by:
hasReservoir
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the reservoir field is set.
-
getReservoir
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;
- Specified by:
getReservoir
in interfaceConstraintProtoOrBuilder
- Returns:
- The reservoir.
-
getReservoirOrBuilder
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;
- Specified by:
getReservoirOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasInterval
public boolean hasInterval()The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;
- Specified by:
hasInterval
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the interval field is set.
-
getInterval
The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;
- Specified by:
getInterval
in interfaceConstraintProtoOrBuilder
- Returns:
- The interval.
-
getIntervalOrBuilder
The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;
- Specified by:
getIntervalOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasNoOverlap
public boolean hasNoOverlap()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;
- Specified by:
hasNoOverlap
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the noOverlap field is set.
-
getNoOverlap
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;
- Specified by:
getNoOverlap
in interfaceConstraintProtoOrBuilder
- Returns:
- The noOverlap.
-
getNoOverlapOrBuilder
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;
- Specified by:
getNoOverlapOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasNoOverlap2D
public boolean hasNoOverlap2D()The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
- Specified by:
hasNoOverlap2D
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the noOverlap2d field is set.
-
getNoOverlap2D
The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
- Specified by:
getNoOverlap2D
in interfaceConstraintProtoOrBuilder
- Returns:
- The noOverlap2d.
-
getNoOverlap2DOrBuilder
The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;
- Specified by:
getNoOverlap2DOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasCumulative
public boolean hasCumulative()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;
- Specified by:
hasCumulative
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the cumulative field is set.
-
getCumulative
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;
- Specified by:
getCumulative
in interfaceConstraintProtoOrBuilder
- Returns:
- The cumulative.
-
getCumulativeOrBuilder
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;
- Specified by:
getCumulativeOrBuilder
in interfaceConstraintProtoOrBuilder
-
hasDummyConstraint
public boolean hasDummyConstraint()This constraint is not meant to be used and will be rejected by the solver. It is meant to mark variable when testing the presolve code.
.operations_research.sat.ListOfVariablesProto dummy_constraint = 30;
- Specified by:
hasDummyConstraint
in interfaceConstraintProtoOrBuilder
- Returns:
- Whether the dummyConstraint field is set.
-
getDummyConstraint
This constraint is not meant to be used and will be rejected by the solver. It is meant to mark variable when testing the presolve code.
.operations_research.sat.ListOfVariablesProto dummy_constraint = 30;
- Specified by:
getDummyConstraint
in interfaceConstraintProtoOrBuilder
- Returns:
- The dummyConstraint.
-
getDummyConstraintOrBuilder
This constraint is not meant to be used and will be rejected by the solver. It is meant to mark variable when testing the presolve code.
.operations_research.sat.ListOfVariablesProto dummy_constraint = 30;
- Specified by:
getDummyConstraintOrBuilder
in interfaceConstraintProtoOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ConstraintProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ConstraintProto parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ConstraintProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ConstraintProto parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ConstraintProto parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ConstraintProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-