NAG CL Interface
e04sac (handle_read_file)
1
Purpose
e04sac initializes a data structure for the NAG optimization modelling suite from a data file for problems such as, linear programming (LP), quadratic programming (QP), secondorder cone programming (SOCP), or linear semidefinite programming (SDP).
2
Specification
The function may be called by the names: e04sac or nag_opt_handle_read_file.
3
Description
e04sac reads a file in one of the supported file formats and stores the data in a new handle. The supported formats are MPS and its derivatives (for LP, QP, SOCP) and sparse SDPA for linear semidefinite programming problems. See
Section 9 for more details on the supported file formats. It might be useful to refer to the file format you use to fully understand the possible error messages. Once the file is successfuly processed, the problem can be solved by a compatible solver from the suite or queried via the printing function
e04ryc. Once the problem is not needed any more,
e04rzc should be called to destroy the handle and deallocate the memory held within. See
Section 4.1 in the
E04 Chapter Introduction for more details about the NAG optimization modelling suite. Also see
Section 2.2 in the
E04 Chapter Introduction for more details on the standard formulations of the optimization problems (e.g. LP, QP, SOCP and SDP) for better understanding on the notations used in this document.
Note: in this release of the NAG Library, all integer variables defined in the file are relaxed to continuous variables.
4
References
Borchers B (1999) SDPLIB 1.2, A Library of semidefinite programming test problems
Optimization Methods and Software 11(1) 683–690
http://euler.nmt.edu/~brian/sdplib/
Fujisawa K, Kojima M and Nakata K (1998) SDPA (Semidefinite Programming Algorithm) User's Manual Technical Report B308 Department of Mathematical and Computing Sciences, Tokyo Institute of Technology.
IBM (1971) MPSX – Mathematical programming system Program Number 5734 XM4 IBM Trade Corporation, New York
5
Arguments

1:
$\mathbf{handle}$ – void **
Output

Note: handle does not need to be set on input.
On exit: holds a handle to the internal data structure. It must not be changed between calls to the NAG optimization modelling suite.

2:
$\mathbf{filename}$ – const char *
Input

On entry: the name of the file to be opened.
Constraint:
must contain a valid filename for the computer system being used.

3:
$\mathbf{ftype}$ – const char *
Input

On entry: the expected file format of the input file, case insensitive.
 ${\mathbf{ftype}}=\mathrm{MPS}$ or $\mathrm{M}$
 The input file is in MPS format.
 ${\mathbf{ftype}}=\mathrm{SDPA}$ or $\mathrm{S}$
 The input file is in SDPA format.
Constraint:
${\mathbf{ftype}}=\mathrm{MPS}$, $\mathrm{M}$, $\mathrm{SDPA}$ or $\mathrm{S}$.

4:
$\mathbf{pinfo}\left[100\right]$ – Integer
Output

On exit: problem sizes and statistics as given in the table below:
$0$ 
Number of variables (nvar). 
$10$ 
Number of Lagrange multipliers (dual variables) for the bound constraints and linear constraints (nnzu). 
$11$ 
Number of Lagrange multipliers (dual variables) for the cone constraints (nnzuc). 
$12$ 
Number of nonzeros in all Lagrange multipliers for the matrix constraints (nnzua). 
$20$ 
Flag indicating the objective function type, $0$: no objective, $1$: linear objective, $2$: quadratic without linear term, $3$: quadratic with linear term, $4$: general nonlinear, $5$: nonlinear least square with dense Jacobian, $6$: nonlinear least square with sparse Jacobian. 
$21$ 
Number of residuals defined in a nonlinear least square problem. 
$30$ 
Definition of box constraints, $0$: not defined, $1$: defined. 
$31$ 
Number of linear constraints. 
$32$ 
Number of nonlinear constraints. 
$33$ 
Definition of Hessian for nonlinear objective and constraints, $0$: not defined, $1$: defined as Lagrangian, $1$: defined as individual Hessians of the objective and the constraints. 
$40$ 
Number of cone constraints. 
$41$ 
Number of matrix inequality constraints. 
otherwise 
Reserved for future use. 
nvar,
nnzu,
nnzuc and
nnzua define the problem size and are required by other routines such as
e04mtc,
e04ptc and
e04svc in the optimization suite.

5:
$\mathbf{fail}$ – NagError *
Input/Output

The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
6
Error Indicators and Warnings
 NE_ALLOC_FAIL

Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
 NE_BAD_PARAM

On entry, argument $\u2329\mathit{\text{value}}\u232a$ had an illegal value.
 NE_DIAG_ELEMENTS

Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The specified element belongs to a diagonal block but is not diagonal.
The row index is $\u2329\mathit{\text{value}}\u232a$ and column index is $\u2329\mathit{\text{value}}\u232a$.
 NE_DUPLICATE_ELEMENT

An entry in the constraints with $\mathit{matno}=\u2329\mathit{\text{value}}\u232a$, $\mathit{blkno}=\u2329\mathit{\text{value}}\u232a$, row index $\u2329\mathit{\text{value}}\u232a$ and column index $\u2329\mathit{\text{value}}\u232a$ was defined more than once. All entries need to be unique.
 NE_FILE_INCOMPLETE

A premature end of the input stream. The part defining the dimensions of the blocks was not found.
A premature end of the input stream. The part defining the nonzero entries was not found.
A premature end of the input stream. The part defining the number of blocks was not found.
A premature end of the input stream. The part defining the number of variables was not found.
A premature end of the input stream. The part defining the objective function was not found.
 NE_INT

An invalid number of blocks was given on line $\u2329\mathit{\text{value}}\u232a$.
The number stated there is $\u2329\mathit{\text{value}}\u232a$ and needs to be at least $1$.
An invalid number of variables was given on line $\u2329\mathit{\text{value}}\u232a$.
The number stated there is $\u2329\mathit{\text{value}}\u232a$ and needs to be at least $1$.
 NE_INT_ARRAY

An invalid size of the block number $\u2329\mathit{\text{value}}\u232a$ was given on line $\u2329\mathit{\text{value}}\u232a$.
The number stated there is $\u2329\mathit{\text{value}}\u232a$ and needs to be nonzero.
 NE_INTERNAL_ERROR

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
 NE_INVALID_CS

Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The given column index is out of bounds, it must respect the size of the block. Its value $\u2329\mathit{\text{value}}\u232a$ must be between $\u2329\mathit{\text{value}}\u232a$ and $\u2329\mathit{\text{value}}\u232a$ (inclusive).
Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The given row index is out of bounds, it must respect the size of the block. Its value $\u2329\mathit{\text{value}}\u232a$ must be between $\u2329\mathit{\text{value}}\u232a$ and $\u2329\mathit{\text{value}}\u232a$ (inclusive).
Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The specified nonzero element is not in the upper triangle.
The row index is $\u2329\mathit{\text{value}}\u232a$ and column index is $\u2329\mathit{\text{value}}\u232a$.
 NE_INVALID_FORMAT

The token on line $\u2329\mathit{\text{value}}\u232a$ at position $\u2329\mathit{\text{value}}\u232a$ to $\u2329\mathit{\text{value}}\u232a$ was not recognized as a valid integer.
The token on line $\u2329\mathit{\text{value}}\u232a$ at position $\u2329\mathit{\text{value}}\u232a$ to $\u2329\mathit{\text{value}}\u232a$ was not recognized as a valid real number.
The token on line $\u2329\mathit{\text{value}}\u232a$ starting at position $\u2329\mathit{\text{value}}\u232a$ was too long and was not recognized.
 NE_MPS_BOUNDS

Inconsistent bounds for column ‘$\u2329\mathit{\text{value}}\u232a$’.
Inconsistent bounds for row ‘$\u2329\mathit{\text{value}}\u232a$’.
Unknown bound type ‘$\u2329\mathit{\text{value}}\u232a$’ in BOUNDS section.
Inconsistent bounds are reported when the lower bound is greater than or equal to $\text{1.0e+20}$ or the upper bound is less than or equal to $\text{1.0e+20}$, or when the lower bound is greater than the upper bound. Any upper bound greater than or equal to $\text{1.0e+20}$ will be regarded as $+\infty $ (and similarly any lower bound less than or equal to $\text{1.0e+20}$ will be regarded as $\infty $).
 NE_MPS_COLUMNS

Column ‘
$\u2329\mathit{\text{value}}\u232a$’ has been defined more than once in the COLUMNS section. Column definitions must be continuous. (See
Section 9.1.5).
Unknown column name ‘$\u2329\mathit{\text{value}}\u232a$’ in $\u2329\mathit{\text{value}}\u232a$ section.
All column names must be specified in the COLUMNS section.
 NE_MPS_ENDATA_NOT_FOUND

End of file found before ENDATA indicator line.
 NE_MPS_ILL_NCONEVAR

Rotated secondorder cone ‘$\u2329\mathit{\text{value}}\u232a$’ should have at least $3$ variables.
Secondorder cone ‘$\u2329\mathit{\text{value}}\u232a$’ should have at least $2$ variables.
 NE_MPS_ILLEGAL_DATA_LINE

An illegal line was detected in ‘$\u2329\mathit{\text{value}}\u232a$’ section.
This is neither a comment nor a valid data line.
 NE_MPS_ILLEGAL_NUMBER

Field
$\u2329\mathit{\text{value}}\u232a$ did not contain a number (see
Section 9.1).
 NE_MPS_INDICATOR

Both quadratic objective and cone constraints found, not supported.
Incorrect ordering of indicator lines.
BOUNDS indicator line found before COLUMNS indicator line.
Incorrect ordering of indicator lines.
COLUMNS indicator line found before ROWS indicator line.
Incorrect ordering of indicator lines.
CSECTION indicator line found before COLUMNS indicator line.
Incorrect ordering of indicator lines.
OBJNAME indicator line found after ROWS indicator line.
Incorrect ordering of indicator lines.
QUADOBJ indicator line found before BOUNDS indicator line.
Incorrect ordering of indicator lines.
QUADOBJ indicator line found before COLUMNS indicator line.
Incorrect ordering of indicator lines.
RANGES indicator line found before RHS indicator line.
Incorrect ordering of indicator lines.
RHS indicator line found before COLUMNS indicator line.
Indicator line ‘$\u2329\mathit{\text{value}}\u232a$’ has been found more than once in the MPS file.
Unknown cone type ‘$\u2329\mathit{\text{value}}\u232a$’.
Unknown indicator line ‘$\u2329\mathit{\text{value}}\u232a$’.
 NE_MPS_INVALID_INTORG_INTEND

Found ‘INTEND’ marker without previous marker being ‘INTORG’.
Found ‘INTORG’ but not ‘INTEND’ before the end of the COLUMNS section.
Found ‘INTORG’ marker within ‘INTORG’ to ‘INTEND’ range.
Illegal marker type ‘$\u2329\mathit{\text{value}}\u232a$’.
Should be either ‘INTORG’ or ‘INTEND’.
 NE_MPS_MANDATORY

At least one mandatory section not found in MPS file.
 NE_MPS_OBJNAME

The supplied name in OBJNAME of the objective row was not found among the free rows in the ROWS section.
 NE_MPS_PRINTABLE

Illegal column name.
Column names must consist of printable characters only.
Illegal cone name.
Cone names must consist of printable characters only.
Illegal row name.
Row names must consist of printable characters only.
 NE_MPS_REPEAT_COLUMN

More than one nonzero of $A$ has row name ‘$\u2329\mathit{\text{value}}\u232a$’ and column name ‘$\u2329\mathit{\text{value}}\u232a$’ in the COLUMNS section.
 NE_MPS_REPEAT_CONE

Cone name ‘$\u2329\mathit{\text{value}}\u232a$’ has been defined more than once.
 NE_MPS_REPEAT_CONEVAR

Column name ‘$\u2329\mathit{\text{value}}\u232a$’ has been defined more than once in cone constraint.
 NE_MPS_REPEAT_ROW

Row name ‘$\u2329\mathit{\text{value}}\u232a$’ has been defined more than once in the ROWS section.
 NE_MPS_ROWS

Unknown inequality key ‘$\u2329\mathit{\text{value}}\u232a$’ in ROWS section.
Expected ‘N’, ‘G’, ‘L’ or ‘E’.
Unknown row name ‘$\u2329\mathit{\text{value}}\u232a$’ in $\u2329\mathit{\text{value}}\u232a$ section.
All row names must be specified in the ROWS section.
 NE_MPS_ROWS_OR_CONS

Empty ROWS section.
Neither the objective row nor the constraints were defined.
 NE_NO_LICENCE

Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
 NE_NOT_CLOSE_FILE

Cannot close file.
 NE_NOT_READ_FILE

The input file seems to be empty. No data was read.
 NE_OUT_OF_RANGE

Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The given block number is out of bounds. Its value $\u2329\mathit{\text{value}}\u232a$ must be between
$1$ and ${m}_{A}$
(inclusive).
Invalid structural data found on line $\u2329\mathit{\text{value}}\u232a$.
The given matrix number is out of bounds. Its value $\u2329\mathit{\text{value}}\u232a$ must be between
$0$ and $n$
(inclusive).
 NE_READ_ERROR

Cannot open file $\u2329\mathit{\text{value}}\u232a$ for reading.
Reading from the file caused an unknown error on line $\u2329\mathit{\text{value}}\u232a$.
 NE_STR_UNKNOWN

On entry, ${\mathbf{ftype}}=\u2329\mathit{\text{value}}\u232a$.
Constraint: ${\mathbf{ftype}}=\mathrm{MPS}$, $\mathrm{M}$, $\mathrm{SDPA}$ or $\mathrm{S}$.
 NE_WRONG_NUM_TOKENS

Not enough data was given on line $\u2329\mathit{\text{value}}\u232a$ specifying block sizes.
Expected
${m}_{A}$
tokens but found only $\u2329\mathit{\text{value}}\u232a$.
Not enough data was given on line $\u2329\mathit{\text{value}}\u232a$ specifying nonzero matrix elements.
Expected $\u2329\mathit{\text{value}}\u232a$ tokens but found only $\u2329\mathit{\text{value}}\u232a$.
Not enough data was given on line $\u2329\mathit{\text{value}}\u232a$ specifying the objective function.
Expected $n$ tokens but found only $\u2329\mathit{\text{value}}\u232a$.
7
Accuracy
Not applicable.
8
Parallelism and Performance
e04sac makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementationspecific information.
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 
usersupplied 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) 
CSECTION 
usersupplied name 
parameter 
cone type 
(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 
$2\u20133$ 
$5\u201312$ 
$15\u201322$ 
$25\u201336$ 
$40\u201347$ 
$50\u201361$ 
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 $12$. This allows values to be entered in several equivalent forms. For example, $1.2345678$, $\text{1.2345678e+0}$, $\text{123.45678e\u22122}$ and $\text{12345678e\u221207}$ all represent the same number. It is safest to include an explicit decimal point.
Lines with an asterisk ($*$) in column $1$ 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 nonblank character outside the predefined six fields and columns 72–80 is considered to be a major error (
${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_MPS_ILLEGAL_DATA_LINE; see
Section 6), unless it is part of a comment.
9.1.1
NAME Section (optional)
The NAME section is the only section where the data must be on the same line as the indicator. The ‘usersupplied name’ must be in Field
$3$ but may be blank.
Field 
Required 
Description 
$3$ 
No 
Name of the problem 
9.1.2
OBJSENSE Section (optional)
The data line in this section can be used to specify the sense of the objective function. If this section is present it must contain only one data line. If the section is missing or empty, minimization is assumed.
Field 
Required 
Description 
$2$ 
No 
Sense of the objective function 
Field $2$ may contain either MIN, MAX, MINIMIZE or MAXIMIZE.
9.1.3
OBJNAME Section (optional)
The data line in this section can be used to specify the name of a free row (see
Section 9.1.4) 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.
Field 
Required 
Description 
$2$ 
No 
Row name to be used as the objective function 
Field $2$ must contain a valid row name.
9.1.4
ROWS Section
The data lines in this section specify unique row (constraint) names and their inequality types (i.e., unconstrained,
$=$,
$\ge $ or
$\le $).
Field 
Required 
Description 
$1$ 
Yes 
Inequality key 
$2$ 
Yes 
Row name 
The inequality key specifies each row's type. It must be
E,
G,
L or
N and can be in either column
$2$ or
$3$.
Inequality Key 
Description 
$\mathit{l}$ 
$\mathit{u}$ 
N 
Free row 
$\infty $ 
$\infty $ 
G 
Greater than or equal to 
finite 
$\infty $ 
L 
Less than or equal to 
$\infty $ 
finite 
E 
Equal to 
finite 
$l$ 
Row type
N stands for ‘Not binding’. It can be used to define the objective row. The objective row is a free row that specifies the vector
$c$ in the linear objective term
${c}^{\mathrm{T}}x$. If there is more than one free row, the first free row is chosen, unless another free row name is specified by OBJNAME (see
Section 9.1.3). Note that
$c$ 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.
9.1.5
COLUMNS Section
Data lines in this section specify the names to be assigned to the variables (columns) in the general linear constraint matrix
$A$, and define, in terms of column vectors, the actual values of the corresponding matrix elements.
Field 
Required 
Description 
$2$ 
Yes 
Column name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
Each data line in the COLUMNS section defines the nonzero elements of $A$ or $c$. Any elements of $A$ or $c$ that are undefined are assumed to be zero. Nonzero elements of $A$ must be grouped by column, that is to say that all of the nonzero elements in the jth column of $A$ must be specified before those in the $\mathit{j}+1$th column, for $\mathit{j}=1,2,\dots ,n1$. Rows may appear in any order within the column.
9.1.5.1
Integer Markers
e04sac allows users to define the integer variables within the COLUMNS section using integer markers. However, in this release of the NAG Library, all integer variables defined using integer markers are relaxed to continuous variables. Each marker line must have the following format:
Field 
Required 
Description 
$2$ 
No 
Marker ID 
$3$ 
Yes 
Marker tag 
$5$ 
Yes 
Marker type 
The marker tag must be ${}^{\prime}$MARKER${}^{\prime}$. The marker type must be ${}^{\prime}$INTORG${}^{\prime}$ to start reading integer variables and ${}^{\prime}$INTEND${}^{\prime}$ to finish reading integer variables. This implies that a row cannot be named ${}^{\prime}$MARKER${}^{\prime}$, ${}^{\prime}$INTORG${}^{\prime}$ or ${}^{\prime}$INTEND${}^{\prime}$. Please note that both marker tag and marker type comprise of $8$ characters as a ${}^{\prime}$ 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 ${}^{\prime}$INTORG${}^{\prime}$ marker and end with an ${}^{\prime}$INTEND${}^{\prime}$ marker and there should not be another marker between them.
9.1.6
RHS Section
This section specifies the righthand side values (if any) of the general linear constraint matrix
$A$.
Field 
Required 
Description 
$2$ 
Yes 
RHS name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
The MPS file may contain several RHS sets distinguished by RHS name. However only 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 e04sac. An RHS given to the objective function is dealt with differently by different MPS readers, therefore it is safer not to 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.
9.1.7
RANGES Section (optional)
Ranges are used to modify the interpretation of constraints defined in the ROWS section (see
Section 9.1.4) to the form
$l\le Ax\le u$, where both
$l$ and
$u$ are finite. The range of the constraint is
$r=ul$.
Field 
Required 
Description 
$2$ 
Yes 
Range name 
$3$ 
Yes 
Row name 
$4$ 
Yes 
Value 
$5$ 
No 
Row name 
$6$ 
No 
Value 
The range of each constraint implies an upper and lower bound dependent on the inequality key of each constraint, on the RHS
$b$ of the constraint (as defined in the RHS section), and on the range
$r$.
Inequality Key 
Sign of $\text{}\mathit{r}$ 
$\mathit{l}$ 
$\mathit{u}$ 
E 
$+$ 
$b$ 
$b+r$ 
E 
$$ 
$b+r$ 
$b$ 
G 
$+/$ 
$b$ 
$b+\leftr\right$ 
L 
$+/$ 
$b\leftr\right$ 
$b$ 
N 
$+/$ 
$\infty $ 
$+\infty $ 
Only the first range set will be used.
9.1.8
BOUNDS Section (optional)
These lines specify limits on the values of the variables (the quantities
$l$ and
$u$ in
$l\le x\le u$). If a variable is not specified in the bound set then it is automatically assumed to lie between
$0$ and
$+\infty $.
Field 
Required 
Description 
$1$ 
Yes 
Bound type identifier 
$2$ 
Yes 
Bound name 
$3$ 
Yes 
Column name 
$4$ 
Yes/No 
Value 
Note: Field $4$ is required only if the bound type identifier is one of UP, LO, FX, UI or LI in which case it gives the value $k$ 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 
$\mathit{l}$ 
$\mathit{u}$ 
Integer Variable? 
UP 
unchanged 
$k$ 
No 
LO 
$k$ 
unchanged 
No 
FX 
$k$ 
$k$ 
No 
FR 
$\infty $ 
$\infty $ 
No 
MI 
$\infty $ 
unchanged 
No 
PL 
unchanged 
$\infty $ 
No 
BV 
$0$ 
$1$ 
No 
UI 
unchanged 
$k$ 
No 
LI 
$k$ 
unchanged 
No 
Only the first bound set will be used.
In this release of the NAG Library, integer variables defined using BV, UI or LI are relaxed to continuous variables
9.1.9
QUADOBJ Section (optional)
The QUADOBJ section defines nonzero elements of the upper or lower triangle of the Hessian matrix
$H$.
Field 
Required 
Description 
$2$ 
Yes 
Column name (HColumn Index) 
$3$ 
Yes 
Column name (HRow Index) 
$4$ 
Yes 
Value 
$5$ 
No 
Column name (HRow Index) 
$6$ 
No 
Value 
Each data line in the QUADOBJ section defines one (or optionally two) nonzero elements ${H}_{ij}$ of the matrix $H$. Each element ${H}_{ij}$ is given as a triplet of row index $i$, column index $j$ and a value. The column names (as defined in the COLUMNS section) are used to link the names of the variables and the indices $i$ and $j$.
It is only necessary to define either the upper or lower triangle of the $H$ matrix; either will suffice. Any elements that have been defined in the upper triangle of the matrix will be moved to the lower triangle of the matrix, then any repeated nonzeros will be summed.
9.1.10
CSECTION Section (optional)
Data lines in this section specify the cone constraint that has the following form in secondorder cone programming.
where
${x}_{{G}^{i}}$ is a subvector of decision variables
$x$ indexed by
${G}^{i}$,
${\mathcal{K}}^{{m}_{i}}$ is either quadratic cone or rotated quadratic cone of dimension
${m}_{i}$. This section may appear multiple times in the file to define various cone constraints
$i=1,\dots ,r$.
The CSECTION has data on the same line as the indicator to store the name, parameter and type of the cone. Cone name is compulsory and must be in Field
$3$. The possible cone type key is either QUAD for quadratic cone or RQUAD for rotated quadratic cone. The parameter of cone is not used in all cases.
Field 
Required 
Description 
$3$ 
Yes 
Name of the cone 
$4$ 
No 
Parameter of the cone 
$5$ 
Yes 
Cone type 
The data lines in this section specify variable names in the cone. Note that we require at least
$2$ variables for quadratic cone and
$3$ variables for rotated quadratic cone.
Field 
Required 
Description 
$2$ 
Yes 
A valid variable name 
9.2
Sparse SDPA file format
The problem data is written in an ASCII input file in a SDPA sparse format which was first introduced in
Fujisawa et al. (1998).
In the description below we follow closely the specification from
Borchers (1999).
The format is line oriented. If more elements are required on the line they need to be separated by a space, a tab, or any of the special characters ‘,’, ‘(’, ‘)’, ‘{’, or ‘}’. The file consists of six sections:

1.Comments. The file can begin with arbitrarily many lines of comments. Each line of comments must begin with ‘"’ or ‘*’.

2.The first line after the comments contains integer $n$, the number of variables. The rest of this line is ignored.

3.The second line after the comments contains integer ${m}_{A}$, the number of blocks in the block diagonal structure of the matrices. Additional text on this line after ${m}_{A}$ is ignored.

4.The third line after the comments contains a vector of ${m}_{A}$ integers that give the sizes of the individual blocks. Negative numbers may be used to indicate that a block is actually a diagonal submatrix. Thus a block size of ‘$5$’ indicates a $5$ by $5$ block in which only the diagonal elements are nonzero.

5.The fourth line after the comments contains an $n$dimensional real vector defining the objective function vector $c$.

6.The remaining lines of the file contain nonzero entries in the constraint matrices, with one entry per line. The format for each line is
where $\mathit{matno}$ is the number $\left(0,\dots ,n\right)$ of the matrix to which this entry belongs and $\mathit{blkno}$ specifies the block number $k=1,2,\dots ,{m}_{A}$ within this matrix. Together, they uniquely identify the block ${A}_{\mathit{matno}}^{\mathit{blkno}}$. Integers $\mathit{i}$ and $\mathit{j}$ are onebased indices which specify a location of the entry within the block. Note that since all matrices are assumed to be symmetric, only entries in the upper triangle of a matrix should be supplied. Finally, $\mathit{entry}$ should give the real value of the entry in the matrix. Precisely, ${\left({A}_{\mathit{matno}}^{\mathit{blkno}}\right)}_{\mathit{i}\mathit{j}}={\left({A}_{\mathit{matno}}^{\mathit{blkno}}\right)}_{\mathit{j}\mathit{i}}=\mathit{entry}$.
For SDPA format we use the word ‘token’ as a reference to a group of contiguous characters without a space or any other delimeters.
10
Example
This example demonstrates how to load data of an SOCP problem from an MPS file and solve it using SOCP solver
e04ptc.
The data file stores the following SOCP problem
subject to the bounds
the general linear constraints
and the cone constraint
The optimal solution (to five significant figures) is
and the objective function value is
$19.518$.
10.1
Program Text
10.2
Program Data
10.3
Program Results