public final class ConstraintProto extends com.google.protobuf.GeneratedMessage implements ConstraintProtoOrBuilder
Next id: 31Protobuf type
operations_research.sat.ConstraintProto| Modifier and Type | Class and Description |
|---|---|
static class |
ConstraintProto.Builder
Next id: 31
|
static class |
ConstraintProto.ConstraintCase |
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| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_DIFF_FIELD_NUMBER |
static int |
AT_MOST_ONE_FIELD_NUMBER |
static int |
AUTOMATON_FIELD_NUMBER |
static int |
BOOL_AND_FIELD_NUMBER |
static int |
BOOL_OR_FIELD_NUMBER |
static int |
BOOL_XOR_FIELD_NUMBER |
static int |
CIRCUIT_FIELD_NUMBER |
static int |
CUMULATIVE_FIELD_NUMBER |
static int |
DUMMY_CONSTRAINT_FIELD_NUMBER |
static int |
ELEMENT_FIELD_NUMBER |
static int |
ENFORCEMENT_LITERAL_FIELD_NUMBER |
static int |
EXACTLY_ONE_FIELD_NUMBER |
static int |
INT_DIV_FIELD_NUMBER |
static int |
INT_MOD_FIELD_NUMBER |
static int |
INT_PROD_FIELD_NUMBER |
static int |
INTERVAL_FIELD_NUMBER |
static int |
INVERSE_FIELD_NUMBER |
static int |
LIN_MAX_FIELD_NUMBER |
static int |
LINEAR_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
NO_OVERLAP_2D_FIELD_NUMBER |
static int |
NO_OVERLAP_FIELD_NUMBER |
static int |
RESERVOIR_FIELD_NUMBER |
static int |
ROUTES_FIELD_NUMBER |
static int |
TABLE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
AllDifferentConstraintProto |
getAllDiff()
The all_diff constraint forces all variables to take different values.
|
AllDifferentConstraintProtoOrBuilder |
getAllDiffOrBuilder()
The all_diff constraint forces all variables to take different values.
|
BoolArgumentProto |
getAtMostOne()
The at_most_one constraint enforces that no more than one literal is
true at the same time.
|
BoolArgumentProtoOrBuilder |
getAtMostOneOrBuilder()
The at_most_one constraint enforces that no more than one literal is
true at the same time.
|
AutomatonConstraintProto |
getAutomaton()
The automaton constraint forces a sequence of variables to be accepted
by an automaton.
|
AutomatonConstraintProtoOrBuilder |
getAutomatonOrBuilder()
The automaton constraint forces a sequence of variables to be accepted
by an automaton.
|
BoolArgumentProto |
getBoolAnd()
The bool_and constraint forces all of the literals to be true.
|
BoolArgumentProtoOrBuilder |
getBoolAndOrBuilder()
The bool_and constraint forces all of the literals to be true.
|
BoolArgumentProto |
getBoolOr()
The bool_or constraint forces at least one literal to be true.
|
BoolArgumentProtoOrBuilder |
getBoolOrOrBuilder()
The bool_or constraint forces at least one literal to be true.
|
BoolArgumentProto |
getBoolXor()
The bool_xor constraint forces an odd number of the literals to be true.
|
BoolArgumentProtoOrBuilder |
getBoolXorOrBuilder()
The bool_xor constraint forces an odd number of the literals to be true.
|
CircuitConstraintProto |
getCircuit()
The circuit constraint takes a graph and forces the arcs present
(with arc presence indicated by a literal) to form a unique cycle.
|
CircuitConstraintProtoOrBuilder |
getCircuitOrBuilder()
The circuit constraint takes a graph and forces the arcs present
(with arc presence indicated by a literal) to form a unique cycle.
|
ConstraintProto.ConstraintCase |
getConstraintCase() |
CumulativeConstraintProto |
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.
|
CumulativeConstraintProtoOrBuilder |
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.
|
static ConstraintProto |
getDefaultInstance() |
ConstraintProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
ListOfVariablesProto |
getDummyConstraint()
This constraint is not meant to be used and will be rejected by the
solver.
|
ListOfVariablesProtoOrBuilder |
getDummyConstraintOrBuilder()
This constraint is not meant to be used and will be rejected by the
solver.
|
ElementConstraintProto |
getElement()
The element constraint forces the variable with the given index
to be equal to the target.
|
ElementConstraintProtoOrBuilder |
getElementOrBuilder()
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 |
getEnforcementLiteralCount()
The constraint will be enforced iff all literals listed here are true.
|
java.util.List<java.lang.Integer> |
getEnforcementLiteralList()
The constraint will be enforced iff all literals listed here are true.
|
BoolArgumentProto |
getExactlyOne()
The exactly_one constraint force exactly one literal to true and no more.
|
BoolArgumentProtoOrBuilder |
getExactlyOneOrBuilder()
The exactly_one constraint force exactly one literal to true and no more.
|
LinearArgumentProto |
getIntDiv()
The int_div constraint forces the target to equal exprs[0] / exprs[1].
|
LinearArgumentProtoOrBuilder |
getIntDivOrBuilder()
The int_div constraint forces the target to equal exprs[0] / exprs[1].
|
IntervalConstraintProto |
getInterval()
The interval constraint takes a start, end, and size, and forces
start + size == end.
|
IntervalConstraintProtoOrBuilder |
getIntervalOrBuilder()
The interval constraint takes a start, end, and size, and forces
start + size == end.
|
LinearArgumentProto |
getIntMod()
The int_mod constraint forces the target to equal exprs[0] % exprs[1].
|
LinearArgumentProtoOrBuilder |
getIntModOrBuilder()
The int_mod constraint forces the target to equal exprs[0] % exprs[1].
|
LinearArgumentProto |
getIntProd()
The int_prod constraint forces the target to equal the product of all
variables.
|
LinearArgumentProtoOrBuilder |
getIntProdOrBuilder()
The int_prod constraint forces the target to equal the product of all
variables.
|
InverseConstraintProto |
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.
|
InverseConstraintProtoOrBuilder |
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.
|
LinearConstraintProto |
getLinear()
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.
|
LinearConstraintProtoOrBuilder |
getLinearOrBuilder()
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.
|
LinearArgumentProto |
getLinMax()
The lin_max constraint forces the target to equal the maximum of all
linear expressions.
|
LinearArgumentProtoOrBuilder |
getLinMaxOrBuilder()
The lin_max constraint forces the target to equal the maximum of all
linear expressions.
|
java.lang.String |
getName()
For debug/logging only.
|
com.google.protobuf.ByteString |
getNameBytes()
For debug/logging only.
|
NoOverlapConstraintProto |
getNoOverlap()
The no_overlap constraint prevents a set of intervals from
overlapping; in scheduling, this is called a disjunctive
constraint.
|
NoOverlap2DConstraintProto |
getNoOverlap2D()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
|
NoOverlap2DConstraintProtoOrBuilder |
getNoOverlap2DOrBuilder()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
|
NoOverlapConstraintProtoOrBuilder |
getNoOverlapOrBuilder()
The no_overlap constraint prevents a set of intervals from
overlapping; in scheduling, this is called a disjunctive
constraint.
|
com.google.protobuf.Parser<ConstraintProto> |
getParserForType() |
ReservoirConstraintProto |
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.
|
ReservoirConstraintProtoOrBuilder |
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.
|
RoutesConstraintProto |
getRoutes()
The routes constraint implements the vehicle routing problem.
|
RoutesConstraintProtoOrBuilder |
getRoutesOrBuilder()
The routes constraint implements the vehicle routing problem.
|
int |
getSerializedSize() |
TableConstraintProto |
getTable()
The table constraint enforces what values a tuple of variables may
take.
|
TableConstraintProtoOrBuilder |
getTableOrBuilder()
The table constraint enforces what values a tuple of variables may
take.
|
boolean |
hasAllDiff()
The all_diff constraint forces all variables to take different values.
|
boolean |
hasAtMostOne()
The at_most_one constraint enforces that no more than one literal is
true at the same time.
|
boolean |
hasAutomaton()
The automaton constraint forces a sequence of variables to be accepted
by an automaton.
|
boolean |
hasBoolAnd()
The bool_and constraint forces all of the literals to be true.
|
boolean |
hasBoolOr()
The bool_or constraint forces at least one literal to be true.
|
boolean |
hasBoolXor()
The bool_xor constraint forces an odd number of the literals to be true.
|
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.
|
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.
|
boolean |
hasDummyConstraint()
This constraint is not meant to be used and will be rejected by the
solver.
|
boolean |
hasElement()
The element constraint forces the variable with the given index
to be equal to the target.
|
boolean |
hasExactlyOne()
The exactly_one constraint force exactly one literal to true and no more.
|
int |
hashCode() |
boolean |
hasIntDiv()
The int_div constraint forces the target to equal exprs[0] / exprs[1].
|
boolean |
hasInterval()
The interval constraint takes a start, end, and size, and forces
start + size == end.
|
boolean |
hasIntMod()
The int_mod constraint forces the target to equal exprs[0] % exprs[1].
|
boolean |
hasIntProd()
The int_prod constraint forces the target to equal the product of all
variables.
|
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.
|
boolean |
hasLinear()
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.
|
boolean |
hasLinMax()
The lin_max constraint forces the target to equal the maximum of all
linear expressions.
|
boolean |
hasNoOverlap()
The no_overlap constraint prevents a set of intervals from
overlapping; in scheduling, this is called a disjunctive
constraint.
|
boolean |
hasNoOverlap2D()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
|
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.
|
boolean |
hasRoutes()
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 |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ConstraintProto.Builder |
newBuilder() |
static ConstraintProto.Builder |
newBuilder(ConstraintProto prototype) |
ConstraintProto.Builder |
newBuilderForType() |
protected ConstraintProto.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static ConstraintProto |
parseDelimitedFrom(java.io.InputStream input) |
static ConstraintProto |
parseDelimitedFrom(java.io.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(java.nio.ByteBuffer data) |
static ConstraintProto |
parseFrom(java.nio.ByteBuffer 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(java.io.InputStream input) |
static ConstraintProto |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ConstraintProto> |
parser() |
ConstraintProto.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int ENFORCEMENT_LITERAL_FIELD_NUMBER
public static final int BOOL_OR_FIELD_NUMBER
public static final int BOOL_AND_FIELD_NUMBER
public static final int AT_MOST_ONE_FIELD_NUMBER
public static final int EXACTLY_ONE_FIELD_NUMBER
public static final int BOOL_XOR_FIELD_NUMBER
public static final int INT_DIV_FIELD_NUMBER
public static final int INT_MOD_FIELD_NUMBER
public static final int INT_PROD_FIELD_NUMBER
public static final int LIN_MAX_FIELD_NUMBER
public static final int LINEAR_FIELD_NUMBER
public static final int ALL_DIFF_FIELD_NUMBER
public static final int ELEMENT_FIELD_NUMBER
public static final int CIRCUIT_FIELD_NUMBER
public static final int ROUTES_FIELD_NUMBER
public static final int TABLE_FIELD_NUMBER
public static final int AUTOMATON_FIELD_NUMBER
public static final int INVERSE_FIELD_NUMBER
public static final int RESERVOIR_FIELD_NUMBER
public static final int INTERVAL_FIELD_NUMBER
public static final int NO_OVERLAP_FIELD_NUMBER
public static final int NO_OVERLAP_2D_FIELD_NUMBER
public static final int CUMULATIVE_FIELD_NUMBER
public static final int DUMMY_CONSTRAINT_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic ConstraintProto.ConstraintCase getConstraintCase()
getConstraintCase in interface ConstraintProtoOrBuilderpublic java.lang.String getName()
For debug/logging only. Can be empty.
string name = 1;getName in interface ConstraintProtoOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
For debug/logging only. Can be empty.
string name = 1;getNameBytes in interface ConstraintProtoOrBuilderpublic java.util.List<java.lang.Integer> 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;getEnforcementLiteralList in interface ConstraintProtoOrBuilderpublic 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;getEnforcementLiteralCount in interface ConstraintProtoOrBuilderpublic 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;getEnforcementLiteral in interface ConstraintProtoOrBuilderindex - The index of the element to return.public boolean hasBoolOr()
The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;hasBoolOr in interface ConstraintProtoOrBuilderpublic BoolArgumentProto getBoolOr()
The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;getBoolOr in interface ConstraintProtoOrBuilderpublic BoolArgumentProtoOrBuilder getBoolOrOrBuilder()
The bool_or constraint forces at least one literal to be true.
.operations_research.sat.BoolArgumentProto bool_or = 3;getBoolOrOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasBoolAnd in interface ConstraintProtoOrBuilderpublic BoolArgumentProto 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;getBoolAnd in interface ConstraintProtoOrBuilderpublic BoolArgumentProtoOrBuilder 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;getBoolAndOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasAtMostOne in interface ConstraintProtoOrBuilderpublic BoolArgumentProto 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;getAtMostOne in interface ConstraintProtoOrBuilderpublic BoolArgumentProtoOrBuilder 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;getAtMostOneOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasExactlyOne in interface ConstraintProtoOrBuilderpublic BoolArgumentProto 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;getExactlyOne in interface ConstraintProtoOrBuilderpublic BoolArgumentProtoOrBuilder 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;getExactlyOneOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasBoolXor()
The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;hasBoolXor in interface ConstraintProtoOrBuilderpublic BoolArgumentProto getBoolXor()
The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;getBoolXor in interface ConstraintProtoOrBuilderpublic BoolArgumentProtoOrBuilder getBoolXorOrBuilder()
The bool_xor constraint forces an odd number of the literals to be true.
.operations_research.sat.BoolArgumentProto bool_xor = 5;getBoolXorOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasIntDiv in interface ConstraintProtoOrBuilderpublic LinearArgumentProto 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;getIntDiv in interface ConstraintProtoOrBuilderpublic LinearArgumentProtoOrBuilder 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;getIntDivOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasIntMod in interface ConstraintProtoOrBuilderpublic LinearArgumentProto 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;getIntMod in interface ConstraintProtoOrBuilderpublic LinearArgumentProtoOrBuilder 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;getIntModOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasIntProd in interface ConstraintProtoOrBuilderpublic LinearArgumentProto 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;getIntProd in interface ConstraintProtoOrBuilderpublic LinearArgumentProtoOrBuilder 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;getIntProdOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasLinMax in interface ConstraintProtoOrBuilderpublic LinearArgumentProto 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;getLinMax in interface ConstraintProtoOrBuilderpublic LinearArgumentProtoOrBuilder 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;getLinMaxOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasLinear()
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;hasLinear in interface ConstraintProtoOrBuilderpublic LinearConstraintProto getLinear()
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;getLinear in interface ConstraintProtoOrBuilderpublic LinearConstraintProtoOrBuilder getLinearOrBuilder()
The linear constraint enforces a linear inequality among the variables, such as 0 <= x + 2y <= 10.
.operations_research.sat.LinearConstraintProto linear = 12;getLinearOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasAllDiff()
The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;hasAllDiff in interface ConstraintProtoOrBuilderpublic AllDifferentConstraintProto getAllDiff()
The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;getAllDiff in interface ConstraintProtoOrBuilderpublic AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder()
The all_diff constraint forces all variables to take different values.
.operations_research.sat.AllDifferentConstraintProto all_diff = 13;getAllDiffOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasElement()
The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;hasElement in interface ConstraintProtoOrBuilderpublic ElementConstraintProto getElement()
The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;getElement in interface ConstraintProtoOrBuilderpublic ElementConstraintProtoOrBuilder getElementOrBuilder()
The element constraint forces the variable with the given index to be equal to the target.
.operations_research.sat.ElementConstraintProto element = 14;getElementOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasCircuit in interface ConstraintProtoOrBuilderpublic CircuitConstraintProto 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;getCircuit in interface ConstraintProtoOrBuilderpublic CircuitConstraintProtoOrBuilder 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;getCircuitOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasRoutes()
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;hasRoutes in interface ConstraintProtoOrBuilderpublic RoutesConstraintProto getRoutes()
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;getRoutes in interface ConstraintProtoOrBuilderpublic RoutesConstraintProtoOrBuilder getRoutesOrBuilder()
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;getRoutesOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasTable()
The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;hasTable in interface ConstraintProtoOrBuilderpublic TableConstraintProto getTable()
The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;getTable in interface ConstraintProtoOrBuilderpublic TableConstraintProtoOrBuilder getTableOrBuilder()
The table constraint enforces what values a tuple of variables may take.
.operations_research.sat.TableConstraintProto table = 16;getTableOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasAutomaton()
The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;hasAutomaton in interface ConstraintProtoOrBuilderpublic AutomatonConstraintProto getAutomaton()
The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;getAutomaton in interface ConstraintProtoOrBuilderpublic AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder()
The automaton constraint forces a sequence of variables to be accepted by an automaton.
.operations_research.sat.AutomatonConstraintProto automaton = 17;getAutomatonOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasInverse in interface ConstraintProtoOrBuilderpublic InverseConstraintProto 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;getInverse in interface ConstraintProtoOrBuilderpublic InverseConstraintProtoOrBuilder 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;getInverseOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasReservoir in interface ConstraintProtoOrBuilderpublic ReservoirConstraintProto 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;getReservoir in interface ConstraintProtoOrBuilderpublic ReservoirConstraintProtoOrBuilder 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;getReservoirOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasInterval()
The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;hasInterval in interface ConstraintProtoOrBuilderpublic IntervalConstraintProto getInterval()
The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;getInterval in interface ConstraintProtoOrBuilderpublic IntervalConstraintProtoOrBuilder getIntervalOrBuilder()
The interval constraint takes a start, end, and size, and forces start + size == end.
.operations_research.sat.IntervalConstraintProto interval = 19;getIntervalOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasNoOverlap in interface ConstraintProtoOrBuilderpublic NoOverlapConstraintProto 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;getNoOverlap in interface ConstraintProtoOrBuilderpublic NoOverlapConstraintProtoOrBuilder 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;getNoOverlapOrBuilder in interface ConstraintProtoOrBuilderpublic boolean hasNoOverlap2D()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;hasNoOverlap2D in interface ConstraintProtoOrBuilderpublic NoOverlap2DConstraintProto getNoOverlap2D()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;getNoOverlap2D in interface ConstraintProtoOrBuilderpublic NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder()
The no_overlap_2d constraint prevents a set of boxes from overlapping.
.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;getNoOverlap2DOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasCumulative in interface ConstraintProtoOrBuilderpublic CumulativeConstraintProto 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;getCumulative in interface ConstraintProtoOrBuilderpublic CumulativeConstraintProtoOrBuilder 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;getCumulativeOrBuilder in interface ConstraintProtoOrBuilderpublic 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;hasDummyConstraint in interface ConstraintProtoOrBuilderpublic ListOfVariablesProto 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;getDummyConstraint in interface ConstraintProtoOrBuilderpublic ListOfVariablesProtoOrBuilder 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;getDummyConstraintOrBuilder in interface ConstraintProtoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ConstraintProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ConstraintProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ConstraintProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static ConstraintProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ConstraintProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static ConstraintProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic ConstraintProto.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ConstraintProto.Builder newBuilder()
public static ConstraintProto.Builder newBuilder(ConstraintProto prototype)
public ConstraintProto.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ConstraintProto.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static ConstraintProto getDefaultInstance()
public static com.google.protobuf.Parser<ConstraintProto> parser()
public com.google.protobuf.Parser<ConstraintProto> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic ConstraintProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.