CPXXmodelasstcallbacksetfunc and CPXmodelasstcallbacksetfunc
Sets the modeling assistance callback function.
int CPXXmodelasstcallbacksetfunc ( CPXENVptr env, CPXLPptr lp, CPXMODELASSTCALLBACKFUNC *callback, void * userhandle )
int CPXmodelasstcallbacksetfunc ( CPXENVptr env, CPXLPptr lp, CPXMODELASSTCALLBACKFUNC *callback, void * userhandle )
Description
The modeling assistance callback function is a callback
function that is invoked before and after the optimization
(once for every modeling issue detected). The callback function
will only be invoked if the parameter
data consistency checking and modeling assistance
(CPX_PARAM_DATACHECK)
is set to CPX_DATACHECK_ASSIST. In addition, the
parameter warning limit
(CPX_PARAM_WARNLIM) controls the number of
times each type of modeling assistance warning will be reported
(the rest will be ignored).
In order to clear a modeling assistance callback, invoke this
function with a callback of NULL.
For a detailed explanation of the various modeling issues that can be detected, see this topic Modeling information codes by number in the CPLEX Callable Library (C API).
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned, for example, by
CPXXcreateprob/CPXcreateprob. - callback
- The user-written callback function to invoke. See CPXMODELASSTCALLBACKFUNC for the signature of this function.
- userhandle
- User data for callback invocation. CPLEX passes this pointer as the last argument to the callback function.