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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IloCplex::GoalI<br />

GoalI::BranchType<br />

GoalI::IntegerFeasibility<br />

Inner Enumeration<br />

GoalI::GoalI::IntegerFeasibi<br />

lityArray<br />

Inner Type Def<br />

Description<br />

Goals can be used to control the branch & cut search in IloCplex. Goals are<br />

implemented in subclasses of the class IloCplex::GoalI. This is the base class for<br />

user-written implementation classes of <strong>CPLEX</strong> goals.<br />

To implement your own goal you need to create a subclass of IloCplex::GoalI and<br />

implement its pure virtual methods execute and duplicateGoal. You may use<br />

one of the ILO<strong>CPLEX</strong>GOAL0 macros to assist you in doing so. After implementing<br />

your goal class, you use it by passing it to the solve method when solving the model.<br />

The method duplicateGoal may be called by IloCplex to create copies of a goal<br />

when needed for parallel branch & cut search. Thus the implementation of this method<br />

must create and return an exact copy of the invoked object itself.<br />

The method execute controls the branch & cut search of IloCplex by the goal it<br />

returns. When IloCplex processes a node, it pops the top goal from the node's goal<br />

stack and calls method execute of that goal. It continues executing the top goal from<br />

the stack until the node is deactivated or the goal stack is empty. If the goal stack is<br />

empty, IloCplex proceeds with the built-in search strategy for the subtree rooted at<br />

the current node.<br />

The class IloCplex::GoalI provides several methods for querying information<br />

about the current node. The method execute controls how to proceed with the branch<br />

& cut search via the goal it returns. The returned goal, unless it is the 0 goal, is pushed<br />

on the goal stack and will thus be executed next.<br />

See also the chapter about goals in the <strong>ILOG</strong> <strong>CPLEX</strong> User's <strong>Manual</strong>.<br />

Constructors<br />

public GoalI(IloEnv env)<br />

The goal constructor. It requires an instance of the same IloEnv as the IloCplex<br />

object with which to use the goal. The environment can later be queried by calling<br />

method getEnv.<br />

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

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

Saved successfully!

Ooh no, something went wrong!