Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.ConstraintProto.Builder Class Reference
Inheritance diagram for com.google.ortools.sat.ConstraintProto.Builder:
com.google.ortools.sat.ConstraintProtoOrBuilder

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.sat.ConstraintProto getDefaultInstanceForType ()
 
com.google.ortools.sat.ConstraintProto build ()
 
com.google.ortools.sat.ConstraintProto buildPartial ()
 
Builder clone ()
 
Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.ConstraintProto other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
ConstraintCase getConstraintCase ()
 
Builder clearConstraint ()
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
Builder setName (java.lang.String value)
 
Builder clearName ()
 
Builder setNameBytes (com.google.protobuf.ByteString value)
 
java.util.List< java.lang.Integer > getEnforcementLiteralList ()
 
int getEnforcementLiteralCount ()
 
int getEnforcementLiteral (int index)
 
Builder setEnforcementLiteral (int index, int value)
 
Builder addEnforcementLiteral (int value)
 
Builder addAllEnforcementLiteral (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearEnforcementLiteral ()
 
boolean hasBoolOr ()
 
com.google.ortools.sat.BoolArgumentProto getBoolOr ()
 
Builder setBoolOr (com.google.ortools.sat.BoolArgumentProto value)
 
Builder setBoolOr (com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
 
Builder mergeBoolOr (com.google.ortools.sat.BoolArgumentProto value)
 
Builder clearBoolOr ()
 
com.google.ortools.sat.BoolArgumentProto.Builder getBoolOrBuilder ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder ()
 
boolean hasBoolAnd ()
 
com.google.ortools.sat.BoolArgumentProto getBoolAnd ()
 
Builder setBoolAnd (com.google.ortools.sat.BoolArgumentProto value)
 
Builder setBoolAnd (com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
 
Builder mergeBoolAnd (com.google.ortools.sat.BoolArgumentProto value)
 
Builder clearBoolAnd ()
 
com.google.ortools.sat.BoolArgumentProto.Builder getBoolAndBuilder ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder ()
 
boolean hasAtMostOne ()
 
com.google.ortools.sat.BoolArgumentProto getAtMostOne ()
 
Builder setAtMostOne (com.google.ortools.sat.BoolArgumentProto value)
 
Builder setAtMostOne (com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
 
Builder mergeAtMostOne (com.google.ortools.sat.BoolArgumentProto value)
 
Builder clearAtMostOne ()
 
com.google.ortools.sat.BoolArgumentProto.Builder getAtMostOneBuilder ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder ()
 
boolean hasExactlyOne ()
 
com.google.ortools.sat.BoolArgumentProto getExactlyOne ()
 
Builder setExactlyOne (com.google.ortools.sat.BoolArgumentProto value)
 
Builder setExactlyOne (com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
 
Builder mergeExactlyOne (com.google.ortools.sat.BoolArgumentProto value)
 
Builder clearExactlyOne ()
 
com.google.ortools.sat.BoolArgumentProto.Builder getExactlyOneBuilder ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getExactlyOneOrBuilder ()
 
boolean hasBoolXor ()
 
com.google.ortools.sat.BoolArgumentProto getBoolXor ()
 
Builder setBoolXor (com.google.ortools.sat.BoolArgumentProto value)
 
Builder setBoolXor (com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
 
Builder mergeBoolXor (com.google.ortools.sat.BoolArgumentProto value)
 
Builder clearBoolXor ()
 
com.google.ortools.sat.BoolArgumentProto.Builder getBoolXorBuilder ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder ()
 
boolean hasIntDiv ()
 
com.google.ortools.sat.LinearArgumentProto getIntDiv ()
 
Builder setIntDiv (com.google.ortools.sat.LinearArgumentProto value)
 
Builder setIntDiv (com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
 
Builder mergeIntDiv (com.google.ortools.sat.LinearArgumentProto value)
 
Builder clearIntDiv ()
 
com.google.ortools.sat.LinearArgumentProto.Builder getIntDivBuilder ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntDivOrBuilder ()
 
boolean hasIntMod ()
 
com.google.ortools.sat.LinearArgumentProto getIntMod ()
 
Builder setIntMod (com.google.ortools.sat.LinearArgumentProto value)
 
Builder setIntMod (com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
 
Builder mergeIntMod (com.google.ortools.sat.LinearArgumentProto value)
 
Builder clearIntMod ()
 
com.google.ortools.sat.LinearArgumentProto.Builder getIntModBuilder ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntModOrBuilder ()
 
boolean hasIntProd ()
 
com.google.ortools.sat.LinearArgumentProto getIntProd ()
 
Builder setIntProd (com.google.ortools.sat.LinearArgumentProto value)
 
Builder setIntProd (com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
 
Builder mergeIntProd (com.google.ortools.sat.LinearArgumentProto value)
 
Builder clearIntProd ()
 
com.google.ortools.sat.LinearArgumentProto.Builder getIntProdBuilder ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntProdOrBuilder ()
 
boolean hasLinMax ()
 
com.google.ortools.sat.LinearArgumentProto getLinMax ()
 
Builder setLinMax (com.google.ortools.sat.LinearArgumentProto value)
 
Builder setLinMax (com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
 
Builder mergeLinMax (com.google.ortools.sat.LinearArgumentProto value)
 
Builder clearLinMax ()
 
com.google.ortools.sat.LinearArgumentProto.Builder getLinMaxBuilder ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder ()
 
boolean hasLinear ()
 
com.google.ortools.sat.LinearConstraintProto getLinear ()
 
Builder setLinear (com.google.ortools.sat.LinearConstraintProto value)
 
Builder setLinear (com.google.ortools.sat.LinearConstraintProto.Builder builderForValue)
 
Builder mergeLinear (com.google.ortools.sat.LinearConstraintProto value)
 
Builder clearLinear ()
 
com.google.ortools.sat.LinearConstraintProto.Builder getLinearBuilder ()
 
com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder ()
 
boolean hasAllDiff ()
 
com.google.ortools.sat.AllDifferentConstraintProto getAllDiff ()
 
Builder setAllDiff (com.google.ortools.sat.AllDifferentConstraintProto value)
 
Builder setAllDiff (com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue)
 
Builder mergeAllDiff (com.google.ortools.sat.AllDifferentConstraintProto value)
 
Builder clearAllDiff ()
 
com.google.ortools.sat.AllDifferentConstraintProto.Builder getAllDiffBuilder ()
 
com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder ()
 
boolean hasElement ()
 
com.google.ortools.sat.ElementConstraintProto getElement ()
 
Builder setElement (com.google.ortools.sat.ElementConstraintProto value)
 
Builder setElement (com.google.ortools.sat.ElementConstraintProto.Builder builderForValue)
 
Builder mergeElement (com.google.ortools.sat.ElementConstraintProto value)
 
Builder clearElement ()
 
com.google.ortools.sat.ElementConstraintProto.Builder getElementBuilder ()
 
com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder ()
 
boolean hasCircuit ()
 
com.google.ortools.sat.CircuitConstraintProto getCircuit ()
 
Builder setCircuit (com.google.ortools.sat.CircuitConstraintProto value)
 
Builder setCircuit (com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue)
 
Builder mergeCircuit (com.google.ortools.sat.CircuitConstraintProto value)
 
Builder clearCircuit ()
 
com.google.ortools.sat.CircuitConstraintProto.Builder getCircuitBuilder ()
 
com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder ()
 
boolean hasRoutes ()
 
com.google.ortools.sat.RoutesConstraintProto getRoutes ()
 
Builder setRoutes (com.google.ortools.sat.RoutesConstraintProto value)
 
Builder setRoutes (com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue)
 
Builder mergeRoutes (com.google.ortools.sat.RoutesConstraintProto value)
 
Builder clearRoutes ()
 
com.google.ortools.sat.RoutesConstraintProto.Builder getRoutesBuilder ()
 
com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder ()
 
boolean hasTable ()
 
com.google.ortools.sat.TableConstraintProto getTable ()
 
Builder setTable (com.google.ortools.sat.TableConstraintProto value)
 
Builder setTable (com.google.ortools.sat.TableConstraintProto.Builder builderForValue)
 
Builder mergeTable (com.google.ortools.sat.TableConstraintProto value)
 
Builder clearTable ()
 
com.google.ortools.sat.TableConstraintProto.Builder getTableBuilder ()
 
com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder ()
 
boolean hasAutomaton ()
 
com.google.ortools.sat.AutomatonConstraintProto getAutomaton ()
 
Builder setAutomaton (com.google.ortools.sat.AutomatonConstraintProto value)
 
Builder setAutomaton (com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue)
 
Builder mergeAutomaton (com.google.ortools.sat.AutomatonConstraintProto value)
 
Builder clearAutomaton ()
 
com.google.ortools.sat.AutomatonConstraintProto.Builder getAutomatonBuilder ()
 
com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder ()
 
boolean hasInverse ()
 
com.google.ortools.sat.InverseConstraintProto getInverse ()
 
Builder setInverse (com.google.ortools.sat.InverseConstraintProto value)
 
Builder setInverse (com.google.ortools.sat.InverseConstraintProto.Builder builderForValue)
 
Builder mergeInverse (com.google.ortools.sat.InverseConstraintProto value)
 
Builder clearInverse ()
 
com.google.ortools.sat.InverseConstraintProto.Builder getInverseBuilder ()
 
com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder ()
 
boolean hasReservoir ()
 
com.google.ortools.sat.ReservoirConstraintProto getReservoir ()
 
Builder setReservoir (com.google.ortools.sat.ReservoirConstraintProto value)
 
Builder setReservoir (com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue)
 
Builder mergeReservoir (com.google.ortools.sat.ReservoirConstraintProto value)
 
Builder clearReservoir ()
 
com.google.ortools.sat.ReservoirConstraintProto.Builder getReservoirBuilder ()
 
com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder ()
 
boolean hasInterval ()
 
com.google.ortools.sat.IntervalConstraintProto getInterval ()
 
Builder setInterval (com.google.ortools.sat.IntervalConstraintProto value)
 
Builder setInterval (com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue)
 
Builder mergeInterval (com.google.ortools.sat.IntervalConstraintProto value)
 
Builder clearInterval ()
 
com.google.ortools.sat.IntervalConstraintProto.Builder getIntervalBuilder ()
 
com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder ()
 
boolean hasNoOverlap ()
 
com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap ()
 
Builder setNoOverlap (com.google.ortools.sat.NoOverlapConstraintProto value)
 
Builder setNoOverlap (com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue)
 
Builder mergeNoOverlap (com.google.ortools.sat.NoOverlapConstraintProto value)
 
Builder clearNoOverlap ()
 
com.google.ortools.sat.NoOverlapConstraintProto.Builder getNoOverlapBuilder ()
 
com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder ()
 
boolean hasNoOverlap2D ()
 
com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D ()
 
Builder setNoOverlap2D (com.google.ortools.sat.NoOverlap2DConstraintProto value)
 
Builder setNoOverlap2D (com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue)
 
Builder mergeNoOverlap2D (com.google.ortools.sat.NoOverlap2DConstraintProto value)
 
Builder clearNoOverlap2D ()
 
com.google.ortools.sat.NoOverlap2DConstraintProto.Builder getNoOverlap2DBuilder ()
 
com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder ()
 
boolean hasCumulative ()
 
com.google.ortools.sat.CumulativeConstraintProto getCumulative ()
 
Builder setCumulative (com.google.ortools.sat.CumulativeConstraintProto value)
 
Builder setCumulative (com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue)
 
Builder mergeCumulative (com.google.ortools.sat.CumulativeConstraintProto value)
 
Builder clearCumulative ()
 
com.google.ortools.sat.CumulativeConstraintProto.Builder getCumulativeBuilder ()
 
com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder ()
 
boolean hasDummyConstraint ()
 
com.google.ortools.sat.ListOfVariablesProto getDummyConstraint ()
 
Builder setDummyConstraint (com.google.ortools.sat.ListOfVariablesProto value)
 
Builder setDummyConstraint (com.google.ortools.sat.ListOfVariablesProto.Builder builderForValue)
 
Builder mergeDummyConstraint (com.google.ortools.sat.ListOfVariablesProto value)
 
Builder clearDummyConstraint ()
 
com.google.ortools.sat.ListOfVariablesProto.Builder getDummyConstraintBuilder ()
 
com.google.ortools.sat.ListOfVariablesProtoOrBuilder getDummyConstraintOrBuilder ()
 
final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 

Protected Member Functions

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Detailed Description

Next id: 31

Protobuf type operations_research.sat.ConstraintProto

Definition at line 1962 of file ConstraintProto.java.

Member Function Documentation

◆ addAllEnforcementLiteral()

Builder com.google.ortools.sat.ConstraintProto.Builder.addAllEnforcementLiteral ( java.lang.Iterable<? extends java.lang.Integer > values)
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;

Parameters
valuesThe enforcementLiteral to add.
Returns
This builder for chaining.

Definition at line 2861 of file ConstraintProto.java.

◆ addEnforcementLiteral()

Builder com.google.ortools.sat.ConstraintProto.Builder.addEnforcementLiteral ( int value)
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;

Parameters
valueThe enforcementLiteral to add.
Returns
This builder for chaining.

Definition at line 2831 of file ConstraintProto.java.

◆ addRepeatedField()

Builder com.google.ortools.sat.ConstraintProto.Builder.addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 2233 of file ConstraintProto.java.

◆ build()

com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.build ( )

Definition at line 2081 of file ConstraintProto.java.

◆ buildPartial()

com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.buildPartial ( )

Definition at line 2090 of file ConstraintProto.java.

◆ clear()

Builder com.google.ortools.sat.ConstraintProto.Builder.clear ( )

Definition at line 1990 of file ConstraintProto.java.

◆ clearAllDiff()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearAllDiff ( )
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Definition at line 5173 of file ConstraintProto.java.

◆ clearAtMostOne()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearAtMostOne ( )
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;

Definition at line 3458 of file ConstraintProto.java.

◆ clearAutomaton()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearAutomaton ( )
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Definition at line 6096 of file ConstraintProto.java.

◆ clearBoolAnd()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearBoolAnd ( )
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;

Definition at line 3208 of file ConstraintProto.java.

◆ clearBoolOr()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearBoolOr ( )
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Definition at line 3006 of file ConstraintProto.java.

◆ clearBoolXor()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearBoolXor ( )
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Definition at line 3943 of file ConstraintProto.java.

◆ clearCircuit()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearCircuit ( )
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;

Definition at line 5544 of file ConstraintProto.java.

◆ clearConstraint()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearConstraint ( )

Definition at line 2594 of file ConstraintProto.java.

◆ clearCumulative()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearCumulative ( )
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;

Definition at line 7233 of file ConstraintProto.java.

◆ clearDummyConstraint()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearDummyConstraint ( )
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;

Definition at line 7423 of file ConstraintProto.java.

◆ clearElement()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearElement ( )
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Definition at line 5357 of file ConstraintProto.java.

◆ clearEnforcementLiteral()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearEnforcementLiteral ( )
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;

Returns
This builder for chaining.

Definition at line 2891 of file ConstraintProto.java.

◆ clearExactlyOne()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearExactlyOne ( )
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;

Definition at line 3732 of file ConstraintProto.java.

◆ clearField()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearField ( com.google.protobuf.Descriptors.FieldDescriptor field)

Definition at line 2217 of file ConstraintProto.java.

◆ clearIntDiv()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearIntDiv ( )
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;

Definition at line 4157 of file ConstraintProto.java.

◆ clearInterval()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearInterval ( )
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Definition at line 6666 of file ConstraintProto.java.

◆ clearIntMod()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearIntMod ( )
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;

Definition at line 4365 of file ConstraintProto.java.

◆ clearIntProd()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearIntProd ( )
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;

Definition at line 4591 of file ConstraintProto.java.

◆ clearInverse()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearInverse ( )
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;

Definition at line 6283 of file ConstraintProto.java.

◆ clearLinear()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearLinear ( )
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Definition at line 4992 of file ConstraintProto.java.

◆ clearLinMax()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearLinMax ( )
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;

Definition at line 4802 of file ConstraintProto.java.

◆ clearName()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearName ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
This builder for chaining.

Definition at line 2670 of file ConstraintProto.java.

◆ clearNoOverlap()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearNoOverlap ( )
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;

Definition at line 6859 of file ConstraintProto.java.

◆ clearNoOverlap2D()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearNoOverlap2D ( )
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Definition at line 7043 of file ConstraintProto.java.

◆ clearOneof()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor oneof)

Definition at line 2222 of file ConstraintProto.java.

◆ clearReservoir()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearReservoir ( )
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;

Definition at line 6476 of file ConstraintProto.java.

◆ clearRoutes()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearRoutes ( )
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Definition at line 5725 of file ConstraintProto.java.

◆ clearTable()

Builder com.google.ortools.sat.ConstraintProto.Builder.clearTable ( )
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Definition at line 5909 of file ConstraintProto.java.

◆ clone()

Builder com.google.ortools.sat.ConstraintProto.Builder.clone ( )

Definition at line 2207 of file ConstraintProto.java.

◆ getAllDiff()

com.google.ortools.sat.AllDifferentConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getAllDiff ( )
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Returns
The allDiff.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5088 of file ConstraintProto.java.

◆ getAllDiffBuilder()

com.google.ortools.sat.AllDifferentConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getAllDiffBuilder ( )
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Definition at line 5196 of file ConstraintProto.java.

◆ getAllDiffOrBuilder()

com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getAllDiffOrBuilder ( )
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5207 of file ConstraintProto.java.

◆ getAtMostOne()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The atMostOne.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3333 of file ConstraintProto.java.

◆ getAtMostOneBuilder()

com.google.ortools.sat.BoolArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getAtMostOneBuilder ( )
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;

Definition at line 3491 of file ConstraintProto.java.

◆ getAtMostOneOrBuilder()

com.google.ortools.sat.BoolArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3512 of file ConstraintProto.java.

◆ getAutomaton()

com.google.ortools.sat.AutomatonConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getAutomaton ( )
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Returns
The automaton.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6007 of file ConstraintProto.java.

◆ getAutomatonBuilder()

com.google.ortools.sat.AutomatonConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getAutomatonBuilder ( )
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Definition at line 6120 of file ConstraintProto.java.

◆ getAutomatonOrBuilder()

com.google.ortools.sat.AutomatonConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getAutomatonOrBuilder ( )
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6132 of file ConstraintProto.java.

◆ getBoolAnd()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The boolAnd.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3107 of file ConstraintProto.java.

◆ getBoolAndBuilder()

com.google.ortools.sat.BoolArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getBoolAndBuilder ( )
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;

Definition at line 3235 of file ConstraintProto.java.

◆ getBoolAndOrBuilder()

com.google.ortools.sat.BoolArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3250 of file ConstraintProto.java.

◆ getBoolOr()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProto.Builder.getBoolOr ( )
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Returns
The boolOr.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2921 of file ConstraintProto.java.

◆ getBoolOrBuilder()

com.google.ortools.sat.BoolArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getBoolOrBuilder ( )
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Definition at line 3029 of file ConstraintProto.java.

◆ getBoolOrOrBuilder()

com.google.ortools.sat.BoolArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getBoolOrOrBuilder ( )
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3040 of file ConstraintProto.java.

◆ getBoolXor()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProto.Builder.getBoolXor ( )
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Returns
The boolXor.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3858 of file ConstraintProto.java.

◆ getBoolXorBuilder()

com.google.ortools.sat.BoolArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getBoolXorBuilder ( )
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Definition at line 3966 of file ConstraintProto.java.

◆ getBoolXorOrBuilder()

com.google.ortools.sat.BoolArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getBoolXorOrBuilder ( )
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3977 of file ConstraintProto.java.

◆ getCircuit()

com.google.ortools.sat.CircuitConstraintProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The circuit.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5455 of file ConstraintProto.java.

◆ getCircuitBuilder()

com.google.ortools.sat.CircuitConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getCircuitBuilder ( )
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;

Definition at line 5568 of file ConstraintProto.java.

◆ getCircuitOrBuilder()

com.google.ortools.sat.CircuitConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5580 of file ConstraintProto.java.

◆ getConstraintCase()

ConstraintCase com.google.ortools.sat.ConstraintProto.Builder.getConstraintCase ( )

◆ getCumulative()

com.google.ortools.sat.CumulativeConstraintProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The cumulative.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7140 of file ConstraintProto.java.

◆ getCumulativeBuilder()

com.google.ortools.sat.CumulativeConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getCumulativeBuilder ( )
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;

Definition at line 7258 of file ConstraintProto.java.

◆ getCumulativeOrBuilder()

com.google.ortools.sat.CumulativeConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7271 of file ConstraintProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getDefaultInstanceForType ( )

Definition at line 2076 of file ConstraintProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.ConstraintProto.Builder.getDescriptor ( )
static

Definition at line 1967 of file ConstraintProto.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.ConstraintProto.Builder.getDescriptorForType ( )

Definition at line 2071 of file ConstraintProto.java.

◆ getDummyConstraint()

com.google.ortools.sat.ListOfVariablesProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The dummyConstraint.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7334 of file ConstraintProto.java.

◆ getDummyConstraintBuilder()

com.google.ortools.sat.ListOfVariablesProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getDummyConstraintBuilder ( )
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;

Definition at line 7447 of file ConstraintProto.java.

◆ getDummyConstraintOrBuilder()

com.google.ortools.sat.ListOfVariablesProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7459 of file ConstraintProto.java.

◆ getElement()

com.google.ortools.sat.ElementConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getElement ( )
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Returns
The element.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5268 of file ConstraintProto.java.

◆ getElementBuilder()

com.google.ortools.sat.ElementConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getElementBuilder ( )
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Definition at line 5381 of file ConstraintProto.java.

◆ getElementOrBuilder()

com.google.ortools.sat.ElementConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getElementOrBuilder ( )
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5393 of file ConstraintProto.java.

◆ getEnforcementLiteral()

int com.google.ortools.sat.ConstraintProto.Builder.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;

Parameters
indexThe index of the element to return.
Returns
The enforcementLiteral at the given index.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2774 of file ConstraintProto.java.

◆ getEnforcementLiteralCount()

int com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The count of enforcementLiteral.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2749 of file ConstraintProto.java.

◆ getEnforcementLiteralList()

java.util.List< java.lang.Integer > com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
A list containing the enforcementLiteral.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2724 of file ConstraintProto.java.

◆ getExactlyOne()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The exactlyOne.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3603 of file ConstraintProto.java.

◆ getExactlyOneBuilder()

com.google.ortools.sat.BoolArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getExactlyOneBuilder ( )
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;

Definition at line 3766 of file ConstraintProto.java.

◆ getExactlyOneOrBuilder()

com.google.ortools.sat.BoolArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3788 of file ConstraintProto.java.

◆ getIntDiv()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The intDiv.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4048 of file ConstraintProto.java.

◆ getIntDivBuilder()

com.google.ortools.sat.LinearArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getIntDivBuilder ( )
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;

Definition at line 4186 of file ConstraintProto.java.

◆ getIntDivOrBuilder()

com.google.ortools.sat.LinearArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4203 of file ConstraintProto.java.

◆ getInterval()

com.google.ortools.sat.IntervalConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getInterval ( )
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Returns
The interval.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6577 of file ConstraintProto.java.

◆ getIntervalBuilder()

com.google.ortools.sat.IntervalConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getIntervalBuilder ( )
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Definition at line 6690 of file ConstraintProto.java.

◆ getIntervalOrBuilder()

com.google.ortools.sat.IntervalConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getIntervalOrBuilder ( )
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6702 of file ConstraintProto.java.

◆ getIntMod()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The intMod.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4272 of file ConstraintProto.java.

◆ getIntModBuilder()

com.google.ortools.sat.LinearArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getIntModBuilder ( )
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;

Definition at line 4390 of file ConstraintProto.java.

◆ getIntModOrBuilder()

com.google.ortools.sat.LinearArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4403 of file ConstraintProto.java.

◆ getIntProd()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The intProd.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4478 of file ConstraintProto.java.

◆ getIntProdBuilder()

com.google.ortools.sat.LinearArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getIntProdBuilder ( )
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;

Definition at line 4621 of file ConstraintProto.java.

◆ getIntProdOrBuilder()

com.google.ortools.sat.LinearArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4639 of file ConstraintProto.java.

◆ getInverse()

com.google.ortools.sat.InverseConstraintProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The inverse.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6194 of file ConstraintProto.java.

◆ getInverseBuilder()

com.google.ortools.sat.InverseConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getInverseBuilder ( )
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;

Definition at line 6307 of file ConstraintProto.java.

◆ getInverseOrBuilder()

com.google.ortools.sat.InverseConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6319 of file ConstraintProto.java.

◆ getLinear()

com.google.ortools.sat.LinearConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getLinear ( )
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Returns
The linear.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4903 of file ConstraintProto.java.

◆ getLinearBuilder()

com.google.ortools.sat.LinearConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getLinearBuilder ( )
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Definition at line 5016 of file ConstraintProto.java.

◆ getLinearOrBuilder()

com.google.ortools.sat.LinearConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getLinearOrBuilder ( )
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5028 of file ConstraintProto.java.

◆ getLinMax()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The linMax.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4709 of file ConstraintProto.java.

◆ getLinMaxBuilder()

com.google.ortools.sat.LinearArgumentProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getLinMaxBuilder ( )
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;

Definition at line 4827 of file ConstraintProto.java.

◆ getLinMaxOrBuilder()

com.google.ortools.sat.LinearArgumentProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4840 of file ConstraintProto.java.

◆ getName()

java.lang.String com.google.ortools.sat.ConstraintProto.Builder.getName ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The name.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2612 of file ConstraintProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.sat.ConstraintProto.Builder.getNameBytes ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The bytes for name.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2633 of file ConstraintProto.java.

◆ getNoOverlap()

com.google.ortools.sat.NoOverlapConstraintProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The noOverlap.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6766 of file ConstraintProto.java.

◆ getNoOverlap2D()

com.google.ortools.sat.NoOverlap2DConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getNoOverlap2D ( )
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Returns
The noOverlap2d.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6958 of file ConstraintProto.java.

◆ getNoOverlap2DBuilder()

com.google.ortools.sat.NoOverlap2DConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getNoOverlap2DBuilder ( )
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Definition at line 7066 of file ConstraintProto.java.

◆ getNoOverlap2DOrBuilder()

com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getNoOverlap2DOrBuilder ( )
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7077 of file ConstraintProto.java.

◆ getNoOverlapBuilder()

com.google.ortools.sat.NoOverlapConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getNoOverlapBuilder ( )
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;

Definition at line 6884 of file ConstraintProto.java.

◆ getNoOverlapOrBuilder()

com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6897 of file ConstraintProto.java.

◆ getReservoir()

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
The reservoir.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6383 of file ConstraintProto.java.

◆ getReservoirBuilder()

com.google.ortools.sat.ReservoirConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getReservoirBuilder ( )
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;

Definition at line 6501 of file ConstraintProto.java.

◆ getReservoirOrBuilder()

com.google.ortools.sat.ReservoirConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.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;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6514 of file ConstraintProto.java.

◆ getRoutes()

com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getRoutes ( )
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Returns
The routes.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5640 of file ConstraintProto.java.

◆ getRoutesBuilder()

com.google.ortools.sat.RoutesConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getRoutesBuilder ( )
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Definition at line 5748 of file ConstraintProto.java.

◆ getRoutesOrBuilder()

com.google.ortools.sat.RoutesConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getRoutesOrBuilder ( )
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5759 of file ConstraintProto.java.

◆ getTable()

com.google.ortools.sat.TableConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getTable ( )
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Returns
The table.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5820 of file ConstraintProto.java.

◆ getTableBuilder()

com.google.ortools.sat.TableConstraintProto.Builder com.google.ortools.sat.ConstraintProto.Builder.getTableBuilder ( )
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Definition at line 5933 of file ConstraintProto.java.

◆ getTableOrBuilder()

com.google.ortools.sat.TableConstraintProtoOrBuilder com.google.ortools.sat.ConstraintProto.Builder.getTableOrBuilder ( )
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5945 of file ConstraintProto.java.

◆ hasAllDiff()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasAllDiff ( )
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Returns
Whether the allDiff field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5076 of file ConstraintProto.java.

◆ hasAtMostOne()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the atMostOne field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3311 of file ConstraintProto.java.

◆ hasAutomaton()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasAutomaton ( )
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Returns
Whether the automaton field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5994 of file ConstraintProto.java.

◆ hasBoolAnd()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the boolAnd field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3091 of file ConstraintProto.java.

◆ hasBoolOr()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasBoolOr ( )
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Returns
Whether the boolOr field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 2909 of file ConstraintProto.java.

◆ hasBoolXor()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasBoolXor ( )
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Returns
Whether the boolXor field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3846 of file ConstraintProto.java.

◆ hasCircuit()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the circuit field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5442 of file ConstraintProto.java.

◆ hasCumulative()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the cumulative field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7126 of file ConstraintProto.java.

◆ hasDummyConstraint()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the dummyConstraint field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 7321 of file ConstraintProto.java.

◆ hasElement()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasElement ( )
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Returns
Whether the element field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5255 of file ConstraintProto.java.

◆ hasExactlyOne()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the exactlyOne field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 3580 of file ConstraintProto.java.

◆ hasIntDiv()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the intDiv field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4030 of file ConstraintProto.java.

◆ hasInterval()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasInterval ( )
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Returns
Whether the interval field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6564 of file ConstraintProto.java.

◆ hasIntMod()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the intMod field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4258 of file ConstraintProto.java.

◆ hasIntProd()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the intProd field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4459 of file ConstraintProto.java.

◆ hasInverse()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the inverse field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6181 of file ConstraintProto.java.

◆ hasLinear()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasLinear ( )
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Returns
Whether the linear field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4890 of file ConstraintProto.java.

◆ hasLinMax()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the linMax field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 4695 of file ConstraintProto.java.

◆ hasNoOverlap()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the noOverlap field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6752 of file ConstraintProto.java.

◆ hasNoOverlap2D()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasNoOverlap2D ( )
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Returns
Whether the noOverlap2d field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6946 of file ConstraintProto.java.

◆ hasReservoir()

boolean com.google.ortools.sat.ConstraintProto.Builder.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;

Returns
Whether the reservoir field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 6369 of file ConstraintProto.java.

◆ hasRoutes()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasRoutes ( )
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Returns
Whether the routes field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5628 of file ConstraintProto.java.

◆ hasTable()

boolean com.google.ortools.sat.ConstraintProto.Builder.hasTable ( )
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Returns
Whether the table field is set.

Implements com.google.ortools.sat.ConstraintProtoOrBuilder.

Definition at line 5807 of file ConstraintProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.sat.ConstraintProto.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 1973 of file ConstraintProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.ConstraintProto.Builder.isInitialized ( )

Definition at line 2369 of file ConstraintProto.java.

◆ mergeAllDiff()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeAllDiff ( com.google.ortools.sat.AllDifferentConstraintProto value)
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Definition at line 5146 of file ConstraintProto.java.

◆ mergeAtMostOne()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeAtMostOne ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3421 of file ConstraintProto.java.

◆ mergeAutomaton()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeAutomaton ( com.google.ortools.sat.AutomatonConstraintProto value)
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Definition at line 6068 of file ConstraintProto.java.

◆ mergeBoolAnd()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeBoolAnd ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3177 of file ConstraintProto.java.

◆ mergeBoolOr()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeBoolOr ( com.google.ortools.sat.BoolArgumentProto value)
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Definition at line 2979 of file ConstraintProto.java.

◆ mergeBoolXor()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeBoolXor ( com.google.ortools.sat.BoolArgumentProto value)
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Definition at line 3916 of file ConstraintProto.java.

◆ mergeCircuit()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeCircuit ( com.google.ortools.sat.CircuitConstraintProto value)
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;

Definition at line 5516 of file ConstraintProto.java.

◆ mergeCumulative()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeCumulative ( com.google.ortools.sat.CumulativeConstraintProto value)
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;

Definition at line 7204 of file ConstraintProto.java.

◆ mergeDummyConstraint()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeDummyConstraint ( com.google.ortools.sat.ListOfVariablesProto value)
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;

Definition at line 7395 of file ConstraintProto.java.

◆ mergeElement()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeElement ( com.google.ortools.sat.ElementConstraintProto value)
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Definition at line 5329 of file ConstraintProto.java.

◆ mergeExactlyOne()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeExactlyOne ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3694 of file ConstraintProto.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeFrom ( com.google.ortools.sat.ConstraintProto other)

Definition at line 2248 of file ConstraintProto.java.

◆ mergeFrom() [2/3]

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException

Definition at line 2374 of file ConstraintProto.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 2239 of file ConstraintProto.java.

◆ mergeIntDiv()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeIntDiv ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4124 of file ConstraintProto.java.

◆ mergeInterval()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeInterval ( com.google.ortools.sat.IntervalConstraintProto value)
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Definition at line 6638 of file ConstraintProto.java.

◆ mergeIntMod()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeIntMod ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4336 of file ConstraintProto.java.

◆ mergeIntProd()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeIntProd ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4557 of file ConstraintProto.java.

◆ mergeInverse()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeInverse ( com.google.ortools.sat.InverseConstraintProto value)
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;

Definition at line 6255 of file ConstraintProto.java.

◆ mergeLinear()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeLinear ( com.google.ortools.sat.LinearConstraintProto value)
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Definition at line 4964 of file ConstraintProto.java.

◆ mergeLinMax()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeLinMax ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4773 of file ConstraintProto.java.

◆ mergeNoOverlap()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeNoOverlap ( com.google.ortools.sat.NoOverlapConstraintProto value)
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;

Definition at line 6830 of file ConstraintProto.java.

◆ mergeNoOverlap2D()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeNoOverlap2D ( com.google.ortools.sat.NoOverlap2DConstraintProto value)
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Definition at line 7016 of file ConstraintProto.java.

◆ mergeReservoir()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeReservoir ( com.google.ortools.sat.ReservoirConstraintProto value)
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;

Definition at line 6447 of file ConstraintProto.java.

◆ mergeRoutes()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeRoutes ( com.google.ortools.sat.RoutesConstraintProto value)
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Definition at line 5698 of file ConstraintProto.java.

◆ mergeTable()

Builder com.google.ortools.sat.ConstraintProto.Builder.mergeTable ( com.google.ortools.sat.TableConstraintProto value)
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Definition at line 5881 of file ConstraintProto.java.

◆ mergeUnknownFields()

final Builder com.google.ortools.sat.ConstraintProto.Builder.mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 7502 of file ConstraintProto.java.

◆ setAllDiff() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAllDiff ( com.google.ortools.sat.AllDifferentConstraintProto value)
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Definition at line 5108 of file ConstraintProto.java.

◆ setAllDiff() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAllDiff ( com.google.ortools.sat.AllDifferentConstraintProto.Builder builderForValue)
The all_diff constraint forces all variables to take different values.

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Definition at line 5128 of file ConstraintProto.java.

◆ setAtMostOne() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAtMostOne ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3363 of file ConstraintProto.java.

◆ setAtMostOne() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAtMostOne ( com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
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;

Definition at line 3393 of file ConstraintProto.java.

◆ setAutomaton() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAutomaton ( com.google.ortools.sat.AutomatonConstraintProto value)
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Definition at line 6028 of file ConstraintProto.java.

◆ setAutomaton() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setAutomaton ( com.google.ortools.sat.AutomatonConstraintProto.Builder builderForValue)
The automaton constraint forces a sequence of variables to be accepted
by an automaton.

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Definition at line 6049 of file ConstraintProto.java.

◆ setBoolAnd() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolAnd ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3131 of file ConstraintProto.java.

◆ setBoolAnd() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolAnd ( com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
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;

Definition at line 3155 of file ConstraintProto.java.

◆ setBoolOr() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolOr ( com.google.ortools.sat.BoolArgumentProto value)
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Definition at line 2941 of file ConstraintProto.java.

◆ setBoolOr() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolOr ( com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
The bool_or constraint forces at least one literal to be true.

.operations_research.sat.BoolArgumentProto bool_or = 3;

Definition at line 2961 of file ConstraintProto.java.

◆ setBoolXor() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolXor ( com.google.ortools.sat.BoolArgumentProto value)
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Definition at line 3878 of file ConstraintProto.java.

◆ setBoolXor() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setBoolXor ( com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
The bool_xor constraint forces an odd number of the literals to be true.

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Definition at line 3898 of file ConstraintProto.java.

◆ setCircuit() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setCircuit ( com.google.ortools.sat.CircuitConstraintProto value)
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;

Definition at line 5476 of file ConstraintProto.java.

◆ setCircuit() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setCircuit ( com.google.ortools.sat.CircuitConstraintProto.Builder builderForValue)
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;

Definition at line 5497 of file ConstraintProto.java.

◆ setCumulative() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setCumulative ( com.google.ortools.sat.CumulativeConstraintProto value)
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;

Definition at line 7162 of file ConstraintProto.java.

◆ setCumulative() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setCumulative ( com.google.ortools.sat.CumulativeConstraintProto.Builder builderForValue)
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;

Definition at line 7184 of file ConstraintProto.java.

◆ setDummyConstraint() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setDummyConstraint ( com.google.ortools.sat.ListOfVariablesProto value)
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;

Definition at line 7355 of file ConstraintProto.java.

◆ setDummyConstraint() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setDummyConstraint ( com.google.ortools.sat.ListOfVariablesProto.Builder builderForValue)
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;

Definition at line 7376 of file ConstraintProto.java.

◆ setElement() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setElement ( com.google.ortools.sat.ElementConstraintProto value)
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Definition at line 5289 of file ConstraintProto.java.

◆ setElement() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setElement ( com.google.ortools.sat.ElementConstraintProto.Builder builderForValue)
The element constraint forces the variable with the given index
to be equal to the target.

.operations_research.sat.ElementConstraintProto element = 14;

Definition at line 5310 of file ConstraintProto.java.

◆ setEnforcementLiteral()

Builder com.google.ortools.sat.ConstraintProto.Builder.setEnforcementLiteral ( int index,
int value )
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;

Parameters
indexThe index to set the value at.
valueThe enforcementLiteral to set.
Returns
This builder for chaining.

Definition at line 2800 of file ConstraintProto.java.

◆ setExactlyOne() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setExactlyOne ( com.google.ortools.sat.BoolArgumentProto value)
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;

Definition at line 3634 of file ConstraintProto.java.

◆ setExactlyOne() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setExactlyOne ( com.google.ortools.sat.BoolArgumentProto.Builder builderForValue)
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;

Definition at line 3665 of file ConstraintProto.java.

◆ setField()

Builder com.google.ortools.sat.ConstraintProto.Builder.setField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 2211 of file ConstraintProto.java.

◆ setIntDiv() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntDiv ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4074 of file ConstraintProto.java.

◆ setIntDiv() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntDiv ( com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
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;

Definition at line 4100 of file ConstraintProto.java.

◆ setInterval() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setInterval ( com.google.ortools.sat.IntervalConstraintProto value)
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Definition at line 6598 of file ConstraintProto.java.

◆ setInterval() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setInterval ( com.google.ortools.sat.IntervalConstraintProto.Builder builderForValue)
The interval constraint takes a start, end, and size, and forces
start + size == end.

.operations_research.sat.IntervalConstraintProto interval = 19;

Definition at line 6619 of file ConstraintProto.java.

◆ setIntMod() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntMod ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4294 of file ConstraintProto.java.

◆ setIntMod() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntMod ( com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
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;

Definition at line 4316 of file ConstraintProto.java.

◆ setIntProd() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntProd ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4505 of file ConstraintProto.java.

◆ setIntProd() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setIntProd ( com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
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;

Definition at line 4532 of file ConstraintProto.java.

◆ setInverse() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setInverse ( com.google.ortools.sat.InverseConstraintProto value)
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;

Definition at line 6215 of file ConstraintProto.java.

◆ setInverse() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setInverse ( com.google.ortools.sat.InverseConstraintProto.Builder builderForValue)
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;

Definition at line 6236 of file ConstraintProto.java.

◆ setLinear() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setLinear ( com.google.ortools.sat.LinearConstraintProto value)
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Definition at line 4924 of file ConstraintProto.java.

◆ setLinear() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setLinear ( com.google.ortools.sat.LinearConstraintProto.Builder builderForValue)
The linear constraint enforces a linear inequality among the variables,
such as 0 <= x + 2y <= 10.

.operations_research.sat.LinearConstraintProto linear = 12;

Definition at line 4945 of file ConstraintProto.java.

◆ setLinMax() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setLinMax ( com.google.ortools.sat.LinearArgumentProto value)
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;

Definition at line 4731 of file ConstraintProto.java.

◆ setLinMax() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setLinMax ( com.google.ortools.sat.LinearArgumentProto.Builder builderForValue)
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;

Definition at line 4753 of file ConstraintProto.java.

◆ setName()

Builder com.google.ortools.sat.ConstraintProto.Builder.setName ( java.lang.String value)
For debug/logging only. Can be empty.

string name = 1;

Parameters
valueThe name to set.
Returns
This builder for chaining.

Definition at line 2654 of file ConstraintProto.java.

◆ setNameBytes()

Builder com.google.ortools.sat.ConstraintProto.Builder.setNameBytes ( com.google.protobuf.ByteString value)
For debug/logging only. Can be empty.

string name = 1;

Parameters
valueThe bytes for name to set.
Returns
This builder for chaining.

Definition at line 2685 of file ConstraintProto.java.

◆ setNoOverlap() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setNoOverlap ( com.google.ortools.sat.NoOverlapConstraintProto value)
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;

Definition at line 6788 of file ConstraintProto.java.

◆ setNoOverlap() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setNoOverlap ( com.google.ortools.sat.NoOverlapConstraintProto.Builder builderForValue)
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;

Definition at line 6810 of file ConstraintProto.java.

◆ setNoOverlap2D() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setNoOverlap2D ( com.google.ortools.sat.NoOverlap2DConstraintProto value)
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Definition at line 6978 of file ConstraintProto.java.

◆ setNoOverlap2D() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setNoOverlap2D ( com.google.ortools.sat.NoOverlap2DConstraintProto.Builder builderForValue)
The no_overlap_2d constraint prevents a set of boxes from overlapping.

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Definition at line 6998 of file ConstraintProto.java.

◆ setRepeatedField()

Builder com.google.ortools.sat.ConstraintProto.Builder.setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value )

Definition at line 2227 of file ConstraintProto.java.

◆ setReservoir() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setReservoir ( com.google.ortools.sat.ReservoirConstraintProto value)
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;

Definition at line 6405 of file ConstraintProto.java.

◆ setReservoir() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setReservoir ( com.google.ortools.sat.ReservoirConstraintProto.Builder builderForValue)
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;

Definition at line 6427 of file ConstraintProto.java.

◆ setRoutes() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setRoutes ( com.google.ortools.sat.RoutesConstraintProto value)
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Definition at line 5660 of file ConstraintProto.java.

◆ setRoutes() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setRoutes ( com.google.ortools.sat.RoutesConstraintProto.Builder builderForValue)
The routes constraint implements the vehicle routing problem.

.operations_research.sat.RoutesConstraintProto routes = 23;

Definition at line 5680 of file ConstraintProto.java.

◆ setTable() [1/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setTable ( com.google.ortools.sat.TableConstraintProto value)
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Definition at line 5841 of file ConstraintProto.java.

◆ setTable() [2/2]

Builder com.google.ortools.sat.ConstraintProto.Builder.setTable ( com.google.ortools.sat.TableConstraintProto.Builder builderForValue)
The table constraint enforces what values a tuple of variables may
take.

.operations_research.sat.TableConstraintProto table = 16;

Definition at line 5862 of file ConstraintProto.java.

◆ setUnknownFields()

final Builder com.google.ortools.sat.ConstraintProto.Builder.setUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 7496 of file ConstraintProto.java.


The documentation for this class was generated from the following file: