Namespace: ILOG.OPL
Assembly: oplall (in oplall.dll)
Syntax
| C# |
|---|
public abstract class NodeCallback : Cplex..::..MIPCallback |
Remarks
Node callbacks allow you to determine which node from among the unexplored nodes Cplex will chose to explore next in the branch-and-cut search. They aslo give you the option to override this selection.
When an instance of this callback class executes, the invoking instance of Cplex still has n = getNremainingNodes (inherited from MIPCallback) nodes left to process. These remaining nodes are numbered from 0 (zero) to n-1. For that reason, the same node may have a different number each time an instance of NodeCallback is called. To identify a node uniquely, an instance of Cplex also assigns a unique identifier (Cplex.NodeId) to each node. That unique identifier remains unchanged throughout the search. The method getNodeId(int i) allows you to access the Cplex.NodeId for each of the remaining nodes 0 to n-1. Similarly, the method getNodeNumber returns the number of a node specified by its Cplex.NodeId.
The constructor and methods of this class are protected to make sure that they are used only to derive a user-written callback class or to implement the main method in it.
Inheritance Hierarchy
ILOG.OPL..::..Cplex..::..Callback
ILOG.OPL..::..Cplex..::..MIPInfoCallback
ILOG.OPL..::..Cplex..::..MIPCallback
ILOG.OPL..::..Cplex..::..NodeCallback