CPXgetcallbacklp


Usage

Mixed Integer Users Only

Description

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. In contrast, the function CPXgetcallbacknodelp() returns a pointer to the node subproblem, which is an LP. Generally, this pointer may be used only in CPLEX Callable Library query routines, such as CPXsolution() or CPXgetrows().

This routine may be called only when the value of the wherefrom argument is one of 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.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

  int CPXgetcallbacklp (CPXCENVptr env,
                        void *cbdata,
                        int wherefrom,
                        CPXCLPptr *lp_p);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment, as returned by one of the CPXopenCPLEX routines.

void *cbdata

The pointer passed to the user-written callback. This parameter must be the value of cbdata passed to the user-written callback.

int wherefrom

An integer value indicating from where the user-written callback was called. The parameter must be the value of wherefrom passed to the user-written callback.

CPXCLPptr *lp_p

A pointer to a variable of type CPXLPptr to receive the pointer to the LP problem object, which is a MIP.

Example

  status = CPXgetcallbacklp (env, cbdata, wherefrom, &origlp);

See Also

Examples admipex1.c, admipex2.c, and admipex3.c in the advanced examples directory

Previous Page: CPXgetcallbackincumbent Return to Top Next Page: CPXgetcallbacknodeinfo