ilog.cplex
Class IloCplex.CutCallback

java.lang.Object
  |
  +--ilog.cplex.IloCplex.Callback
        |
        +--ilog.cplex.IloCplex.MIPCallback
              |
              +--ilog.cplex.IloCplex.ControlCallback
                    |
                    +--ilog.cplex.IloCplex.CutCallback
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
IloCplex.LazyConstraintCallback
Enclosing class:
IloCplex

public abstract static class IloCplex.CutCallback
extends IloCplex.ControlCallback

This is the base class for user-written callbacks that add cuts during the branch-and-cut search. Both local and global cuts can be added with this callback, with the methods addLocal and add, respectively. You can add more than one cut in this callback by calling add or addLocal multiple times.

When global cuts are added with the method add, they are not removed by backtracking in the search tree. Thus, such cuts must be valid for the entire problem; they must not depend on variables being fixed in a particular subtree.

When local cuts are added with the method addLocal, they are removed by backtracking in the search tree. Thus, such cuts may depend on variables fixed in a particular subtree.

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.

See Also:
IloCplex.ControlCallback

Constructor Summary
protected IloCplex.CutCallback()
          This is the constructor for user-written cut callbacks.
 
Method Summary
protected  ilog.concert.IloConstraint add(ilog.concert.IloConstraint cut)
          Adds cut as a global cut to the problem being solved.
protected  ilog.concert.IloConstraint addLocal(ilog.concert.IloConstraint cut)
          Adds cut as a local cut to the problem being solved.
 
Methods inherited from class ilog.cplex.IloCplex.ControlCallback
getDownPseudoCost, getFeasibilities, getFeasibilities, getFeasibility, getLB, getLBs, getLBs, getNodeData, getObjValue, getSlack, getSlacks, getSlacks, getSOSFeasibility, getSOSFeasibility, getUB, getUBs, getUBs, getUpPseudoCost, getValue, getValue, getValues, getValues
 
Methods inherited from class ilog.cplex.IloCplex.MIPCallback
getBestObjValue, getCutoff, getDirection, getIncumbentObjValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMyThreadNum, getNcliques, getNcovers, getNdisjunctiveCuts, getNflowCovers, getNflowPaths, getNfractionalCuts, getNGUBcovers, getNimpliedBounds, getNiterations, getNMIRs, getNnodes, getNremainingNodes, getObjCoef, getObjCoefs, getObjCoefs, getPriority, getUserThreads, hasIncumbent
 
Methods inherited from class ilog.cplex.IloCplex.Callback
abort, getModel, getNcols, getNQCs, getNrows, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IloCplex.CutCallback

protected IloCplex.CutCallback()
This is the constructor for user-written cut callbacks. This constructor can be called only to construct objects of derived user-written callback classes; it cannot be called to construct IloCplex.CutCallback objects directly.

Method Detail

add

protected ilog.concert.IloConstraint add(ilog.concert.IloConstraint cut)
                                  throws IloException
Adds cut as a global cut to the problem being solved. This cut must be globally valid. It will not be removed by backtracking or any other means during the search.

Parameters:
cut - The constraint to be added as a global cut. The constraint must be linear.
Returns:
The cut that has been added.
IloException

addLocal

protected ilog.concert.IloConstraint addLocal(ilog.concert.IloConstraint cut)
                                       throws IloException
Adds cut as a local cut to the problem being solved. This cut will not be removed when the search backtracks. In other words, it is active only for the subtree rooted at the invoking node.

Parameters:
cut - The constraint to be added as a local cut. The constraint must be linear.
Returns:
The cut that has been added.
IloException