ilog.cplex
Class IloCplex.UserCutCallback

java.lang.Object
  |
  +--ilog.cplex.IloCplex.Callback
        |
        +--ilog.cplex.IloCplex.MIPCallback
              |
              +--ilog.cplex.IloCplex.ControlCallback
                    |
                    +--ilog.cplex.IloCplex.UserCutCallback
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
IloCplex

public abstract static class IloCplex.UserCutCallback
extends IloCplex.ControlCallback

This is an advanced method.

Important:

Advanced methods 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 methods instead.

This is the user cut callback class. Extensions of this class implement user-written user cut callbacks. They allow you to add user cuts to the problem while the problem is being solved with branch-and-cut search. User cuts may not contribute to the model formulation and restrict the feasible region of the problem, but only strengthen the formulation. If constraints that do restrict the feasible region of the problem are to be added during the optimization, an instance of IloCplex.LazyConstraintCallback must be used instead. Cuts are added from this callback by a call to the method add. The added cuts must be globally valid because they are not removed automatically during backtracking.

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, IloCplex.CutCallback, IloCplex.UserCutCallback

Constructor Summary
protected IloCplex.UserCutCallback()
          This is the constructor for user-written user cut callbacks.
 
Method Summary
protected  ilog.concert.IloConstraint add(ilog.concert.IloConstraint cut)
          Adds cut as a global user 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.UserCutCallback

protected IloCplex.UserCutCallback()
This is the constructor for user-written user 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 user 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. The cut must also not cut off any solution.

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