|
||||||||
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
The class for callbacks when IloCplex
is solving a MIP.
MIP callbacks are executed at every node during the solution of an MIP.
This class provides a common query and application programming interface
(API) for these classes:
NodeCallback
IncumbentCallback
DisjunctiveCutCallback
FractionalCutCallback
ProbingCallback
CutCallback
BranchCallback
HeuristicCallback
SolveCallback
MIPCallbackI
represents a
user-written callback in an application that uses an instance of
IloCplex
to solve a mixed integer program (MIP).
IloCplex
calls the user-written callback prior to solving
each node in branch and cut search. This class offers methods for
accessing an incumbent solution, an incumbent node, and an incumbent
objective value from a user-written callback. It also offers methods for
accessing priority orders and statistical information such
as the number of cuts. Methods are also available to query the number of
generated cuts for each type of cut CPLEX generates. See the ILOG
CPLEX User’s Manual for more information on cuts.
The methods of this class are protected for use in deriving a user-written callback class and in implementing the main member function there.
If an attempt is made to access information not available to an instance of this class, an exception is thrown. For example, if there is no incumbent, the methods that query incumbents will throw an exception.
IloCplex.Callback
Constructor Summary | |
protected |
IloCplex.MIPCallback()
|
Method Summary | |
protected double |
getBestObjValue()
Gets the objective value of the best active node in the current branch and cut tree. |
protected double |
getCutoff()
Gets the object value cutoff. |
protected IloCplex.BranchDirection |
getDirection(IloNumVar var)
Gets the branch direction. |
protected double |
getIncumbentObjValue()
Gets the current best integer solution objective value. |
protected double |
getIncumbentValue(IloNumVar var)
The value of var for current best integer solution. |
protected double[] |
getIncumbentValues(IloNumVar[] vars)
Gets an array of variable values for the incumbent solution. |
protected double[] |
getIncumbentValues(IloNumVar[] vars,
int start,
int num)
Gets a set of variable values for the incumbent solution. |
protected int |
getNcliques()
Gets the number of clique cuts. |
protected int |
getNcovers()
Gets the number of cover cuts. |
protected int |
getNdisjunctiveCuts()
Gets the number of disjunctive cuts. |
protected int |
getNflowCovers()
Gets the number of flow cover cuts. |
protected int |
getNflowPaths()
Gets the number of flow path cuts. |
protected int |
getNfractionalCuts()
Gets the number of fractional cuts. |
protected int |
getNGUBcovers()
Gets the number of GUB cover cuts. |
protected int |
getNimpliedBounds()
Gets the number of implied bounds cuts. |
protected int |
getNiterations()
Gets the number of LP node iterations. |
protected int |
getNMIRs()
Gets the number of MIR cuts. |
protected int |
getNnodes()
Gets the nodes processed so far. |
protected int |
getNremainingNodes()
Gets the nodes remaining to be processed. |
protected int |
getPriority(IloNumVar var)
Gets the branch priority. |
protected boolean |
isIntegerFeasible()
Returns true if an incumbent solution has been found. |
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.MIPCallback()
Method Detail |
protected double getBestObjValue()
protected double getCutoff()
protected double getIncumbentObjValue()
protected double getIncumbentValue(IloNumVar var)
var
for current best integer solution.
This method returns the value of variable var
in the
current incumbent solution (that is, the best integer solution found so
far).var
- The variable for which to query the incument solution
value.var
in the current
incumbent solution.protected double[] getIncumbentValues(IloNumVar[] vars)
vars
- The array of variables for which to query the
incumbent solution values.var[j]
is returned in
element j
of the returned array.protected double[] getIncumbentValues(IloNumVar[] vars, int start, int num)
vars
- An array containing the variables for which to query
the incumbent solution values.start
- The index of the first variable in vars
for which to return the incumbent solution value.num
- The number of variables in vars
for which
to return the incumbent solution values.var
. The solution for variable
var[j+start]
is returned in element
j
of the returned array.protected boolean isIntegerFeasible()
true
if an incumbent solution has been found.true
if an incumbent solution has been found.protected int getNnodes()
protected int getNremainingNodes()
protected int getNiterations()
protected int getNcliques()
protected int getNcovers()
protected int getNflowCovers()
protected int getNflowPaths()
protected int getNGUBcovers()
protected int getNfractionalCuts()
protected int getNdisjunctiveCuts()
protected int getNMIRs()
protected int getNimpliedBounds()
protected IloCplex.BranchDirection getDirection(IloNumVar var) throws IloException
var
var
- The variable for which the branch direction is queried.var
.protected int getPriority(IloNumVar var) throws IloException
var
.var
- The variable for which the branch priority is queriedvar
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |