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.
ILOLAZYCONSTRAINTCALLBACK0<br />
ILOLAZYCONSTRAINTCALLBACK0<br />
Category<br />
Synopsis<br />
Description<br />
Macro<br />
ILOLAZYCONSTRAINTCALLBACK0(name)<br />
ILOLAZYCONSTRAINTCALLBACK1(name, type1, x1)<br />
ILOLAZYCONSTRAINTCALLBACK2(name, type1, x1, type2, x2)<br />
ILOLAZYCONSTRAINTCALLBACK3(name, type1, x1, type2, x2, type3, x3)<br />
ILOLAZYCONSTRAINTCALLBACK4(name, type1, x1, type2, x2, type3, x3, type4,<br />
x4)<br />
ILOLAZYCONSTRAINTCALLBACK5(name, type1, x1, type2, x2, type3, x3, type4,<br />
x4, type5, x5)<br />
ILOLAZYCONSTRAINTCALLBACK6(name, type1, x1, type2, x2, type3, x3, type4,<br />
x4, type5, x5, type6, x6)<br />
ILOLAZYCONSTRAINTCALLBACK7(name, type1, x1, type2, x2, type3, x3, type4,<br />
x4, type5, x5, type6, x6, type7, x7)<br />
This macro creates two things: an implementation class for a user-defined lazy<br />
constraint callback named nameI and a function named name that creates an instance<br />
of this class and returns an IloCplex::Callback handle for it. This function needs<br />
to be called with an environment as first parameter followed by the n parameters<br />
specified at the macro execution in order to create a callback. You can then use the<br />
callback by passing it to the use method of an IloCplex object.<br />
The class nameI that is created by the macro includes the implementation of method<br />
makeClone as required for callbacks. The implementation of the main method must<br />
be provided by the user in curly brackets {} following the macro invocation, like this:<br />
ILOLAZYCONSTRAINTCALLBACKn(name, ...) {<br />
// implementation of the callback<br />
}<br />
For the implementation of the callback, methods from class<br />
IloCplex::LazyConstraintCallbackI and its parent classes can be used.<br />
You are not obliged to use this macro to define callbacks. When the macro seems too<br />
restrictive for your purposes, we recommend that you define a callback class directly.<br />
Since the argument name is used to name the callback class, it is not possible to use the<br />
same name for several callback definitions.<br />
See Also<br />
IloCplex::LazyConstraintCallbackI<br />
<strong>ILOG</strong> <strong>CPLEX</strong> <strong>C++</strong> <strong>API</strong> <strong>9.0</strong> REFERENCE M ANUAL 29