ILOG CPLEX .NET Reference Manual

Cplex.Use Method 

Installs a user-written callback.

public virtual void Use(
   Callback cb
);

Parameters

cb
The callback to be used from now on. The type of the callback object being passed determines which callback is being installed. If a callback of the same type has previously been installed, the new callback will replace the old one.

Remarks

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.

See Also

Cplex Class | ILOG.CPLEX Namespace