Places in which a CPLEX callback can be invoked.

Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0

Syntax

C#
public sealed class Id
Visual Basic
Public NotInheritable Class Id

Remarks

The values defined here specify in which contexts CPLEX can invoke a callback. They are used in two different ways:

  • The are used as arguments to Callback.Function.Invoke to indicate in which context the callback has just been invoked.
  • A bit-wise OR of these values is used as argument to Cplex.Use(Callback.Function, long) to specify in which places CPLEX should invoke the registered callback.

For details about the various context values, refer to Callback context in the Reference Manual of the Callable Library (C API) for further details about these values. reference documentation.

Important notes about the ThreadDown context:

  • If a callback invoked in ThreadUp context throws an exception then ThreadDown will not be invoked on this thread!
  • The callback function is not allowed to throw exceptions if invoked in context ThreadDown. Any exception thrown in this context will be ignored.

You may think of ThreadUp and ThreadDown as "constructor" and "destructor": the destructor is only invoked if the object was fully constructed and is not allowed to throw an exception.

Inheritance Hierarchy

System..::..Object
  ILOG.CPLEX..::..Cplex..::..Callback..::..Context..::..Id

See Also