|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ilog.cplex.IloCplex.Callback | +--ilog.cplex.IloCplex.MIPCallback | +--ilog.cplex.IloCplex.NodeCallback
A class to identify which node will next be selected for branch and cut.
An instance of the class NodeCallback
represents a
user-written callback in an application that uses an instance of
IloCplex
. The methods of this class enable you
(from a user-derived callback class) to query the instance of
IloCplex
about the next node that it plans to select in the
branch and cut. There are also methods in this class that enable
you to select a node as the next node to process in the branch and cut
from a user-derived callback class.
When an instance of this callback executes, the invoking instance of
IloCplex
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 IloCplex
also
assigns a unique NodeId
to each node. That unique identifier
remains unchanged throughout the search. The method
getNodeId(int i)
allows you to access the
NodeId
for each of the remaining nodes 0
to
n-1
. Such a query allows you to associate data with
individual nodes.
The methods of this class are protected for use in deriving a user-written callback class and in implementing the main method in it.
If an attempt is made to access information not available to an instance of this class, an exception is thrown.
IloCplex.MIPCallback
Constructor Summary | |
protected |
IloCplex.NodeCallback()
|
Method Summary | |
protected IloNumVar |
getBranchVar(int node)
Gets the variable at a node. |
protected int |
getDepth(int node)
Gets the depth of the node in the search tree. |
protected double |
getEstimatedObjValue(int node)
Gets the estimated objective value at the node indicated by the index number node . |
protected double |
getInfeasibilitySum(int node)
Gets the sum of infeasibility measures at the node indicated by the index number node . |
protected int |
getNinfeasibilities(int node)
Gets the number of infeasibilities at the node indicated by the index number node . |
protected IloCplex.NodeId |
getNodeId(int node)
Gets the node identifier of the node indicated by the index number node . |
protected double |
getObjValue(int node)
Gets the objective value at the node indicated by the index number node . |
protected void |
selectNode(int node)
Selects the next node to be processed by its index number. |
Methods inherited from class ilog.cplex.IloCplex.MIPCallback |
getBestObjValue,
getCutoff,
getDirection,
getIncumbentObjValue,
getIncumbentValue,
getIncumbentValues,
getIncumbentValues,
getNcliques,
getNcovers,
getNdisjunctiveCuts,
getNflowCovers,
getNflowPaths,
getNfractionalCuts,
getNGUBcovers,
getNimpliedBounds,
getNiterations,
getNMIRs,
getNnodes,
getNremainingNodes,
getPriority,
isIntegerFeasible |
Methods inherited from class ilog.cplex.IloCplex.Callback |
abort,
main |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected IloCplex.NodeCallback()
Method Detail |
protected IloCplex.NodeId getNodeId(int node)
node
. An instance of IloCplex
numbers the nodes in the branch and cut sequentially from
0
(zero) to numberOfNodes - 1
as it creates
nodes. Within a search, these node numbers are unique throughout the
duration of that search.node
- The index number of the node for which the node identifier
is required.node
.protected double getObjValue(int node)
node
.node
- The index number of the node for which the node identifier
is required.node
.protected double getEstimatedObjValue(int node)
node
.node
- The index number of the node for which the node identifier
is required.node
.protected int getDepth(int node)
0
(zero); the depth of other nodes is their distance from
the root.node
- The index number of the node for which the node identifier
is required.node
.protected double getInfeasibilitySum(int node)
node
.node
- The index number of the node for which the node identifier
is required.node
.protected int getNinfeasibilities(int node)
node
.node
- The index number of the node at which the to find the
number of infeasibilities.node
.protected void selectNode(int node)
node
and
sets it as the next node to process in the branch and cut. The
parameter node
must be an integer between 0
(zero) and getNremainingNodes - 1
.
The invoking instance of IloCplex
uses the specified node
as the next node to process.
node
- The index number of the node you want to be processed.protected IloNumVar getBranchVar(int node) throws IloException
node
.node
- The index number of the node from which you want to obtain
the variable.node
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |