Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXaddusercuts
is used to add constraints to
the list of constraints that should be added to the LP subproblem of a MIP
optimization if they are violated. CPLEX handles addition of the constraints
and makes sure that all integer solutions satisfy all the constraints. The
constraints are added to those specified in prior calls to
CPXaddusercuts
.
The constraints must be cuts, which are implied by the constraint matrix.
The CPLEX parameter CPX_PARAM_PRELINEAR
should be set to
CPX_OFF
(0).
Use CPXfreeusercuts
to clear the list of cuts.
The arguments of CPXaddusercuts
are the same as those of
CPXaddrows
, with the exception that new columns may not be
specified, so there are no ccnt
and colname
arguments, and row names may not be specified, so there is no
rowname
argument. Furthermore, unlike
CPXaddrows
, CPXaddusercuts
does not accept a NULL pointer for the array of right-hand side values.
Example
status = CPXaddusercuts (env, lp, cutcnt, cutnzcnt, cutrhs, cutsense, cutbeg, cutind, cutval);
See also admipex4.c
in the standard distribution.
sense[i] | = 'L' | ≤ constraint |
sense[i] | = 'E' | = constraint |
sense[i] | = 'G' | ≥ constraint |
sense[i] | = 'R' | ranged constraint |
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
rcnt | An integer that indicates the number of new rows to be added to the constraint matrix. |
nzcnt | An integer that indicates the number of nonzero constraint coefficients to be added to the constraint matrix. This specifies the length of the arrays |
rhs | An array of length |
sense | An array of length |
rmatbeg | An array used with |
rmatind | An array used with |
rmatval | An array used with |