After the initialization function
e04rac has been called,
e04rjc 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
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 function and any later alterations to
will not affect these constraints.
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_ALREADY_DEFINED
-
A set of linear constraints has already been defined.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_BOUND
-
On entry, , , .
Constraint: .
On entry, , and .
Constraint: .
On entry, , , .
Constraint: .
- 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 initialized by
e04rac or it has been corrupted.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
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: .
On entry, more than one element of
b has row index
and column index
.
Constraint: each element of
b 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_PHASE
-
The problem cannot be modified in this phase any more, the solver has already been called.
- NE_REF_MATCH
-
On entry, .
Constraint: .
Not applicable.
None.
This example demonstrates how to use the MPS file reader
e04mxc and this suite of functions to define and solve a QP problem.
e04mxc uses a different output format to the one required by
e04rjc, 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
e04rjc 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
e04rac for links to further examples in this suite.