public abstract static class IloCplex.UserCutCallback extends IloCplex.ControlCallback
This is an advanced class.
Important:
Advanced classes typically demand a profound understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other classes 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; user cuts must
not 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.
When you use UserCutCallback, you effectively promise
CPLEX that you are not adding cuts that reduce the solution space by
the callback, in contrast to LazyConstraintCallback.
By using UserCutCallback, you allow CPLEX to pursue
presolve more aggressively.
In the case of LazyConstraintCallback, you are free
to add cuts that may chop off solutions that are otherwise feasible
with respect to the model.
IloCplex.MIPCallback.NodeDataIloCplex.Callback.Context, IloCplex.Callback.Function| Modifier | Constructor and Description |
|---|---|
protected |
IloCplex.UserCutCallback()
This is the constructor for user-written user cut callbacks.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
abortCutLoop()
Exit the cut loop and move on to branching.
|
protected IloRange |
add(IloRange cut,
int cutmanagement)
Adds
cut as a global user cut to the problem being solved. |
protected IloRange |
addLocal(IloRange cut)
Adds its argument as a local cut to the problem being solved.
|
protected boolean |
isAfterCutLoop()
This method indicates whether or not the callback was invoked after
CPLEX stopped generating cuts and called the callback a final time.
|
getDownPseudoCost, getFeasibilities, getFeasibilities, getFeasibility, getLB, getLBs, getLBs, getNodeData, getNodeId, getObjValue, getSlack, getSlacks, getSlacks, getSOSFeasibility, getSOSFeasibility, getUB, getUBs, getUBs, getUpPseudoCost, getValue, getValue, getValues, getValues, setNodeDatagetCurrentNodeDepth, getNodeDoubleInfo, getNodeIntInfo, getNodeLongInfo, getObjCoef, getObjCoefs, getObjCoefsgetBestObjValue, getCutoff, getDirection, getIncumbentObjValue, getIncumbentValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMIPRelativeGap, getNcuts, getNiterations, getNiterations64, getNnodes, getNnodes64, getNremainingNodes, getNremainingNodes64, getPriority, getQuality, hasIncumbentgetModel, getNcols, getNQCs, getNrowsabort, getCplexTime, getDetTime, getEndDetTime, getEndTime, getStartDetTime, getStartTime, mainprotected IloCplex.UserCutCallback()
This constructor can be called only to construct objects of derived
user-written callback classes; it cannot be called to construct
IloCplex.UserCutCallback objects directly.
protected IloRange add(IloRange cut, int cutmanagement) throws IloException
cut as a global user cut to the problem being solved.
This cut must be globally valid. The cut must also not cut off any solution. The cut will not be removed by backtracking. If you designate the cut as purgeable, then CPLEX can remove the cut under certain conditions.
IloExceptioncut - The constraint to be added as a global cut.
The constraint must be linear.cutmanagement - An integer indicating how the cut should be
managed by CPLEX. Possible values are listed in
IloCplex.CutManagement.protected IloRange addLocal(IloRange cut) throws IloException
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.
IloExceptioncut - The constraint to be added as a local cut.
The constraint must be linear.protected boolean isAfterCutLoop()
protected void abortCutLoop()