CPXXcallbackgetrelaxationpi and CPXcallbackgetrelaxationpi

Get approximation of shadow prices to the current node relaxation and its objective value for callback invocations with CPX_CALLBACKCONTEXT_RELAXATION or CPX_CALLBACKCONTEXT_BRANCHING.

int  CPXXcallbackgetrelaxationpi( CPXCALLBACKCONTEXptr context, double *lrpi, CPXDIM lrbeg, CPXDIM lrend, double *qrpi, int *qrpidef, CPXDIM qrbeg, CPXDIM qrend, double *qzerotol_p )

int  CPXcallbackgetrelaxationpi( CPXCALLBACKCONTEXptr context, double *lrpi, CPXDIM lrbeg, CPXDIM lrend, double *qrpi, int *qrpidef, CPXDIM qrbeg, CPXDIM qrend, double *qzerotol_p )

Description

Computes approximate shadow prices to the current node relaxation. This feature is experimental, and will remain in Beta in CPLEX 22.1.0 (over the course of 2022), while we refine and improve it. We welcome feedback to cos-beta@wwpdl.vnet.ibm.com.

Warning: Your call of this function is valid only if the callback was invoked in the contexts CPX_CALLBACKCONTEXT_RELAXATION or CPX_CALLBACKCONTEXT_BRANCHING. In all other contexts, it returns an error.

Arguments

context

The callback context as passed into the callback function.

lrpi

Buffer to store the values queried, which are associated to linear constraints. The buffer must have size of at least 1+lrend-lrbrg. The buffer can be NULL if lrbeg and lrend specify an empty range.

lrbeg

First linear constraints row (inclusive) to query from the shadow prices of the current node relaxation.

lrend

Last linear constraints row (inclusive) to query from the shadow prices of the current node relaxation.

qrpi

Buffer to store the values queried, which are associated to quadratic constraints. The buffer must have size of at least 1+qrend-qrbrg. The buffer can be NULL if qrbeg and qrend specify an empty range.

qrpidef

Buffer to store binary indicators that specify whether the queried shadow prices are defined for the quadratic constraints selected. The shadow price associated to a quadratic constraint is indefinite if the gradient of the constraint evaluated at the optimal relaxation found is the zero vector. The parameter qzerotol_p controls the tolerance under which such gradient is deemed to be the zero vector. The buffer must have size of at least 1+qrend-qrbrg. The buffer can be NULL if qrbeg and qrend specify an empty range.

qrbeg

First quadratic constraints row (inclusive) to query from the shadow prices of the current node relaxation.

qrend

Last quadratic constraints row (inclusive) to query from the shadow prices of the current node relaxation

qzerotol_p

Pointer to the zero tolerance applied in order to specify whether the shadow prices associated to the selected quadratic constraints are defined. The pointer cannot be NULL. If the pointed value is negative, default tolerance of 1.0E-6 is applied. The tolerance cannot be less than the convergence tolerance for QC problems, which is controlled by the parameter CPXPARAM_Barrier_QCPConvergeTol.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.