| Overview | Group | Tree | Graph | Deprecated | Index | Concepts |

An instance of the class IloCplex::MIPCallbackI represents
a user-written callback in an application that uses an instance of
IloCplex to solve a mixed integer program
(MIP). IloCplex calls the user-written callback prior to
solving each node in branch-and-cut search.
User-written callbacks of this class or
any of its subclasses are not
compatible with MIP dynamic search. If you are looking for support for
callbacks compatible with dynamic search, consider the class
IloCplex::MIPInfoCallbackI instead.
This class offers member functions for accessing an incumbent solution and its objective value from a user-written callback. It also offers methods for accessing priority orders and statistical information, such as the number of cuts. Methods are also available to query the number of generated cuts for each type of cut CPLEX generates. See the CPLEX User's Manual for more information about cuts.
The methods of this class are protected for use in deriving a
user-written callback class and in implementing the main
method there.
If an attempt is made to access information not available to an instance of this class, an exception is thrown. For example, if there is no incumbent, the methods that query about incumbents will throw an exception.
This class also provides the common application programming interface (API) for these callback classes:
IloCplex::NodeCallbackIIloCplex::IncumbentCallbackIIloCplex::DisjunctiveCutCallbackIIloCplex::FlowMIRCutCallbackIIloCplex::FractionalCutCallbackIIloCplex::ProbingCallbackIIloCplex::UserCutCallbackIIloCplex::LazyConstraintCallbackIIloCplex::BranchCallbackIIloCplex::HeuristicCallbackIIloCplex::SolveCallbackISee Also:
IloCplex, IloCplex::BranchCallbackI, IloCplex::Callback, IloCplex::CallbackI, IloCplex::UserCutCallbackI, IloCplex::LazyConstraintCallbackI, IloCplex::DisjunctiveCutCallbackI, IloCplex::FlowMIRCutCallbackI, IloCplex::FractionalCutCallbackI, IloCplex::HeuristicCallbackI, IloCplex::IncumbentCallbackI, IloCplex::NodeCallbackI, IloCplex::OptimizationCallbackI, IloCplex::ProbingCallbackI, IloCplex::SolveCallbackI, ILOMIPCALLBACK0
| Method Summary | |
|---|---|
public virtual IloInt | getCurrentNodeDepth() const |
public IloNum | getObjCoef(const IloIntVar var) const |
public IloNum | getObjCoef(const IloNumVar var) const |
public void | getObjCoefs(IloNumArray val, const IloIntVarArray vars) const |
public void | getObjCoefs(IloNumArray val, const IloNumVarArray vars) const |
protected Callback::Type | getType() const |
public IloInt | getUserThreads() const |
protected | MIPCallbackI(IloEnv env) |
Inherited Methods from OptimizationCallbackI |
|---|
getModel, getNcols, getNQCs, getNrows |
Inherited Methods from CallbackI |
|---|
abort, duplicateCallback, getCplexTime, getDetTime, getEndDetTime, getEndTime, getEnv, getStartDetTime, getStartTime, getType, main |
| Inner Class |
|---|
| MIPCallbackI::NodeData |
| Inner structs |
|---|
| MIPCallbackI::NodeId |
| Method Detail |
|---|
This constructor creates a callback for use in
an application that uses an instance of IloCplex
to solve a mixed integer program (MIP).
Returns the depth of the current node in the search tree. The root node has depth 0 (zero). The depth of other nodes is defined recursively as the depth of their parent node plus one. In other words, the depth of a node is its distance in terms of the number of branches from the root.
Returns the linear objective coefficient for var
in the model currently being solved.
Returns the linear objective coefficient for var
in the model currently being solved.
Puts the linear objective coefficient of each of the
variables in the array vars into the
corresponding element of the array vals.
Puts the linear objective coefficient of each of the
variables in the array vars into the
corresponding element of the array vals.
Returns the total number of parallel threads currently running.
This method returns the callback type of the invoking callback object.
| Inner Struct Detail |
|---|
Objects of this class are used to identify uniquely
nodes of the branch-and-cut search tree during the solution
of a MIP. When a new node is created either by
IloCplex or by the user in a
branch callback, IloCplex assigns a
NodeId to it. From then on, the node can be
referenced via this NodeId, for example,
from an instance of IloCplex::NodeCallbackI.
See MIPCallbackI::NodeId.
| Method Summary | |
|---|---|
public int | operator!=(const NodeId & nodeid) const |
public int | operator==(const NodeId & nodeid) const |
| Method Detail |
|---|
IloTrue if the invoking NodeId
represents a node different from the node specified by the argument
nodeid.
See MIPCallbackI::NodeId.
IloTrue if the invoking NodeId
represents the same node as the argument nodeid.