Installs a user-written callback.
Callbacks are objects with a user-written method main
that are called regularly during the optimization of the active model. This object must be implemented as a class derived from a subclass of Cplex.Callback
class, and the abstract method main
must be implemented for this class.
There are several places where the Cplex
algorithms call a callback. Cplex
provides several different types of callbacks, and each is implemented as a specific subclass of Cplex.Callback
.
Cplex
can use only one callback of a given type at a time. Thus, when calling method use
several times with callbacks of the same type, only the callback passed at the last call of method use
will be executed during the optimization. However, callbacks of different types can be used simultaneously.