# NAG FL Interfaceh02bvf (ilp_​print)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 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 <nag.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)
The routine may be called by the names h02bvf or nagf_mip_ilp_print.

## 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}$Integer Input
On entry: the number of variables, as returned by h02buf.
Constraint: ${\mathbf{n}}>0$.
2: $\mathbf{m}$Integer Input
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) array Input
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}$Integer Input
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) array Input
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) array Input
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) array Input
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) array Input
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 array Input
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) array Input
On entry: the user-defined names for all the variables and constraints, as returned by h02buf.
11: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ 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{lda}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{m}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
On entry, ${\mathbf{m}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{m}}\ge 0$.
On entry, ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{n}}>0$.
${\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.