Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
Constraint (CpModelProto.Builder builder) | |
void | onlyEnforceIf (Literal lit) |
void | onlyEnforceIf (Literal[] lits) |
int | getIndex () |
ConstraintProto.Builder | getBuilder () |
Constraint (CpModelProto.Builder builder) | |
void | onlyEnforceIf (Literal lit) |
void | onlyEnforceIf (Literal[] lits) |
int | getIndex () |
ConstraintProto.Builder | getBuilder () |
Wrapper around a ConstraintProto.
Constraints created by the CpModel class are automatically added to the model. One needs this class to add an enforcement literal to a constraint.
Definition at line 25 of file Constraint.java.
com.google.ortools.sat.Constraint.Constraint | ( | CpModelProto.Builder | builder | ) |
Definition at line 26 of file Constraint.java.
com.google.ortools.sat.Constraint.Constraint | ( | CpModelProto.Builder | builder | ) |
Definition at line 26 of file Constraint.java.
ConstraintProto.Builder com.google.ortools.sat.Constraint.getBuilder | ( | ) |
Returns the constraint builder.
Definition at line 49 of file Constraint.java.
ConstraintProto.Builder com.google.ortools.sat.Constraint.getBuilder | ( | ) |
Returns the constraint builder.
Definition at line 49 of file Constraint.java.
int com.google.ortools.sat.Constraint.getIndex | ( | ) |
Returns the index of the constraint in the model.
Definition at line 44 of file Constraint.java.
int com.google.ortools.sat.Constraint.getIndex | ( | ) |
Returns the index of the constraint in the model.
Definition at line 44 of file Constraint.java.
void com.google.ortools.sat.Constraint.onlyEnforceIf | ( | Literal | lit | ) |
Adds a literal to the constraint.
Definition at line 32 of file Constraint.java.
void com.google.ortools.sat.Constraint.onlyEnforceIf | ( | Literal | lit | ) |
Adds a literal to the constraint.
Definition at line 32 of file Constraint.java.
void com.google.ortools.sat.Constraint.onlyEnforceIf | ( | Literal[] | lits | ) |
Adds a list of literals to the constraint.
Definition at line 37 of file Constraint.java.
void com.google.ortools.sat.Constraint.onlyEnforceIf | ( | Literal[] | lits | ) |
Adds a list of literals to the constraint.
Definition at line 37 of file Constraint.java.