After the
handle has been initialized (e.g.,
e04raf has been called),
e04rff may be used to define the objective function of the problem as a quadratic function
or a sparse linear function
. If the objective function has already been defined, it will be overwritten. If
e04rff is called with no nonzeroes in either
or
,
any existing objective function is removed, no new one is added and the problem will be solved as a feasible point problem.
e04tef may be used to set individual elements
of the linear objective.
Linear Programming (LP)
Quadratic Programming problems (QP)
or for Semidefinite Programming problems with bilinear matrix inequalities (BMI-SDP)
The matrix
is a sparse symmetric
matrix. It does not need to be positive definite. See
Section 3.1 in the
E04 Chapter Introduction for more details about the
NAG optimization modelling suite.
None.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
Background information to multithreading can be found in the
Multithreading documentation.
Internal changes have been made to this routine as follows:
- At Mark 27.1: Previously, it was not possible to modify the objective function once it was set or to edit the model once a solver had been called. These limitations have been removed and the associated error codes were removed.
For details of all known issues which have been reported for the
NAG Library please refer to the
Known Issues.
This example demonstrates how to use nonlinear semidefinite programming to find a nearest correlation matrix satisfying additional requirements. This is a viable alternative to routines
g02aaf,
g02abf,
g02ajf or
g02anf as it easily allows you to add further constraints on the correlation matrix. In this case a problem with a linear matrix inequality and a quadratic objective function is formulated to find the nearest correlation matrix in the Frobenius norm preserving the nonzero pattern of the original input matrix. However, additional box bounds (
e04rhf) or linear constraints (
e04rjf) can be readily added to further bind individual elements of the new correlation matrix or new matrix inequalities (
e04rnf) to restrict its eigenvalues.
The problem is as follows (to simplify the notation only the upper triangular parts are shown). To a given
symmetric input matrix
find correction terms
which form symmetric matrix
so that the following requirements are met:
-
(a)It is a correlation matrix, i.e., symmetric positive semidefinite matrix with a unit diagonal. This is achieved by the way is assembled and by a linear matrix inequality
-
(b) is nearest to in the Frobenius norm, i.e., it minimizes the Frobenius norm of the difference which is equivalent to:
-
(c) preserves the nonzero structure of . This is met by defining only for nonzero elements .
See also
e04raf for links to further examples in the suite.