Skip to main content
FRAMES NO FRAMES

Class IloCplex::UserCutCallbackI

Definition file: ilcplex/ilocplexi.h
Map of IloCplex::UserCutCallbackIIloCplex::UserCutCallbackIIloCplex::UserCutCallbackIIloCplex::ControlCallbackIIloCplex::MIPCallbackIIloCplex::MIPInfoCallbackIIloCplex::OptimizationCallbackIIloCplex::CallbackI
Note

This is an advanced class. 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.

An instance of the class IloCplex::UserCutCallbackI represents a user-written callback in an application that uses an instance of IloCplex to solve a MIP while generating user cuts to tighten the LP relaxation. IloCplex calls the user-written callback after solving each node LP. The constraints added in an instance of UserCutCallbackI must be real cuts in the sense that omitting them does not affect the feasible region of the model under consideration.

See Also:

Method Summary
protected voidabortCutLoop()
protected IloConstraintadd(IloConstraint con, IloCplex::CutManagement purgeable=UseCutForce)
protected IloConstraintaddLocal(IloConstraint con)
protected Callback::TypegetType() const
protected IloBoolisAfterCutLoop() const
Inherited Methods from ControlCallbackI
getDownPseudoCost, getDownPseudoCost, getFeasibilities, getFeasibilities, getFeasibility, getFeasibility, getFeasibility, getFeasibility, getLB, getLB, getLBs, getLBs, getNodeData, getNodeId, getObjValue, getSlack, getSlacks, getUB, getUB, getUBs, getUBs, getUpPseudoCost, getUpPseudoCost, getValue, getValue, getValue, getValues, getValues, isSOSFeasible, isSOSFeasible, setNodeData
Inherited Methods from MIPCallbackI
getCurrentNodeDepth, getObjCoef, getObjCoef, getObjCoefs, getObjCoefs, getType, getUserThreads, MIPCallbackI
Inherited Methods from MIPInfoCallbackI
getBestObjValue, getCutoff, getDirection, getDirection, getIncumbentObjValue, getIncumbentSlack, getIncumbentSlacks, getIncumbentValue, getIncumbentValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMIPRelativeGap, getMyThreadNum, getNcuts, getNiterations, getNiterations64, getNnodes, getNnodes64, getNremainingNodes, getNremainingNodes64, getPriority, getPriority, getQuality, getType, hasIncumbent, MIPInfoCallbackI
Inherited Methods from OptimizationCallbackI
getModel, getNcols, getNQCs, getNrows
Inherited Methods from CallbackI
abort, duplicateCallback, getCplexTime, getDetTime, getEndDetTime, getEndTime, getEnv, getStartDetTime, getStartTime, getType, main
Method Detail

abortCutLoop

protected void abortCutLoop()

Exit the cut loop and move on to branching.


add

protected IloConstraint add(IloConstraint con, IloCplex::CutManagement purgeable=UseCutForce)

This method adds a cut to the current node LP subproblem for the constraint specified by con. This cut must be globally valid. The added cut must be linear. It will not be removed by backtracking.

Select the value of purgeable from the symbolic values of the enumeration IloCplex::CutManagement. Depending on the value of purgeable, CPLEX removes the cut during branch and cut under certain circumstances.

Parameters:

con

The constraint to be added as a cut. This method (in contrast to IloCplex::add) creates a deep copy of the argument con; that is, subsequent modifications of con do not modify the added constraint.

purgeable

A value specifying when or whether CPLEX can remove this cut.

Returns:

The routine always returns con.


addLocal

protected IloConstraint addLocal(IloConstraint con)

This method adds a local cut to the current node LP subproblem for the constraint specified by the argument con. IloCplex manages the local cut in such a way that it will be active only when CPLEX is processing nodes of this subtree; in other words, the added cut is local. The added cut must be linear.

Parameters:

con

The constraint to be added as a cut. This method (in contrast to IloCplex::add) creates a deep copy of the argument con; that is, subsequent modifications of con do not modify the added constraint.

Returns:

The routine always returns con.


isAfterCutLoop

protected IloBool isAfterCutLoop() const

This method returns IloTrue if the callback was invoked after CPLEX stopped generating cuts and called the callback one last time. The method returns IloFalse if the callback was invoked from the cut loop that CPLEX executes at each node of the search tree.


getType

protected Callback::Type getType() const

This method returns the callback type of the invoking callback object.