A constraint is the main modeling object. It provides two methods:
- Post() is responsible for creating the demons and attaching them to immediate demons().
- InitialPropagate() is called once just after Post and performs the initial propagation. The subsequent propagations will be performed by the demons Posted during the post() method.
Definition at line 3929 of file constraint_solver.h.
#include <constraint_solver.h>
| operations_research::Constraint::Constraint |
( |
Solver *const | solver | ) |
|
|
inlineexplicit |
◆ Constraint() [2/2]
| operations_research::Constraint::Constraint |
( |
const Constraint & | | ) |
|
|
delete |
◆ ~Constraint()
| operations_research::Constraint::~Constraint |
( |
| ) |
|
|
inlineoverride |
◆ Accept()
| void operations_research::Constraint::Accept |
( |
ModelVisitor * | visitor | ) |
const |
|
virtual |
◆ DebugString()
| std::string operations_research::Constraint::DebugString |
( |
| ) |
const |
|
overridevirtual |
◆ InitialPropagate()
| virtual void operations_research::Constraint::InitialPropagate |
( |
| ) |
|
|
pure virtual |
◆ IsCastConstraint()
| bool operations_research::Constraint::IsCastConstraint |
( |
| ) |
const |
Is the constraint created by a cast from expression to integer variable?
Definition at line 3322 of file constraint_solver.cc.
◆ operator=()
◆ Post()
| virtual void operations_research::Constraint::Post |
( |
| ) |
|
|
pure virtual |
◆ PostAndPropagate()
| void operations_research::Constraint::PostAndPropagate |
( |
| ) |
|
Calls Post and then Propagate to initialize the constraints. This is usually done in the root node.
Definition at line 3308 of file constraint_solver.cc.
◆ Var()
| IntVar * operations_research::Constraint::Var |
( |
| ) |
|
|
virtual |
Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API.
Definition at line 3326 of file constraint_solver.cc.
The documentation for this class was generated from the following files: