CPXXcallbackrejectcandidatelocal and CPXcallbackrejectcandidatelocal
Rejects a candidate solution or an unbounded direction from a callback in the context CPX_CALLBACKCONTEXT_CANDIDATE and specifies additional constraints that cut off the solution.
int CPXXcallbackrejectcandidatelocal( CPXCALLBACKCONTEXTptr context, CPXDIM rcnt, CPXNNZ nzcnt, double const * rhs, char const * sense, CPXNNZ const * rmatbeg, CPXDIM const * rmatind, double const * rmatval )
int CPXcallbackrejectcandidatelocal( CPXCALLBACKCONTEXTptr context, int rcnt, int nzcnt, double const * rhs, char const * sense, int const * rmatbeg, int const * rmatind, double const * rmatval )
Description
This routine rejects the candidate solution or unbounded ray
from callbacks in the context
CPX_CALLBACKCONTEXT_CANDIDATE.
CPLEX drops the current candidate solution or unbounded direction
and considers it infeasible.
You must specify a number of additional constraints that render
the candidate solution or unbounded ray infeasible. These constraints
are considered valid only in the subtree rooted at the current node
(they are only locally valid).
CPLEX can use these additional constraints to avoid finding the same
point or direction again.
This function is the local variant of CPXXcallbackrejectcandidate and CPXcallbackrejectcandidate.
There is no way to "unreject" a solution. After this routine has been called, the current candidate solution or unbounded direction is considered infeasible no matter what.
You can call this routine more than once in the same callback invocation. CPLEX will accumulate the constraints from all such calls.
There is no guarantee that CPLEX will use the constraints that you specify. CPLEX will try to do so, but for technical reasons, it is not always possible to use the constraints. You can thus not assume that in subsequent callback invocations the candidate solutions satisfy the constraints you specified here.
CPXCALLBACKINFO_CANDIDATE_SOURCE returns the value CPX_LAZYCONSTRAINTCALLBACK_NODE).
In all other situations, this routine returns an error.
Arguments
- context
-
The callback context as passed into the user-written callback function.
- rcnt
-
The number of constraints that cut off the candidate solution. This number can be 0 (zero).
- nzcnt
-
The number of nonzeros in the specified constraints.
- rhs
-
Righthand sides for the constraints.
- sense
-
Senses for the constraints.
- rmatbeg
-
Array of indices into
rmatindandrmatvalthat specify where each constraint starts in the sparse representation of the constraints. - rmatind
-
Indices of nonzero columns in the sparse representation of constraints.
- rmatval
-
Coefficients of nonzero columns in the sparse representation of constraints.