# NAG Library Routine Document

## 1Purpose

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.

## 2Specification

Fortran Interface
 Subroutine h02bvf ( n, m, a, lda, bl, bu, x,
 Integer, Intent (In) :: n, m, lda, istate(n+m) Integer, Intent (Inout) :: ifail Real (Kind=nag_wp), Intent (In) :: a(lda,*), bl(n+m), bu(n+m), x(n), clamda(n+m) Character (8), Intent (In) :: crname(n+m)
#include nagmk26.h
 void h02bvf_ (const Integer *n, const Integer *m, const double a[], const Integer *lda, const double bl[], const double bu[], const double x[], const double clamda[], const Integer istate[], const char crname[], Integer *ifail, const Charlen length_crname)

## 3Description

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.

## 4References

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

## 5Arguments

1:     $\mathbf{n}$ – IntegerInput
On entry: the number of variables, as returned by h02buf.
Constraint: ${\mathbf{n}}>0$.
2:     $\mathbf{m}$ – IntegerInput
On entry: the number of general linear constraints, as returned by h02buf.
Constraint: ${\mathbf{m}}\ge 0$.
3:     $\mathbf{a}\left({\mathbf{lda}},*\right)$ – 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:     $\mathbf{lda}$ – IntegerInput
On entry: this must be the same argument maxm as supplied to h02buf.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
5:     $\mathbf{bl}\left({\mathbf{n}}+{\mathbf{m}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the lower bounds for all the constraints, as returned by e04mff/e04mfa or h02bzf.
6:     $\mathbf{bu}\left({\mathbf{n}}+{\mathbf{m}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the upper bounds for all the constraints, as returned by e04mff/e04mfa or h02bzf.
7:     $\mathbf{x}\left({\mathbf{n}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the solution to the problem, as returned by e04mff/e04mfa or h02bbf.
8:     $\mathbf{clamda}\left({\mathbf{n}}+{\mathbf{m}}\right)$ – 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:     $\mathbf{istate}\left({\mathbf{n}}+{\mathbf{m}}\right)$ – Integer arrayInput
On entry: the status of every constraint in the working set at the solution, as returned by e04mff/e04mfa or h02bzf.
10:   $\mathbf{crname}\left({\mathbf{n}}+{\mathbf{m}}\right)$ – Character(8) arrayInput
On entry: the user-defined names for all the variables and constraints, as returned by h02buf.
11:   $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, $-1\text{​ or ​}1$. If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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).

## 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$
 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)$.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

## 8Parallelism and Performance

h02bvf is not thread safe and should not be called from a multithreaded user program. Please see Section 3.12.1 in How to Use the NAG Library and its Documentation for more information on thread safety.
h02bvf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.