CPXXgetinfocallbackfunc and CPXgetinfocallbackfunc

The routine CPXXgetinfocallbackfunc/CPXgetinfocallbackfunc accesses the user-written callback routine to be called regularly during the optimization of a mixed integer program (MIP).

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

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

Description

The routine CPXXgetinfocallbackfunc/CPXgetinfocallbackfunc accesses the user-written callback routine to be called regularly during the optimization of a mixed integer program (MIP).

This routine enables the user to access a separate callback function to be called during the solution of mixed integer programming problems (MIPs). Unlike any other callback routines, this user-written callback routine is used only to retrieve information about MIP search. It does not control the search, though it allows the search to terminate. The user-written callback function that this routine invokes is allowed to call only two other routines: CPXXgetcallbackinfo/CPXgetcallbackinfo and CPXXgetcallbackincumbent/CPXgetcallbackincumbent.

The prototype for the user-written callback function is identical to that of CPXXsetmipcallbackfunc/CPXsetmipcallbackfunc.

For documentation of the user-written callback, see Callback Description in the documentation of CPXXsetinfocallbackfunc and CPXsetinfocallbackfunc.

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 = CPXgetinfocallbackfunc (env, mycallback, NULL);