Overview | Group | Tree | Graph | Index | Concepts |
ILOFRACTIONALCUTCALLBACK0(name)
ILOFRACTIONALCUTCALLBACK1(name, type1, x1)
ILOFRACTIONALCUTCALLBACK2(name, type1, x1, type2, x2)
ILOFRACTIONALCUTCALLBACK3(name, type1, x1, type2, x2, type3, x3)
ILOFRACTIONALCUTCALLBACK4(name, type1, x1, type2, x2, type3, x3, type4, x4)
ILOFRACTIONALCUTCALLBACK5(name, type1, x1, type2, x2, type3, x3, type4, x4, type5, x5)
ILOFRACTIONALCUTCALLBACK6(name, type1, x1, type2, x2, type3, x3, type4, x4, type5, x5, type6, x6)
ILOFRACTIONALCUTCALLBACK7(name, type1, x1, type2, x2, type3, x3, type4, x4, type5, x5, type6, x6, type7, x7)
This macro creates two things: an implementation class for a user-defined
callback named nameI
and a function named name
that creates an instance of this class and returns a handle for it, that is,
an instance of IloCplex::Callback
.
This function needs to be called with an environment as its first parameter,
followed by the n parameters
specified at the macro execution in order to create a callback.
You can then use the callback by passing it to the
use
method of an IloCplex
object.
The class nameI
that is created by the macro includes the
implementation of the method duplicateCallback
as required for callbacks. The implementation of the
main
method must be provided by the user in curly brackets {}
following the macro invocation, like this:
ILOFRACTIONALCUTCALLBACKn(name, ...) { // implementation of the callback }
For the implementation of the callback, methods from class
IloCplex::FractionalCutCallbackI
and its
parent classes can be used.
You are not obliged to use this macro to define callbacks. When the macro seems too restrictive for your purposes, we recommend that you define a callback class directly. Since the argument name is used to name the callback class, it is not possible to use the same name for several callback definitions.
See Also: