After the
handle has been initialized (e.g.,
e04rac has been called),
e04rsc may be used to edit a model by adding or replacing a quadratic objective function or constraint of the form
and
respectively. If a factor
of
such that
is available,
e04rtc should be called instead.
The matrix
is a sparse symmetric
matrix. Typically
e04rsc would be used together with Second-order Cone Programming (SOCP) solver
e04ptc if
is positive semidefinite which implies the problem is convex. Otherwise, if the problem is nonconvex, a general nonlinear optimization solver (such as
e04stc) may be used. It is also acceptable if
is a zero matrix, in which case the corresponding objective function or constraint becomes linear. Note that it is possible to temporarily disable and enable individual constraints in the model by
e04tcc and
e04tbc, respectively. See
Section 4.1 in the
E04 Chapter Introduction for more details about the NAG optimization modelling suite.
None.
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_HANDLE
-
The supplied
handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
- NE_INT
-
nnzr and
nnzq cannot be zero at the same time.
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INTARR
-
On entry, , and .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
- NE_INVALID_CS
-
On entry, , and .
Constraint: .
On entry, , and .
Constraint: (elements within the upper triangle).
On entry, , and .
Constraint: .
On entry, more than one element of
q has row index
and column index
.
Constraint: each element of
q must have a unique row and column index.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
- NE_NOT_INCREASING
-
On entry, more than one element of
idxr has index
.
Constraint: each element of
idxr must have a unique index.
- NE_PHASE
-
The problem cannot be modified right now, the solver is running.
- NE_REF_MATCH
-
On entry,
.
The given
idqc does not match with any quadratic constraint already defined.
Not applicable.
None.
This example demonstrates how to define and solve a convex quadratically constrained quadratic programming problem via SOCP. See also
e04rtc where the quadratic term is defined by its factor.
This example solves a quadratically constrained quadratic programming problem
where
and
.
The optimal solution (to five significant figures) is
and the objective function value is
.