After the initialization routine
e04raf has been called,
e04rjf may be used to define the linear constraints
of the problem unless the linear constraints have already been defined. This will typically be used for problems, such as linear programming (LP)
quadratic programming (QP)
nonlinear programming (NLP)
or linear semidefinite programming (SDP)
where
is the number of decision variables,
is a general
rectangular matrix and
and
are
-dimensional vectors. Note that upper and lower bounds are specified for all the constraints. This form allows full generality in specifying various types of constraint. In particular, the
th constraint may be defined as an equality by setting
. If certain bounds are not present, the associated elements of
or
may be set to special values that are treated as
or
. See the description of the optional parameter
Infinite Bound Size which is common among all solvers in the suite. Its value is denoted as
further in this text. Note that the bounds are interpreted based on its value at the time of calling this routine and any later alterations to
Infinite Bound Size will not affect these constraints.
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.
None.
This example demonstrates how to use the MPS file reader
e04mxf and this suite of routines to define and solve a QP problem.
e04mxf uses a different output format to the one required by
e04rjf, in particular, it uses the compressed column storage (CCS) (see
Section 2.1.3 in the
F11 Chapter Introduction) instead of the coordinate storage and the linear objective vector is included in the system matrix. Therefore a simple transformation is needed before calling
e04rjf as demonstrated in the example program.
The data file stores the following problem:
where
The optimal solution (to five figures) is
See also
Section 10 in
e04raf for links to further examples in this suite.