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.

It is possible to tell IloCplex to terminate the branch & cut procedure sooner than a<br />

completed proof of optimality. For example, a user can set a time limit or a limit on the<br />

number of nodes to be processed. Indeed, with default settings, IloCplex will<br />

terminate the search when the MIP Gap has been brought lower than 0.0001 (0.01%),<br />

because it is often the case that much computation is invested in moving the Best Node<br />

value after the eventual optimal incumbent has been located. This termination criterion<br />

for the MIP Gap can be changed by the user, of course.<br />

Goals<br />

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

implemented in the class IloCplex::GoalI . The class IloCplex::Goal is<br />

the handle class. That is, it contains a pointer to an instance of IloCplex::GoalI<br />

along with accessors of objects in the implmenetation class.<br />

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

implement its virtual member functions execute and duplicateGoal. The method<br />

execute controls the branch & cut search. The method duplicateGoal creates a<br />

copy of the invoking goal object to be used for parallel branch & cut search.<br />

Implementing your goal can be greatly simplified if you use one of the macros<br />

ILO<strong>CPLEX</strong>GOALn.<br />

Every branch & cut node maintains a goal stack, possibly containing<br />

IloCplex::GoalI objects. After IloCplex solves the relaxation of a node, it<br />

pops the top goal from the goal stack and calls its method execute. There are several<br />

types of goals:<br />

◆ If OrGoal is executed, IloCplex will create child nodes. Each of the child<br />

nodes will be initialized with a copy of the goal stack of the current node. Then, for<br />

each child node, the specified goal in the OrGoal is pushed onto the corresponding<br />

goal stack of the child node. Finally, the current node is deleted. (See<br />

IloCplex#GoalI::OrGoal for a more detailed discussion.)<br />

◆<br />

If a cut goal is executed, the constraint will be added to the current node relaxation.<br />

Constraint goals are provided to represent both local and global cuts. Local cut goals<br />

are conventionally used to express branching.<br />

◆ If AndGoal is executed, its subgoals are simply pushed onto the stack. (See<br />

IloCplex::GoalI::AndGoal for a more detailed discussion.)<br />

◆ If IloCplex::GoalI::FailGoal is executed, IloCplex will prune the<br />

current node; that is, it will discontinue the search at the current node. IloCplex<br />

will continue with another node if there is one still available in the tree.<br />

◆ If IloCplex::GoalI::SolutionGoal is executed, IloCplex will<br />

attempt to inject a user-provided solution as a new incumbent. Before <strong>ILOG</strong> <strong>CPLEX</strong><br />

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

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

Saved successfully!

Ooh no, something went wrong!