hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_opt_miqp_mps_read (e04mx)

Purpose

nag_opt_miqp_mps_read (e04mx) reads data for 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.

Syntax

[n, m, nnz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = e04mx(infile, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, mpslst, pnames)
[n, m, nnz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = nag_opt_miqp_mps_read(infile, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, mpslst, pnames)

Description

nag_opt_miqp_mps_read (e04mx) reads data for linear programming (LP) or quadratic programming (QP) problems (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 nn (the number of variables), mm (the number of general linear constraints), the mm by nn matrix AA, the vectors ll, uu, cc (stored in row iobj of AA) and the nn by nn Hessian matrix HH for use with nag_opt_qpconvex1_sparse_solve (e04nk) and nag_opt_qpconvex2_sparse_solve (e04nq). These functions are designed to solve problems of the form
minimizex  cTx + (1/2)xTHx   subject to  l ≤
{ x Ax }
≤ u.
minimize x cTx+12xTHx   subject to  l{ x Ax } u.

MPS input format

The input file of data may only contain two types of lines:
  1. Indicator lines (specifying the type of data which is to follow).
  2. Data lines (specifying the actual data).
A section is a combination of an indicator line and its corresponding data line(s). 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 user-supplied name (optional)
OBJSENSE (optional)
  data line
OBJNAME (optional)
  data line
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 a fixed format, being made up of fields as 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 2323 512512 15221522 25362536 40474047 50615061
Contents Code Name Name Value Name Value
Each name and code must consist of ‘printable’ characters only; names and codes supplied must match the case used in the following descriptions. Values are read using a field width of 1212. This allows values to be entered in several equivalent forms. For example, 1.23456781.2345678, 1.23456781.2345678, 123.45678e−2123.45678e−2 and 12345678e−0712345678e−07 all represent the same number. It is safest to include an explicit decimal point.
Lines with an asterisk ( * *) in column 11 will be considered comment lines and will be ignored by the function.
Columns outside the six fields must be blank, except for columns 72–80, whose contents are ignored by the function. A non-blank character outside the predefined six fields and columns 72–80 is considered to be a major error (ifail = 16ifail=16; see Section [Error Indicators and Warnings]), unless it is part of a comment.

NAME Section (optional)

The NAME section is the only section where the data must be on the same line as the indicator. The ‘user-supplied name’ must be in field 33 but may be blank.
Field Required Description
33 No Name of the problem

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 must contain only one data line. If the section is missing or empty, minimization is assumed.
Field Required Description
22 No Sense of the objective function
Field 2 may contain either MIN, MAX, MINIMIZE or MAXIMIZE.

OBJNAME Section (optional)

The data line in this section can be used to specify the name of a free row (see Section [ROWS Section]) that should be used as the objective function. If this section is present it must contain only one data line. If the section is missing or is empty, the first free row will be chosen instead. Alternatively, OBJNAME can be overridden by setting nonempty pnames(2)pnames2 (see Section [Parameters]).
Field Required Description
22 No Row name to be used as the objective function
Field 2 must contain a valid row name.

ROWS Section

The data lines in this section specify unique row (constraint) names and their inequality types (i.e., unconstrained, = =,  or ).
Field Required Description
11 Yes Inequality key
22 Yes Row name
The inequality key specifies each row's type. It must be E, G, L or N and can be in either column 22 or 33.
Inequality Key Description ll uu
N Free row -
G Greater than or equal to finite
L Less than or equal to - finite
E Equal to finite ll
Row type N stands for ‘Not binding’. It can be used to define the objective row. The objective row is a free row that specifies the vector cc in the linear objective term cTxcTx. 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 [OBJNAME Section (optional)]) or pnames(2)pnames2 (see Section [Parameters]). Note that cc is assumed to be zero if either the chosen row does not appear in the COLUMNS section (i.e., has no nonzero elements) or there are no free rows defined in the ROWS section.

COLUMNS Section

Data lines in this section specify the names to be assigned to the variables (columns) in the general linear constraint matrix AA, and define, in terms of column vectors, the actual values of the corresponding matrix elements.
Field Required Description
22 Yes Column name
33 Yes Row name
44 Yes Value
55 No Row name
66 No Value
Each data line in the COLUMNS section defines the nonzero elements of AA or cc. Any elements of AA or cc that are undefined are assumed to be zero. Nonzero elements of AA must be grouped by column, that is to say that all of the nonzero elements in the jth column of AA must be specified before those in the j + 1j+1th column, for j = 1,2,,n1j=1,2,,n-1. Rows may appear in any order within the column.
Integer Markers
For backward compatibility nag_opt_miqp_mps_read (e04mx) allows you to define the integer variables within the COLUMNS section using integer markers, although this is not recommended as markers can be treated differently by different MPS readers; you should instead define any integer variables in the BOUNDS section (see below). Each marker line must have the following format:
Field Required Description
22 No Marker ID
33 Yes Marker tag
55 Yes Marker type
The marker tag must be MARKER. The 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. Please note that both marker tag and marker type comprise of 88 characters as a is the mandatory first and last character in the string. You may wish to have several integer marker sections within the COLUMNS section, in which case each marker 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 nag_opt_miqp_mps_read (e04mx). 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.

RHS Section

This section specifies the right-hand side values (if any) of the general linear constraint matrix AA.
Field Required Description
22 Yes RHS name
33 Yes Row name
44 Yes Value
55 No Row name
66 No Value
The MPS file may contain several RHS sets distinguished by RHS name. If an RHS name is defined in pnames(3)pnames3 (see Section [Parameters]) then nag_opt_miqp_mps_read (e04mx) will read in only that RHS vector, otherwise the first RHS set will be used.
Only the nonzero RHS elements need to be specified. Note that if an RHS is given to the objective function it will be ignored by nag_opt_miqp_mps_read (e04mx). An RHS given to the objective function is dealt with differently by different MPS readers, therefore it is safer to not define an 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.

RANGES Section (optional)

Ranges are used to modify the interpretation of constraints defined in the ROWS section (see Section [ROWS Section]) to the form lAxulAxu, where both ll and uu are finite. The range of the constraint is r = ulr=u-l.
Field Required Description
22 Yes Range name
33 Yes Row name
44 Yes Value
55 No Row name
66 No Value
The range of each constraint implies an upper and lower bound dependent on the inequality key of each constraint, on the RHS bb of the constraint (as defined in the RHS section), and on the range rr.
Inequality Key Sign of rr ll uu
E + + bb b + rb+r
E - b + rb+r bb
G + / +/- bb b + |r|b+|r|
L + / +/- b|r|b-|r| bb
N + / +/- - + +
If a range name is defined in pnames(4)pnames4 (see Section [Parameters]) then the function will read in only the range set of that name, otherwise the first set will be used.

BOUNDS Section (optional)

These lines specify limits on the values of the variables (the quantities ll and uu in lxulxu). If a variable is not specified in the bound set then it is automatically assumed to lie between 00 and + +.
Field Required Description
11 Yes Bound type identifier
22 Yes Bound name
33 Yes Column name
44 Yes/No Value
Note: field 4 is required only if the bound type identifier is one of UP, LO, FX, UI or LI in which case it gives the value kk below. If the 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 each determines the variables' bounds.
Bound Type
Identifier

ll

uu
Integer
Variable?
UP unchanged kk No
LO kk unchanged No
FX kk kk No
FR - No
MI - unchanged No
PL unchanged No
BV 00 11 Yes
UI unchanged kk Yes
LI kk unchanged Yes
If a bound name is defined in pnames(5)pnames5 (see Section [Parameters]) then the function will read in only the bound set of that name, otherwise the first set will be used.

QUADOBJ Section (optional)

The QUADOBJ section defines nonzero elements of the upper or lower triangle of the Hessian matrix HH.
Field Required Description
22 Yes Column name (HColumn Index)
33 Yes Column name (HRow Index)
44 Yes Value
55 No Column name (HRow Index)
66 No Value
Each data line in the QUADOBJ section defines one (or optionally two) nonzero elements HijHij of the matrix HH. Each element HijHij is given as a triplet of row index ii, column index jj and a value. The column names (as defined in the COLUMNS section) are used to link the names of the variables and the indices ii and jj. More precisely, the matrix HH on output will have a nonzero element
Hij = Value
Hij = Value
where index jj belongs to HColumn Index and index ii to one of the HRow Indices such that
It is only necessary to define either the upper or lower triangle of the HH 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 nag_opt_qpconvex1_sparse_solve (e04nk) and nag_opt_qpconvex2_sparse_solve (e04nq) to have the HH matrix defined by the first ncolh column names. If the nonzeros of HH are defined by any columns that are not in the first ncolh of n then nag_opt_miqp_mps_read (e04mx) will rearrange the matrices AA and HH so that they are.

Query Mode

nag_opt_miqp_mps_read (e04mx) offers a ‘query mode’ to quickly give upper estimates on the sizes of user arrays. In this mode any expensive checks of the data and of the file format are skipped, providing a prompt count of the number of variables, constraints and matrix nonzeros. This might be useful in the common case where the size of the problem is not known in advance.
You may activate query mode by setting any of the following: maxn < 1maxn<1, maxm < 1maxm<1, maxnnz < 1maxnnz<1, maxncolh < 0maxncolh<0 or maxnnzh < 0maxnnzh<0. If no major formatting error is detected in the data file, ifail = 0ifail=0 is returned and the upper estimates are given as stated in Table 1. Alternatively, the function switches to query mode while the file is being read if it is discovered that the provided space is insufficient (that is, if n > maxnn>maxn, m > maxmm>maxm, nnz > maxnnznnz>maxnnz, ncolh > maxncolhncolh>maxncolh, nnzh > maxnnzhnnzh>maxnnzh or lintvar > maxlintvarlintvar>maxlintvar). In this case ifail = 2ifail=2 is returned.
Argument Name Upper Estimate for
n maxn
m maxm
nnz maxnnz
ncolh maxncolh
nnzh maxnnzh
lintvar maxlintvar
Table 1
The recommended practice is shown in Section [Example], where the function is invoked twice. The first call queries the array lengths required, after which the data arrays are allocated to be of these sizes. The second call reads the data using the sufficiently-sized arrays.

References

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

Parameters

Compulsory Input Parameters

1:     infile – int64int32nag_int scalar
The ID of the MPSX data file to be read as returned by a call to nag_file_open (x04ac).
Constraint: infile0infile0.
2:     maxn – int64int32nag_int scalar
An upper limit for the number of variables in the problem.
If maxn < 1maxn<1, nag_opt_miqp_mps_read (e04mx) will start in query mode (see Section [Query Mode]).
3:     maxm – int64int32nag_int scalar
An upper limit for the number of general linear constraints (including the objective row) in the problem.
If maxm < 1maxm<1, nag_opt_miqp_mps_read (e04mx) will start in query mode (see Section [Query Mode]).
4:     maxnnz – int64int32nag_int scalar
An upper limit for the number of nonzeros (including the objective row) in the problem.
If maxnnz < 1maxnnz<1, nag_opt_miqp_mps_read (e04mx) will start in query mode (see Section [Query Mode]).
5:     maxncolh – int64int32nag_int scalar
An upper limit for the dimension of the matrix HH.
If maxncolh < 0maxncolh<0, nag_opt_miqp_mps_read (e04mx) will start in query mode (see Section [Query Mode]).
6:     maxnnzh – int64int32nag_int scalar
An upper limit for the number of nonzeros of the matrix HH.
If maxnnzh < 0maxnnzh<0, nag_opt_miqp_mps_read (e04mx) will start in query mode (see Section [Query Mode]).
7:     maxlintvar – int64int32nag_int scalar
If maxlintvar0maxlintvar0, an upper limit for the number of integer variables.
If maxlintvar < 0maxlintvar<0, nag_opt_miqp_mps_read (e04mx) will treat all integer variables in the file as continuous variables.
8:     mpslst – int64int32nag_int scalar
If mpslst0mpslst0, summary messages are sent to the current advisory message unit (as defined by nag_file_set_unit_advisory (x04ab)) as nag_opt_miqp_mps_read (e04mx) reads through the data file. This can be useful for debugging the file. If mpslst = 0mpslst=0, then no summary is produced.
9:     pnames(55) – cell array of strings
A set of names associated with the MPSX form of the problem.
pnames(1)pnames1
Must either contain the name of the problem or be blank.
pnames(2)pnames2
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).
pnames(3)pnames3
Must either contain the name of the RHS set to be used or be blank (in which case the first RHS set is used).
pnames(4)pnames4
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).
pnames(5)pnames5
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).

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     n – int64int32nag_int scalar
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, an upper estimate of the number of variables of the problem. Otherwise, nn, the actual number of variables in the problem.
2:     m – int64int32nag_int scalar
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, an upper estimate of the number of general linear constraints in the problem (including the objective row). Otherwise mm, the actual number of general linear constaints of the problem.
3:     nnz – int64int32nag_int scalar
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=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).
4:     ncolh – int64int32nag_int scalar
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, an upper estimate of the value of ncolh required by nag_opt_qpconvex1_sparse_solve (e04nk) and nag_opt_qpconvex2_sparse_solve (e04nq). In this context ncolh is the number of leading nonzero columns of the Hessian matrix HH. Otherwise, the actual dimension of the matrix HH.
5:     nnzh – int64int32nag_int scalar
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, an upper estimate of the number of nonzeros of the matrix HH. Otherwise, the actual number of nonzeros of the matrix HH.
6:     lintvar – int64int32nag_int scalar
If on entry maxlintvar < 0maxlintvar<0, all integer variables are treated as continuous and lintvar = -1lintvar=-1.
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, an upper estimate of the number of integer variables of the problem. Otherwise, the actual number of integer variables of the problem.
7:     iobj – int64int32nag_int scalar
If iobj > 0iobj>0, row iobj of AA is a free row containing the nonzero coefficients of the vector cc.
If iobj = 0iobj=0, the coefficients of cc are assumed to be zero.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]) iobj is not referenced.
8:     a(maxnnz) – double array
The nonzero elements of AA, ordered by increasing column index.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), a is not referenced.
9:     irowa(maxnnz) – int64int32nag_int array
The row indices of the nonzero elements stored in a.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), irowa is not referenced.
10:   iccola(maxn + 1maxn+1) – int64int32nag_int array
A set of pointers to the beginning of each column of AA. More precisely, iccola(i)iccolai contains the index in a of the start of the iith column, for i = 1,2,,ni=1,2,,n. Note that iccola(1) = 1iccola1=1 and iccola(n + 1) = nnz + 1iccolan+1=nnz+1.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), iccola is not referenced.
11:   bl(maxn + maxmmaxn+maxm) – double array
12:   bu(maxn + maxmmaxn+maxm) – double array
bl contains the vector ll (the lower bounds) and bu contains the vector uu (the upper bounds), for all the variables and constraints in the following order. The first n elements of each array contains the bounds on the variables xx and the next m elements contains the bounds for the linear objective term cTxcTx and for the general linear constraints AxAx (if any). Note that an ‘infinite’ lower bound is indicated by bl(j) = 1.0e+20 blj = -1.0e+20 and an ‘infinite’ upper bound by bu(j) = + 1.0e+20buj=+1.0e+20. In other words, any element of uu greater than or equal to 10201020 will be regarded as + + (and similarly any element of ll less than or equal to 1020-1020 will be regarded as -). If this value is deemed to be ‘inappropriate’, before calling nag_opt_qpconvex1_sparse_solve (e04nk) or nag_opt_qpconvex2_sparse_solve (e04nq) you are recommended to reset the value of its optional parameter (e04nk) and (e04nq) and make any necessary changes to bl and/or bu.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), bl is not referenced.
13:   pnames(55) – cell array of strings
A set of names associated with the problem as defined in the MPSX data file as follows:
pnames(1)pnames1
Contains the name of the problem (or blank if none).
pnames(2)pnames2
Contains the name of the objective row (or blank if none).
pnames(3)pnames3
Contains the name of the RHS set (or blank if none).
pnames(4)pnames4
Contains the name of the RANGE set (or blank if none).
pnames(5)pnames5
Contains the name of the BOUNDS set (or blank if none).
14:   nname – int64int32nag_int scalar
n + mn+m, the total number of variables and constraints in the problem (including the objective row).
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, nname is not set.
15:   crname(maxn + maxmmaxn+maxm) – cell array of strings
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 crname(n + iobj)crnamen+iobj.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), crname is not referenced.
16:   h(max (0,maxnnzh)max(0,maxnnzh)) – double array
The nnzh nonzero elements of HH, arranged by increasing column index.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), h is not referenced.
17:   irowh(max (0,maxnnzh)max(0,maxnnzh)) – int64int32nag_int array
The nnzh row indices of the elements stored in HH.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), irowh is not referenced.
18:   iccolh(maxncolh + 1maxncolh+1) – int64int32nag_int array
A set of pointers to the beginning of each column of HH. More precisely, iccolh(i)iccolhi contains the index in HH of the start of the iith column, for i = 1,2,,ncolhi=1,2,,ncolh. Note that iccolh(1) = 1iccolh1=1 and iccolh(ncolh + 1) = nnzh + 1iccolhncolh+1=nnzh+1.
If nag_opt_miqp_mps_read (e04mx) is run in query mode (see Section [Query Mode]), iccolh is not referenced.
19:   minmax – int64int32nag_int scalar
minmax defines the direction of the optimization as read from the MPS file. By default the function assumes the objective function should be minimized and will return minmax = -1minmax=-1. If the function discovers in the OBJSENSE section that the objective function should be maximized it will return minmax = 1minmax=1. If the function discovers that there is neither the linear objective term cc (the objective row) nor the Hessian matrix HH, the problem is considered as a feasible point problem and minmax = 0minmax=0 is returned.
If nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or returned with ifail = 2ifail=2, minmax is not set.
20:   intvar(max (0,maxlintvar)max(0,maxlintvar)) – int64int32nag_int array
If maxlintvar > 0maxlintvar>0 on entry, intvar contains pointers to the columns that are defined as integer variables. More precisely, intvar(i) = kintvari=k, where kk is the index of a column that is defined as an integer variable, for i = 1,2,,lintvari=1,2,,lintvar.
If maxlintvar0maxlintvar0 on entry, or nag_opt_miqp_mps_read (e04mx) was run in query mode (see Section [Query Mode]), or it returned with ifail = 2ifail=2, intvar is not set.
21:   ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).
Note that if any of the relevant parameters are accidentally set to zero, or not set and assume zero values, then the function will have executed in query mode. In this case only the size of the problem is returned and other parameters are not set. See Section [Query Mode].

Error Indicators and Warnings

Errors or warnings detected by the function:

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

W ifail = 1ifail=1
Warning: MPS file not strictly fixed format, although the problem was read anyway. The data may have been read incorrectly. You should set mpslst = 1mpslst=1 and repeat the call to nag_opt_miqp_mps_read (e04mx) for more details.
  ifail = 2ifail=2
At least one of maxm, maxn, maxnnz, maxnnzh, maxncolh or maxlintvar is too small.
At least one of maxm, maxn, maxnnz, maxnnzh, maxncolh or maxlintvar is too small. Suggested values are returned in m, n, nnz, nnzh, ncolh and lintvar respectively.
  ifail = 3ifail=3
Incorrect ordering of indicator lines.
OBJNAME indicator line found after ROWS indicator line.
  ifail = 4ifail=4
Incorrect ordering of indicator lines.
COLUMNS indicator line found before ROWS indicator line.
  ifail = 5ifail=5
Incorrect ordering of indicator lines.
RHS indicator line found before COLUMNS indicator line.
  ifail = 6ifail=6
Incorrect ordering of indicator lines.
RANGES indicator line found before RHS indicator line.
  ifail = 7ifail=7
Incorrect ordering of indicator lines.
BOUNDS indicator line found before COLUMNS indicator line.
  ifail = 8ifail=8
Incorrect ordering of indicator lines.
QUADOBJ indicator line found before BOUNDS indicator line.
  ifail = 9ifail=9
Incorrect ordering of indicator lines.
QUADOBJ indicator line found before COLUMNS indicator line.
  ifail = 10ifail=10
Unknown indicator line ‘__’.
  ifail = 12ifail=12
Indicator line ‘__’ has been found more than once in the MPS file.
  ifail = 13ifail=13
End of file found before ENDATA indicator line.
  ifail = 14ifail=14
No indicator line found in file. It may be an empty file.
  ifail = 15ifail=15
At least one mandatory section not found in MPS file.
  ifail = 16ifail=16
An illegal line was detected in ‘__’ section.
This is neither a comment nor a valid data line.
  ifail = 17ifail=17
Unknown inequality key ‘__’ in ROWS section.
Expected ‘N’, ‘G’, ‘L’ or ‘E’.
  ifail = 18ifail=18
Empty ROWS section.
Neither the objective row nor the constraints were defined.
  ifail = 19ifail=19
The supplied name, in pnames(2)pnames2 or in OBJNAME, of the objective row was not found among the free rows in the ROWS section.
  ifail = 20ifail=20
The supplied name, in pnames(5)pnames5, of the BOUNDS set to be used was not found in the BOUNDS section.
  ifail = 21ifail=21
The supplied name, in pnames(3)pnames3, of the RHS set to be used was not found in the RHS section.
  ifail = 22ifail=22
The supplied name, in pnames(4)pnames4, of the RANGES set to be used was not found in the RANGES section.
  ifail = 23ifail=23
Illegal row name.
Row names must consist of printable characters only.
  ifail = 24ifail=24
Illegal column name.
Column names must consist of printable characters only.
  ifail = 25ifail=25
Row name ‘__’ has been defined more than once in the ROWS section.
  ifail = 26ifail=26
Column ‘__’ has been defined more than once in the COLUMNS section. Column definitions must be continuous. (See Section [COLUMNS Section]).
  ifail = 27ifail=27
Found ‘INTORG’ marker within ‘INTORG’ to ‘INTEND’ range.
  ifail = 28ifail=28
Found ‘INTEND’ marker without previous marker being ‘INTORG’.
  ifail = 29ifail=29
Found ‘INTORG’ but not ‘INTEND’ before the end of the COLUMNS section.
  ifail = 30ifail=30
Illegal marker type ‘__’.
Should be either ‘INTORG’ or ‘INTEND’.
  ifail = 31ifail=31
Unknown row name ‘__’ in __ section.
All row names must be specified in the ROWS section.
  ifail = 32ifail=32
Unknown column name ‘__’ in __ section.
All column names must be specified in the COLUMNS section.
  ifail = 33ifail=33
Unknown bound type ‘__’ in BOUNDS section.
  ifail = 34ifail=34
More than one nonzero of a has row name ‘__’ and column name ‘__’ in the COLUMNS section.
  ifail = 35ifail=35
Field __ did not contain a number (see Section [Description]).
  ifail = 36ifail=36
Constraint: infile0infile0.
  ifail = 999ifail=-999
Dynamic memory allocation failed.

Accuracy

Not applicable.

Further Comments

None.

Example

function nag_opt_miqp_mps_read_example
maxm = int64(0);
maxn = int64(0);
maxnnz = int64(0);
maxnnzh = int64(0);
maxncolh = int64(0);
maxlintvar = int64(-1);
pnames = {'        ', '        ', '        ', '        ', '        '};
mpslst = int64(1);
nin = int64(7);
mode = int64(0);


% Open the data file for reading
[ifail] = nag_file_open(nin, 'nag_opt_miqp_mps_read.opt', mode);

% Call nag_opt_miqp_mps_read in query mode
[n, m, nz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, ...
 pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = ...
    nag_opt_miqp_mps_read(nin, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, ...
          mpslst, pnames);

% Close the data file
[ifail] = nag_file_close(nin);

% Set max sizes
maxm = m;
maxn = n;
maxnnz = nz;
maxnnzh = nnzh;
maxncolh = ncolh;

% Open the data file for reading
[ifail] = nag_file_open(nin, 'nag_opt_miqp_mps_read.opt', mode);

% Call nag_opt_miqp_mps_read to read the problem
[n, m, nz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, ...
 pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = ...
    nag_opt_miqp_mps_read(nin, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, ...
          mpslst, pnames);

% Close the data file
[ifail] = nag_file_close(nin);

% Data has been read, set up and run the solver

% Initialise workspace
[cw, iw, rw, ifail] = nag_opt_qpconvex2_sparse_init;

% Turn on monitoring and direct to standard output
[cw, iw, rw, ifail] = nag_opt_qpconvex2_sparse_option_integer_set('Print File', int64(6), cw, iw, rw);

% We have no explicit objective vector so set LENC = 0; the
% objective vector is stored in row IOBJ of ACOL.
lenc = int64(0);
objadd = 0;
start = 'c';

c = zeros(lenc, 1);
helast = zeros(n+m, 1, 'int64');
hs = zeros(n+m, 1, 'int64');
x = zeros(n+m, 1);
for i=1:n+m
  x(i) = min(max(0, bl(i)),bu(i));
end
ns = int64(0);

% Store the non zeros of H, iccolh and irowh in user for use by qphx
user = {h, iccolh, irowh};

% Call nag_opt_qpconvex2_sparse_solve to solve the problem
[hs, x, pi, rc, ns, ninf, sinf, obj, user, cw, iw, rw, ifail] = ...
     nag_opt_qpconvex2_sparse_solve(start, @qphx, m, n, lenc, ncolh, iobj, objadd, pnames{1}, a, ...
     irowa, iccola, bl, bu, c, crname, helast, hs, x, ns, cw, iw, rw, 'user', user)


function [hx, user] = qphx(ncolh, x, nstate, user)
  hx = zeros(ncolh, 1);

  h = user{1};
  iccolh = user{2};
  irowh = user{3};

  for icol = 1:ncolh
    start = iccolh(icol);
    endd = iccolh(icol+1)-1;

    for idx = start:endd
      irow = irowh(idx);
      hx(irow) = hx(irow) + x(icol)*h(idx);
      if irow ~= icol
        hx (icol) = hx(icol) + x(irow)*h(idx);
      end
    end
  end
 

 MPSX INPUT LISTING
 ------------------
 Searching for indicator line
 Line          1: Found NAME indicator line
                  Query mode - Ignoring NAME data.
 Line          2: Found ROWS indicator line
                  Query mode - Counting ROWS data.
 Line          7: Found COLUMNS indicator line
                  Query mode - Counting COLUMNS data.
 Line         26: Found RHS indicator line
                  Query mode - Ignoring RHS data.
 Line         31: Found RANGES indicator line
                  Query mode - Ignoring RANGES data.
 Line         35: Found BOUNDS indicator line
                  Query mode - Ignoring BOUNDS data.
 Line         54: Found QUADOBJ indicator line
                  Query mode - Counting QUADOBJ data.
                  Query mode - End of QUADOBJ data. Exit

 MPSX INPUT LISTING
 ------------------
 Searching for indicator line
 Line          1: Found NAME indicator line
 Line          2: Found ROWS indicator line
 Line          7: Found COLUMNS indicator line
 Line         26: Found RHS indicator line
 Line         31: Found RANGES indicator line
 Line         35: Found BOUNDS indicator line
 Line         54: Found QUADOBJ indicator line
 Line         64: Found ENDATA indicator line

 Parameters
 ==========

 Files
 -----
 Solution file..........         0       Old basis file ........         0       (Print file)...........         6
 Insert file............         0       New basis file ........         0       (Summary file).........         0
 Punch file.............         0       Backup basis file......         0
 Load file..............         0       Dump file..............         0

 Frequencies
 -----------
 Print frequency........       100       Check frequency........        60       Save new basis map.....       100
 Summary frequency......       100       Factorization frequency        50       Expand frequency.......     10000

 LP/QP Parameters
 ----------------
 Minimize...............                 QPsolver Cholesky......                 Cold start.............
 Scale tolerance........     0.900       Feasibility tolerance..  1.00E-06       Iteration limit........     10000
 Scale option...........         2       Optimality tolerance...  1.00E-06       Print level............         1
 Crash tolerance........     0.100       Pivot tolerance........  2.04E-11       Partial price..........         1
 Crash option...........         3       Elastic weight.........  1.00E+00       Prtl price section ( A)         9
 Elastic mode...........         1       Elastic objective......         1       Prtl price section (-I)         4

 QP objective
 ------------
 Objective variables....         5       Hessian columns........         5       Superbasics limit......         6
 Nonlin Objective vars..         5       Unbounded step size....  1.00E+20
 Linear Objective vars..         0

 Miscellaneous
 -------------
 LU factor tolerance....      3.99       LU singularity tol.....  2.04E-11       Timing level...........         0
 LU update tolerance....      3.99       LU swap tolerance......  1.03E-04       Debug level............         0
 LU partial  pivoting...                 eps (machine precision)  1.11E-16       System information.....        No



 Matrix statistics
 -----------------
               Total      Normal        Free       Fixed     Bounded
 Rows              4           0           1           0           3
 Columns           9           0           0           0           9

 No. of matrix elements                   36     Density     100.000
 Biggest                          4.0000E+00  (excluding fixed columns,
 Smallest                         1.0000E+00   free rows, and RHS)

 No. of objective coefficients             9
 Biggest                          4.0000E+00  (excluding fixed columns)
 Smallest                         1.0000E-01

 Nonlinear constraints       0     Linear constraints       4
 Nonlinear variables         5     Linear variables         4
 Jacobian  variables         0     Objective variables      5
 Total constraints           4     Total variables          9


 Itn      0: Feasible linear constraints

 E04NQT EXIT   0 -- finished successfully
 E04NQT INFO   1 -- optimality conditions satisfied

 Problem name                 E04MX.EX
 No. of iterations                  11   Objective value     -8.0677777778E+00
 No. of Hessian products            25   Objective row       -1.0785555556E+01
                                         Quadratic objective  2.7177777778E+00
 No. of superbasics                  4   No. of basic nonlinears             2
 No. of degenerate steps             2   Percentage                      18.18
 Max x       (scaled)        1 1.3E+00   Max pi      (scaled)        4 1.0E+00
 Max x                       1 2.0E+00   Max pi                      4 1.0E+00
 Max Prim inf(scaled)        0 0.0E+00   Max Dual inf(scaled)        5 2.2E-16
 Max Primal infeas           0 0.0E+00   Max Dual infeas             5 1.6E-16

 Name           E04MX.EX                 Objective Value     -8.0677777778E+00

 Status         Optimal Soln             Iteration     11    Superbasics     4

 Section 1 - Rows

  Number  ...Row.. State  ...Activity...  Slack Activity  ..Lower Limit.  ..Upper Limit.  .Dual Activity    ..i

      10  ..ROW1..    UL         1.50000          .             -2.00000         1.50000        -0.06667      1
      11  ..ROW2..    UL         1.50000          .             -2.00000         1.50000        -0.03333      2
      12  ..ROW3..   SBS         3.93333        -0.06667        -2.00000         4.00000          .           3
      13  ..COST..    BS       -10.78556       -10.78556           None            None         -1.0          4

 Section 2 - Columns

  Number  .Column. State  ...Activity...  .Obj Gradient.  ..Lower Limit.  ..Upper Limit.  Reduced Gradnt    m+j

       1  ...X1...    UL         2.00000        -0.90000        -2.00000         2.00000        -0.80000      5
       2  ...X2...   SBS        -0.23333        -0.13333        -2.00000         2.00000          .           6
       3  ...X3...    BS        -0.26667        -0.16667        -2.00000         2.00000          .           7
       4  ...X4...    BS        -0.30000        -0.20000        -2.00000         2.00000         0.00000      8
       5  ...X5...   SBS        -0.10000          .             -2.00000         2.00000         0.00000      9
       6  ...X6...    UL         2.00000        -1.0            -2.00000         2.00000        -0.90000     10
       7  ...X7...    UL         2.00000        -1.0            -2.00000         2.00000        -0.90000     11
       8  ...X8...   SBS        -1.77778        -0.10000        -2.00000         2.00000         0.00000     12
       9  ...X9...    BS        -0.45556        -0.30000        -2.00000         2.00000         0.00000     13

hs =

                    1
                    2
                    3
                    3
                    2
                    1
                    1
                    2
                    3
                    1
                    1
                    2
                    3


x =

    2.0000
   -0.2333
   -0.2667
   -0.3000
   -0.1000
    2.0000
    2.0000
   -1.7778
   -0.4556
    1.5000
    1.5000
    3.9333
  -10.7856


pi =

   -0.0667
   -0.0333
         0
   -1.0000


rc =

   -0.8000
         0
         0
   -0.0000
    0.0000
   -0.9000
   -0.9000
   -0.0000
    0.0000
   -0.0667
   -0.0333
         0
         0


ns =

                    4


ninf =

                    0


sinf =

     0


obj =

   -8.0678


user = 

    [18x1 double]    [10x1 int64]    [18x1 int64]


cw = 

    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '


iw =

                    0
                  600
                13296
                  600
                25590
                  600
                  720
                    0
                    0
                    0
                    0
                    6
                    0
                    0
                    9
                    4
                   36
                    0
                    0
                    0
                    0
                    5
                    0
                    5
                    0
                    0
                    5
                   21
                    0
                    0
                  501
                  600
                  721
                  720
                    0
                  501
                  600
                25591
                25590
                    0
                  501
                  600
                13297
                13296
                    0
                    0
                    0
                    0
                    0
                    0
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
                    0
                    0
                    0
                   20
               -11111
                    5
                    4
                    0
                    0
                    1
                    0
                    0
                    4
                    3
                   10
                   25
                    0
                    0
                    4
                    0
               -11111
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    4
                    4
                    0
                    0
                    0
                    0
                    1
                    1
                    0
                12430
                    0
                   11
                    5
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    1
                    1
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    0
                   13
                    0
                    0
                    0
                  601
                  601
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                  666
                  676
                  748
                  761
                    0
                  774
                    0
                    0
                    0
                    0
                    0
                  614
                  634
                    0
                  778
                  701
                    0
                  706
                  711
                  624
                  742
                  721
                  601
                    0
                    0
                    0
                    0
                    0
                  686
                  696
                    0
                    0
                    0
                    0
                    0
                  647
                  660
                    0
                  614
                  627
                  640
                  653
                  666
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                  666
                  666
                  666
                  666
                  666
                    0
                    0
                    0
                12430
                12513
                  673
                  683
                  687
                  691
                  701
                  705
                  715
                  719
                  783
                    0
                  729
                13159
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                   11
                    0
                    6
                    1
                    0
                    0
                    0
                    5
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
             14101066
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0


rw =

  1.0e+308 *

    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    1.7977
    0.0000
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
    0.0000
         0
    0.0000
    0.0000
    0.0000
         0
    0.0000
   -0.0000
   -0.0000
   -0.0000
         0
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
         0
         0
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
   -0.0000
    0.0000
    0.0000
         0
         0
         0
         0
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0


ifail =

                    0


function e04mx_example
maxm = int64(0);
maxn = int64(0);
maxnnz = int64(0);
maxnnzh = int64(0);
maxncolh = int64(0);
maxlintvar = int64(-1);
pnames = {'        ', '        ', '        ', '        ', '        '};
mpslst = int64(1);
nin = int64(7);
mode = int64(0);


% Open the data file for reading
[ifail] = x04ac(nin, 'e04mx.opt', mode);

% Call e04mx in query mode
[n, m, nz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, ...
 pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = ...
    e04mx(nin, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, ...
          mpslst, pnames);

% Close the data file
[ifail] = x04ad(nin);

% Set max sizes
maxm = m;
maxn = n;
maxnnz = nz;
maxnnzh = nnzh;
maxncolh = ncolh;

% Open the data file for reading
[ifail] = x04ac(nin, 'e04mx.opt', mode);

% Call e04mx to read the problem
[n, m, nz, ncolh, nnzh, lintvar, iobj, a, irowa, iccola, bl, bu, ...
 pnames, nname, crname, h, irowh, iccolh, minmax, intvar, ifail] = ...
    e04mx(nin, maxn, maxm, maxnnz, maxncolh, maxnnzh, maxlintvar, ...
          mpslst, pnames);

% Close the data file
[ifail] = x04ad(nin);

% Data has been read, set up and run the solver

% Initialise workspace
[cw, iw, rw, ifail] = e04np;

% Turn on monitoring and direct to standard output
[cw, iw, rw, ifail] = e04nt('Print File', int64(6), cw, iw, rw);

% We have no explicit objective vector so set LENC = 0; the
% objective vector is stored in row IOBJ of ACOL.
lenc = int64(0);
objadd = 0;
start = 'c';

c = zeros(lenc, 1);
helast = zeros(n+m, 1, 'int64');
hs = zeros(n+m, 1, 'int64');
x = zeros(n+m, 1);
for i=1:n+m
  x(i) = min(max(0, bl(i)),bu(i));
end
ns = int64(0);

% Store the non zeros of H, iccolh and irowh in user for use by qphx
user = {h, iccolh, irowh};

% Call e04nq to solve the problem
[hs, x, pi, rc, ns, ninf, sinf, obj, user, cw, iw, rw, ifail] = ...
     e04nq(start, @qphx, m, n, lenc, ncolh, iobj, objadd, pnames{1}, a, ...
     irowa, iccola, bl, bu, c, crname, helast, hs, x, ns, cw, iw, rw, 'user', user)


function [hx, user] = qphx(ncolh, x, nstate, user)
  hx = zeros(ncolh, 1);

  h = user{1};
  iccolh = user{2};
  irowh = user{3};

  for icol = 1:ncolh
    start = iccolh(icol);
    endd = iccolh(icol+1)-1;

    for idx = start:endd
      irow = irowh(idx);
      hx(irow) = hx(irow) + x(icol)*h(idx);
      if irow ~= icol
        hx (icol) = hx(icol) + x(irow)*h(idx);
      end
    end
  end
 

 MPSX INPUT LISTING
 ------------------
 Searching for indicator line
 Line          1: Found NAME indicator line
                  Query mode - Ignoring NAME data.
 Line          2: Found ROWS indicator line
                  Query mode - Counting ROWS data.
 Line          7: Found COLUMNS indicator line
                  Query mode - Counting COLUMNS data.
 Line         26: Found RHS indicator line
                  Query mode - Ignoring RHS data.
 Line         31: Found RANGES indicator line
                  Query mode - Ignoring RANGES data.
 Line         35: Found BOUNDS indicator line
                  Query mode - Ignoring BOUNDS data.
 Line         54: Found QUADOBJ indicator line
                  Query mode - Counting QUADOBJ data.
                  Query mode - End of QUADOBJ data. Exit

 MPSX INPUT LISTING
 ------------------
 Searching for indicator line
 Line          1: Found NAME indicator line
 Line          2: Found ROWS indicator line
 Line          7: Found COLUMNS indicator line
 Line         26: Found RHS indicator line
 Line         31: Found RANGES indicator line
 Line         35: Found BOUNDS indicator line
 Line         54: Found QUADOBJ indicator line
 Line         64: Found ENDATA indicator line

 Parameters
 ==========

 Files
 -----
 Solution file..........         0       Old basis file ........         0       (Print file)...........         6
 Insert file............         0       New basis file ........         0       (Summary file).........         0
 Punch file.............         0       Backup basis file......         0
 Load file..............         0       Dump file..............         0

 Frequencies
 -----------
 Print frequency........       100       Check frequency........        60       Save new basis map.....       100
 Summary frequency......       100       Factorization frequency        50       Expand frequency.......     10000

 LP/QP Parameters
 ----------------
 Minimize...............                 QPsolver Cholesky......                 Cold start.............
 Scale tolerance........     0.900       Feasibility tolerance..  1.00E-06       Iteration limit........     10000
 Scale option...........         2       Optimality tolerance...  1.00E-06       Print level............         1
 Crash tolerance........     0.100       Pivot tolerance........  2.04E-11       Partial price..........         1
 Crash option...........         3       Elastic weight.........  1.00E+00       Prtl price section ( A)         9
 Elastic mode...........         1       Elastic objective......         1       Prtl price section (-I)         4

 QP objective
 ------------
 Objective variables....         5       Hessian columns........         5       Superbasics limit......         6
 Nonlin Objective vars..         5       Unbounded step size....  1.00E+20
 Linear Objective vars..         0

 Miscellaneous
 -------------
 LU factor tolerance....      3.99       LU singularity tol.....  2.04E-11       Timing level...........         0
 LU update tolerance....      3.99       LU swap tolerance......  1.03E-04       Debug level............         0
 LU partial  pivoting...                 eps (machine precision)  1.11E-16       System information.....        No



 Matrix statistics
 -----------------
               Total      Normal        Free       Fixed     Bounded
 Rows              4           0           1           0           3
 Columns           9           0           0           0           9

 No. of matrix elements                   36     Density     100.000
 Biggest                          4.0000E+00  (excluding fixed columns,
 Smallest                         1.0000E+00   free rows, and RHS)

 No. of objective coefficients             9
 Biggest                          4.0000E+00  (excluding fixed columns)
 Smallest                         1.0000E-01

 Nonlinear constraints       0     Linear constraints       4
 Nonlinear variables         5     Linear variables         4
 Jacobian  variables         0     Objective variables      5
 Total constraints           4     Total variables          9


 Itn      0: Feasible linear constraints

 E04NQT EXIT   0 -- finished successfully
 E04NQT INFO   1 -- optimality conditions satisfied

 Problem name                 E04MX.EX
 No. of iterations                  11   Objective value     -8.0677777778E+00
 No. of Hessian products            25   Objective row       -1.0785555556E+01
                                         Quadratic objective  2.7177777778E+00
 No. of superbasics                  4   No. of basic nonlinears             2
 No. of degenerate steps             2   Percentage                      18.18
 Max x       (scaled)        1 1.3E+00   Max pi      (scaled)        4 1.0E+00
 Max x                       1 2.0E+00   Max pi                      4 1.0E+00
 Max Prim inf(scaled)        0 0.0E+00   Max Dual inf(scaled)        5 2.2E-16
 Max Primal infeas           0 0.0E+00   Max Dual infeas             5 1.6E-16

 Name           E04MX.EX                 Objective Value     -8.0677777778E+00

 Status         Optimal Soln             Iteration     11    Superbasics     4

 Section 1 - Rows

  Number  ...Row.. State  ...Activity...  Slack Activity  ..Lower Limit.  ..Upper Limit.  .Dual Activity    ..i

      10  ..ROW1..    UL         1.50000          .             -2.00000         1.50000        -0.06667      1
      11  ..ROW2..    UL         1.50000          .             -2.00000         1.50000        -0.03333      2
      12  ..ROW3..   SBS         3.93333        -0.06667        -2.00000         4.00000          .           3
      13  ..COST..    BS       -10.78556       -10.78556           None            None         -1.0          4

 Section 2 - Columns

  Number  .Column. State  ...Activity...  .Obj Gradient.  ..Lower Limit.  ..Upper Limit.  Reduced Gradnt    m+j

       1  ...X1...    UL         2.00000        -0.90000        -2.00000         2.00000        -0.80000      5
       2  ...X2...   SBS        -0.23333        -0.13333        -2.00000         2.00000          .           6
       3  ...X3...    BS        -0.26667        -0.16667        -2.00000         2.00000          .           7
       4  ...X4...    BS        -0.30000        -0.20000        -2.00000         2.00000         0.00000      8
       5  ...X5...   SBS        -0.10000          .             -2.00000         2.00000         0.00000      9
       6  ...X6...    UL         2.00000        -1.0            -2.00000         2.00000        -0.90000     10
       7  ...X7...    UL         2.00000        -1.0            -2.00000         2.00000        -0.90000     11
       8  ...X8...   SBS        -1.77778        -0.10000        -2.00000         2.00000         0.00000     12
       9  ...X9...    BS        -0.45556        -0.30000        -2.00000         2.00000         0.00000     13

hs =

                    1
                    2
                    3
                    3
                    2
                    1
                    1
                    2
                    3
                    1
                    1
                    2
                    3


x =

    2.0000
   -0.2333
   -0.2667
   -0.3000
   -0.1000
    2.0000
    2.0000
   -1.7778
   -0.4556
    1.5000
    1.5000
    3.9333
  -10.7856


pi =

   -0.0667
   -0.0333
         0
   -1.0000


rc =

   -0.8000
         0
         0
   -0.0000
    0.0000
   -0.9000
   -0.9000
   -0.0000
    0.0000
   -0.0667
   -0.0333
         0
         0


ns =

                    4


ninf =

                    0


sinf =

     0


obj =

   -8.0678


user = 

    [18x1 double]    [10x1 int64]    [18x1 int64]


cw = 

    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '-1111111'
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '
    '        '


iw =

                    0
                  600
                13296
                  600
                25590
                  600
                  720
                    0
                    0
                    0
                    0
                    6
                    0
                    0
                    9
                    4
                   36
                    0
                    0
                    0
                    0
                    5
                    0
                    5
                    0
                    0
                    5
                   21
                    0
                    0
                  501
                  600
                  721
                  720
                    0
                  501
                  600
                25591
                25590
                    0
                  501
                  600
                13297
                13296
                    0
                    0
                    0
                    0
                    0
                    0
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
               -11111
                    0
                    0
                    0
                   20
               -11111
                    5
                    4
                    0
                    0
                    1
                    0
                    0
                    4
                    3
                   10
                   25
                    0
                    0
                    4
                    0
               -11111
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    4
                    4
                    0
                    0
                    0
                    0
                    1
                    1
                    0
                12430
                    0
                   11
                    5
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    1
                    1
                    0
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    0
                    1
                    0
                    0
                    1
                    0
                    0
                    0
                    0
                    0
                   13
                    0
                    0
                    0
                  601
                  601
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                  666
                  676
                  748
                  761
                    0
                  774
                    0
                    0
                    0
                    0
                    0
                  614
                  634
                    0
                  778
                  701
                    0
                  706
                  711
                  624
                  742
                  721
                  601
                    0
                    0
                    0
                    0
                    0
                  686
                  696
                    0
                    0
                    0
                    0
                    0
                  647
                  660
                    0
                  614
                  627
                  640
                  653
                  666
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                  666
                  666
                  666
                  666
                  666
                    0
                    0
                    0
                12430
                12513
                  673
                  683
                  687
                  691
                  701
                  705
                  715
                  719
                  783
                    0
                  729
                13159
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                   11
                    0
                    6
                    1
                    0
                    0
                    0
                    5
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
             14101066
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0
                    0


rw =

  1.0e+308 *

    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    1.7977
    0.0000
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
    0.0000
         0
    0.0000
    0.0000
    0.0000
         0
    0.0000
   -0.0000
   -0.0000
   -0.0000
         0
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
   -0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
         0
         0
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
   -0.0000
    0.0000
    0.0000
         0
         0
         0
         0
    0.0000
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0


ifail =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013