Generic callbacks

Generic callbacks are compatible with recent innovations in CPLEX.

First, contrast legacy callbacks, such as informational callbacks, query callbacks, or control callbacks (already familiar in CPLEX) with the more recent implementation of generic callbacks. Legacy callbacks were designed when CPLEX was a branch-and-bound or branch-and-cut solver. Consequently, those legacy callbacks were designed to monitor and control a branch-and-bound or branch-and-cut search. This design implies that those legacy callbacks assume a branch-and-bound or branch-and-cut context throughout their invocation. For example, such legacy callbacks usually assume a "current node" context. This assumption is one of the reasons that the legacy callbacks are incompatible with dynamic search.

Over time, CPLEX has evolved and now executes more sophisticated strategies than straightforward branch-and-bound or branch-and-cut, although that strategy is still at the core of the solver. Dynamic search and other features have been added to CPLEX to solve models faster. The generic callback is compatible with all these new features since it does not assume a strictly branch-and-bound or branch-and-cut perspective in the solution process. It only assumes a generic search for an optimal solution. As a consequence, it does not allow user control of the the branch-and-bound or branch-and-cut process in as much detail as the legacy callbacks do. Such low-level control, however, is not usually required. The degree of control offered by the generic callback is more high level, yet frequently that degree of control is all that is needed.