ilog.cplex
Class IloCplex.CutCallback

java.lang.Object
  extended byilog.cplex.IloCplex.Callback
      extended byilog.cplex.IloCplex.MIPCallback
          extended byilog.cplex.IloCplex.ControlCallback
              extended byilog.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

Base class for user-written callbacks adding cuts during search.

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 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  IloConstraint add(IloConstraint cut)
          Adds cut as a global cut to the problem being solved.
protected  IloConstraint addLocal(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, getNcliques, getNcovers, getNdisjunctiveCuts, getNflowCovers, getNflowPaths, getNfractionalCuts, getNGUBcovers, getNimpliedBounds, getNiterations, getNMIRs, getNnodes, getNremainingNodes, getObjCoef, getObjCoefs, getObjCoefs, getPriority, 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 IloConstraint add(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.
Throws:
IloException

addLocal

protected IloConstraint addLocal(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.
Throws:
IloException