NAG Library Routine Document
E04MXF
1 Purpose
E04MXF reads data for a sparse linear programming, mixed integer linear programming, quadratic programming or mixed integer quadratic programming problems from an external file which is in standard or compatible MPS input format.
2 Specification
SUBROUTINE E04MXF ( 
INFILE, MAXN, MAXM, MAXNNZ, MAXNCOLH, MAXNNZH, MAXLINTVAR, MPSLST, N, M, NNZ, NCOLH, NNZH, LINTVAR, IOBJ, A, IROWA, ICCOLA, BL, BU, PNAMES, NNAME, CRNAME, H, IROWH, ICCOLH, MINMAX, INTVAR, IFAIL) 
INTEGER 
INFILE, MAXN, MAXM, MAXNNZ, MAXNCOLH, MAXNNZH, MAXLINTVAR, MPSLST, N, M, NNZ, NCOLH, NNZH, LINTVAR, IOBJ, IROWA(MAXNNZ), ICCOLA(MAXN+1), NNAME, IROWH(MAXNNZH), ICCOLH(MAXNCOLH+1), MINMAX, INTVAR(MAXLINTVAR), IFAIL 
REAL (KIND=nag_wp) 
A(MAXNNZ), BL(MAXN+MAXM), BU(MAXN+MAXM), H(MAXNNZH) 
CHARACTER(8) 
PNAMES(5), CRNAME(MAXN+MAXM) 

3 Description
E04MXF reads linear programming (LP) or quadratic programming (QP) problem data or their mixed integer variants from an external file which is prepared in standard or compatible MPS (see
IBM (1971)) input format. It then initializes
$n$ (the number of variables),
$m$ (the number of general linear constraints), the
$m$ by
$n$ matrix
$A$, the vectors
$l$,
$u$,
$c$ (stored in row
IOBJ of
$A$) and the
$n$ by
$n$ Hessian matrix
$H$ for use with
E04NKF/E04NKA and
E04NQF.
These routines are designed to solve problems of the form
The input file of data may only contain two types of lines:
 Indicator lines (specifying the type of data which is to follow).
 Data lines (specifying the actual data).
A section is a combination of an indicator line and its corresponding data lines. Any characters beyond column 80 are ignored. Indicator lines must not contain leading blank characters (in other words they must begin in column 1). The following displays the order in which the indicator lines must appear in the file:
NAME 
usersupplied name 
(optional) 
OBJSENSE 
(optional) 

data line(s) 
OBJNAME 
(optional) 

data line(s) 
ROWS 

data line(s) 
COLUMNS 

data line(s) 
RHS 

data line(s) 
RANGES 
(optional) 

data line(s) 
BOUNDS 
(optional) 

data line(s) 
QUADOBJ 
(optional) 

data line(s) 
ENDATA 
A data line follows the same fixed format made up of fields defined below. The contents of the fields may have different significance depending upon the section of data in which they appear.

Field 1 
Field 2 
Field 3 
Field 4 
Field 5 
Field 6 
Columns 
$2\u20133$ 
$5\u201312$ 
$15\u201322$ 
$25\u201336$ 
$40\u201347$ 
$50\u201361$ 
Contents 
Code 
Name 
Name 
Value 
Name 
Value 
The names and codes consist of ‘printable’ characters only. Values are read using a field width of $12$. This allows values to be entered in several equivalent forms. For example, $1.2345678$, $\text{1.2345678E+0}$, $\text{123.45678E\u22122}$ and $\text{12345678E\u221207}$ all represent the same number. It is safest to include an explicit decimal point.
Lines with an asterisk ($*$) in column one will be considered comment lines and will be ignored by the routine.
Columns outside the six fields must be blank, except for columns 72–80, whose contents are ignored by the routine. These columns may be used to enter a sequence number. A nonblank character outside the predefined six fields and columns 72–80 is considered to be a major error (
${\mathbf{IFAIL}}={\mathbf{16}}$; see
Section 6), unless it is part of a comment.
3.1.1 NAME Section (optional)
The NAME section is the only section where the data is on the same line as the indicator. The ‘usersupplied name’ must be in field
$3$ on the same line as the NAME indicator line. The ‘usersupplied name’ may be blank.
Field 
Required 
Description 
$3$ 
No 
Name of the problem 
3.1.2 OBJSENSE Section (optional)
The data line in this section can be used to specify the sense of the objective function. If this section is present it can contain only one data line. If OBJSENSE section is missing or empty, minimization is assumed.
Field 
Required 
Description 
$2$ 
No 
Sense of objective function 
Field 2 may contain either MIN, MAX, MINIMIZE or MAXIMIZE.
3.1.3 OBJNAME Section (optional)
The data line in this section can be used to specify the name of a free row (see
Section 3.1.4) that should be used as the objective function. If this section is present it can contain only one data line. If OBJNAME section is missing or is empty, the first free row will be chosen instead. Alternatively, OBJNAME can be overridden by setting nonempty
${\mathbf{PNAMES}}\left(2\right)$.
Field 
Required 
Description 
$2$ 
No 
Row name to be used as the objective function 
Field 2 must contain a valid row name.
3.1.4 ROWS Section
The data lines in this section specify unique row (constraint) names and their inequality types (i.e., unconstrained,
$=$,
$\ge $ or
$\le $).
Field 
Required 
Description 
$1$ 
Yes 
Inequality Key 
$2$ 
Yes 
Row name 
The inequality key specifies each row's type. It may contain the values
E,
G,
L,
N and can be in either column
$2$ or
$3$.
Inequality Key 
Description 
$\mathit{l}$ 
$\mathit{u}$ 
N 
free row 
$\infty $ 
$\infty $ 
G 
Greater than or equal to 
finite 
$\infty $ 
L 
Less than or equal to 
$\infty $ 
finite 
E 
Equal to 
finite 
$l$ 
Row type
N stands for ‘Not binding’, also known as ‘Free’. It can be used to define the objective row. The objective row is a free row that specifies the vector
$c$ in the linear objective term
${c}^{\mathrm{T}}x$. If there is more than one free row, the first free row is chosen, unless another free row name is specified by OBJNAME (see
Section 3.1.3) or
${\mathbf{PNAMES}}\left(2\right)$ (see
Section 5). Note that
$c$ is assumed to be zero if either the chosen row defined does not appear in the COLUMNS section (i.e., has no nonzero elements) or there are no free rows defined in the ROWS section.
3.1.5 COLUMNS Section
Data lines in this section specify the names to be assigned to the variables (columns) in the general linear constraint matrix
$A$, and define, in terms of column vectors, the actual values of the corresponding matrix elements.
Field 
Required 
Description 
$2$ 
Yes 
Column name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
Each data line in the COLUMNS section defines the nonzero elements of $A$ or $c$. Any elements of $A$ or $c$ that are undefined are assumed to be zero. Nonzero elements of $A$ must be grouped by column, that is to say that all of the nonzero elements in the jth column of $A$ must be specified before those in the $\mathit{j}+1$th column, for $\mathit{j}=1,2,\dots ,n1$. Rows may appear in any order within the column.
3.1.6 Integer Markers
As is described later in this document, you are able to define any integer variables in the BOUNDS section of the MPS file. For backward compatibility E04MXF allows you to define the integer variables within the COLUMNS section using integer markers, although it is not recommended as markers can be treated differently by different MPS readers. Each marker line must have the following format:
Field 
Required 
Description 
$2$ 
No 
Marker ID 
$3$ 
Yes 
Marker Tag 
$5$ 
Yes 
Marker Type 
The marker tag must contain ‘MARKER’. Marker Type must be ‘INTORG’ to start reading integer variables and ‘INTEND’ to finish reading integer variables. This implies that a row cannot be named ‘MARKER’, ‘INTORG’ or ‘INTEND’. You may wish to have several integer marker sections within the COLUMNS section, in which case each section must begin with an ‘INTORG’ marker and end with an ‘INTEND’ marker and there should not be another marker between them.
Field 2 is ignored by E04MXF. When an integer variable is declared it will keep its default bounds unless they are changed in the BOUNDS section. This may vary between different MPS readers.
3.1.7 RHS Section
This section specifies the righthand side values of the general linear constraint matrix
$A$ (if any).
Field 
Required 
Description 
$2$ 
Yes 
RHS name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
The MPS file can contain several RHS sets distinguished by RHS name. If RHS name is defined in
${\mathbf{PNAMES}}\left(3\right)$ (see
Section 5) then E04MXF will read in only that RHS vector, otherwise the first RHS set will be used.
Only the nonzero elements need to be specified. Note if a RHS is given to the objective function it will be ignored by E04MXF. RHSs given to the objective function are dealt with differently by different MPS readers, therefore it is safer to not define a RHS of the objective function in your MPS file. Note that this section may be empty, in which case the RHS vector is assumed to be zero.
3.1.8 RANGES Section (optional)
Ranges are used to modify the interpretation of constraints defined in the ROWS section (see
Section 3.1.4) to the form
$l\le Ax\le u$, where both
$l$ and
$u$ are finite. The range of the constraint is
$r=ul$.
Field 
Required 
Description 
$2$ 
Yes 
Range name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
The range of each constraint implies the upper and lower bounds depending on the Inequality Key of each constraint, as shown below.
Inequality Key 
Sign of $\text{}\mathit{r}$ 
$\mathit{l}$ 
$\mathit{u}$ 
E 
$+$ 
$b$ 
$b+r$ 
E 
$$ 
$b+r$ 
$b$ 
G 
$+/$ 
$b$ 
$b+\leftr\right$ 
L 
$+/$ 
$b\leftr\right$ 
$b$ 
N 
$+/$ 
$\infty $ 
$+\infty $ 
where
$b$ is the RHS of the constraint defined in the RHS section and
$r$ is the range.
If Range name is defined in
${\mathbf{PNAMES}}\left(4\right)$ (see
Section 5) then the routine will read in only the range set of that Range name otherwise the first set will be used.
3.1.9 BOUNDS Section (optional)
These lines specify limits on the values of the variables (
$l$ and
$u$ in
$l\le x\le u$). If the variable is not specified in the bound set then it is automatically assumed to lie between
$0$ and
$+\infty $.
Field 
Required 
Description 
$1$ 
Yes 
Bound type identifier 
$2$ 
Yes 
Bound name 
$3$ 
Yes 
Column name 
$4$ 
Yes/No 
Value 
Note: field 4 is required only if Bound type identifier is one of UP, LO, FX, UI or LI in which case it gives the value $k$ below. If Bound type identifier is FR, MI, PL or BV, field 4 is ignored and it is recommended to leave it blank.
The table below describes the acceptable Bound type identifiers and how they specify the variables' bounds.
Bound Type Identifier 
$\mathit{l}$ 
$\mathit{u}$ 
Integer Variable? 
UP 
unchanged 
$k$ 
No 
LO 
$k$ 
unchanged 
No 
FX 
$k$ 
$k$ 
No 
FR 
$\infty $ 
$\infty $ 
No 
MI 
$\infty $ 
unchanged 
No 
PL 
unchanged 
$\infty $ 
No 
BV 
$0$ 
$1$ 
Yes 
UI 
unchanged 
$k$ 
Yes 
LI 
$k$ 
unchanged 
Yes 
If Bound name is defined in
${\mathbf{PNAMES}}\left(5\right)$ (see
Section 5) then the routine will read in only the bound set of that name otherwise the first set will be used.
3.1.10 QUADOBJ Section (optional)
The QUADOBJ section defines nonzero elements of one triangle of the Hessian matrix
$H$.
Field 
Required 
Description 
$2$ 
Yes 
Column name (HColumn Index) 
$3$ 
Yes 
Column name (HRow Index) 
$4$ 
Yes 
Value 
$5$ 
No 
Column name (HRow Index) 
$6$ 
No 
Value 
Each data line in the QUADOBJ section defines one or optionally two nonzero elements
${H}_{ij}$ of the matrix
$H$. Each element
${H}_{ij}$ is given as a triplet of row index
$i$, column index
$j$ and a value. The Column names (as defined in the COLUMNS section) are used to link the names of the variables and the indices
$i$ and
$j$. More precisely, the matrix
$H$ on output will have a nonzero element
where index
$j$ belongs to HColumn Index and index
$i$ to one of the HRow Indices such that
 ${\mathbf{CRNAME}}\left(j\right)=\text{Column name (HColumn Index)}$ and
 ${\mathbf{CRNAME}}\left(i\right)=\text{Column name (HRow Index)}$.
It is only necessary to define either the upper or lower triangle of the $H$ matrix; either will suffice. Any elements that have been defined in the upper triangle of the matrix will be moved to the lower triangle of the matrix, then any repeated nonzeros will be summed.
Note: it is much more efficient for
E04NKF/E04NKA and
E04NQF
to have the
$H$ matrix defined by the first
NCOLH column names. If the nonzeros of
$H$ are defined by any columns that are not in the first
NCOLH of
N then E04MXF will rearrange matrices
$A$ and
$H$ so that they are.
3.2 Query Mode
E04MXF offers a way to quickly give upper estimates on the sizes of user arrays, so called ‘query mode’. In this mode any expensive checks of the data and of the file format are skipped only to promptly count the number of variables, constraints and matrix nonzeros. This might be useful in the usual case where the size of the problem is not known in advance.
The query mode can be intentionally triggered from the beginning by setting any of the following:
${\mathbf{MAXN}}<1$,
${\mathbf{MAXM}}<1$,
${\mathbf{MAXNNZ}}<1$,
${\mathbf{MAXNCOLH}}<0$,
${\mathbf{MAXNNZH}}<0$ or
${\mathbf{MAXLINTVAR}}=0$. If no major formatting error occurs in the file,
${\mathbf{IFAIL}}={\mathbf{0}}$ is returned and the upper estimates are given as stated in
Table 1. Alternatively, the routine switches to the query mode while the file is being read and if it is discovered that the provided space is insufficient (
${\mathbf{N}}>{\mathbf{MAXN}}$,
${\mathbf{M}}>{\mathbf{MAXM}}$,
${\mathbf{NNZ}}>{\mathbf{MAXNNZ}}$,
${\mathbf{NCOLH}}>{\mathbf{MAXNCOLH}}$,
${\mathbf{NNZH}}>{\mathbf{MAXNNZH}}$ or
${\mathbf{LINTVAR}}>{\mathbf{MAXLINTVAR}}$). In this case
${\mathbf{IFAIL}}={\mathbf{2}}$ is returned.
The recommended practice is shown in the
Section 9 when the routine is run twice. The first time in the query mode, then the data arrays are allocated and E04MXF is called for the second time to read the data.
4 References
IBM (1971) MPSX – Mathematical programming system Program Number 5734 XM4 IBM Trade Corporation, New York
5 Parameters
 1: INFILE – INTEGERInput

On entry: the identifier associated with the MPSX data file to read from.
Constraint:
$0\le {\mathbf{INFILE}}$.
 2: MAXN – INTEGERInput
On entry: an upper limit for the number of variables in the problem.
If
${\mathbf{MAXN}}<1$, E04MXF will go into query mode (see
Section 3.2).
 3: MAXM – INTEGERInput
On entry: an upper limit for the number of constraints (including the objective row) in the problem.
If
${\mathbf{MAXM}}<1$, E04MXF will go into query mode (see
Section 3.2).
 4: MAXNNZ – INTEGERInput
On entry: an upper limit for the number of nonzeros (including the objective row) in the problem.
If
${\mathbf{MAXNNZ}}<1$, E04MXF will start in query mode (see
Section 3.2).
 5: MAXNCOLH – INTEGERInput
On entry: an upper limit for the dimension of the matrix
$H$.
If
${\mathbf{MAXNCOLH}}<0$, E04MXF will start in query mode (see
Section 3.2).
 6: MAXNNZH – INTEGERInput
On entry: an upper limit for the number of nonzeros of the matrix
$H$.
If
${\mathbf{MAXNNZH}}<0$, E04MXF will start in query mode (see
Section 3.2).
 7: MAXLINTVAR – INTEGERInput
On entry: if
${\mathbf{MAXLINTVAR}}>0$, an upper limit for the number of integer variables.
If
${\mathbf{MAXLINTVAR}}=0$, E04MXF will start in query mode (see
Section 3.2).
If ${\mathbf{MAXLINTVAR}}<0$, E04MXF will treat all integer varables in the file as continuous variables.
 8: MPSLST – INTEGERInput
On entry: if
${\mathbf{MPSLST}}\ne 0$, then a summary of what E04MXF is doing is sent to the current advisory message unit (as defined by
X04ABF). This can be useful for debugging the MPS data file. If
${\mathbf{MPSLST}}=0$, then no summary is produced.
 9: N – INTEGEROutput
On exit: if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of the number of variables of the problem. Otherwise,
$n$, the actual number of variables in the problem.
 10: M – INTEGEROutput
On exit: if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of the number of general linear constraints in the problem (including the objective row). Otherwse
$m$, the actual number of general linear constaints of the problem.
 11: NNZ – INTEGEROutput
On exit: if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of the number of nonzeros in the problem (including the objective row). Otherwise the actual number of nonzeros in the problem (including the objective row).
 12: NCOLH – INTEGEROutput
On exit: if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of
the variable
NCOLH as used by
E04NKF/E04NKA and
E04NQF.
In this context
NCOLH is the number of leading nonzero columns of the Hessian matrix
$H$. Otherwise, the actual dimension of the matrix
$H$.
 13: NNZH – INTEGEROutput
On exit: if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of the number of nonzeros of the matrix
$H$. Otherwise, the actual number of nonzeros of the matrix
$H$.
 14: LINTVAR – INTEGEROutput
On exit: if on entry,
${\mathbf{MAXLINTVAR}}<0$, all integer variables are treated as continuous and
${\mathbf{LINTVAR}}=1$.
Otherwise, if E04MXF was run in query mode (see
Section 3.2), or returned with
${\mathbf{IFAIL}}={\mathbf{2}}$, an upper estimate of the number of integer variables of the problem. Otherwise, the actual number of integer variables of the problem.
 15: IOBJ – INTEGEROutput
On exit: if
${\mathbf{IOBJ}}>0$, row
IOBJ of
$A$ is a free row containing the nonzero coefficients of the vector
$c$.
If ${\mathbf{IOBJ}}=0$, the coefficients of $c$ are assumed to be zero.
 16: A(MAXNNZ) – REAL (KIND=nag_wp) arrayOutput
On exit: the nonzero elements of $A$, ordered by increasing column index.
 17: IROWA(MAXNNZ) – INTEGER arrayOutput
On exit: the row indices of the nonzero elements stored in
A.
 18: ICCOLA(${\mathbf{MAXN}}+1$) – INTEGER arrayOutput
On exit: a set of pointers to the beginning of each column of
$A$. More precisely,
${\mathbf{ICCOLA}}\left(\mathit{i}\right)$ contains the index in
A of the start of the
$\mathit{i}$th column, for
$\mathit{i}=1,2,\dots ,{\mathbf{N}}$. Note that
${\mathbf{ICCOLA}}\left(1\right)=1$ and
${\mathbf{ICCOLA}}\left({\mathbf{N}}+1\right)={\mathbf{NNZ}}+1$.
 19: BL(${\mathbf{MAXN}}+{\mathbf{MAXM}}$) – REAL (KIND=nag_wp) arrayOutput
 20: BU(${\mathbf{MAXN}}+{\mathbf{MAXM}}$) – REAL (KIND=nag_wp) arrayOutput
On exit:
BL contains the vector
$l$ (the lower bounds) and
BU contains the vector
$u$ (the upper bounds), for all the variables and constraints in the following order. The first
N elements of each array contain the bounds on the variables
$x$ and the next
M elements contain the bounds for the linear objective term
${c}^{\mathrm{T}}x$ and the general linear constraints
$Ax$ (if any). Note that an ‘infinite’ lower bound is indicated by
${\mathbf{BL}}\left(j\right)=\text{1.0E+20}$, an ‘infinite’ upper bound by
${\mathbf{BU}}\left(j\right)=+\text{1.0E+20}$.
Note that E04MXF uses an ‘infinite’ bound size of
${10}^{20}$ in the definition of
$l$ and
$u$. In other words, any element of
$u$ greater than or equal to
${10}^{20}$ will be regarded as
$+\infty $ (and similarly any element of
$l$ less than or equal to
${10}^{20}$ will be regarded as
$\infty $). If this value is deemed to be ‘inappropriate’, you are recommended to reset the value of the optional parameter
Infinite Bound Size and make any necessary changes to
BL and/or
BU before calling
E04NKF/E04NKA and
E04NQF.
 21: PNAMES($5$) – CHARACTER(8) arrayInput/Output
On entry: a set of names associated with the MPSX form of the problem.
 ${\mathbf{PNAMES}}\left(1\right)$
 Must either contain the name of the problem or be blank.
 ${\mathbf{PNAMES}}\left(2\right)$
 Must either be blank or contain the name of the objective row (in which case it overrides OBJNAME section and the default choice of the first objective free row).
 ${\mathbf{PNAMES}}\left(3\right)$
 Must either contain the name of the RHS set to be used or be blank (in which case the first RHS set is used).
 ${\mathbf{PNAMES}}\left(4\right)$
 Must either contain the name of the RANGE set to be used or be blank (in which case the first RANGE set (if any) is used).
 ${\mathbf{PNAMES}}\left(5\right)$
 Must either contain the name of the BOUNDS set to be used or be blank (in which case the first BOUNDS set (if any) is used).
On exit: a set of names associated with the problem as defined in the MPSX data file as follows:
 ${\mathbf{PNAMES}}\left(1\right)$
 Contains the name of the problem (or blank if none).
 ${\mathbf{PNAMES}}\left(2\right)$
 Contains the name of the objective row (or blank if none).
 ${\mathbf{PNAMES}}\left(3\right)$
 Contains the name of the RHS set (or blank if none).
 ${\mathbf{PNAMES}}\left(4\right)$
 Contains the name of the RANGE set (or blank if none).
 ${\mathbf{PNAMES}}\left(5\right)$
 Contains the name of the BOUNDS set (or blank if none).
 22: NNAME – INTEGEROutput
On exit: $n+m$, the total number of variables and constraints in the problem (including the objective row).
 23: CRNAME(${\mathbf{MAXN}}+{\mathbf{MAXM}}$) – CHARACTER(8) arrayOutput

Note: that only the first eight characters of the rows of
CRNAME are significant.
On exit: the MPS names of all the variables and constraints in the problem in the following order. The first
N elements contain the MPS names for the variables and the next
M elements contain the MPS names for the objective row and general linear constraints (if any). Note that the MPS name for the objective row is stored in
${\mathbf{CRNAME}}\left({\mathbf{N}}+{\mathbf{IOBJ}}\right)$.
 24: H(MAXNNZH) – REAL (KIND=nag_wp) arrayOutput
On exit: the
NNZH nonzero elements of
$H$, arranged by increasing column index.
 25: IROWH(MAXNNZH) – INTEGER arrayOutput
On exit: the
NNZH row indices of the elements stored in
$H$.
 26: ICCOLH(${\mathbf{MAXNCOLH}}+1$) – INTEGER arrayOutput
On exit: a set of pointers to the beginning of each column of $H$. More precisely,
${\mathbf{ICCOLH}}\left(\mathit{i}\right)$ contains the index in $H$ of the start of the $\mathit{i}$th column, for $\mathit{i}=1,2,\dots ,{\mathbf{NCOLH}}$. Note that ${\mathbf{ICCOLH}}\left(1\right)=1$ and ${\mathbf{ICCOLH}}\left({\mathbf{NCOLH}}+1\right)={\mathbf{NNZH}}+1$.
 27: MINMAX – INTEGEROutput
On exit:
MINMAX defines the direction of the optimization as read from the MPS file. By default the routine assumes the objective function should be minimized and will return
${\mathbf{MINMAX}}=1$. If the routine discovers in the OBJSENSE section that the objective function should be maximized it will return
${\mathbf{MINMAX}}=1$. If the routine discovers that there is neither the linear objective term
$c$ (the objective row) nor the Hessian matrix
$H$, the problem is considered as a feasible point problem and returns
${\mathbf{MINMAX}}=0$.
 28: INTVAR(MAXLINTVAR) – INTEGER arrayOutput
On exit:
INTVAR contains pointers to the columns that are defined as integer variables. More precisely,
${\mathbf{INTVAR}}\left(\mathit{i}\right)=k$, where
$k$ is the index of a column that is defined as an integer variable, for
$\mathit{i}=1,2,\dots ,{\mathbf{LINTVAR}}$.
 29: 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).
Please note that if any of the relevant parameters are accidentally set to zero, or not set and assume zero values, then the routine will have executed in query mode. In this case only the size of the problem is returned and other parameters are not set. Please see
Section 3.2.
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$

Warning: MPS file not strictly fixed format, although the problem was read anyway. The data may have been read incorrectly, therefore you may wish to run the program with ${\mathbf{MPSLST}}=1$ for more details.
 ${\mathbf{IFAIL}}=2$

At least one of
MAXM,
MAXN,
MAXNNZ,
MAXNCOLH,
MAXNNZH or
MAXLINTVAR is too small. Suggested values are returned in
M,
N,
NNZ,
NCOLH,
NNZH and
LINTVAR respectively.
 ${\mathbf{IFAIL}}=3$

Incorrect ordering of indicator lines.
OBJNAME indicator line found after ROWS indicator line.
 ${\mathbf{IFAIL}}=4$

Incorrect ordering of indicator lines.
COLUMNS indicator line found before ROWS indicator line.
 ${\mathbf{IFAIL}}=5$

Incorrect ordering of indicator lines.
RHS indicator line found before COLUMNS indicator line.
 ${\mathbf{IFAIL}}=6$

Incorrect ordering of indicator lines.
RANGES indicator line found before RHS indicator line.
 ${\mathbf{IFAIL}}=7$

Incorrect ordering of indicator lines.
BOUNDS indicator line found before COLUMNS indicator line.
 ${\mathbf{IFAIL}}=8$

Incorrect ordering of indicator lines.
BOUNDS indicator line found before QUADOBJ indicator line.
 ${\mathbf{IFAIL}}=9$

Incorrect ordering of indicator lines.
QUADOBJ indicator line found before COLUMNS indicator line.
 ${\mathbf{IFAIL}}=10$

Unknown indicator line ‘$\u27e8\mathit{\text{value}}\u27e9$’.
 ${\mathbf{IFAIL}}=12$

Indicator line ‘$\u27e8\mathit{\text{value}}\u27e9$’ has been found more than once in the MPS file.
 ${\mathbf{IFAIL}}=13$

End of file found before ENDATA indicator line.
 ${\mathbf{IFAIL}}=14$

No indicator line found in file. It may be an empty file.
 ${\mathbf{IFAIL}}=15$

At least one mandatory section not found in MPS file.
 ${\mathbf{IFAIL}}=16$

An illegal line was detected in ‘$\u27e8\mathit{\text{value}}\u27e9$’ section.
This is neither a comment nor a valid data line.
 ${\mathbf{IFAIL}}=17$

Unknown inequality key ‘$\u27e8\mathit{\text{value}}\u27e9$’ in ROWS section.
Expected ‘N’, ‘G’, ‘L’ or ‘E’
 ${\mathbf{IFAIL}}=18$

Empty ROWS section.
Neither the objective row or the constraints were defined.
 ${\mathbf{IFAIL}}=19$

The supplied name, in ${\mathbf{PNAMES}}\left(2\right)$ or in OBJNAME, of the objective row was not found in amongst Free rows in the ROWS section.
 ${\mathbf{IFAIL}}=20$

The supplied name, in ${\mathbf{PNAMES}}\left(5\right)$, of the BOUNDS set to be used was not found in the BOUNDS section.
 ${\mathbf{IFAIL}}=21$

The supplied name, in ${\mathbf{PNAMES}}\left(3\right)$, of the RHS set to be used was not found in the RHS section.
 ${\mathbf{IFAIL}}=22$

The supplied name, in ${\mathbf{PNAMES}}\left(4\right)$, of the RANGES set to be used was not found in the RANGES section.
 ${\mathbf{IFAIL}}=23$

Illegal row name.
Row names must consist of printable characters only.
 ${\mathbf{IFAIL}}=24$

Illegal column name.
Column names must consist of printable characters only.
 ${\mathbf{IFAIL}}=25$

Row name ‘$\u27e8\mathit{\text{value}}\u27e9$’ has been defined more than once in the ROWS section.
 ${\mathbf{IFAIL}}=26$

Column ‘
$\u27e8\mathit{\text{value}}\u27e9$’ has been defined more than once in the COLUMNS section. Column definitions must be continuous. (See
Section 3.1.5).
 ${\mathbf{IFAIL}}=27$

Found another ‘$\mathrm{INTORG}$’ marker within ‘$\mathrm{INTORG}$’$$‘$\mathrm{INTEND}$’ range.
 ${\mathbf{IFAIL}}=28$

Found ‘$\mathrm{INTEND}$’ marker without previous marker being ‘$\mathrm{INTORG}$’.
 ${\mathbf{IFAIL}}=29$

Found ‘$\mathrm{INTORG}$’ but not ‘$\mathrm{INTEND}$’ before the end of the COLUMNS section.
 ${\mathbf{IFAIL}}=30$

Illegal marker type ‘$\u27e8\mathit{\text{value}}\u27e9$’.
Should be either ‘INTORG’ or ‘INTEND’.
 ${\mathbf{IFAIL}}=31$

Unknown row name ‘$\u27e8\mathit{\text{value}}\u27e9$’ in $\u27e8\mathit{\text{value}}\u27e9$ section.
All row names must be specified in the ROWS section.
 ${\mathbf{IFAIL}}=32$

Unknown column name ‘$\u27e8\mathit{\text{value}}\u27e9$’ in $\u27e8\mathit{\text{value}}\u27e9$ section.
All column names must be specified in the COLUMNS section.
 ${\mathbf{IFAIL}}=33$

Unknown bound type ‘$\u27e8\mathit{\text{value}}\u27e9$’ in BOUNDS section.
 ${\mathbf{IFAIL}}=34$

More than one nonzero of
A has row name ‘
$\u27e8\mathit{\text{value}}\u27e9$’ and column name ‘
$\u27e8\mathit{\text{value}}\u27e9$’ in the COLUMNS section.
 ${\mathbf{IFAIL}}=35$

Field
$\u27e8\mathit{\text{value}}\u27e9$ did not contain a number (see
Section 3).
 ${\mathbf{IFAIL}}=36$

On entry, ${\mathbf{INFILE}}=\u27e8\mathit{\text{value}}\u27e9$.
Constraint: $0\le {\mathbf{INFILE}}$.
 ${\mathbf{IFAIL}}=999$

Dynamic memory allocation failed.
7 Accuracy
Not applicable.
None.
9 Example
This example solves the quadratic programming problem
where
The optimal solution (to five figures) is
Three bound constraints and two general linear constraints are active at the solution. Note that, although the Hessian matrix is only positive semidefinite, the point
${x}^{*}$ is unique.
The MPS representation of the problem is given in
Section 9.2.
9.1 Program Text
Program Text (e04mxfe.f90)
9.2 Program Data
Program Options (e04mxfe.opt)
9.3 Program Results
Program Results (e04mxfe.r)