ILOG CPLEX C++ API 9.0 Reference Manual
ILOG CPLEX C++ API 9.0 Reference Manual
ILOG CPLEX C++ API 9.0 Reference Manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
IloCplex::HeuristicCallbackI<br />
Inherited methods from IloCplex::CallbackI<br />
CallbackI::abort, CallbackI::duplicateCallback, CallbackI::getEnv,<br />
CallbackI::getModel, CallbackI::getNcols, CallbackI::getNQCs,<br />
CallbackI::getNrows, CallbackI::main<br />
Description<br />
See Also<br />
Methods<br />
An instance of the class IloCplex::HeuristicCallbackI represents a userwritten<br />
callback in an application that uses an instance of IloCplex to solve a mixed<br />
integer programming problem (a MIP). When you derive a user-defined class of<br />
callbacks, this class offers protected methods for you to:<br />
◆<br />
◆<br />
◆<br />
◆<br />
◆<br />
give the instance of IloCplex a potential new incumbent solution;<br />
query the instance of IloCplex about the solution status for the current node;<br />
query the instance of IloCplex about the variable bounds at the current node;<br />
change bounds temporarily on a variable or group of variables at the current node;<br />
re-solve the problem at the node with the changed bounds;<br />
◆ use all the query functions inherited from parent classes.<br />
In short, this callback allows you to attempt to construct an integer feasible solution at a<br />
node and pass it to the invoking instance of IloCplex to use as its new incumbent.<br />
The <strong>API</strong> supports you in finding such a solution by allowing you iteratively to change<br />
bounds of the variables and re-solve the node relaxation. Changing the bounds in the<br />
heuristic callback has no effect on the search beyond the termination of the callback.<br />
The heuristic callback is called after the node relaxation has been solved (including all<br />
cuts that may have been generated).<br />
If an attempt is made to access information not available at the node for the invoking<br />
instance of IloCplex, an exception is thrown.<br />
IloCplex, IloCplex::Callback, IloCplex::CallbackI,<br />
IloCplex::ControlCallbackI, IloCplex::MIPCallbackI,<br />
ILOHEURISTICCALLBACK0<br />
protected IloCplex::CplexStatus getCplexStatus()<br />
This method returns the <strong>ILOG</strong> <strong>CPLEX</strong> status of the instance of IloCplex at the<br />
current node (that is, the state of the optimizer at the node) during the last call to solve<br />
(which may have been called directly in the callback or by IloCplex when processing<br />
the node).<br />
The enumeration IloCplex::CplexStatus lists the possible status values.<br />
<strong>ILOG</strong> <strong>CPLEX</strong> <strong>C++</strong> <strong>API</strong> <strong>9.0</strong> REFERENCE M ANUAL 153