Overview | Group | Index | Concepts |
This is an advanced routine. Advanced routines typically demand a thorough 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 Callable Library routines instead.
The routine CPXgetcallbacklp
is used to get the pointer to
the MIP problem that is in use when the user-written callback function is
called. It is the original MIP if CPX_PARAM_MIPCBREDLP
is set
to CPX_OFF
; otherwise, it is the presolved MIP.
To obtain information about the node LP associated with this MIP, use
the following routines:
CPXgetcallbacknodeintfeas
CPXgetcallbacknodelb
CPXgetcallbacknodeub
CPXgetcallbacknodex
CPXgetcallbackgloballb
CPXgetcallbackglobalub
Each of those routines will return node information associated
with the original MIP if CPX_PARAM_MIPCBREDLP
is
turned off (that is, set to CPX_OFF
); otherwise,
they return information associated with the presolved MIP.
In contrast, the
function CPXgetcallbacknodelp
returns a
pointer to the node subproblem, which is an LP.
Note that the setting of CPX_PARAM_MIPCDREDLP
does not
affect this lp
pointer. Since CPLEX does not explicitly
maintain an unpresolved node LP, the lp
pointer will
correspond to the presolved node LP unless CPLEX presolve has been
turned off or CPLEX has made no presolve reductions at all.
Generally, this pointer may
be used only in CPLEX Callable Library query routines, such as
CPXsolution
or
CPXgetrows
.
The routine CPXgetcallbacklp
may be called only when the value of the
wherefrom
argument is one of the following:
CPX_CALLBACK_MIP
,
CPX_CALLBACK_MIP_BRANCH
,
CPX_CALLBACK_MIP_INCUMBENT
,
CPX_CALLBACK_MIP_NODE
,
CPX_CALLBACK_MIP_HEURISTIC
,
CPX_CALLBACK_MIP_SOLVE
, or
CPX_CALLBACK_MIP_CUT
.
Example
status = CPXgetcallbacklp (env, cbdata, wherefrom, &origlp);
See also admipex1.c
,
admipex2.c
, and admipex3.c
in the standard distribution.
env | A pointer to the CPLEX environment, as returned by |
cbdata | The pointer passed to the user-written callback. This parameter must be the value of |
wherefrom | An integer value indicating from where the user-written callback was called. The parameter must be the value of |
lp_p | A pointer to a variable of type |