CPXXgetmipcallbackfunc and CPXgetmipcallbackfunc

The routine CPXXgetmipcallbackfunc/CPXgetmipcallbackfunc accesses the user-written callback routine to be called in the branch-and-cut tree during the optimization of a mixed integer program.

int  CPXXgetmipcallbackfunc( CPXCENVptr env, int(CPXPUBLIC **callback_p)(CPXCENVptr, void *, int, void *), void ** cbhandle_p )

int  CPXgetmipcallbackfunc( CPXCENVptr env, int(CPXPUBLIC **callback_p)(CPXCENVptr, void *, int, void *), void ** cbhandle_p )

Description

The routine CPXXgetmipcallbackfunc/CPXgetmipcallbackfunc accesses the user-written callback routine to be called in the branch-and-cut tree during the optimization of a mixed integer program.

This routine works in the same way as the routine CPXXgetlpcallbackfunc/CPXgetlpcallbackfunc. It enables the user to create a separate callback function to be called during the solution of mixed integer programming problems. The prototype for the callback function is identical to that of CPXXgetlpcallbackfunc/CPXgetlpcallbackfunc.

For documentation of the user-written callback, see Callback Description in the documentation of CPXXsetmipcallbackfunc and CPXsetmipcallbackfunc.

Arguments

env

A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.

callback_p

The address of the pointer to the current user-written callback function. If no callback function has been set, the pointer evaluates to NULL.

cbhandle_p

The address of a variable to hold the user's private pointer.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


 status = CPXgetmipcallbackfunc (env, mycallback, NULL);