CPXCALLBACKFUNC
Prototype for generic callback functions
Arguments
- context
-
A pointer to an opaque callback context structure. This pointer is passed to routines that can be called from a generic callback, such as CPXXcallbackgetinfoint and CPXcallbackgetinfoint.
- contextid
-
An integer value specifying the context in which the callback is invoked. This is one of the following values:
- userhandle
-
The userhandle argument that was passed to CPXXcallbacksetfunc and CPXcallbacksetfunc when the callback was registered.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs. Any value different from zero will result in an ungraceful exit of CPLEX (usually with CPXERR_CALLBACK). Note that the actual value returned is not propagated up the call stack. The only thing that CPLEX checks is whether the returned value is zero or not.
Do not use a non-zero return value to stop optimization in case there is no error. Use CPXXcallbackabort and CPXcallbackabort for that purpose.
See also
- CPXCALLBACKCONTEXTptr
- CPXXcallbacksetfunc and CPXcallbacksetfunc
- CPXXcallbackgetfunc and CPXcallbackgetfunc
- CPXXcallbackabort and CPXcallbackabort
- CPXXcallbackgetcandidatepoint and CPXcallbackgetcandidatepoint
- CPXXcallbackgetincumbent and CPXcallbackgetincumbent
- CPXXcallbackgetinfodbl and CPXcallbackgetinfodbl
- CPXXcallbackgetinfoint and CPXcallbackgetinfoint
- CPXXcallbackgetinfolong and CPXcallbackgetinfolong
- CPXXcallbackgetrelaxationpoint and CPXcallbackgetrelaxationpoint
- CPXXcallbackpostheursoln and CPXcallbackpostheursoln
- CPXXcallbackrejectcandidate and CPXcallbackrejectcandidate
- CPXXcallbackaddusercuts and CPXcallbackaddusercuts
- CPXXcallbackgetlocallb and CPXcallbackgetlocallb
- CPXXcallbackgetlocalub and CPXcallbackgetlocalub
- CPX_CALLBACKCONTEXT_THREAD_UP
- CPX_CALLBACKCONTEXT_THREAD_DOWN
- CPX_CALLBACKCONTEXT_LOCAL_PROGRESS
- CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS
- CPX_CALLBACKCONTEXT_CANDIDATE
- CPX_CALLBACKCONTEXT_RELAXATION