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

Public Member Functions

java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
java.util.List< java.lang.Integer > getEnforcementLiteralList ()
 
int getEnforcementLiteralCount ()
 
int getEnforcementLiteral (int index)
 
boolean hasBoolOr ()
 
com.google.ortools.sat.BoolArgumentProto getBoolOr ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolOrOrBuilder ()
 
boolean hasBoolAnd ()
 
com.google.ortools.sat.BoolArgumentProto getBoolAnd ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolAndOrBuilder ()
 
boolean hasAtMostOne ()
 
com.google.ortools.sat.BoolArgumentProto getAtMostOne ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getAtMostOneOrBuilder ()
 
boolean hasExactlyOne ()
 
com.google.ortools.sat.BoolArgumentProto getExactlyOne ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getExactlyOneOrBuilder ()
 
boolean hasBoolXor ()
 
com.google.ortools.sat.BoolArgumentProto getBoolXor ()
 
com.google.ortools.sat.BoolArgumentProtoOrBuilder getBoolXorOrBuilder ()
 
boolean hasIntDiv ()
 
com.google.ortools.sat.LinearArgumentProto getIntDiv ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntDivOrBuilder ()
 
boolean hasIntMod ()
 
com.google.ortools.sat.LinearArgumentProto getIntMod ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntModOrBuilder ()
 
boolean hasIntProd ()
 
com.google.ortools.sat.LinearArgumentProto getIntProd ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getIntProdOrBuilder ()
 
boolean hasLinMax ()
 
com.google.ortools.sat.LinearArgumentProto getLinMax ()
 
com.google.ortools.sat.LinearArgumentProtoOrBuilder getLinMaxOrBuilder ()
 
boolean hasLinear ()
 
com.google.ortools.sat.LinearConstraintProto getLinear ()
 
com.google.ortools.sat.LinearConstraintProtoOrBuilder getLinearOrBuilder ()
 
boolean hasAllDiff ()
 
com.google.ortools.sat.AllDifferentConstraintProto getAllDiff ()
 
com.google.ortools.sat.AllDifferentConstraintProtoOrBuilder getAllDiffOrBuilder ()
 
boolean hasElement ()
 
com.google.ortools.sat.ElementConstraintProto getElement ()
 
com.google.ortools.sat.ElementConstraintProtoOrBuilder getElementOrBuilder ()
 
boolean hasCircuit ()
 
com.google.ortools.sat.CircuitConstraintProto getCircuit ()
 
com.google.ortools.sat.CircuitConstraintProtoOrBuilder getCircuitOrBuilder ()
 
boolean hasRoutes ()
 
com.google.ortools.sat.RoutesConstraintProto getRoutes ()
 
com.google.ortools.sat.RoutesConstraintProtoOrBuilder getRoutesOrBuilder ()
 
boolean hasTable ()
 
com.google.ortools.sat.TableConstraintProto getTable ()
 
com.google.ortools.sat.TableConstraintProtoOrBuilder getTableOrBuilder ()
 
boolean hasAutomaton ()
 
com.google.ortools.sat.AutomatonConstraintProto getAutomaton ()
 
com.google.ortools.sat.AutomatonConstraintProtoOrBuilder getAutomatonOrBuilder ()
 
boolean hasInverse ()
 
com.google.ortools.sat.InverseConstraintProto getInverse ()
 
com.google.ortools.sat.InverseConstraintProtoOrBuilder getInverseOrBuilder ()
 
boolean hasReservoir ()
 
com.google.ortools.sat.ReservoirConstraintProto getReservoir ()
 
com.google.ortools.sat.ReservoirConstraintProtoOrBuilder getReservoirOrBuilder ()
 
boolean hasInterval ()
 
com.google.ortools.sat.IntervalConstraintProto getInterval ()
 
com.google.ortools.sat.IntervalConstraintProtoOrBuilder getIntervalOrBuilder ()
 
boolean hasNoOverlap ()
 
com.google.ortools.sat.NoOverlapConstraintProto getNoOverlap ()
 
com.google.ortools.sat.NoOverlapConstraintProtoOrBuilder getNoOverlapOrBuilder ()
 
boolean hasNoOverlap2D ()
 
com.google.ortools.sat.NoOverlap2DConstraintProto getNoOverlap2D ()
 
com.google.ortools.sat.NoOverlap2DConstraintProtoOrBuilder getNoOverlap2DOrBuilder ()
 
boolean hasCumulative ()
 
com.google.ortools.sat.CumulativeConstraintProto getCumulative ()
 
com.google.ortools.sat.CumulativeConstraintProtoOrBuilder getCumulativeOrBuilder ()
 
boolean hasDummyConstraint ()
 
com.google.ortools.sat.ListOfVariablesProto getDummyConstraint ()
 
com.google.ortools.sat.ListOfVariablesProtoOrBuilder getDummyConstraintOrBuilder ()
 
com.google.ortools.sat.ConstraintProto.ConstraintCase getConstraintCase ()
 

Detailed Description

Definition at line 7 of file ConstraintProtoOrBuilder.java.

Member Function Documentation

◆ getAllDiff()

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

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Returns
The allDiff.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getAllDiffOrBuilder()

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

.operations_research.sat.AllDifferentConstraintProto all_diff = 13;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getAtMostOne()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getAtMostOneOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getAutomaton()

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

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Returns
The automaton.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getAutomatonOrBuilder()

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

.operations_research.sat.AutomatonConstraintProto automaton = 17;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolAnd()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolAndOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolOr()

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

.operations_research.sat.BoolArgumentProto bool_or = 3;

Returns
The boolOr.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolOrOrBuilder()

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

.operations_research.sat.BoolArgumentProto bool_or = 3;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolXor()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getBoolXorOrBuilder()

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

.operations_research.sat.BoolArgumentProto bool_xor = 5;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getCircuit()

com.google.ortools.sat.CircuitConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getCircuitOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getConstraintCase()

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

◆ getCumulative()

com.google.ortools.sat.CumulativeConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getCumulativeOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getDummyConstraint()

com.google.ortools.sat.ListOfVariablesProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getDummyConstraintOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getElement()

com.google.ortools.sat.ElementConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getElementOrBuilder()

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

.operations_research.sat.ElementConstraintProto element = 14;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getEnforcementLiteral()

int com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getEnforcementLiteralCount()

int com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getEnforcementLiteralList()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getExactlyOne()

com.google.ortools.sat.BoolArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getExactlyOneOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntDiv()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntDivOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getInterval()

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

.operations_research.sat.IntervalConstraintProto interval = 19;

Returns
The interval.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntervalOrBuilder()

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

.operations_research.sat.IntervalConstraintProto interval = 19;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntMod()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntModOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntProd()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getIntProdOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getInverse()

com.google.ortools.sat.InverseConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getInverseOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getLinear()

com.google.ortools.sat.LinearConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getLinearOrBuilder()

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

.operations_research.sat.LinearConstraintProto linear = 12;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getLinMax()

com.google.ortools.sat.LinearArgumentProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getLinMaxOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getName()

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

string name = 1;

Returns
The name.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getNameBytes()

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

string name = 1;

Returns
The bytes for name.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getNoOverlap()

com.google.ortools.sat.NoOverlapConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getNoOverlap2D()

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

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Returns
The noOverlap2d.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getNoOverlap2DOrBuilder()

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

.operations_research.sat.NoOverlap2DConstraintProto no_overlap_2d = 21;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getNoOverlapOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getReservoir()

com.google.ortools.sat.ReservoirConstraintProto com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getReservoirOrBuilder()

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

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getRoutes()

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

.operations_research.sat.RoutesConstraintProto routes = 23;

Returns
The routes.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getRoutesOrBuilder()

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

.operations_research.sat.RoutesConstraintProto routes = 23;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getTable()

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

.operations_research.sat.TableConstraintProto table = 16;

Returns
The table.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ getTableOrBuilder()

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

.operations_research.sat.TableConstraintProto table = 16;

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasAllDiff()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasAtMostOne()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasAutomaton()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasBoolAnd()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasBoolOr()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasBoolXor()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasCircuit()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasCumulative()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasDummyConstraint()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasElement()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasExactlyOne()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasIntDiv()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasInterval()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasIntMod()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasIntProd()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasInverse()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasLinear()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasLinMax()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasNoOverlap()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasNoOverlap2D()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasReservoir()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasRoutes()

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

.operations_research.sat.RoutesConstraintProto routes = 23;

Returns
Whether the routes field is set.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.

◆ hasTable()

boolean com.google.ortools.sat.ConstraintProtoOrBuilder.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.

Implemented in com.google.ortools.sat.ConstraintProto, and com.google.ortools.sat.ConstraintProto.Builder.


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