NAG FL Interfacee04ryf (handle_​print)

1Purpose

e04ryf is a part of the NAG optimization modelling suite. It allows you to print information about the problem, stored as a handle, such as which parts have already been defined or details of the matrix constraints.

2Specification

Fortran Interface
 Subroutine e04ryf ( nout,
 Integer, Intent (In) :: nout Integer, Intent (Inout) :: ifail Character (*), Intent (In) :: cmdstr Type (c_ptr), Intent (In) :: handle
#include <nag.h>
 void e04ryf_ (void **handle, const Integer *nout, const char *cmdstr, Integer *ifail, const Charlen length_cmdstr)
The routine may be called by the names e04ryf or nagf_opt_handle_print.

3Description

e04ryf prints information on a problem handle which has been previously initialized by e04raf. Various pieces of information can be retrieved and printed to the given output unit. This can be helpful when the routine is interfaced from interactive environments, for debugging purposes or to help familiarize you with the NAG optimization modelling suite.
The printer is guided by a command string which contains one or more of the following keywords:
Overview
Gives a brief overview of the problem handle, particularly, which phase it is in, if the problem or optional parameters can be edited and which parts of the problem have already been set. This might be helpful to clarify situations when ${\mathbf{ifail}}={\mathbf{2}}$ or ${\mathbf{3}}$ (the problem cannot be altered anymore, a certain part has already been defined) is obtained from routines, such as, e04ref, e04rff, e04rhf and e04rjf.
Objective
Prints the objective function as it was defined by e04ref or e04rff if it is linear or quadratic. Prints the sparsity structure of the objective function as it was defined by e04rgf if it is nonlinear or nonlinear least squares by e04rmf.
Simple bounds
Prints the variable bounds as defined by e04rhf. This might help you understand the effect of the optional parameter Infinite Bound Size on the bounds.
Linear constraints bounds
Linear constraints detailed
Print bounds or linear constraint matrix as defined by e04rjf.
Cone constraints
Cone constraints detailed
Print all second-order cone constraints as defined by e04rbf. For each constraint print its idgroup, dimension and type. If details are requested, the variables composing the cone constraint are listed as well.
Matrix constraints
Gives a list of the matrix constraints as defined by e04rnf and e04rpf. For each matrix constraint its idblk, dimension and order (e.g., linear, bilinear) are printed.
Matrix constraints detailed
Prints all the matrix constraints including all nonzeros of all the matrices as formulated by e04rnf and e04rpf.
Nonlinear constraints bounds
Nonlinear constraints detailed
Print bounds or sparsity structure of the nonlinear constraints as defined by e04rkf.
Multipliers sizes
Prints the expected dimensions of arrays storing the Lagrangian multipliers, such as u and ua of the solver e04svf which store the Lagrangian multipliers for standard and matrix constraints, respectively. This might be helpful in particular in connection with Overview and Matrix constraints to check the way the sizes of the arrays are derived.
Options
Prints all the current optional parameters. It flags whether the argument is at its default choice, whether you have set it or whether it is chosen by the solver (for example, options left on ‘AUTO’ setting after the solver has been called).
Note that the output data might not match your input exactly. The sparse matrices are typically transposed, sorted and explicit zeros removed and in certain cases transformed as needed (for example, matrices ${Q}_{ij}$ and ${Q}_{ji}$ are merged by e04rpf).
See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

None.

5Arguments

1: $\mathbf{handle}$Type (c_ptr) Input
On entry: the handle to the problem. It needs to be initialized by e04raf and must not be changed.
2: $\mathbf{nout}$Integer Input
On entry: the Fortran unit number which identifies the file to be written to.
Constraint: ${\mathbf{nout}}\ge 0$.
3: $\mathbf{cmdstr}$Character(*) Input
On entry: a command string which contains one or more keywords which identify the piece of information about the handle to be printed. Keywords are case-insensitive and space tolerant. Multiple keywords in cmdstr must be separated by commas or semicolons.
Constraint: cmdstr can only contain one or more of the following accepted keywords: overview, objective, simple bounds, linear constraints bounds, linear constraints detailed, matrix constraints, matrix constraints detailed, nonlinear constraints bounds, nonlinear constraints detailed, multipliers sizes, options.
4: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 4 in the Introduction to the NAG Library FL Interface for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is $0$. When the value is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
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 e04raf or it has been corrupted.
${\mathbf{ifail}}=6$
On entry, ${\mathbf{nout}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{nout}}\ge 0$.
${\mathbf{ifail}}=7$
cmdstr does not contain any keywords or is empty.
Keyword number $〈\mathit{\text{value}}〉$ is not recognized, it is too long.
Keyword number $〈\mathit{\text{value}}〉$ is not recognized.
${\mathbf{ifail}}=199$
An error occurred when writing to output.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

8Parallelism and Performance

e04ryf is not threaded in any implementation.

None.

10Example

This example shows the life-cycle of a handle of a typical (BMI-SDP) problem by printing the overview of the handle in various stages of the problem formulation and after the solution is found. It is also helpful to notice how a linear matrix inequality is extended with the bilinear term, see e04raf and e04rpf for further details.
The problem is as follows:
 $minimize x,y​ ​∈​ ​ℝ y subject to 1 x-1 y x-1 3/4 0 y 0 16 ⪰0 x -xy -xy 1 ⪰0 x≥0 -3≤y≤3$
The solution is $x=1/4$, $y=-2$.
Note that the matrix constraints need to be supplied in the form of equation (3) in e04rpf, i.e.,
 $∑ i,j=1 n xi xj Qijk + ∑ i=1 n xi Aik - A0k ⪰ 0 , k=1,…,mA .$
Therefore the first constraint is defined by matrices
 $A 0 1 = -1 1 0 -3/4 0 -16 , A 1 1 = 0 1 0 0 0 0 , A 2 1 = 0 0 1 0 0 0$
and the second one by
 $A 0 2 = 0 0 -1 , A 1 2 = 1 0 0 , A 2 2 ​ empty, Q 12 2 = 0 -1 0 0 .$