CPXXqpdjfrompi and CPXqpdjfrompi

The routine CPXXqpdjfrompi/CPXqpdjfrompi computes an array of reduced costs from an array of dual values and an array of primal values for a QP.

int  CPXXqpdjfrompi( CPXCENVptr env, CPXCLPptr lp, double const * pi, double const * x, double * dj )

int  CPXqpdjfrompi( CPXCENVptr env, CPXCLPptr lp, double const * pi, double const * x, double * dj )

Description

Warning:

This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXXqpdjfrompi/CPXqpdjfrompi computes an array of reduced costs from an array of dual values and an array of primal values for a QP.

Arguments

env
A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX LP problem object, as returned by CPXXcreateprob/CPXcreateprob.
pi
An array that contains dual solution (pi) values for a problem, as returned by such routines as CPXXqpuncrushpi/CPXqpuncrushpi and CPXXcrushpi/CPXcrushpi. The length of the array must at least equal the number of rows in the LP problem object.
x
An array that contains primal solution (x) values for a problem, as returned by such routines as CPXXuncrushx/CPXuncrushx and CPXXcrushx/CPXcrushx. The length of the array must at least equal the number of columns in the LP problem object.
dj
An array to receive the reduced cost values computed from the pi values for the problem object. The length of the array must at least equal the number of columns in the problem object.

Return

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

Example


status = CPXqpdjfrompi (env, lp, origpi, reducepi);