Download ILOG CPLEX 8.1 Advanced Reference Manual
Transcript
CPXcutcallbackadd CPXcutcallbackadd Usage Mixed Integer Users Only Description The routine CPXcutcallbackadd() adds cuts during MIP branch & cut. This routine may be called only from within user-written cut callbacks; thus it may be called only when the value of its wherefrom argument is CPX_CALLBACK_MIP_CUT. The cut may be for the original problem if the parameter CPX_PARAM_MIPCBREDLP was set to CPX_OFF before the call to CPXmipopt() that calls the callback. Otherwise, the cut is used on the presolved problem. Return Value The routine returns a zero on success, and a nonzero if an error occurs. One possible error is indicated by the symbolic constant CPXERR_NO_SPACE. That error occurs when the number of cuts added reaches the maximum allowed, as set by the parameter CPX_PARAM_CUTSFACTOR. Synopsis Arguments int CPXcutcallbackadd (CPXCENVptr env, void *cbdata, int wherefrom, int *nzcnt, double rhs, int sense, const int *cutind, const double *cutval); CPXCENVptr env The pointer to the ILOG CPLEX environment, as returned by one of the CPXopenCPLEX routines. void *cbdata The pointer passed to the user-written callback. This parameter must be the value of cbdata passed to the user-written callback. int wherefrom An integer value that indicates where the user-written callback was called from. This parameter must be the value of wherefrom passed to the user-written callback. int *nzcnt An integer value that indicates the number of coefficients in the cut, or equivalently, the length of the arrays cutind and cutval. double rhs A double value that indicates the value of the right-hand side of the cut. ILOG CPLEX 8.1 — ADVANCED REFERENCE MANUAL 67