Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class CanonicalBooleanLinearProblem
Note: This documentation is automatically generated.
Holds a set of boolean linear constraints in canonical form:
- The constraint is a linear sum of LiteralWithCoeff <= rhs.
- The linear sum satisfies the properties described in
ComputeBooleanLinearExpressionCanonicalForm().
TODO(user): Simplify further the constraints.
TODO(user): Remove the duplication between this and what the sat solver
is doing in AddLinearConstraint() which is basically the same.
TODO(user): Remove duplicate constraints? some problems have them, and
this is not ideal for the symmetry computation since it leads to a lot of
symmetries of the associated graph that are not useful.
Adds a new constraint to the problem. The bounds are inclusive.
Returns false in case of a possible overflow or if the constraint is
never satisfiable.
TODO(user): Use a return status to distinguish errors if needed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["The `CanonicalBooleanLinearProblem` class in C++ stores a set of boolean linear constraints, each expressed as a sum of literals with coefficients, less than or equal to a right-hand side value."],["These linear constraints are in a canonical form, ensuring specific properties are satisfied as defined by `ComputeBooleanLinearExpressionCanonicalForm()`."],["The class provides methods to add constraints, access individual constraints and their components (literals, coefficients, and right-hand side), and determine the total number of constraints."],["There are ongoing development plans to simplify the constraints further, eliminate redundancy with the SAT solver's constraint handling, and address potential issues with duplicate constraints impacting symmetry computations."]]],["The `CanonicalBooleanLinearProblem` class manages boolean linear constraints in canonical form, where each constraint is a linear sum of `LiteralWithCoeff` less than or equal to a right-hand side (rhs). Key actions include: adding new constraints with specified bounds via `AddLinearConstraint`, and retrieving the number of constraints with `NumConstraints`, a specific constraint using `Constraint`, and a specific rhs value with `Rhs`. The class includes TODOs for simplifying constraints, removing duplication with the sat solver, and addressing duplicate constraints.\n"]]