Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

operations_research::NoGood Class Reference

NoGood Recorder. More...

#include <constraint_solver.h>

List of all members.

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.


Detailed Description

NoGood Recorder.

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.


Constructor & Destructor Documentation

operations_research::NoGood::~NoGood (  ) 

namespace

NoGood

Definition at line 115 of file nogoods.cc.


Member Function Documentation

void operations_research::NoGood::AddIntegerVariableEqualValueTerm ( IntVar *const   var,
int64  value 
)

Creates a term var == value.

Definition at line 119 of file nogoods.cc.

void operations_research::NoGood::AddIntegerVariableNotEqualValueTerm ( IntVar *const   var,
int64  value 
)

Creates a term var != value.

Definition at line 123 of file nogoods.cc.

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

Pretty print.

Definition at line 159 of file nogoods.cc.


The documentation for this class was generated from the following files: