Base class for user-written callbacks selecting the next node to process during the branch-and-cut search.
For a list of all members of this type, see Cplex.NodeCallback Members.
System.Object
ILOG.CPLEX.Cplex.Callback
ILOG.CPLEX.Cplex.MIPCallback
ILOG.CPLEX.Cplex.NodeCallback
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 is an advanced class.
Important:
Advanced classes typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other classes instead.
This is the base class for user-written callbacks that allow the user to select the node to process next during the branch-and-cut search. 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 also 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.
Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll)