H Chapter Contents
H Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentH02BVF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

H02BVF prints the solution to a linear or integer programming problem computed by E04MFF/E04MFA or H02BBF and H02BZF, with user-supplied names for the rows and columns.

## 2  Specification

 SUBROUTINE H02BVF ( N, M, A, LDA, BL, BU, X, CLAMDA, ISTATE, CRNAME, IFAIL)
 INTEGER N, M, LDA, ISTATE(N+M), IFAIL REAL (KIND=nag_wp) A(LDA,*), BL(N+M), BU(N+M), X(N), CLAMDA(N+M) CHARACTER(8) CRNAME(N+M)

## 3  Description

H02BVF prints the solution to a linear or integer programming problem with user-supplied names for the rows and columns. All output is written to the current advisory message unit (as defined by X04ABF). The routine must be preceded in the same program by calls to H02BUF and either E04MFF/E04MFA (if an LP problem has been solved) or H02BBF and H02BZF (if an IP problem has been solved). The documents for E04MFF/E04MFA, H02BUF and/or H02BBF and H02BZF should be consulted for further details.

## 4  References

IBM (1971) MPSX – Mathematical programming system Program Number 5734 XM4 IBM Trade Corporation, New York

## 5  Parameters

1:     N – INTEGERInput
On entry: the number of variables, as returned by H02BUF.
Constraint: ${\mathbf{N}}>0$.
2:     M – INTEGERInput
On entry: the number of general linear constraints, as returned by H02BUF.
Constraint: ${\mathbf{M}}\ge 0$.
3:     A(LDA,$*$) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least ${\mathbf{N}}$ if ${\mathbf{M}}>0$ and at least $1$ if ${\mathbf{M}}=0$.
On entry: the matrix of general linear constraints, as returned by H02BUF.
4:     LDA – INTEGERInput
On entry: this must be the same parameter MAXM as supplied to H02BUF.
Constraint: ${\mathbf{LDA}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.
5:     BL(${\mathbf{N}}+{\mathbf{M}}$) – REAL (KIND=nag_wp) arrayInput
On entry: the lower bounds for all the constraints, as returned by E04MFF/E04MFA or H02BZF.
6:     BU(${\mathbf{N}}+{\mathbf{M}}$) – REAL (KIND=nag_wp) arrayInput
On entry: the upper bounds for all the constraints, as returned by E04MFF/E04MFA or H02BZF.
7:     X(N) – REAL (KIND=nag_wp) arrayInput
On entry: the solution to the problem, as returned by E04MFF/E04MFA or H02BBF.
8:     CLAMDA(${\mathbf{N}}+{\mathbf{M}}$) – REAL (KIND=nag_wp) arrayInput
On entry: the Lagrange-multipliers (reduced costs) for each constraint with respect to the working set, as returned by E04MFF/E04MFA or H02BZF.
9:     ISTATE(${\mathbf{N}}+{\mathbf{M}}$) – INTEGER arrayInput
On entry: the status of every constraint in the working set at the solution, as returned by E04MFF/E04MFA or H02BZF.
10:   CRNAME(${\mathbf{N}}+{\mathbf{M}}$) – CHARACTER(8) arrayInput
On entry: the user-defined names for all the variables and constraints, as returned by H02BUF.
11:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to $0$, $-1\text{​ or ​}1$. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value $-1\text{​ or ​}1$ is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is $0$. When the value $-\mathbf{1}\text{​ or ​}\mathbf{1}$ 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).

## 6  Error Indicators and Warnings

If on entry ${\mathbf{IFAIL}}={\mathbf{0}}$ or $-{\mathbf{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$
 On entry, ${\mathbf{N}}\le 0$, or ${\mathbf{M}}<0$, or ${\mathbf{LDA}}<\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.

Not applicable.