30.01.2015 Views

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IloCplex::SearchLimitI<br />

creates a goal limitGoal which branches as specified by goal1 until the limit<br />

specified by limit is reached. Only the nodes created by goal1 (or any of the goals<br />

created by it later) are subjected to the search limit. For example, if you created two<br />

branches with the goal<br />

OrGoal(limitGoal, goal2);<br />

only the subtree defined by goal1 is subject to the search limit limit; the subtree<br />

defined by goal2 is not.<br />

The ability to specify search limits for subtrees means that it is possible for certain<br />

branches to be subject to more than one search limit. Nodes with multiple search limits<br />

attached to them are processed only if none of the search limits has been reached, or, in<br />

other words, if all the search limits return IloFalse when method check is called by<br />

IloCplex.<br />

Each time <strong>CPLEX</strong> uses a search limit, it is duplicated first. If you use the same instance<br />

of your limit in different branches, it will be duplicated first, the copy will be passed to<br />

the corresponding node, and init method will be called on the copy.<br />

See Also<br />

Constructors<br />

Methods<br />

IloCplex, IloCplex::SearchLimit<br />

public SearchLimitI()<br />

The default constructor creates a new instance of SearchLimitI.<br />

public virtual IloBool check()<br />

This method is called for every node subjected to the invoking search limit before<br />

evaluating the node. If it returns IloTrue, the node is pruned, or, equivalently, the<br />

search below that node is discontinued. Thus, users implementing search limits must<br />

implement this method to return IloTrue if the search limit has been reached and<br />

IloFalse otherwise.<br />

public virtual SearchLimitI * duplicateLimit()<br />

This method is called internally to duplicate the current search limit. Users must<br />

implement it in a subclass to return a copy of the invoking object.<br />

public virtual void init()<br />

This method is called by IloCplex right before the first time check is called for a<br />

node and allows you to initialize the limit based on that node.<br />

<strong>ILOG</strong> <strong>CPLEX</strong> <strong>C++</strong> <strong>API</strong> <strong>9.0</strong> REFERENCE M ANUAL 216

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!