NO FRAMES

CPXcutcallbackaddlocal

int CPXPUBLIC CPXcutcallbackaddlocal(CPXCENVptr env, void * cbdata, int wherefrom, int nzcnt, double rhs, int sense, const int * cutind, const double * cutval)
Definition file: cplex.h
Include files: cplex.h

The routine CPXcutcallbackaddlocal adds local cuts during MIP branch & cut. A local cut is one that applies to the current nodes and the subtree rooted at this node. Global cuts, that is, cuts that apply throughout the branch & cut tree, are added with the routine CPXcutcallbackadd. 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.

Example

 status = CPXcutcallbackaddlocal (env,
                                  cbdata,
                                  wherefrom,
                                  mynzcnt,
                                  myrhs,
                                  'L',
                                  mycutind,
                                  mycutval);
 

See Also:

Parameters:

env

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

cbdata

The pointer passed to the user-written callback. This parameter must be the value of cbdata passed to the user-written callback.

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.

nzcnt

An integer value that indicates the number of coefficients in the cut, or equivalently, the length of the arrays cutind and cutval.

rhs

A double value that indicates the value of the right-hand side of the cut.

sense

An integer value that indicates the sense of the cut.

cutind

An array containing the column indices of cut coefficients.

cutval

An array containing the values of cut coefficients.

Returns:

The routine returns zero on success and nonzero if an error occurs.