The callback base class.
For a list of all members of this type, see Cplex.Callback Members.
System.Object
ILOG.CPLEX.Cplex.Callback
ILOG.CPLEX.Cplex.ContinuousCallback
ILOG.CPLEX.Cplex.CrossoverCallback
ILOG.CPLEX.Cplex.MIPCallback
ILOG.CPLEX.Cplex.NetworkCallback
ILOG.CPLEX.Cplex.PresolveCallback
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This class defines the common interface available to all callback classes. A callback is an object with a method main
implemented by the user. This method is called by the Cplex
algorithm at specific points during the optimization. For each of these points, an extension of Cplex.Callback
is provided. To implement and use a particular callback, the following steps must be carried out:
main
for this extension. When doing so, you may use all of the methods defined in the callback class and its base classes.clone
is not adequate and the callback is to be used for parallel optimization, this method also needs to be implemented by the user. Recall that the default clone
method performs a shallow copy, so typically a user implementation would perform a deep copy for objects that should be local to threads or use the synchronize
keyword where synchronization is required. Cplex
with the method Cplex.Use
.The next time a solution method is executed on the Cplex
object for which the callback has been set, the method main
of the callback will be called each time the corresponding point in the optimization algorithm is reached, for example at each iteration.
The methods of this class are protected to make sure they are used only to derive a user-written callback class or to implement the main
method in it.
Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll)