CPXXcallbackrejectcandidate and CPXcallbackrejectcandidate
Rejects a candidate solution or an unbounded direction from a callback in the context CPX_CALLBACKCONTEXT_CANDIDATE and potentially specifies additional constraints that cut off the solution.
int CPXXcallbackrejectcandidate( CPXCALLBACKCONTEXTptr context, CPXDIM rcnt, CPXNNZ nzcnt, double const * rhs, char const * sense, CPXNNZ const * rmatbeg, CPXDIM const * rmatind, double const * rmatval )
int CPXcallbackrejectcandidate( 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 can optionally specify a number of additional constraints that render the candidate solution or unbounded ray infeasible. CPLEX can use these additional constraints to avoid finding the same point or direction again.
There is no way to "unreject" a solution. After this routine has been called, the current candidate solution or unbounded direction is considered infeasible, even if no constraints are specified.
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.
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 rmatind and rmatval that 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.