Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ constraint_solver/ |
#include <constraint_solver.h>
Public Member Functions | |
~NoGood () | |
namespace | |
void | AddIntegerVariableEqualValueTerm (IntVar *const var, int64 value) |
Creates a term var == value. | |
void | AddIntegerVariableNotEqualValueTerm (IntVar *const var, int64 value) |
Creates a term var != value. | |
bool | Apply (Solver *const solver) |
Applies the nogood. | |
string | DebugString () const |
Pretty print. |
Nogoods are used to store negative information collected during search. They are by definition non reversible. No Good A nogood is a conjunction of unary constraints that represents a state that must not be visited during search. For instance if X and Y are variables, (X == 5) && (Y != 3) is a nogood that forbid all part of the search tree where X is 5 and Y is not 3.
Definition at line 4020 of file constraint_solver.h.
operations_research::NoGood::~NoGood | ( | ) |
void operations_research::NoGood::AddIntegerVariableEqualValueTerm | ( | IntVar *const | var, | |
int64 | value | |||
) |
void operations_research::NoGood::AddIntegerVariableNotEqualValueTerm | ( | IntVar *const | var, | |
int64 | value | |||
) |
bool operations_research::NoGood::Apply | ( | Solver *const | solver | ) |
Applies the nogood.
That is if there is only one undecided term and all remaining terms are always true, then the opposite of this term is added to the solver. It returns true if the nogood is still active and needs to be reevaluated.
Definition at line 128 of file nogoods.cc.
string operations_research::NoGood::DebugString | ( | ) | const |