After the initialization function handle_init has been called, handle_set_quadobj may be used to define the objective function of the problem as a quadratic function or a sparse linear function unless the objective function has already been defined by another function in the suite. This objective function will typically be used for linear programming (LP)
(1)
quadratic programming problems (QP)
(2)
or for semidefinite programming problems with bilinear matrix inequalities (BMI-SDP)
(3)
The matrix is a sparse symmetric by 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.
Communication structure.
An object of either the derived class CommE04RA or its base class NoneCopyableComm can be supplied.
It is recommended that the derived class is used. If the base class is supplied it must
first be initialized via a call to opt::handle_init (e04ra).
On entry: the nonzero elements of the sparse vector . must contain the index of
in the vector, for . The elements are stored in ascending order. Note that , the number of variables in the problem, was set in nvar during the initialization of the handle by handle_init.
Constraints:
, for ;
, for .
3: – double arrayInput
On entry: the nonzero elements of the sparse vector . must contain the index of
in the vector, for . The elements are stored in ascending order. Note that , the number of variables in the problem, was set in nvar during the initialization of the handle by handle_init.
On entry: arrays irowh, icolh and h store the nonzeros of the upper triangle of the matrix in coordinate storage (CS) format (see Section 2.1.1 in the F11 Chapter Introduction). irowh specifies one-based row indices, icolh specifies one-based column indices and h specifies the values of the nonzero elements in such a way that where ,
, for . No particular order is expected, but elements should not repeat.
On entry: arrays irowh, icolh and h store the nonzeros of the upper triangle of the matrix in coordinate storage (CS) format (see Section 2.1.1 in the F11 Chapter Introduction). irowh specifies one-based row indices, icolh specifies one-based column indices and h specifies the values of the nonzero elements in such a way that where ,
, for . No particular order is expected, but elements should not repeat.
Constraint:
, for .
6: – double arrayInput
On entry: arrays irowh, icolh and h store the nonzeros of the upper triangle of the matrix in coordinate storage (CS) format (see Section 2.1.1 in the F11 Chapter Introduction). irowh specifies one-based row indices, icolh specifies one-based column indices and h specifies the values of the nonzero elements in such a way that where ,
, for . No particular order is expected, but elements should not repeat.
Constraint:
, for .
7: – OptionalE04RFInput/Output
Optional parameter container, derived from Optional.
5.1Additional Quantities
1:
The number of nonzero elements in the sparse vector
2:
The number of nonzero elements in the upper triangle of the matrix
6Exceptions and Warnings
Errors or warnings detected by the function:
All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of
opt.ifail, depending on how errors
and warnings are being handled (see Error Handling for more details).