NO FRAMES

Class IloCplex::ControlCallbackI

Definition file: ilocplexi.h
Include files: ilcplex/ilocplex.h

This class defines the common application programming interface (API) for the following classes that allow you to control the MIP search:

An instance of one of these classes represents a user-written callback that intervenes in the search for a solution at a given node in an application that uses an instance of IloCplex to solve a mixed integer program (MIP). Control callbacks are tied to a node. They are called at each node during IloCplex branch & cut search. The user never subclasses the IloCplex::ControlCallbackI class directly; it only defines the common interface of thosee listed callbacks.

In particular, SolveCallbackI is called before solving the node relaxation and optionally allows substitution of its solution. IloCplex does this by default. After the node relaxation has been solved, either by an instance of SolveCallbackI or by IloCplex, the other control callbacks are called in the following order:

  1. IloCplex::CutCallbackI
  2. IloCplex::HeuristicCallbackI
  3. IloCplex::BranchCallbackI

If the cut callback added new cuts to the node relaxation, the node relaxation will be solved again using the solve callback, if used. The same is true if IloCplex generated its own cuts.

The methods of this class are protected and its constructor is private; you cannot directly subclass this class; you must derive from its subclasses.

If an attempt is made to access information not available to an instance of this class, an exception is thrown.

See Also:

Method Summary
protected IloNumgetDownPseudoCost(const IloIntVar)
protected IloNumgetDownPseudoCost(const IloNumVar)
protected voidgetFeasibilities(ControlCallbackI::IntegerFeasibilityArray, const IloIntVarArray)
protected voidgetFeasibilities(ControlCallbackI::IntegerFeasibilityArray, const IloNumVarArray)
protected ControlCallbackI::IntegerFeasibilitygetFeasibility(const IloIntVar)
protected ControlCallbackI::IntegerFeasibilitygetFeasibility(const IloNumVar)
protected ControlCallbackI::IntegerFeasibilitygetFeasibility(const IloSOS2)
protected ControlCallbackI::IntegerFeasibilitygetFeasibility(const IloSOS1)
protected IloNumgetLB(const IloIntVar)
protected IloNumgetLB(const IloNumVar)
protected voidgetLBs(IloNumArray, const IloIntVarArray)
protected voidgetLBs(IloNumArray, const IloNumVarArray)
protected NodeData *getNodeData()
protected IloNumgetObjValue()
protected IloNumgetSlack(const IloRange)
protected voidgetSlacks(IloNumArray, const IloRangeArray)
protected IloNumgetUB(const IloIntVar)
protected IloNumgetUB(const IloNumVar)
protected voidgetUBs(IloNumArray, const IloIntVarArray)
protected voidgetUBs(IloNumArray, const IloNumVarArray)
protected IloNumgetUpPseudoCost(const IloIntVar)
protected IloNumgetUpPseudoCost(const IloNumVar)
protected IloNumgetValue(const IloIntVar)
protected IloNumgetValue(const IloNumVar)
protected IloNumgetValue(const IloExprArg)
protected voidgetValues(IloNumArray, const IloIntVarArray)
protected voidgetValues(IloNumArray, const IloNumVarArray)
protected IloBoolisSOSFeasible(const IloSOS2)
protected IloBoolisSOSFeasible(const IloSOS1)
Inherited Methods from MIPCallbackI
getBestObjValue, getCutoff, getDirection, getDirection, getIncumbentObjValue, getIncumbentValue, getIncumbentValue, getIncumbentValues, getIncumbentValues, getMyThreadNum, getNcliques, getNcovers, getNdisjunctiveCuts, getNflowCovers, getNflowPaths, getNfractionalCuts, getNGUBcovers, getNimpliedBounds, getNiterations, getNMIRs, getNnodes, getNremainingNodes, getObjCoef, getObjCoef, getObjCoefs, getObjCoefs, getPriority, getPriority, getUserThreads, hasIncumbent
Inherited Methods from CallbackI
abort, duplicateCallback, getEnv, getModel, getNcols, getNQCs, getNrows, main
Inner Enumeration
ControlCallbackI::IntegerFeasibility
Inner Typedef
ControlCallbackI::IntegerFeasibilityArray
Inner Class
ControlCallbackI::PresolvedVariableException
Method Detail

getDownPseudoCost

protected IloNum getDownPseudoCost(const IloIntVar var)

This method returns the current pseudo cost for branching downward on the variable var.


getDownPseudoCost

protected IloNum getDownPseudoCost(const IloNumVar var)

This method returns the current pseudo cost for branching downward on the variable var.


getFeasibilities

protected void getFeasibilities(ControlCallbackI::IntegerFeasibilityArray stat, const IloIntVarArray var)

This method indicates whether each of the variables in the array vars is integer feasible, integer infeasible, or implied integer feasible by putting the indication in the corresponding element of the array stats.


getFeasibilities

protected void getFeasibilities(ControlCallbackI::IntegerFeasibilityArray stat, const IloNumVarArray var)

This method indicates whether each of the variables in the array vars is integer feasible, integer infeasible, or implied integer feasible by putting the indication in the corresponding element of the array stats.


getFeasibility

protected ControlCallbackI::IntegerFeasibility getFeasibility(const IloIntVar var)

This method indicates whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

protected ControlCallbackI::IntegerFeasibility getFeasibility(const IloNumVar var)

This method indicates whether the variable var is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

protected ControlCallbackI::IntegerFeasibility getFeasibility(const IloSOS2 sos)

This method indicates whether the Special Ordered Set sos is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getFeasibility

protected ControlCallbackI::IntegerFeasibility getFeasibility(const IloSOS1 sos)

This method indicates whether the Special Ordered Set sos is integer feasible, integer infeasible, or implied integer feasible in the current node solution.


getLB

protected IloNum getLB(const IloIntVar var)

This method returns the lower bound of var at the current node. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getLB

protected IloNum getLB(const IloNumVar var)

This method returns the lower bound of var at the current node. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getLBs

protected void getLBs(IloNumArray val, const IloIntVarArray vars)

For each element of the array vars, this method puts the lower bound at the current node into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getLBs

protected void getLBs(IloNumArray val, const IloNumVarArray vars)

This method puts the lower bound at the current node of each element of the array vars into the corresponding element of the array vals. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getNodeData

protected NodeData * getNodeData()

This method retrieves the NodeData object that may have previously been assigned to the current node by the user with the method IloCplex::BranchCallbackI::makeBranch. If no data object has been assigned to the current node, 0 (zero) will be returned.


getObjValue

protected IloNum getObjValue()

This method returns the objective value of the solution of the relaxation at the current node.


getSlack

protected IloNum getSlack(const IloRange rng)

This method returns the slack value for the constraint indicated by rng in the solution of the relaxation at the current node.


getSlacks

protected void getSlacks(IloNumArray val, const IloRangeArray con)

For each of the constraints in the array of ranges rngs, this method puts the slack value in the solution of the relaxation at the current node into the corresponding element of the array vals.


getUB

protected IloNum getUB(const IloIntVar var)

This method returns the upper bound of the variable var at the current node. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getUB

protected IloNum getUB(const IloNumVar var)

This method returns the upper bound of the variable var at the current node. This bound is likely to be different from the bound in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getUBs

protected void getUBs(IloNumArray val, const IloIntVarArray vars)

For each element in the array vars, this method puts the upper bound at the current node into the corresponding element of the array vals. The bounds are those in the relaxation at the current node. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getUBs

protected void getUBs(IloNumArray val, const IloNumVarArray vars)

For each element in the array vars, this method puts the upper bound at the current node into the corresponding element of the array vals. The bounds are those in the relaxation at the current node. These bounds are likely to be different from the bounds in the original model because an instance of IloCplex tightens bounds when it branches from a node to its subnodes.


getUpPseudoCost

protected IloNum getUpPseudoCost(const IloIntVar var)

This method returns the current pseudo cost for branching upward on the variable var.


getUpPseudoCost

protected IloNum getUpPseudoCost(const IloNumVar var)

This method returns the current pseudo cost for branching upward on the variable var.


getValue

protected IloNum getValue(const IloIntVar var)

This method returns the value of the variable var in the solution of the relaxation at the current node.


getValue

protected IloNum getValue(const IloNumVar var)

This method returns the value of the variable var in the solution of the relaxation at the current node.


getValue

protected IloNum getValue(const IloExprArg expr)

This method returns the value of the expression expr in the solution of the relaxation at the current node.


getValues

protected void getValues(IloNumArray val, const IloIntVarArray vars)

For each variable in the array vars, this method puts the value in the solution of the relaxation at the current node into the corresponding element of the array vals.


getValues

protected void getValues(IloNumArray val, const IloNumVarArray vars)

For each variable in the array vars, this method puts the value in the solution of the relaxation at the current node into the corresponding element of the array vals.


isSOSFeasible

protected IloBool isSOSFeasible(const IloSOS2 sos2)

This method returns IloTrue if the solution of the LP at the current node is SOS feasible for the special ordered set indicated in its argument. The SOS set passed as a parameter to this method may be of type 2. See the ILOG CPLEX User's Manual for more explanation of types of special ordered sets.


isSOSFeasible

protected IloBool isSOSFeasible(const IloSOS1 sos1)

This method returns IloTrue if the solution of the LP at the current node is SOS feasible for the special ordered set indicated in its argument. The SOS set passed as a parameter to this method may be of type 1. See the ILOG CPLEX User's Manual for more explanation about these types of special ordered sets.


Inner Enumeration Detail

Enumeration IntegerFeasibility

Definition file: ilocplexi.h
Include files: ilcplex/ilocplex.h

The enumeration IloCplex::ControlCallbackI::IntegerFeasibility is an enumeration limited in scope to the class IloCplex::ControlCallbackI. This enumeration is used by IloCplex::ControlCallbackI::getFeasibility to represent the integer feasibility of a variable or SOS in the current node solution:

See Also:

Fields
ImpliedInfeasible
Feasible
= CPX_INTEGER_FEASIBLE
Infeasible
= CPX_INTEGER_INFEASIBLE
ImpliedFeasible
= CPX_IMPLIED_INTEGER_FEASIBLE
Inner Typedef Detail

Typedef IntegerFeasibilityArray

Definition file: ilocplexi.h

IloArray< IntegerFeasibility > IntegerFeasibilityArray

This type defines an array-type for IloCplex::ControlCallbackI::IntegerFeasibility. The fully qualified name of an integer feasibility array is IloCplex::ControlCallbackI::IntegerFeasibility::Array.

See Also: