| Overview | Group | Tree | Graph | Deprecated | Index | Concepts |

A search limit is an object in CP Optimizer. Like other CP Optimizer entities, a
search limit is implemented by means of two classes: a handle class and an
implementation class. In other words, an instance of the class
IlcSearchLimit (a handle) contains a data member (the handle
pointer) that points to an instance of the class
IlcSearchLimitI (its implementation object).
A search limit is used to prune part of the search tree. The member
function check indicates whether the limit has been
reached.
A search limit has its own life cycle:
duplicate.
init is called.The class IlcSearchLimitI is extendable; in other words, you
can write your own search limits.
See Also:
IlcSearchLimit, IlcLimitSearch, IlcSearchLimitI
| Method Summary | |
|---|---|
public virtual IlcBool | check() const |
public | IlcSearchLimitI(IlcCPEngine cp) |
public virtual void | init() |
public | ~IlcSearchLimitI() |
| Method Detail |
|---|
This constructor creates an instance of the class IlcSearchLimitI using
cp. This constructor should not be called directly as this class is an abstract class.
This constructor is to be called in the constructor of its subclasses.
This destructor is called automatically by the destructor of its subclasses. It frees memory used by the objects.
This member function is called to check whether the
limit implemented by the object has been reached. If the limit has been reached, this virtual
member function should return IlcTrue. Afterward, the unexplored search tree covered
by this limit will be simply discarded.
When you implement this virtual member function yourself, you should make sure that your
implementation decides exactly one time (that is, once and for all) whether a limit has been
reached. Once the limit has been reached, it will not be called again, and all nodes covered
by the limit will be discarded. The signature includes const for that reason to
avoid accumulated effects of multiple calls of this member function.
When the goal IlcLimitSearch executes, it calls this method with the current
node passed as its parameter. The purpose of this method is to store a reference
state for the node evaluator.