Previous Page: CPXcopyorderFirst PageNext Page: CPXcopyquad

CPXcopyqpsep


Usage

Barrier Users Only

Description

The CPXcopyqpsep() routine is used to copy a Q matrix for separable QP problems. A separable QP problem is one where the coefficients of Q have no nonzero off-diagonal elements. Note that CPLEX will evaluate the corresponding objective with a factor of 0.5 in front of the quadratic objective term.

Note that the problem type before the CPXcopyqpsep() call must be CPXPROB_LP or CPXPROB_QP for this routine to succeed. Use CPXchgprobtype() to change the problem type. After successful execution of CPXcopyqpsep(), the problem type will be CPXPROB_QP.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

int CPXcopyqpsep (CPXENVptr env,
                  CPXLPptr lp,
                  double *qsepvec);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

double *qsepvec
An array of length CPXgetnumcols(env,lp).qsepvec[0], qsepvec[1],..., qsepvec[numcols-1] should contain the quadratic coefficients of the separable quadratic objective.

Example

status = CPXcopyqpsep (env, lp, qsepvec);
Previous Page: CPXcopyorderFirst PageNext Page: CPXcopyquad