CPXXgetheuristiccallbackfunc and CPXgetheuristiccallbackfunc

The routine CPXXgetheuristiccallbackfunc/CPXgetheuristiccallbackfunc accesses the user-written callback to be called by CPLEX during MIP optimization after the subproblem has been solved to optimality.

int  CPXXgetheuristiccallbackfunc( CPXCENVptr env, int(CPXPUBLIC **heuristiccallback_p)(CPXX_CALLBACK_HEURISTIC_ARGS), void ** cbhandle_p )

int  CPXgetheuristiccallbackfunc( CPXCENVptr env, int(CPXPUBLIC **heuristiccallback_p)(CALLBACK_HEURISTIC_ARGS), void ** cbhandle_p )

Description

Warning:

This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXXgetheuristiccallbackfunc/CPXgetheuristiccallbackfunc accesses the user-written callback to be called by CPLEX during MIP optimization after the subproblem has been solved to optimality. That callback is not called when the subproblem is infeasible or cut off. The callback supplies CPLEX with heuristically-derived integer solutions.

Arguments

env

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

heuristiccallback_p

The address of the pointer to the current user-written heuristic callback. If no callback 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 or an error code otherwise.

Example


 CPXgetheuristiccallbackfunc(env, &current_callback, &current_handle);
 

See also Advanced MIP Control Interface in the CPLEX User's Manual.

For documentation of callback arguments, see the routine CPXXsetheuristiccallbackfunc/CPXsetheuristiccallbackfunc.