Description
The CPXgetnetcallbackfunc() is used to access the user-written callback routine which will be called each time a log message is issued during the optimization of a network problem. If the display log is turned off, the callback routine will still be called.CPXgetlpcallbackfunc() routine. It enables the user to create a separate callback function to be called during the solution of a network problem. The prototype for the callback function is identical to that of CPXgetlpcallbackfunc().Return Value
If the operation is successful, CPXgetnetcallbackfunc() returns the value 0; if not, it returns a nonzero value to indicate an error.Synopsis
void CPXgetnetcallbackfunc (CPXENVptr env,
int (CPXPUBLIC *callback)
(CPXENVptr, void *, int, void *),
void **cbhandle_p);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX routines.
int (CPXPUBLIC *callback) (CPXENVptr, void *, int, void *)The address of the pointer to the current user-written callback function. If no callback function has been set, the pointer will evaluate to NULL.
void **cbhandle_pThe address of a variable to hold the user's private pointer.
int callback (CPXENVptr env,
void *cbdata,
int wherefrom,
void *cbhandle);
CPXENVptr envThe pointer to the CPLEX environment that was passed into the associated optimization routine.
void *cbdataA pointer passed from the optimization routine to the user-written callback function that identifies the problem being optimized. The only purpose for the
cbdata pointer is to pass it to the CPXgetcallbackinfo() routine.
int wherefromAn integer value indicating from which optimization algorithm the user-written callback function was called. Possible values and their meaning appear in the table below.
void *cbhandlePointer to user private data, as passed to
CPXsetlpcallbackfunc() or CPXsetmipcallbackfunc().
status = CPXgetnetcallbackfunc (env, mycallback, NULL);