![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Next id: 31
Protobuf type operations_research.sat.ConstraintProto
Definition at line 1965 of file ConstraintProto.java.
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;
values | The enforcementLiteral to add. |
Definition at line 2832 of file ConstraintProto.java.
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;
value | The enforcementLiteral to add. |
Definition at line 2802 of file ConstraintProto.java.
com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.build | ( | ) |
Definition at line 2084 of file ConstraintProto.java.
com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.buildPartial | ( | ) |
Definition at line 2093 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.clear | ( | ) |
Definition at line 1993 of file ConstraintProto.java.
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 5144 of file ConstraintProto.java.
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 3429 of file ConstraintProto.java.
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 6067 of file ConstraintProto.java.
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 3179 of file ConstraintProto.java.
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 2977 of file ConstraintProto.java.
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 3914 of file ConstraintProto.java.
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 5515 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.clearConstraint | ( | ) |
Definition at line 2565 of file ConstraintProto.java.
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 7204 of file ConstraintProto.java.
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 7394 of file ConstraintProto.java.
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 5328 of file ConstraintProto.java.
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;
Definition at line 2862 of file ConstraintProto.java.
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 3703 of file ConstraintProto.java.
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 4128 of file ConstraintProto.java.
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 6637 of file ConstraintProto.java.
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 4336 of file ConstraintProto.java.
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 4562 of file ConstraintProto.java.
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 6254 of file ConstraintProto.java.
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 4963 of file ConstraintProto.java.
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 4773 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.clearName | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Definition at line 2641 of file ConstraintProto.java.
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 6830 of file ConstraintProto.java.
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 7014 of file ConstraintProto.java.
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 6447 of file ConstraintProto.java.
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 5696 of file ConstraintProto.java.
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 5880 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5059 of file ConstraintProto.java.
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 5167 of file ConstraintProto.java.
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 5178 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3304 of file ConstraintProto.java.
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 3462 of file ConstraintProto.java.
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 3483 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5978 of file ConstraintProto.java.
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 6091 of file ConstraintProto.java.
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 6103 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3078 of file ConstraintProto.java.
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 3206 of file ConstraintProto.java.
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 3221 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2892 of file ConstraintProto.java.
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 3000 of file ConstraintProto.java.
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 3011 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3829 of file ConstraintProto.java.
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 3937 of file ConstraintProto.java.
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 3948 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5426 of file ConstraintProto.java.
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 5539 of file ConstraintProto.java.
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 5551 of file ConstraintProto.java.
ConstraintCase com.google.ortools.sat.ConstraintProto.Builder.getConstraintCase | ( | ) |
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2560 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 7111 of file ConstraintProto.java.
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 7229 of file ConstraintProto.java.
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 7242 of file ConstraintProto.java.
com.google.ortools.sat.ConstraintProto com.google.ortools.sat.ConstraintProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 2079 of file ConstraintProto.java.
|
static |
Definition at line 1970 of file ConstraintProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.ConstraintProto.Builder.getDescriptorForType | ( | ) |
Definition at line 2074 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 7305 of file ConstraintProto.java.
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 7418 of file ConstraintProto.java.
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 7430 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5239 of file ConstraintProto.java.
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 5352 of file ConstraintProto.java.
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 5364 of file ConstraintProto.java.
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;
index | The index of the element to return. |
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2745 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2720 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2695 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3574 of file ConstraintProto.java.
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 3737 of file ConstraintProto.java.
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 3759 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4019 of file ConstraintProto.java.
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 4157 of file ConstraintProto.java.
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 4174 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6548 of file ConstraintProto.java.
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 6661 of file ConstraintProto.java.
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 6673 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4243 of file ConstraintProto.java.
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 4361 of file ConstraintProto.java.
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 4374 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4449 of file ConstraintProto.java.
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 4592 of file ConstraintProto.java.
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 4610 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6165 of file ConstraintProto.java.
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 6278 of file ConstraintProto.java.
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 6290 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4874 of file ConstraintProto.java.
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 4987 of file ConstraintProto.java.
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 4999 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4680 of file ConstraintProto.java.
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 4798 of file ConstraintProto.java.
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 4811 of file ConstraintProto.java.
java.lang.String com.google.ortools.sat.ConstraintProto.Builder.getName | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2583 of file ConstraintProto.java.
com.google.protobuf.ByteString com.google.ortools.sat.ConstraintProto.Builder.getNameBytes | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2604 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6737 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6929 of file ConstraintProto.java.
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 7037 of file ConstraintProto.java.
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 7048 of file ConstraintProto.java.
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 6855 of file ConstraintProto.java.
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 6868 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6354 of file ConstraintProto.java.
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 6472 of file ConstraintProto.java.
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 6485 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5611 of file ConstraintProto.java.
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 5719 of file ConstraintProto.java.
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 5730 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5791 of file ConstraintProto.java.
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 5904 of file ConstraintProto.java.
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 5916 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5047 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3282 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5965 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3062 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 2880 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3817 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5413 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 7097 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 7292 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5226 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 3551 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4001 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6535 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4229 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4430 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6152 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4861 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 4666 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6723 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6917 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 6340 of file ConstraintProto.java.
boolean com.google.ortools.sat.ConstraintProto.Builder.hasRoutes | ( | ) |
The routes constraint implements the vehicle routing problem.
.operations_research.sat.RoutesConstraintProto routes = 23;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5599 of file ConstraintProto.java.
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;
Implements com.google.ortools.sat.ConstraintProtoOrBuilder.
Definition at line 5778 of file ConstraintProto.java.
|
protected |
Definition at line 1976 of file ConstraintProto.java.
final boolean com.google.ortools.sat.ConstraintProto.Builder.isInitialized | ( | ) |
Definition at line 2340 of file ConstraintProto.java.
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 5117 of file ConstraintProto.java.
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 3392 of file ConstraintProto.java.
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 6039 of file ConstraintProto.java.
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 3148 of file ConstraintProto.java.
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 2950 of file ConstraintProto.java.
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 3887 of file ConstraintProto.java.
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 5487 of file ConstraintProto.java.
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 7175 of file ConstraintProto.java.
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 7366 of file ConstraintProto.java.
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 5300 of file ConstraintProto.java.
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 3665 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.mergeFrom | ( | com.google.ortools.sat.ConstraintProto | other | ) |
Definition at line 2219 of file ConstraintProto.java.
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 2345 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 2210 of file ConstraintProto.java.
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 4095 of file ConstraintProto.java.
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 6609 of file ConstraintProto.java.
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 4307 of file ConstraintProto.java.
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 4528 of file ConstraintProto.java.
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 6226 of file ConstraintProto.java.
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 4935 of file ConstraintProto.java.
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 4744 of file ConstraintProto.java.
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 6801 of file ConstraintProto.java.
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 6987 of file ConstraintProto.java.
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 6418 of file ConstraintProto.java.
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 5669 of file ConstraintProto.java.
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 5852 of file ConstraintProto.java.
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 5079 of file ConstraintProto.java.
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 5099 of file ConstraintProto.java.
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 3334 of file ConstraintProto.java.
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 3364 of file ConstraintProto.java.
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 5999 of file ConstraintProto.java.
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 6020 of file ConstraintProto.java.
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 3102 of file ConstraintProto.java.
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 3126 of file ConstraintProto.java.
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 2912 of file ConstraintProto.java.
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 2932 of file ConstraintProto.java.
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 3849 of file ConstraintProto.java.
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 3869 of file ConstraintProto.java.
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 5447 of file ConstraintProto.java.
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 5468 of file ConstraintProto.java.
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 7133 of file ConstraintProto.java.
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 7155 of file ConstraintProto.java.
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 7326 of file ConstraintProto.java.
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 7347 of file ConstraintProto.java.
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 5260 of file ConstraintProto.java.
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 5281 of file ConstraintProto.java.
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;
index | The index to set the value at. |
value | The enforcementLiteral to set. |
Definition at line 2771 of file ConstraintProto.java.
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 3605 of file ConstraintProto.java.
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 3636 of file ConstraintProto.java.
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 4045 of file ConstraintProto.java.
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 4071 of file ConstraintProto.java.
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 6569 of file ConstraintProto.java.
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 6590 of file ConstraintProto.java.
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 4265 of file ConstraintProto.java.
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 4287 of file ConstraintProto.java.
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 4476 of file ConstraintProto.java.
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 4503 of file ConstraintProto.java.
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 6186 of file ConstraintProto.java.
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 6207 of file ConstraintProto.java.
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 4895 of file ConstraintProto.java.
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 4916 of file ConstraintProto.java.
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 4702 of file ConstraintProto.java.
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 4724 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.setName | ( | java.lang.String | value | ) |
For debug/logging only. Can be empty.
string name = 1;
value | The name to set. |
Definition at line 2625 of file ConstraintProto.java.
Builder com.google.ortools.sat.ConstraintProto.Builder.setNameBytes | ( | com.google.protobuf.ByteString | value | ) |
For debug/logging only. Can be empty.
string name = 1;
value | The bytes for name to set. |
Definition at line 2656 of file ConstraintProto.java.
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 6759 of file ConstraintProto.java.
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 6781 of file ConstraintProto.java.
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 6949 of file ConstraintProto.java.
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 6969 of file ConstraintProto.java.
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 6376 of file ConstraintProto.java.
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 6398 of file ConstraintProto.java.
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 5631 of file ConstraintProto.java.
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 5651 of file ConstraintProto.java.
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 5812 of file ConstraintProto.java.
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 5833 of file ConstraintProto.java.