diff --git a/doc/README.release b/doc/README.release
index 399eaa4e86..e9d2cd84a1 100644
--- a/doc/README.release
+++ b/doc/README.release
@@ -2,7 +2,7 @@ GALAHAD 4.0, a Fortran library with C and Matlab interfaces
for nonlinear optimization
We are delighted to announce the release of version 4 of
-the open-source Fortran library of software for solving
+the open-source GALAHAD Fortran software library for solving
nonlinear optimization problems. A defining feature of this
new release are native interfaces to C and Matlab. The
library contains software for linear and quadratic programming,
diff --git a/doc/paper_v4/paper.md b/doc/paper_v4/paper.md
index a17546e6cd..eca3082dd7 100644
--- a/doc/paper_v4/paper.md
+++ b/doc/paper_v4/paper.md
@@ -1,5 +1,5 @@
---
-title: '`GALAHAD 4.0`: an open source library of Fortran packages
+title: '`GALAHAD 4.0`: an open source library of Fortran packages
with C and Matlab interfaces for continuous optimization'
tags:
- C
@@ -7,7 +7,7 @@ tags:
- Matlab
- optimization
authors:
- - name: Jaroslav Fowkes
+ - name: Jaroslav M. Fowkes
affiliation: 1
- name: Nicholas I. M. Gould
affiliation: 1
@@ -27,69 +27,69 @@ models of physical phenomena are nonlinear, and when discretised for
computer solution they usually involve a large number of minimization
variables (parameters) and/or constraints. Thus it is valuable to be
able to rely on software specifically designed for optimization, and
-particularly that that is capable of designed to solve large, nonlinear
-problems.
+particularly that is designed to solve large, nonlinear problems.
Continuous optimization problems occur in a variety of formats. Problems
may or may not involve constraints, least-squares fitting being a common
-but vital example of the later. If there are constraints, they may
-simply be bounds on the values of the variables, or their may be linear
+but vital example of the latter. If there are constraints, they may
+simply be bounds on the values of the variables, or there may be linear
or nonlinear relationships (both equations or inequalities) between sets
of variables. In an ideal world, a global optimizer is sought, but often
that is beyond current (and likely future) expectations particularly if
there are a large number of variables involved; fortunately a local
-minimizer ofen suffices. There is also a natural hierarchy of problems,
+minimizer often suffices. There is also a natural hierarchy of problems,
and the ability to solve one is useful if it occurs as a subproblem in a
harder one---solving linear systems (sometimes approximately) is vital
in linear or quadratic programming, quadratic programs are used within
-nonlinear programming methods, and local optimization is often a vital
+nonlinear programming methods, and local optimization is often a vital
component of global optimization.
-Thus ideally a comprehensive optimization libary should address the
+Thus ideally a comprehensive optimization library should address the
different needs of its users by providing software tuned to a variety of
commonly-occurring subclasses of problems. This is the aim of
[`GALAHAD`](https://github.com/ralna/GALAHAD). `GALAHAD` provides
packages for basic subproblem solvers (such as for linear systems,
-trust-region and regularization of quadratic and linear least-seqaures
+trust-region and regularization of quadratic and linear least-sqaures
functions), linear and quadratic programming, unconstrained and
bound-constrained optimization, nonlinear least-squares fitting, general
nonlinear programming and both approximate univariate and multivariate
-global optimization, together with an array attendant utilities packages
+global optimization, together with an array of attendant utilities packages
(such as for polynomial fitting, hashing, presolves, and matrix
approximation). It is also recognised that there are excellent external
-sources of relevant software, and `GALAHAD` provides uniform bridges
-to these if they are available.
+sources of relevant software, particular for solving linear systems,
+and `GALAHAD` provides uniform bridges to these if they are available.
# Statement of need
The first release of the Fortran 90 `GALAHAD` library [@GoulOrbaToin03]
-aimed to expand the functionality of the earlier Fortran 77
-`LANCELOT` package [@ConnGoulToin92] for nonlinear optimization.
+aimed to expand the functionality of the earlier Fortran 77
+`LANCELOT` package [@ConnGoulToin92] for nonlinear optimization.
Subsequent releases focused on increasing the scope of solvers provided,
-but aside from limited interfaces to Matlab and to the
-[`CUTEst`](https://github.com/ralna/GALAHAD) modeling library
+but aside from limited interfaces to Matlab and to the
+[`CUTEst`](https://github.com/ralna/GALAHAD) modeling library
[@GoulOrbaToin15], little effort was made to
-bridge the gap between Fortran and other, often more recent and popular,
+bridge the gap between Fortran and other, often more recent and popular,
programming languages. `GALAHAD 4.0` addresses this deficiency.
Although `GALAHAD 4.0` contains an increased variety of new solvers, the
principal motivation for the new release is to raise the profile of the
library by increasing its potential userbase. While modern Fortran is an
-extremly flexible programming language, it is perceived as old fashioned
+extremely flexible programming language, it is perceived as old fashioned
in many circles. Rival open-source solvers such as
[`IPOPT`](https:https://github.com/coin-or/Ipopt) [@WachBieg06] and
commercial ones such as
[`KNITRO`](https:https://www.artelys.com/docs/knitro/) [@ByrdNoceWalt06]
-are written predominantly in C/C++, and this is attractive as there
+are written predominantly in C/C++, and this is attractive as there are
often straightforward bridges from C to other popular languages such as
Python and Julia. Thus, we have now provided interfaces from Fortran to C
for a significant subset of the Fortran packages. This has been
-made possible using the standardised ISO-C bindings introduced in
+made possible using the standardised ISO-C bindings introduced in
Fortran 2003, and enhanced in more modern revisions. Essentially an
interface program binds Fortran types and functions to C equivalents, and
a second C header file provides the C access.
-A current list of major packages with C interfaces and their functionality is as follows:
+A current list of major packages with C interfaces and their functionality
+is as follows:
| package | purpose |
| :------- | ------- |
@@ -127,18 +127,18 @@ A current list of major packages with C interfaces and their functionality is as
| bgo | multivariate global optimization in a box using a multi-start trust-region method |
| dgo | multivariate global optimization in a box using a deterministic partition-and-bound method |
-Interfaces to other `GALAHAD` packages, such as `lancelot` and `filtrane` will be provided as time
-and demand permit. Future extensions to provide follow-on interfaces to Python and Julia using
-the C functionality are underway.
+Interfaces to other `GALAHAD` packages, such as `LANCELOT` and `FILTRANE`
+will be provided as time and demand permit. Future extensions to provide
+follow-on interfaces to Python and Julia using the C functionality are underway.
-GALAHAD is easy to install using its own make-based system. Fortran documentation is provided in
-PDF via LaTeX, while both PDF and man documents for the C packages using
-doxygen.
+`GALAHAD` is easy to install using its own make -based system. Fortran
+documentation is provided in PDF via LaTeX, while both PDF and man
+documents for the C packages are available using Doxygen.
# Acknowledgements
-The authors are grateful for support provided by the Engineering and Physical
-Sciences Research Council (UK) grants EP/F005369/1, EP/I013067/1 and
+The authors are grateful for support provided by the Engineering and Physical
+Sciences Research Council (UK) grants EP/F005369/1, EP/I013067/1 and
EP/M025179/1.
# References
diff --git a/doc/presolve.pdf b/doc/presolve.pdf
index d898ee0389..dfc1695a04 100644
Binary files a/doc/presolve.pdf and b/doc/presolve.pdf differ
diff --git a/doc/src/presolve.tex b/doc/src/presolve.tex
index ce3e6c5d61..293a6affe3 100644
--- a/doc/src/presolve.tex
+++ b/doc/src/presolve.tex
@@ -25,7 +25,7 @@
then ``restored'' to recover the solution for the original formulation.
%\noindent
-The package {\tt \fullpackagename} applies presolving techniques to a
+The package {\tt \fullpackagename} applies presolving techniques to a
{\bf linear}
\begin{equation}\label{objlp}
{\rm minimize}\; \ell(\bmx) = f + \bmg^T \bmx
@@ -65,12 +65,12 @@
\galattributes
\galversions{\tt \fullpackagename\_single, \fullpackagename\_double}.
-\galuses {\tt GALAHAD\_SMT}, {\tt GAL\-AHAD\_QPT}, {\tt GALAHAD\_SPECFILE},
+\galuses {\tt GALAHAD\_SMT}, {\tt GAL\-AHAD\_QPT}, {\tt GALAHAD\_SPECFILE},
{\tt GALAHAD\_SORT}, {\tt GALAHAD\_SYMBOLS}.
\galdate March 2002.
\galorigin N. I. M. Gould, Rutherford Appleton Laboratory, and
Ph. L. Toint, The University of Namur, Belgium.
-\gallanguage Fortran~95 + TR 15581 or Fortran~2003.
+\gallanguage Fortran~95 + TR 15581 or Fortran~2003.
%%%%%%%%%%%%%%%%%%%%%% HOW TO USE %%%%%%%%%%%%%%%%%%%%%%%%
@@ -89,20 +89,20 @@
\medskip
\noindent
-If it is required to use both modules at the same time, the derived types
-{\tt SMT\_problem\_type},
-{\tt QPT\_problem\_type},
-{\tt \packagename\_control\_type},
-{\tt \packagename\_inform\_type}
+If it is required to use both modules at the same time, the derived types
+{\tt SMT\_problem\_type},
+{\tt QPT\_problem\_type},
+{\tt \packagename\_control\_type},
+{\tt \packagename\_inform\_type}
and
{\tt \packagename\_data\_type}
(Section~\ref{galtypes})
and the five subroutines
-{\tt \packagename\_initialize},
-{\tt \packagename\_read\_specfile},
-{\tt \packagename\_apply},
-{\tt \packagename\_restore},
-{\tt \packagename\_terminate},
+{\tt \packagename\_initialize},
+{\tt \packagename\_read\_specfile},
+{\tt \packagename\_apply},
+{\tt \packagename\_restore},
+{\tt \packagename\_terminate},
(Section~\ref{galarguments})
must be renamed on one of the {\tt USE} statements.
@@ -114,53 +114,53 @@
may be stored in a variety of input formats.
\subsubsection{Dense storage format}\label{dense}
-The matrix $\bmA$ is stored as a compact
+The matrix $\bmA$ is stored as a compact
dense matrix by rows, that is, the values of the entries of each row in turn are
stored in order within an appropriate real one-dimensional array.
-Component $n \ast (i-1) + j$ of the storage array {\tt A\%val} will hold the
+Component $n \ast (i-1) + j$ of the storage array {\tt A\%val} will hold the
value $a_{ij}$ for $i = 1, \ldots , m$, $j = 1, \ldots , n$.
-Since $\bmH$ is symmetric, only the lower triangular part (that is the part
+Since $\bmH$ is symmetric, only the lower triangular part (that is the part
$h_{ij}$ for $1 \leq j \leq i \leq n$) need be held. In this case
-the lower triangle will be stored by rows, that is
-component $i \ast (i-1)/2 + j$ of the storage array {\tt H\%val}
+the lower triangle will be stored by rows, that is
+component $i \ast (i-1)/2 + j$ of the storage array {\tt H\%val}
will hold the value $h_{ij}$ (and, by symmetry, $h_{ji}$)
for $1 \leq j \leq i \leq n$.
\subsubsection{Sparse co-ordinate storage format}\label{coordinate}
-Only the nonzero entries of the matrices are stored. For the
-$l$-th entry of $\bmA$, its row index $i$, column index $j$
+Only the nonzero entries of the matrices are stored. For the
+$l$-th entry of $\bmA$, its row index $i$, column index $j$
and value $a_{ij}$
-are stored in the $l$-th components of the integer arrays {\tt A\%row},
+are stored in the $l$-th components of the integer arrays {\tt A\%row},
{\tt A\%col} and real array {\tt A\%val}, respectively.
The order is unimportant, but the total
-number of entries {\tt A\%ne} is also required.
+number of entries {\tt A\%ne} is also required.
The same scheme is applicable to
-$\bmH$ (thus requiring integer arrays {\tt H\%row}, {\tt H\%col}, a real array
+$\bmH$ (thus requiring integer arrays {\tt H\%row}, {\tt H\%col}, a real array
{\tt H\%val} and an integer value {\tt H\%ne}),
except that only the entries in the lower triangle need be stored.
\subsubsection{Sparse row-wise storage format}\label{rowwise}
Again only the nonzero entries are stored, but this time
they are ordered so that those in row $i$ appear directly before those
-in row $i+1$. For the $i$-th row of $\bmA$, the $i$-th component of a
+in row $i+1$. For the $i$-th row of $\bmA$, the $i$-th component of a
integer array {\tt A\%ptr} holds the position of the first entry in this row,
while {\tt A\%ptr} $(m+1)$ holds the total number of entries plus one.
-The column indices $j$ and values $a_{ij}$ of the entries in the $i$-th row
-are stored in components
-$l =$ {\tt A\%ptr}$(i)$, \ldots ,{\tt A\%ptr} $(i+1)-1$ of the
-integer array {\tt A\%col}, and real array {\tt A\%val}, respectively.
+The column indices $j$ and values $a_{ij}$ of the entries in the $i$-th row
+are stored in components
+$l =$ {\tt A\%ptr}$(i)$, \ldots ,{\tt A\%ptr} $(i+1)-1$ of the
+integer array {\tt A\%col}, and real array {\tt A\%val}, respectively.
The same scheme is applicable to
-$\bmH$ (thus requiring integer arrays {\tt H\%ptr}, {\tt H\%col}, and
+$\bmH$ (thus requiring integer arrays {\tt H\%ptr}, {\tt H\%col}, and
a real array {\tt H\%val}),
except that only the entries in the lower triangle need be stored.
-For sparse matrices, this scheme almost always requires less storage than
+For sparse matrices, this scheme almost always requires less storage than
its predecessor.
\subsubsection{Diagonal storage format}\label{diagonal}
If $\bmH$ is diagonal (i.e., $h_{ij} = 0$ for all $1 \leq i \neq j \leq n$)
only the diagonals entries $h_{ii}$, $1 \leq i \leq n$, need be stored,
-and the first $n$ components of the array {\tt H\%val} may be used for
+and the first $n$ components of the array {\tt H\%val} may be used for
the purpose. There is no sensible equivalent for the non-square $\bmA$.
%%%%%%%%%%%%%%%%%%%%%% symbols %%%%%%%%%%%%%%%%%%%%%%%%
@@ -191,33 +191,33 @@ \subsubsection{The derived data type for holding matrices}\label{typesmt}
\begin{description}
-\ittf{m} is a scalar component of type default \integer,
-that holds the number of rows in the matrix.
-
-\ittf{n} is a scalar component of type default \integer,
-that holds the number of columns in the matrix.
-
-\ittf{ne} is a scalar variable of type default \integer, that either
+\ittf{m} is a scalar component of type default \integer,
+that holds the number of rows in the matrix.
+
+\ittf{n} is a scalar component of type default \integer,
+that holds the number of columns in the matrix.
+
+\ittf{ne} is a scalar variable of type default \integer, that either
holds the number of matrix entries or is used to flag the storage scheme
-used.
+used.
-\ittf{val} is a rank-one allocatable array of type default \realdp\,
-and dimension at least {\tt ne}, that holds the values of the entries.
+\ittf{val} is a rank-one allocatable array of type default \realdp\,
+and dimension at least {\tt ne}, that holds the values of the entries.
Each pair of off-diagonal entries $h_{ij} = h_{ji}$ of a {\em symmetric}
-matrix $\bmH$ is represented as a single entry
+matrix $\bmH$ is represented as a single entry
(see \S\ref{dense}--\ref{rowwise}).
-Any duplicated entries that appear in the sparse
-co-ordinate or row-wise schemes will be summed.
+Any duplicated entries that appear in the sparse
+co-ordinate or row-wise schemes will be summed.
-\ittf{row} is a rank-one allocatable array of type default \integer,
-and dimension at least {\tt ne}, that may hold the row indices of the entries.
+\ittf{row} is a rank-one allocatable array of type default \integer,
+and dimension at least {\tt ne}, that may hold the row indices of the entries.
(see \S\ref{coordinate}).
-\ittf{col} is a rank-one allocatable array of type default \integer,
+\ittf{col} is a rank-one allocatable array of type default \integer,
and dimension at least {\tt ne}, that may the column indices of the entries
(see \S\ref{coordinate}--\ref{rowwise}).
-\ittf{ptr} is a rank-one allocatable array of type default \integer,
+\ittf{ptr} is a rank-one allocatable array of type default \integer,
and dimension at least {\tt m + 1}, that may hold the pointers to
the first entry in each row (see \S\ref{rowwise}).
@@ -226,15 +226,15 @@ \subsubsection{The derived data type for holding matrices}\label{typesmt}
%%%%%%%%%%% problem type %%%%%%%%%%%
\subsubsection{The derived data type for holding the problem}\label{typeprob}
-The derived data type {\tt QPT\_problem\_type} is used to hold
-the problem. The components of {\tt QPT\_problem\_type}
+The derived data type {\tt QPT\_problem\_type} is used to hold
+the problem. The components of {\tt QPT\_problem\_type}
are:
\begin{description}
-\itt{new\_problem\_structure} is a scalar variable of type default \logical,
- that is \true\ if this is the first (or only) problem in a sequence of
- problems with identical ``structure'' to be attempted, and \false\ if
+\itt{new\_problem\_structure} is a scalar variable of type default \logical,
+ that is \true\ if this is the first (or only) problem in a sequence of
+ problems with identical ``structure'' to be attempted, and \false\ if
a previous problem with the same ``structure'' (but different
numerical data) has been solved. We say that two problems have the same
structure if they differ only in their components of type {\tt REAL}, which
@@ -251,26 +251,26 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
the {\tt .FALSE.} value should be used for any subsequent call to this
routine for problems with the same structure.
-\ittf{n} is a scalar variable of type default \integer,
- that holds the number of optimization variables, $n$.
-
-\ittf{m} is a scalar variable of type default \integer,
+\ittf{n} is a scalar variable of type default \integer,
+ that holds the number of optimization variables, $n$.
+
+\ittf{m} is a scalar variable of type default \integer,
that holds the number of general linear constraints, $m$.
-
-\ittf{H} is scalar variable of type {\tt SMT\_TYPE}
+
+\ittf{H} is scalar variable of type {\tt SMT\_TYPE}
that holds the Hessian matrix $\bmH$. The following components
are used:
\begin{description}
\itt{H\%type} is an allocatable array of rank one and type default \character, that
-is used to indicate the storage scheme used. If the dense storage scheme
-(see Section~\ref{dense}) is used,
+is used to indicate the storage scheme used. If the dense storage scheme
+(see Section~\ref{dense}) is used,
the first five components of {\tt H\%type} must contain the
string {\tt DENSE}.
-For the sparse co-ordinate scheme (see Section~\ref{coordinate}),
+For the sparse co-ordinate scheme (see Section~\ref{coordinate}),
the first ten components of {\tt H\%type} must contain the
-string {\tt COORDINATE},
+string {\tt COORDINATE},
for the sparse row-wise storage scheme (see Section~\ref{rowwise}),
the first fourteen components of {\tt H\%type} must contain the
string {\tt SPARSE\_BY\_ROWS},
@@ -278,48 +278,48 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
the first eight components of {\tt H\%type} must contain the
string {\tt DIAGONAL}.
-For convenience, the procedure {\tt SMT\_put}
+For convenience, the procedure {\tt SMT\_put}
may be used to allocate sufficient space and insert the required keyword
into {\tt H\%type}.
For example, if {\tt prob} is of derived type {\tt \packagename\_problem\_type}
and involves a Hessian we wish to store using the co-ordinate scheme,
we may simply
%\vspace*{-2mm}
-{\tt
+{\tt
\begin{verbatim}
CALL SMT_put( prob%H%type, 'COORDINATE' )
\end{verbatim}
}
%\vspace*{-4mm}
\noindent
-See the documentation for the \galahad\ package {\tt SMT}
+See the documentation for the \galahad\ package {\tt SMT}
for further details on the use of {\tt SMT\_put}.
-\itt{H\%ne} is a scalar variable of type default \integer, that
+\itt{H\%ne} is a scalar variable of type default \integer, that
holds the number of entries in the {\bf lower triangular} part of $\bmH$
-in the sparse co-ordinate storage scheme (see Section~\ref{coordinate}).
+in the sparse co-ordinate storage scheme (see Section~\ref{coordinate}).
It need not be set for any of the other three schemes.
\itt{H\%val} is a rank-one allocatable array of type default \realdp, that holds
the values of the entries of the {\bf lower triangular} part
-of the Hessian matrix $\bmH$ in any of the
+of the Hessian matrix $\bmH$ in any of the
storage schemes discussed in Section~\ref{galmatrix}.
\itt{H\%row} is a rank-one allocatable array of type default \integer,
-that holds the row indices of the {\bf lower triangular} part of $\bmH$
+that holds the row indices of the {\bf lower triangular} part of $\bmH$
in the sparse co-ordinate storage
-scheme (see Section~\ref{coordinate}).
+scheme (see Section~\ref{coordinate}).
It need not be allocated for any of the other three schemes.
\itt{H\%col} is a rank-one allocatable array variable of type default \integer,
-that holds the column indices of the {\bf lower triangular} part of
-$\bmH$ in either the sparse co-ordinate
-(see Section~\ref{coordinate}), or the sparse row-wise
+that holds the column indices of the {\bf lower triangular} part of
+$\bmH$ in either the sparse co-ordinate
+(see Section~\ref{coordinate}), or the sparse row-wise
(see Section~\ref{rowwise}) storage scheme.
It need not be allocated when the dense or diagonal storage schemes are used.
-\itt{H\%ptr} is a rank-one allocatable array of dimension {\tt n+1} and type
-default \integer, that holds the starting position of
+\itt{H\%ptr} is a rank-one allocatable array of dimension {\tt n+1} and type
+default \integer, that holds the starting position of
each row of the {\bf lower triangular} part of $\bmH$, as well
as the total number of entries plus one, in the sparse row-wise storage
scheme (see Section~\ref{rowwise}). It need not be allocated when the
@@ -327,8 +327,8 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
\end{description}
-\itt{gradient\_kind} is a scalar variable of type default \integer,
-that is used to indicate whether the components of the gradient $\bmg$
+\itt{gradient\_kind} is a scalar variable of type default \integer,
+that is used to indicate whether the components of the gradient $\bmg$
have special or general values. Possible values for {\tt gradient\_kind} are:
\begin{description}
\itt{0} In this case, $\bmg = 0$.
@@ -339,41 +339,41 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
and will be provided by the user in the component {\tt G}.
\end{description}
-\ittf{G} is a rank-one allocatable array of dimension {\tt n} and type
-default \realdp, that holds the gradient $\bmg$
+\ittf{G} is a rank-one allocatable array of dimension {\tt n} and type
+default \realdp, that holds the gradient $\bmg$
of the linear term of the quadratic objective function.
The $j$-th component of {\tt G}, $j = 1, \ldots , n$, contains $\bmg_{j}$.
If {\tt gradient\_kind} {= 0, 1}, {\tt G} need not be allocated.
-\ittf{f} is a scalar variable of type
-default \realdp, that holds
+\ittf{f} is a scalar variable of type
+default \realdp, that holds
the constant term, $f$, in the objective function.
-\ittf{A} is scalar variable of type {\tt SMT\_TYPE}
+\ittf{A} is scalar variable of type {\tt SMT\_TYPE}
that holds the Jacobian matrix $\bmA$. The following components are used:
\begin{description}
\itt{A\%type} is an allocatable array of rank one and type default \character, that
-is used to indicate the storage scheme used. If the dense storage scheme
-(see Section~\ref{dense}) is used,
+is used to indicate the storage scheme used. If the dense storage scheme
+(see Section~\ref{dense}) is used,
the first five components of {\tt A\%type} must contain the
string {\tt DENSE}.
-For the sparse co-ordinate scheme (see Section~\ref{coordinate}),
+For the sparse co-ordinate scheme (see Section~\ref{coordinate}),
the first ten components of {\tt A\%type} must contain the
-string {\tt COORDINATE}, while
+string {\tt COORDINATE}, while
for the sparse row-wise storage scheme (see Section~\ref{rowwise}),
the first fourteen components of {\tt A\%type} must contain the
string {\tt SPARSE\_BY\_ROWS}.
-Just as for {\tt H\%type} above, the procedure {\tt SMT\_put}
+Just as for {\tt H\%type} above, the procedure {\tt SMT\_put}
may be used to allocate sufficient space and insert the required keyword
into {\tt A\%type}.
Once again, if {\tt prob} is of derived type {\tt \packagename\_problem\_type}
-and involves a Jacobian we wish to store using the sparse row-wise
+and involves a Jacobian we wish to store using the sparse row-wise
storage scheme, we may simply
%\vspace*{-2mm}
-{\tt
+{\tt
\begin{verbatim}
CALL SMT_put( prob%A%type, 'SPARSE_BY_ROWS' )
\end{verbatim}
@@ -381,28 +381,28 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
%\vspace*{-4mm}
\noindent
-\itt{A\%ne} is a scalar variable of type default \integer, that
+\itt{A\%ne} is a scalar variable of type default \integer, that
holds the number of entries in $\bmA$
-in the sparse co-ordinate storage scheme (see Section~\ref{coordinate}).
+in the sparse co-ordinate storage scheme (see Section~\ref{coordinate}).
It need not be set for either of the other two schemes.
\itt{A\%val} is a rank-one allocatable array of type default \realdp, that holds
-the values of the entries of the Jacobian matrix $\bmA$ in any of the
+the values of the entries of the Jacobian matrix $\bmA$ in any of the
storage schemes discussed in Section~\ref{galmatrix}.
\itt{A\%row} is a rank-one allocatable array of type default \integer,
that holds the row indices of $\bmA$ in the sparse co-ordinate storage
-scheme (see Section~\ref{coordinate}).
+scheme (see Section~\ref{coordinate}).
It need not be allocated for either of the other two schemes.
\itt{A\%col} is a rank-one allocatable array variable of type default \integer,
-that holds the column indices of $\bmA$ in either the sparse co-ordinate
-(see Section~\ref{coordinate}), or the sparse row-wise
+that holds the column indices of $\bmA$ in either the sparse co-ordinate
+(see Section~\ref{coordinate}), or the sparse row-wise
(see Section~\ref{rowwise}) storage scheme.
It need not be allocated when the dense storage scheme is used.
-\itt{A\%ptr} is a rank-one allocatable array of dimension {\tt m+1} and type
-default \integer, that holds the
+\itt{A\%ptr} is a rank-one allocatable array of dimension {\tt m+1} and type
+default \integer, that holds the
starting position of each row of $\bmA$, as well
as the total number of entries plus one, in the sparse row-wise storage
scheme (see Section~\ref{rowwise}). It need not be allocated when the
@@ -410,152 +410,152 @@ \subsubsection{The derived data type for holding the problem}\label{typeprob}
\end{description}
-\ittf{C\_l} is a rank-one allocatable array of dimension {\tt m} and type
-default \realdp, that holds the vector of lower bounds $\bmc^{l}$
-on the general constraints. The $i$-th component of
+\ittf{C\_l} is a rank-one allocatable array of dimension {\tt m} and type
+default \realdp, that holds the vector of lower bounds $\bmc^{l}$
+on the general constraints. The $i$-th component of
{\tt C\_l}, $i = 1, \ldots , m$, contains $\bmc_{i}^{l}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt C\_l} to any value smaller than {\tt -infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt C\_l} to any value smaller than {\tt -infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{C\_u} is a rank-one allocatable array of dimension {\tt m} and type
-default \realdp, that holds the vector of upper bounds $\bmc^{u}$
-on the general constraints. The $i$-th component of
+\ittf{C\_u} is a rank-one allocatable array of dimension {\tt m} and type
+default \realdp, that holds the vector of upper bounds $\bmc^{u}$
+on the general constraints. The $i$-th component of
{\tt C\_u}, $i = 1, \ldots , m$, contains $\bmc_{i}^{u}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt C\_u} to any value larger than {\tt infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt C\_u} to any value larger than {\tt infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\itt{C\_status} is a rank-one allocatable array of dimension {\tt m} and type
+\itt{C\_status} is a rank-one allocatable array of dimension {\tt m} and type
default \integer, that holds the status of the problem constraints (active or
inactive). A constraint is said to be inactive if it is not included in the
formulation of the considered quadratic program.
-\ittf{X\_l} is a rank-one allocatable array of dimension {\tt n} and type
+\ittf{X\_l} is a rank-one allocatable array of dimension {\tt n} and type
default \realdp, that holds
the vector of lower bounds $\bmx^{l}$ on the the variables.
-The $j$-th component of {\tt X\_l}, $j = 1, \ldots , n$,
+The $j$-th component of {\tt X\_l}, $j = 1, \ldots , n$,
contains $\bmx_{j}^{l}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt X\_l} to any value smaller than {\tt -infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt X\_l} to any value smaller than {\tt -infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{X\_u} is a rank-one allocatable array of dimension {\tt n} and type
+\ittf{X\_u} is a rank-one allocatable array of dimension {\tt n} and type
default \realdp, that holds
the vector of upper bounds $\bmx^{u}$ on the variables.
-The $j$-th component of {\tt X\_u}, $j = 1, \ldots , n$,
+The $j$-th component of {\tt X\_u}, $j = 1, \ldots , n$,
contains $\bmx_{j}^{u}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt X\_u} to any value larger than that {\tt infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt X\_u} to any value larger than that {\tt infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\itt{X\_status} is a rank-one allocatable array of dimension {\tt n} and type
+\itt{X\_status} is a rank-one allocatable array of dimension {\tt n} and type
default \integer, that holds the status of the problem variables (active or
inactive). Variable $j$ is said to be inactive if its value is fixed to the
current value of {\tt problem\%X(j)}, in which case it can be seen as a
parameter of the quadratic program.
-\ittf{Y\_l} is a rank-one allocatable array of dimension {\tt m} and type
+\ittf{Y\_l} is a rank-one allocatable array of dimension {\tt m} and type
default \realdp, that holds
the vector of lower bounds $\bmy^{l}$ on the the multipliers.
-The $j$-th component of {\tt Y\_l}, $j = 1, \ldots , m$,
+The $j$-th component of {\tt Y\_l}, $j = 1, \ldots , m$,
contains $\bmy_{j}^{l}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt Y\_l} to any value smaller than {\tt -infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt Y\_l} to any value smaller than {\tt -infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{Y\_u} is a rank-one allocatable array of dimension {\tt m} and type
+\ittf{Y\_u} is a rank-one allocatable array of dimension {\tt m} and type
default \realdp, that holds
the vector of upper bounds $\bmy^{u}$ on the multipliers.
-The $j$-th component of {\tt Y\_u}, $j = 1, \ldots , m$,
+The $j$-th component of {\tt Y\_u}, $j = 1, \ldots , m$,
contains $\bmy_{j}^{u}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt Y\_u} to any value larger than that {\tt infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt Y\_u} to any value larger than that {\tt infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{Z\_l} is a rank-one allocatable array of dimension {\tt n} and type
+\ittf{Z\_l} is a rank-one allocatable array of dimension {\tt n} and type
default \realdp, that holds
the vector of lower bounds $\bmz^{l}$ on the the dual variables.
-The $j$-th component of {\tt Z\_l}, $j = 1, \ldots , n$,
+The $j$-th component of {\tt Z\_l}, $j = 1, \ldots , n$,
contains $\bmz_{j}^{l}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt Z\_l} to any value smaller than {\tt -infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt Z\_l} to any value smaller than {\tt -infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{Z\_u} is a rank-one allocatable array of dimension {\tt n} and type
+\ittf{Z\_u} is a rank-one allocatable array of dimension {\tt n} and type
default \realdp, that holds
the vector of upper bounds $\bmz^{u}$ on the dual variables.
-The $j$-th component of {\tt Z\_u}, $j = 1, \ldots , n$,
+The $j$-th component of {\tt Z\_u}, $j = 1, \ldots , n$,
contains $\bmz_{j}^{u}$.
-Infinite bounds are allowed by setting the corresponding
-components of {\tt Z\_u} to any value larger than that {\tt infinity},
-where {\tt infinity} is a component of the control array {\tt control}
+Infinite bounds are allowed by setting the corresponding
+components of {\tt Z\_u} to any value larger than that {\tt infinity},
+where {\tt infinity} is a component of the control array {\tt control}
(see Section~\ref{typecontrol}).
-\ittf{X} is a rank-one allocatable array of dimension {\tt n} and type
-default \realdp,
+\ittf{X} is a rank-one allocatable array of dimension {\tt n} and type
+default \realdp,
that holds the values $\bmx$ of the optimization variables.
-The $j$-th component of {\tt X}, $j = 1, \ldots , n$, contains $x_{j}$.
+The $j$-th component of {\tt X}, $j = 1, \ldots , n$, contains $x_{j}$.
-\ittf{Z} is a rank-one allocatable array of dimension {\tt n} and type default
+\ittf{Z} is a rank-one allocatable array of dimension {\tt n} and type default
\realdp, that holds
-the values $\bmz$ of estimates of the dual variables
+the values $\bmz$ of estimates of the dual variables
corresponding to the simple bound constraints (see Section~\ref{galmethod}).
-The $j$-th component of {\tt Z}, $j = 1, \ldots , n$, contains $z_{j}$.
+The $j$-th component of {\tt Z}, $j = 1, \ldots , n$, contains $z_{j}$.
-\ittf{C} is a rank-one allocatable array of dimension {\tt m} and type default
+\ittf{C} is a rank-one allocatable array of dimension {\tt m} and type default
\realdp, that holds
the values $\bmA \bmx$ of the constraints.
-The $i$-th component of {\tt C}, $i = 1, \ldots , m$, contains
-$\bma_{i}^{T}\bmx \equiv (\bmA \bmx)_{i}$.
+The $i$-th component of {\tt C}, $i = 1, \ldots , m$, contains
+$\bma_{i}^{T}\bmx \equiv (\bmA \bmx)_{i}$.
-\ittf{Y} is a rank-one allocatable array of dimension {\tt m} and type
+\ittf{Y} is a rank-one allocatable array of dimension {\tt m} and type
default \realdp, that holds
the values $\bmy$ of estimates of the Lagrange multipliers
corresponding to the general linear constraints (see Section~\ref{galmethod}).
-The $i$-th component of {\tt Y}, $i = 1, \ldots , m$, contains $y_{i}$.
+The $i$-th component of {\tt Y}, $i = 1, \ldots , m$, contains $y_{i}$.
\end{description}
%%%%%%%%%%% control type %%%%%%%%%%%
-\subsubsection{The derived data type for holding control
+\subsubsection{The derived data type for holding control
parameters}\label{typecontrol}
-The derived data type
-{\tt \packagename\_control\_type}
-is used to hold controlling data. Default values may be obtained by calling
+The derived data type
+{\tt \packagename\_control\_type}
+is used to hold controlling data. Default values may be obtained by calling
{\tt \packagename\_initialize} (see Section~\ref{subinit}),
-while individual components may also be changed by calling
+while individual components may also be changed by calling
{\tt \packagename\_read\-\_specfile}
-(see Section~\ref{readspec}).
-The components of
-{\tt \packagename\_control\_type}
+(see Section~\ref{readspec}).
+The components of
+{\tt \packagename\_control\_type}
are:
\begin{description}
\itt{termination} is a scalar variable of type default \integer, that
-determines the strategy for terminating the presolve analysis.
+determines the strategy for terminating the presolve analysis.
Possible values are:
\begin{description}
\item[\sym \galsymreducedsize.] presolving continues so long as one of
the sizes of the problem ($n$, $m$, sizes of $\bmA$ and $\bmH$) is
being reduced.
-\item[\sym \galsymfullpresolve.] presolving continues so long as further
+\item[\sym \galsymfullpresolve.] presolving continues so long as further
problem transformations are possible.
\end{description}
Note that the maximum number of analysis passes ({\tt max\_nbr\_passes}) and
-the maximum number of problem transformations ({\tt max\_nbr\_transforms})
+the maximum number of problem transformations ({\tt max\_nbr\_transforms})
set an upper limit on the presolving effort irrespective of the choice of
{\tt termination}. The only effect of this latter parameter is to allow for
-early termination.
+early termination.
The default is {\tt termination} = {\sym \galsymreducedsize}.
\itt{max\_nbr\_transforms} is a scalar variable of type default \integer, that
@@ -568,7 +568,7 @@ \subsubsection{The derived data type for holding control
The default is {\tt max\_nbr\_passes} = 25.
\itt{c\_accuracy} is a scalar variable of type default \realdp, that holds the
-relative accuracy at which the general linear constraints are satisfied at
+relative accuracy at which the general linear constraints are satisfied at
the exit of the solver. Note that this value is not used before the restoration
of the problem.
The default is {\tt c\_accuracy} = $10^{-4}$ in single precision, and
@@ -582,7 +582,7 @@ \subsubsection{The derived data type for holding control
{\tt z\_accuracy} = $10^{-6}$ in double precision.
\itt{infinity} is a scalar variable of type default \realdp, that holds the
-value beyond which a number is deemed equal to plus infinity
+value beyond which a number is deemed equal to plus infinity
(minus infinity being defined as its opposite)
The default is {\tt infinity} = $10^{19}$.
@@ -598,10 +598,10 @@ \subsubsection{The derived data type for holding control
level of printout requested by the user. See Section~\ref{galinfo}.
The default is {\tt print\_level} = {\sym \galsymsilent}.
-\itt{dual\_transformations} is a scalar variable of type default \logical,
+\itt{dual\_transformations} is a scalar variable of type default \logical,
that has the value {\tt .TRUE.} if dual transformations of the problem are
allowed. Note that this implies that the reduced problem is solved
-accurately (for the dual feasibility condition to hold)
+accurately (for the dual feasibility condition to hold)
as to be able to restore the problem to the original
constraints and variables. The value {\tt .FALSE.} prevents dual
transformations to be applied, thus allowing for inexact
@@ -609,13 +609,13 @@ \subsubsection{The derived data type for holding control
parameter overides the values of {\tt get\_z}, {\tt get\_z\_bounds}, {\tt
get\_y}, {\tt get\_y\_bounds}, {\tt dual\_constraints\_freq}, {\tt
singleton\_columns\_freq}, {\tt doubleton\_columns\_freq}, {\tt z\_accuracy}
-and {\tt check\_dual\_feasibility}.
+and {\tt check\_dual\_feasibility}.
The default is {\tt dual\_transformations} = {\tt .TRUE.}.
-\itt{redundant\_xc} is a scalar variable of type default \logical,
+\itt{redundant\_xc} is a scalar variable of type default \logical,
that has the value {\tt .TRUE.} if redundant variables and constraints
(that is variables that don't occur in the objective function and are
-either unbounded above with all their coefficients in $\bmA$
+either unbounded above with all their coefficients in $\bmA$
being positive for constraints that are unbounded above and negative for
constraints that are unbounded below, or unbounded below
with all their coefficients in $\bmA$ being positive for constraints that are
@@ -640,8 +640,8 @@ \subsubsection{The derived data type for holding control
\itt{singleton\_columns\_freq} is a scalar variable of type default \integer,
that holds the frequency of singleton column analysis in terms of
-presolving passes. A value of 2 indicates that
-singleton columns are analyzed every 2 presolving passes.
+presolving passes. A value of 2 indicates that
+singleton columns are analyzed every 2 presolving passes.
A zero value indicates that they are never analyzed.
The default is {\tt singleton\_columns\_freq} = 1.
@@ -661,8 +661,8 @@ \subsubsection{The derived data type for holding control
\itt{dependent\_variables\_freq} is a scalar variable of type default
\integer, that holds the frequency of search for dependent variables in terms
-of presolving passes. A value of 2 indicates that
-dependent variables are searched for every 2 presolving
+of presolving passes. A value of 2 indicates that
+dependent variables are searched for every 2 presolving
passes. A zero value indicates that no attempt is ever made to detect such
variables. The default is {\tt dependent\_variables\_freq} = 1.
@@ -676,7 +676,7 @@ \subsubsection{The derived data type for holding control
\itt{max\_fill} is a scalar variable of type default \integer, that holds
the maximum percentage of fill in each row of $\bmA$. Note that
this is a row-wise measure: globally fill never exceeds
-the storage initially used for $\bmA$, no matter how large
+the storage initially used for $\bmA$, no matter how large
{\tt max\_fill} is chosen. If {\tt max\_fill} is negative,
no limit is put on row fill.
The default is {\tt max\_fill} = -1 (no limit).
@@ -701,7 +701,7 @@ \subsubsection{The derived data type for holding control
\itt{transf\_file\_name} is a scalar variable of type default \integer, that
holds the name of the file (to be) used for storing problem transformation on
-disk. Note that this parameter must be identical for all calls to
+disk. Note that this parameter must be identical for all calls to
{\tt \packagename} that follows {\tt \packagename\_read\_specfile}. It can
then only be changed after calling {\tt \packagename\_terminate}.
The default is {\tt transf\_file\_name} = {\tt transf.sav}.
@@ -710,13 +710,13 @@ \subsubsection{The derived data type for holding control
determines the convention of sign used for the multipliers
associated with the general linear constraints. Possible values are:
\begin{description}
-\item[\sym \galsympositive.] all multipliers corresponding to active
- inequality constraints are non-negative for
- lower bound constraints and non-positive for
+\item[\sym \galsympositive.] all multipliers corresponding to active
+ inequality constraints are non-negative for
+ lower bound constraints and non-positive for
upper bounds constraints;
-\item[\sym \galsymnegative.] all multipliers corresponding to active
- inequality constraints are non-positive for
- lower bound constraints and non-negative for
+\item[\sym \galsymnegative.] all multipliers corresponding to active
+ inequality constraints are non-positive for
+ lower bound constraints and non-negative for
upper bounds constraints.
\end{description}
The default is {\tt y\_sign} = {\sym \galsympositive}.
@@ -727,25 +727,25 @@ \subsubsection{The derived data type for holding control
corresponding to the reduced point on input of {\tt \packagename\_restore}
must be set to zero. Possible values are:
\begin{description}
-\item[\sym \galsymforcetozero.] all multipliers corresponding to inactive
+\item[\sym \galsymforcetozero.] all multipliers corresponding to inactive
general linear constraints are forced to zero,
possibly at the expense of deteriorating the
dual feasibility condition.
Note that this option is inactive unless
{\tt get\_y = get\_c get\_c\_bounds = .TRUE.}.
-\item[\sym \galsymleaveasis:] multipliers corresponding to inactive
+\item[\sym \galsymleaveasis.] multipliers corresponding to inactive
general linear constraints are left unaltered.
\end{description}
The default is {\tt inactive\_y} = {\sym \galsymleaveasis}.
\itt{z\_sign}is a scalar variable of type default \integer, that
-determines the convention of sign used for the dual
+determines the convention of sign used for the dual
variables associated with the bound constraints. Possible values are:
\begin{description}
-\item[\sym \galsympositive.] all dual variables corresponding to
+\item[\sym \galsympositive.] all dual variables corresponding to
active lower bounds are non-negative, and
non-positive for active upper bounds;
-\item[\sym \galsymnegative.] all dual variables corresponding to
+\item[\sym \galsymnegative.] all dual variables corresponding to
active lower bounds are non-positive, and
non-negative for active upper bounds.
\end{description}
@@ -757,13 +757,13 @@ \subsubsection{The derived data type for holding control
corresponding to the reduced point on input of {\tt \packagename\_restore}
must be set to zero. Possible values are:
\begin{description}
-\item[\sym \galsymforcetozero.] all dual variables corresponding to inactive
+\item[\sym \galsymforcetozero.] all dual variables corresponding to inactive
bounds are forced to zero,
possibly at the expense of deteriorating the
dual feasibility condition.
Note that this option is inactive unless
{\tt get\_z = get\_x get\_x\_bounds = .TRUE.}.
-\item[\sym \galsymleaveasis.] dual variables corresponding to inactive
+\item[\sym \galsymleaveasis.] dual variables corresponding to inactive
bounds are left unaltered.
\end{description}
The default is {\tt inactive\_z} = {\sym \galsymleaveasis}.
@@ -782,16 +782,16 @@ \subsubsection{The derived data type for holding control
{\tt 2 * problem\%n} must be allocated;
\item[\sym \galsymloosest.] the loosest bounds that are known to
keep the problem equivalent to the
- original problem. This option also
- implies that an additional real workspace of size
+ original problem. This option also
+ implies that an additional real workspace of size
{\tt 2 * problem\%n} must be allocated;
\end{description}
-Note that his parameter must be identical for all calls to
+Note that his parameter must be identical for all calls to
{\tt \packagename} following {\tt \packagename\_read\_specfile}.
The default is {\tt final\_x\_bounds} = {\sym \galsymtightest}.
\itt{final\_z\_bounds} is a scalar variable of type default \integer, that
-holds the type of final bounds on the dual variables returned by
+holds the type of final bounds on the dual variables returned by
the package. This parameter can take the values:
\begin{description}
\item[\sym \galsymtightest.] the final bounds are the tightest bounds
@@ -804,16 +804,16 @@ \subsubsection{The derived data type for holding control
{\tt 2 * problem\%n} must be allocated;
\item[\sym \galsymloosest.] the loosest bounds that are known to
keep the problem equivalent to the
- original problem. This option also
+ original problem. This option also
implies that an additional real workspace of size
{\tt 2 * problem\%n} must be allocated;
\end{description}
-Note that his parameter must be identical for all calls to
+Note that his parameter must be identical for all calls to
{\tt \packagename} following {\tt \packagename\_read\_specfile}.
The default is {\tt final\_z\_bounds} = {\sym \galsymtightest}.
-
+
\itt{final\_c\_bounds} is a scalar variable of type default \integer, that
-holds the type of final bounds on the constraints returned by
+holds the type of final bounds on the constraints returned by
the package. This parameter can take the values:
\begin{description}
\item[\sym \galsymtightest.] the final bounds are the tightest bounds
@@ -826,18 +826,18 @@ \subsubsection{The derived data type for holding control
{\tt 2 * problem\%n} must be allocated;
\item[\sym \galsymloosest.] the loosest bounds that are known to
keep the problem equivalent to the
- original problem. This option also
+ original problem. This option also
implies that an additional real workspace of size
{\tt 2 * problem\%n} must be allocated;
\end{description}
-Note that his parameter must be identical for all calls to
-{\tt \packagename} following {\tt \packagename\_read\_specfile}.
-If different from
-{\tt TIGHTEST}, its value must be equal to that of {\tt final\_x\_bounds}.
+Note that his parameter must be identical for all calls to
+{\tt \packagename} following {\tt \packagename\_read\_specfile}.
+If different from {\tt \galsymtightest}, its value must be equal to
+that of {\tt final\_x\_bounds}.
The default is {\tt final\_c\_bounds} = {\sym \galsymtightest}.
-
+
\itt{final\_y\_bounds} is a scalar variable of type default \integer, that
-holds the type of final bounds on the multipliers returned by
+holds the type of final bounds on the multipliers returned by
the package. This parameter can take the values:
\begin{description}
\item[\sym \galsymtightest.] the final bounds are the tightest bounds
@@ -850,14 +850,14 @@ \subsubsection{The derived data type for holding control
{\tt 2 * problem\%n} must be allocated;
\item[\sym \galsymloosest.] the loosest bounds that are known to
keep the problem equivalent to the
- original problem. This option also
+ original problem. This option also
implies that an additional real workspace of size
{\tt 2 * problem\%n} must be allocated;
\end{description}
-Note that his parameter must be identical for all calls to
+Note that his parameter must be identical for all calls to
{\tt \packagename} following {\tt \packagename\_read\_specfile}.
The default is {\tt final\_y\_bounds} = {\sym \galsymtightest}.
-
+
\itt{check\_primal\_feasibility} is a scalar variable of type default
\integer, that holds the level of feasibility check (on the values of $\bmx$)
at the start of the restoration phase. This parameter can
@@ -879,7 +879,7 @@ \subsubsection{The derived data type for holding control
parameter can take the values:
\begin{description}
\item[\sym \galsymnone.] no check at all;
-\item[\sym \galsymbasic:] the primal constraints are recomputed at $(\bmx,\bmy,\bmz)$
+\item[\sym \galsymbasic.] the primal constraints are recomputed at $(\bmx,\bmy,\bmz)$
and a message issued if the computed value
does not match the input value, or if it is
out of bounds (if {\tt print\_level} $\geq$ {\sym \galsymaction});
@@ -891,7 +891,7 @@ \subsubsection{The derived data type for holding control
\itt{get\_q} is a scalar variable of type default \logical, that
must be set to {\tt .TRUE.} if the value of the objective
function must be reconstructed by {\tt \packagename\_restore} from the
-(solved) reduced problem.
+(solved) reduced problem.
The default is {\tt get\_q} = {\tt .TRUE.}.
\itt{get\_f} is a scalar variable of type default \logical, that
@@ -931,7 +931,7 @@ \subsubsection{The derived data type for holding control
The default is {\tt get\_x\_bounds} = {\tt .TRUE.}.
\itt{get\_z} is a scalar variable of type default \logical, that
-must be set to {\ tt .TRUE.} if the value of the dual variables
+must be set to {\tt .TRUE.} if the value of the dual variables
must be reconstructed by {\tt
\packagename\_restore} from the (solved) reduced problem.
The default is {\tt get\_z} = {\tt .TRUE.}.
@@ -941,14 +941,14 @@ \subsubsection{The derived data type for holding control
problem dual variables must be reconstructed by {\tt \packagename\_restore}
from the (solved) reduced problem.
If set, this may require to store specific
-additional information on the problem transformations,
-therefore increasing the storage needed for these transformations.
-Note that this parameter must be identical for all calls to
-{\tt \packagename} following {\tt \packagename\_read\_specfile}.
+additional information on the problem transformations,
+therefore increasing the storage needed for these transformations.
+Note that this parameter must be identical for all calls to
+{\tt \packagename} following {\tt \packagename\_read\_specfile}.
The default is {\tt get\_z\_bounds} = {\tt .TRUE.}.
\itt{get\_c} is a scalar variable of type default \logical, that
-must be set to {\ tt .TRUE.} if the values of the constraints
+must be set to {\tt .TRUE.} if the values of the constraints
must be reconstructed by {\tt
\packagename\_restore} from the (solved) reduced problem.
The default is {\tt get\_c} = {\tt .TRUE.}.
@@ -960,7 +960,7 @@ \subsubsection{The derived data type for holding control
The default is {\tt get\_c\_bounds} = {\tt .TRUE.}.
\itt{get\_y} is a scalar variable of type default \logical, that
-must be set to {\ tt .TRUE.} if the values of the multipliers
+must be set to {\tt .TRUE.} if the values of the multipliers
must be reconstructed by {\tt
\packagename\_restore} from the (solved) reduced problem.
The default is {\tt get\_y} = {\tt .TRUE.}.
@@ -970,10 +970,10 @@ \subsubsection{The derived data type for holding control
problem multipliers must be reconstructed by {\tt \packagename\_restore}
from the (solved) reduced problem.
If set, this may require to store specific
-additional information on the problem transformations,
-therefore increasing the storage needed for these transformations.
-Note that this parameter must be identical for all calls to
-{\tt \packagename} following {\tt \packagename\_read\_specfile}.
+additional information on the problem transformations,
+therefore increasing the storage needed for these transformations.
+Note that this parameter must be identical for all calls to
+{\tt \packagename} following {\tt \packagename\_read\_specfile}.
The default is {\tt get\_y\_bounds} = {\tt .TRUE.}.
\itt{pivot\_tol} is a scalar variable of type default \realdp, that
@@ -986,25 +986,25 @@ \subsubsection{The derived data type for holding control
\itt{min\_rel\_improve} is a scalar variable of type default
\realdp, that holds the minimum relative improvement in the bounds on $\bmx$,
-$\bmy$ and $\bmz$ for a tighter bound on these quantities to be
-accepted in the course of the analysis. More formally,
+$\bmy$ and $\bmz$ for a tighter bound on these quantities to be
+accepted in the course of the analysis. More formally,
if {\tt lower} is the current value of the lower bound on one
of the $\bmx$, $\bmy$ or $\bmz$, and if {\tt newlower} is a tentative tighter
-lower bound on the same quantity, it is only accepted if
+lower bound on the same quantity, it is only accepted if
\[
-{\tt newlower} \geq
+{\tt newlower} \geq
{\tt lower} + {\tt min\_rel\_improve} * \max( 1, |{\tt lower}|).
\]
Similarly, a tentative tighter upper bound {\tt newupper}
only replaces the current upper bound {\tt upper} if
\[
-{\tt newupper} \leq
+{\tt newupper} \leq
{\tt upper} - {\tt min\_rel\_improve} * \max( 1, |{\tt upper}|).
\]
Note that this parameter must exceed the machine precision significantly.
The default is {\tt min\_rel\_improve} = $10^{-6}$ in single
precision, and {\tt min\_rel\_improve} = $10^{-10}$ in double
-precision.
+precision.
\itt{max\_growth\_factor} is a scalar variable of type default
\realdp, that holds the maximum ratio that is allowed for the absolute
@@ -1014,7 +1014,7 @@ \subsubsection{The derived data type for holding control
violating this bound is skipped.
The default is {\tt min\_growth\_factor} = $10^{4}$ in single
precision, and {\tt min\_growth\_factor} = $10^{8}$ in double
-precision.
+precision.
\end{description}
@@ -1022,11 +1022,11 @@ \subsubsection{The derived data type for holding control
\subsubsection{The derived data type for holding informational
parameters}\label{typeinform}
-The derived data type
-{\tt \packagename\_inform\_type}
-is used to hold parameters that give information about the progress and needs
-of the algorithm. The components of
-{\tt \packagename\_inform\_type}
+The derived data type
+{\tt \packagename\_inform\_type}
+is used to hold parameters that give information about the progress and needs
+of the algorithm. The components of
+{\tt \packagename\_inform\_type}
are:
\begin{description}
@@ -1035,7 +1035,7 @@ \subsubsection{The derived data type for holding informational
exit status of the algorithm. See Sections~\ref{galerrors} and \ref{galinfo}
for details.
-\itt{message} is a character array of 3 lines of 80 characters each,
+\itt{message} is a character array of 3 lines of 80 characters each,
containing a description of the exit condition
on exit, typically including more information
than indicated in the description of {\tt status} above.
@@ -1050,12 +1050,12 @@ \subsubsection{The derived data type for holding informational
%%%%%%%%%%% data type %%%%%%%%%%%
\subsubsection{The derived data type for holding problem data}\label{typedata}
-The derived data type
-{\tt \packagename\_data\_type}
+The derived data type
+{\tt \packagename\_data\_type}
is used to hold all the data for a particular problem,
-or sequences of problems with the same structure, between calls of
-{\tt \packagename} procedures.
-This data should be preserved, untouched, from the initial call to
+or sequences of problems with the same structure, between calls of
+{\tt \packagename} procedures.
+This data should be preserved, untouched, from the initial call to
{\tt \packagename\_initialize}
to the final call to
{\tt \packagename\_terminate}.
@@ -1064,30 +1064,30 @@ \subsubsection{The derived data type for holding problem data}\label{typedata}
\galarguments
There are five procedures for user calls
-(see Section~\ref{galfeatures} for further features):
+(see Section~\ref{galfeatures} for further features):
\begin{enumerate}
-\item The subroutine {\tt \packagename\_initialize}
- is used to set default values, and initialize private data,
+\item The subroutine {\tt \packagename\_initialize}
+ is used to set default values, and initialize private data,
before presolving one or more problems with the
same sparsity and bound structure.
\item The subroutine {\tt packagename\_read\_specfile}
is used to read the {\tt packagename} specfile in order to
possibly modify the algoritmic default parameters (see
- Section~\ref{readspec}).
-\item The subroutine {\tt \packagename\_apply}
+ Section~\ref{readspec}).
+\item The subroutine {\tt \packagename\_apply}
is called to presolve the problem, that is to reduce it by applying
suitable problem transformations and permute it to standard form.
-\item The subroutine {\tt \packagename\_restore}
+\item The subroutine {\tt \packagename\_restore}
restores the (solved) reduced problem to the original definition
of variables and constraints;
-\item The subroutine {\tt \packagename\_terminate}
- is provided to allow the user to automatically deallocate array
- components of the private data, allocated by
- {\tt \packagename}, at the end of the solution process.
- It is important to do this if the data object is re-used for another
+\item The subroutine {\tt \packagename\_terminate}
+ is provided to allow the user to automatically deallocate array
+ components of the private data, allocated by
+ {\tt \packagename}, at the end of the solution process.
+ It is important to do this if the data object is re-used for another
problem {\bf with a different structure}
- since {\tt \packagename\_initialize} cannot test for this situation,
+ since {\tt \packagename\_initialize} cannot test for this situation,
and any existing associated targets will subsequently become unreachable.
\end{enumerate}
@@ -1103,24 +1103,24 @@ \subsubsection{The initialization subroutine}\label{subinit}
{\tt CALL \packagename\_initialize( control, inform, data )}
\begin{description}
-\itt{control} is a scalar \intentout\ argument of type
+\itt{control} is a scalar \intentout\ argument of type
{\tt \packagename\_control\_type}
-(see Section~\ref{typecontrol}).
+(see Section~\ref{typecontrol}).
On exit, {\tt control} contains default values for the components as
described in Section~\ref{typecontrol}.
-These values should only be changed after calling
+These values should only be changed after calling
{\tt \packagename\_initialize}.
-\itt{inform} is a scalar \intentout\ argument of type
-{\tt \packagename\_inform\_type} (see Section~\ref{typeinform}).
+\itt{inform} is a scalar \intentout\ argument of type
+{\tt \packagename\_inform\_type} (see Section~\ref{typeinform}).
A successful call to the routine {\tt \packagename\_initialize}
-is indicated when the component {\tt status} has the value 0.
+is indicated when the component {\tt status} has the value 0.
For other return values of {\tt status}, see Section~\ref{galerrors}.
-\itt{data} is a scalar \intentinout\ argument of type
+\itt{data} is a scalar \intentinout\ argument of type
{\tt \packagename\_data\_type}
-(see Section~\ref{typedata}). It is used to hold data about the problem being
-solved. It should never be altered by the user.
+(see Section~\ref{typedata}). It is used to hold data about the problem being
+solved. It should never be altered by the user.
\end{description}
%%%%%%%%% main presolving subroutine %%%%%%
@@ -1137,17 +1137,17 @@ \subsubsection{The subroutine that applies presolving transformations to the pro
Such a call must always be preceded by a call to {\tt \packagename\_initialize}.
\begin{description}
-\itt{problem} is a scalar \intentinout\ argument of type
+\itt{problem} is a scalar \intentinout\ argument of type
{\tt QPT\_problem\_type}
(see Section~\ref{typeprob})
-that contains the problem statement.
-It is used to hold data about the problem being solved.
+that contains the problem statement.
+It is used to hold data about the problem being solved.
Users are free to choose whichever
-of the three matrix formats described in Section~\ref{galmatrix}
+of the three matrix formats described in Section~\ref{galmatrix}
is appropriate for $\bmA$ and $\bmH$ for their application.
Some components of the problem structure need not be allocated or set on
input, in which case they will be assigned suitable default values.
-The components in question, their size and the associated default values
+The components in question, their size and the associated default values
are given in
Table~\ref{defvec}.
\bctable{|l|c|c|l|c|c|}
@@ -1188,35 +1188,35 @@ \subsubsection{The subroutine that applies presolving transformations to the pro
\noindent
On exit, the problem structure will contain the reduced problem, {\bf with its
-Hessian and Jacobian matrices stored in sparse row-wise format}.
+Hessian and Jacobian matrices stored in sparse row-wise format}.
Values for $\bmx$, $\bmz$, $\bmc$, $\bmy$ and $f$ will be provided, that are
feasible for the reduced problem. Note that frequently not
all the space allocated for the original problem is used by the
reduced one. However, crucial information that is necessary to restore the
problem to its original variables/constraints remains stored in the problem
structure, beyond that specified by the dimensions of the reduced problem.
-Thus modification (for instance by a QP algorithm) of the reduced problem data
+Thus modification (for instance by a QP algorithm) of the reduced problem data
is possible (except for {\tt problem\%X\_status} and {\tt problem\%C\_status},
which should always remain unchanged), but no other data within the problem
structure should be altered before calling {\tt \packagename\_restore}.
-\itt{control} is a scalar \intentinout\ argument of type
+\itt{control} is a scalar \intentinout\ argument of type
{\tt \packagename\_control\_type}
-(see Section~\ref{typecontrol}). Default values may be assigned by calling
-{\tt \packagename\_initialize} prior to the first call to
+(see Section~\ref{typecontrol}). Default values may be assigned by calling
+{\tt \packagename\_initialize} prior to the first call to
{\tt \packagename\_apply}.
\itt{inform} is a scalar \intentinout\ argument of type {\tt
-\packagename\_inform\_type}
+\packagename\_inform\_type}
(see Section~\ref{typeinform}). A successful call to the routine
{\tt \packagename\_apply}
-is indicated when the component {\tt status} has the value 0.
+is indicated when the component {\tt status} has the value 0.
For other return values of {\tt status}, see Section~\ref{galerrors}.
-\itt{data} is a scalar \intentinout\ argument of type
+\itt{data} is a scalar \intentinout\ argument of type
{\tt \packagename\_data\_type}
-(see Section~\ref{typedata}). It is used to hold data about the problem being
-solved. It must never be altered by the user since the last call to
+(see Section~\ref{typedata}). It is used to hold data about the problem being
+solved. It must never be altered by the user since the last call to
any of the {\tt \packagename} routines.
\end{description}
@@ -1238,9 +1238,9 @@ \subsubsection{The restoration subroutine}
Section~\ref{typecontrol}).
\begin{description}
-\itt{problem} is a scalar \intentinout\ argument of type
+\itt{problem} is a scalar \intentinout\ argument of type
{\tt QPT\_problem\_type}
-(see Section~\ref{typeprob}).
+(see Section~\ref{typeprob}).
On entry, it is used to hold data about the solved reduced problem. The values
of {\tt problem\%X\_status} and {\tt problem\%C\_status} should not have been
altered since the exit from {\tt \packagename\_apply}.
@@ -1252,23 +1252,23 @@ \subsubsection{The restoration subroutine}
components of the {\tt control} dummy argument (see
Section~\ref{typecontrol}).
-\itt{control} is a scalar \intentinout\ argument of type
+\itt{control} is a scalar \intentinout\ argument of type
{\tt \packagename\_control\_type}
(see Section~\ref{typecontrol}). In particular, its {\tt get\_*} components
specify which elements of the (solved) reduced problem must be restored to the
original formulation.
-\itt{inform} is a scalar \intentinout\ argument of type
+\itt{inform} is a scalar \intentinout\ argument of type
{\tt \packagename\_inform\_\_type}
(see Section~\ref{typeinform}). A successful call to the routine
{\tt \packagename\_restoire}
-is indicated when the component {\tt status} has the value 0.
+is indicated when the component {\tt status} has the value 0.
For other return values of {\tt status}, see Section~\ref{galerrors}.
-\itt{data} is a scalar \intentinout\ argument of type
+\itt{data} is a scalar \intentinout\ argument of type
{\tt \packagename\_data\_type}
-(see Section~\ref{typedata}). It is used to hold data about the problem being
-solved. It must not have been altered by the user since the last call to
+(see Section~\ref{typedata}). It is used to hold data about the problem being
+solved. It must not have been altered by the user since the last call to
any of the {\tt \packagename} routines.
\end{description}
@@ -1276,14 +1276,14 @@ \subsubsection{The restoration subroutine}
%%%%%%% termination subroutine %%%%%%
\subsubsection{The termination subroutine}
-All previously allocated workspace arrays are deallocated as follows:
+All previously allocated workspace arrays are deallocated as follows:
\vspace*{1mm}
\hspace{8mm}
{\tt CALL \packagename\_terminate( control, inform, data )}
\begin{description}
-\itt{control} is a scalar \intentin\ argument of type
+\itt{control} is a scalar \intentin\ argument of type
{\tt \packagename\_control\_type}
exactly as for
{\tt \packagename\_initialize}.
@@ -1293,14 +1293,14 @@ \subsubsection{The termination subroutine}
exactly as for
{\tt \packagename\_initialize}.
A successful call to {\tt \packagename\_terminate}
-is indicated when the component {\tt status} has the value 0.
+is indicated when the component {\tt status} has the value 0.
For other return values of {\tt status}, see Section~\ref{galerrors}.
-\itt{data} is a scalar \intentinout\ argument of type
-{\tt \packagename\_data\_type}
+\itt{data} is a scalar \intentinout\ argument of type
+{\tt \packagename\_data\_type}
exactly as for
{\tt \packagename\_solve},
-which must not have been altered by the user since the last call to
+which must not have been altered by the user since the last call to
{\tt \packagename\_initialize}.
On exit, array components will have been deallocated.
\end{description}
@@ -1309,16 +1309,16 @@ \subsubsection{The termination subroutine}
Note that a call to this routine is mandatory before {\tt \packagename\_apply}
is called for a new quadratic program whose structure differs from the current
one.
-
+
%%%%%%%%%%%%%%%%%%%%%% Warning and error messages %%%%%%%%%%%%%%%%%%%%%%%%
\galerrors
-A negative value of {\tt info\%status} on exit from
+A negative value of {\tt info\%status} on exit from
{\tt \packagename\_initialize},
{\tt \packagename\_read\_specfile},
{\tt \packagename\_apply},
{\tt \packagename\_restore},
-or
+or
{\tt \packagename\_terminate}
indicates that an error has occurred. No further calls should be made
to the four three of these routines until the error has been
@@ -1338,7 +1338,7 @@ \subsubsection{The termination subroutine}
\itt{~-2.} A file intended for saving problem transformations could not be
opened.
-\itt{~-3.} An input-output error occurred while saving transformations on
+\itt{~-3.} An input-output error occurred while saving transformations on
the relevant disk file.
\itt{~-4.} The machine/compiler only supports less than 8 bits in a
@@ -1369,13 +1369,13 @@ \subsubsection{The termination subroutine}
\itt{-29.} The dimension of the vector {\tt problem\%A\_ptr} containing the
addresses of the first entry of each Jacobian row is erroneously specified.
-\itt{-30.} The dimension of the vector {\tt problem\%A\_col} containing
+\itt{-30.} The dimension of the vector {\tt problem\%A\_col} containing
the column indices of the nonzero Jacobian entries is erroneously specified.
\itt{-31.} The dimension of the vector {\tt problem\%A\_row} containing the
row indices of the nonzero Jacobian entries is erroneously specified;
-\itt{-32.} The dimension of the vector {\tt problem\%X} of variables is
+\itt{-32.} The dimension of the vector {\tt problem\%X} of variables is
incompatible with the problem dimension {\tt problem\%n}.
\itt{-33.} The dimension of the vector {\tt problem\%X\_l} of lower bounds on
@@ -1384,7 +1384,7 @@ \subsubsection{The termination subroutine}
\itt{-34.} The dimension of the vector {\tt problem\%X\_u} of upper bounds on
the variables is incompatible with the problem dimension {\tt problem\%n}.
-\itt{-35.} The dimension of the vector {\tt problem\%Z} of dual variables is
+\itt{-35.} The dimension of the vector {\tt problem\%Z} of dual variables is
incompatible with the problem dimension {\tt problem\%n}.
\itt{-36.} The dimension of the vector {\tt problem\%Z\_l} of lower bounds on
@@ -1411,15 +1411,15 @@ \subsubsection{The termination subroutine}
\itt{-43.} The dimension of the vector {\tt problem\%Y\_u} of upper bounds on
the multipliers is incompatible with the problem dimension {\tt problem\%m}.
-\itt{-44.} The problem structure has not been set or has been
+\itt{-44.} The problem structure has not been set or has been
cleaned up before an attempt to apply {\tt \packagename\_apply}.
\itt{-45.} The problem has not been analyzed before an attempt to permute it.
-\itt{-46.} The problem has not been permuted or fully reduced
+\itt{-46.} The problem has not been permuted or fully reduced
before an attempt to restore it.
-\itt{-47.} The column indices of a row of the sparse Hessian are
+\itt{-47.} The column indices of a row of the sparse Hessian are
not in increasing order, in that they specify an entry above the diagonal.
\itt{-48.} One of the files containing saved problem transformations has been
@@ -1428,7 +1428,7 @@ \subsubsection{The termination subroutine}
\itt{-49.} The dimension of the vector {\tt problem\%X\_status} of
variables' status is incompatible with the problem dimension {\tt problem\%n}.
-\itt{-50.} The dimension of the vector {\tt problem\%C\_status} of
+\itt{-50.} The dimension of the vector {\tt problem\%C\_status} of
constraints' status is incompatible with the problem dimension
{\tt problem\%m}.
@@ -1459,12 +1459,12 @@ \subsubsection{The termination subroutine}
\itt{-58.} A dual variable whose value is nonzero because the
corresponding primal is at an artificial bound cannot
-be zeroed while maintaining dual feasibility
+be zeroed while maintaining dual feasibility
(in {\tt \packagename\_restore}). This can happen when $( \bmx, \bmy, \bmz )$
on input of this routine are not (sufficiently) optimal.
\itt{-60.} A keyword was not recognized in the analysis of the specification
-file.
+file.
\itt{-61.} A value was not recognized in the analysis of the specification file.
@@ -1493,7 +1493,7 @@ \subsubsection{The termination subroutine}
\itt{-71.} The vector {\tt problem\%H\_col} has not been allocated although
$\bmH$ is stored in row-wise sparse format or {\tt problem\%H\_ne} $> 0$ and
-$\bmH$ is stored sparse coordinate format.
+$\bmH$ is stored sparse coordinate format.
\itt{-72.} The vector {\tt problem\%H\_row} has not been allocated although
{\tt problem\%H\_ne} $> 0$ and $\bmH$ is stored in sparse coordinate format.
@@ -1507,31 +1507,31 @@ \subsubsection{The termination subroutine}
%%%%%%%%%%%%%%%%%%%%%% Further features %%%%%%%%%%%%%%%%%%%%%%%%
\galfeatures
-\noindent In this section, we describe an alternative means of setting
+\noindent In this section, we describe an alternative means of setting
control parameters, that is components of the variable {\tt control} of type
{\tt \packagename\_control\_type}
-(see Section~\ref{typecontrol}),
+(see Section~\ref{typecontrol}),
by reading an appropriate data specification file using the
subroutine {\tt \packagename\_read\_specfile}. This facility
-is useful as it allows a user to change {\tt \packagename} control parameters
+is useful as it allows a user to change {\tt \packagename} control parameters
without editing and recompiling programs that call {\tt \packagename}.
-A specification file, or specfile, is a data file containing a number of
-"specification commands". Each command occurs on a separate line,
-and comprises a "keyword",
-which is a string (in a close-to-natural language) used to identify a
-control parameter, and
+A specification file, or specfile, is a data file containing a number of
+"specification commands". Each command occurs on a separate line,
+and comprises a "keyword",
+which is a string (in a close-to-natural language) used to identify a
+control parameter, and
an (optional) "value", which defines the value to be assigned to the given
-control parameter. All keywords and values are case insensitive,
+control parameter. All keywords and values are case insensitive,
keywords may be preceded by one or more blanks but
values must not contain blanks, and
each value must be separated from its keyword by at least one blank.
-Values must not contain more than 30 characters, and
+Values must not contain more than 30 characters, and
each line of the specfile is limited to 80 characters,
including the blanks separating keyword and value.
The portion of the specification file used by {\tt \packagename\_read\_specfile}
-must start with a "{\tt BEGIN \packagename}" command and end with an
+must start with a "{\tt BEGIN \packagename}" command and end with an
"{\tt END}" command. The syntax of the specfile is thus defined as follows:
\begin{verbatim}
( .. lines ignored by PRESOLVE_read_specfile .. )
@@ -1539,12 +1539,12 @@ \subsubsection{The termination subroutine}
keyword value
....... .....
keyword value
- END
+ END
( .. lines ignored by PRESOLVE_read_specfile .. )
\end{verbatim}
where {\tt keyword} and {tt value} are two strings separated by (at least) one
blank. The ``{\tt BEGIN \packagename}'' and ``{\tt END}'' delimiter command
-lines may contain additional (trailing) strings so long as such strings are
+lines may contain additional (trailing) strings so long as such strings are
separated by one or more blanks, so that lines such as
\begin{verbatim}
BEGIN PRESOLVE SPECIFICATION
@@ -1556,22 +1556,22 @@ \subsubsection{The termination subroutine}
are acceptable. Furthermore, between the
``{\tt BEGIN \packagename}'' and ``{\tt END}'' delimiters,
specification commands may occur in any order. Blank lines and
-lines whose first non-blank character is {\tt !} or {\tt *} are ignored.
-The content of a line after a {\tt !} or {\tt *} character is also
+lines whose first non-blank character is {\tt !} or {\tt *} are ignored.
+The content of a line after a {\tt !} or {\tt *} character is also
ignored (as is the {\tt !} or {\tt *}
-character itself). This provides an easy manner to "comment out" some
-specification commands, or to comment specific values
-of certain control parameters.
+character itself). This provides an easy manner to "comment out" some
+specification commands, or to comment specific values
+of certain control parameters.
The value of a control parameters may be of five different types, namely
integer, logical, real, string or symbol.
Integer and real values may be expressed in any relevant Fortran integer and
floating-point formats (respectively). Permitted values for logical
-parameters are "{\tt ON}", "{\tt TRUE}", "{\tt .TRUE.}", "{\tt T}",
+parameters are "{\tt ON}", "{\tt TRUE}", "{\tt .TRUE.}", "{\tt T}",
"{\tt YES}", "{\tt Y}", or "{\tt OFF}", "{\tt NO}",
-"{\tt N}", "{\tt FALSE}", "{\tt .FALSE.}" and "{\tt F}".
+"{\tt N}", "{\tt FALSE}", "{\tt .FALSE.}" and "{\tt F}".
Empty values are also allowed for logical control parameters, and are
-interpreted as "{\tt TRUE}". String are specified as a sequence of characters.
+interpreted as "{\tt TRUE}". String are specified as a sequence of characters.
%A symbolic value is a special string obtained from one of the predefined
%symbols of the SYMBOLS module by deleting the leading {\tt GALAHAD\_}
%characters in its name. Thus, the specification command
@@ -1581,12 +1581,12 @@ \subsubsection{The termination subroutine}
%im plies that the value {\sym \galsymreducedsize} is assigned to {\tt
%control\%termination}. This technique is intended to help expressing an
%(integer) control parameter for an algorithm in a "language" that is close to
-%natural (see Section~\ref{galsymbols}).
+%natural (see Section~\ref{galsymbols}).
The specification file must be open for input when {\tt
\packagename\_read\_specfile} is called, and the associated device number
-passed to the routine in device (see below). Note that the corresponding
-file is {\tt REWIND}ed, which makes it possible to combine the specifications
+passed to the routine in device (see below). Note that the corresponding
+file is {\tt REWIND}ed, which makes it possible to combine the specifications
for more than one program/routine. For the same reason, the file is not
closed by {\tt \packagename\_read\_specfile}.
@@ -1594,7 +1594,7 @@ \subsubsection{To read control parameters from a specification file}
\label{readspec}
Control parameters may be read from a file as follows:
-\hskip0.5in
+\hskip0.5in
\def\baselinestretch{0.8} {\tt \begin{verbatim}
CALL PRESOLVE_read_specfile( device, control, inform )
\end{verbatim}}
@@ -1607,28 +1607,28 @@ \subsubsection{To read control parameters from a specification file}
not be altered and execution will continue, but an error message
will be printed on unit {\tt control\%error}.
-\itt{control} is a scalar \intentinout argument of type
-{\tt \packagename\_control\_type} (see Section~\ref{typecontrol}).
-Default values should have already been set, perhaps by calling
+\itt{control} is a scalar \intentinout argument of type
+{\tt \packagename\_control\_type} (see Section~\ref{typecontrol}).
+Default values should have already been set, perhaps by calling
{\tt \packagename\_initialize}. On exit, individual components of {\tt
control} may have been changed according to the commands found in the
specfile. Specfile commands and the component (see Section~\ref{typecontrol})
of {\tt control} that each affects are given in
Tables~\ref{specfile_1} and \ref{specfile_2}.
-\itt{inform} is a scalar \intentout\ argument of type
+\itt{inform} is a scalar \intentout\ argument of type
{\tt \packagename\_inform\_type} (see Section~\ref{typeinform}).
\end{description}
-\bctable{|l|l|l|}
+\bctable{|l|l|l|}
\hline
command & component of {\tt control} & value type \\
\hline
{\tt error-printout-device} & {\tt \%error} & integer \\
-{\tt printout-device} & {\tt \%out} & integer \\
+{\tt printout-device} & {\tt \%out} & integer \\
{\tt print-level} & {\tt \%print\_level} & integer \\
{\tt presolve-termination-strategy} & {\tt \%termination} & integer \\
-{\tt maximum-number-of-transformations} &
+{\tt maximum-number-of-transformations} &
{\tt \%max\_nbr\_transforms} & integer\\
{\tt maximum-number-of-passes} & {\tt \%max\_nbr\_passes} & integer \\
{\tt constraints-accuracy} & {\tt \%c\_accuracy} & real \\
@@ -1661,11 +1661,11 @@ \subsubsection{To read control parameters from a specification file}
{\tt inactive-dual-variables-value} & {\tt \%inactive\_z} & integer \\
{\tt primal-variables-bound-status} & {\tt \%final\_x\_bounds} & integer \\
\hline
-\ectable{\label{specfile_1}Specfile commands and associated
+\ectable{\label{specfile_1}Specfile commands and associated
components of {\tt control} .}
-\bctable{|l|l|l|}
+\bctable{|l|l|l|}
\hline
- command & component of {\tt control} & value type \\
+ command & component of {\tt control} & value type \\
\hline
{\tt dual-variables-bound-status} & {\tt \%final\_z\_bounds} & integer \\
{\tt constraints-bound-status} & {\tt \%final\_c\_bounds} & integer \\
@@ -1689,7 +1689,7 @@ \subsubsection{To read control parameters from a specification file}
{\tt compute-multipliers-values} & {\tt \%get\_y} & logical \\
{\tt compute-multipliers-bounds} & {\tt \%get\_y\_bounds} & logical \\
\hline
-\ectable{\label{specfile_2}Specfile commands and associated
+\ectable{\label{specfile_2}Specfile commands and associated
components of {\tt control} (continued).}
%%%%%%%%%%%%%%%%%%%%%% Information printed %%%%%%%%%%%%%%%%%%%%%%%%
@@ -1702,11 +1702,11 @@ \subsubsection{To read control parameters from a specification file}
\item[\sym \galsymtrace.] only the major steps in the analysis is
reported, that is headers of the main preprocessing phases and, for each pass,
the number of transformations of each type applied,
-\item[\sym \galsymaction.] in addition, reports the nature of each problem
+\item[\sym \galsymaction.] in addition, reports the nature of each problem
transformation,
-\item[\sym \galsymdetails.] in addition, reports more details on each of the
+\item[\sym \galsymdetails.] in addition, reports more details on each of the
main presolve loops
-constituents,
+constituents,
\item[\sym \galsymdebug.] reports considerable detail, including information on
unsuccessful attempts to apply presolving transformations,
\item[\sym \galsymcrazy.] reports a completely silly amount of information.
@@ -1718,28 +1718,28 @@ \subsubsection{To read control parameters from a specification file}
\galcommon None.
\galworkspace Provided automatically by the module.
-\galroutines None.
+\galroutines None.
\galmodules {\tt \packagename} calls the \galahad\ modules
-{\tt GALAHAD\_SMT}, {\tt GALAHAD\_QPT},
+{\tt GALAHAD\_SMT}, {\tt GALAHAD\_QPT},
{\tt GALAHAD\_SPECFILE}, {\tt GALAHAD\_SORT},
and {\tt GALAHAD\_SYMBOLS}.
\galio Output is under control of the arguments
{\tt control\%error}, {\tt control\%out} and {\tt control\%print\_level}.
-\galrestrictions {\tt prob\%n} $> 0$, {\tt prob\%m} $\geq 0$,
-{\tt prob\%A\_type} and {\tt prob\%H\_type} $\in \{${\tt 'DENSE'},
- {\tt 'COORDINATE'}, {\tt 'SPARSE\_BY\_ROWS'}$\}$.
-\galportability ISO Fortran~95 + TR 15581 or Fortran~2003.
+\galrestrictions {\tt prob\%n} $> 0$, {\tt prob\%m} $\geq 0$,
+{\tt prob\%A\_type} and {\tt prob\%H\_type} $\in \{${\tt 'DENSE'},
+ {\tt 'COORDINATE'}, {\tt 'SPARSE\_BY\_ROWS'}$\}$.
+\galportability ISO Fortran~95 + TR 15581 or Fortran~2003.
The package is thread-safe.
%%%%%%%%%%%%%%%%%%%%%% METHOD %%%%%%%%%%%%%%%%%%%%%%%%
\galmethod
-The required solution $\bmx$ of the problem necessarily satisfies
+The required solution $\bmx$ of the problem necessarily satisfies
the primal optimality conditions
\[
\bmA \bmx = \bmc
\]
-and
+and
\[
\bmc^{l} \leq \bmc \leq \bmc^{u}, \;\;
\bmx^{l} \leq \bmx \leq \bmx^{u},
@@ -1750,14 +1750,14 @@ \subsubsection{To read control parameters from a specification file}
\bmy = \bmy^{l} + \bmy^{u} \tim{and}
\bmz = \bmz^{l} + \bmz^{u},
\]
-and
+and
\[
\bmy^{l} \geq 0 , \;\;
\bmy^{u} \leq 0 , \;\;
\bmz^{l} \geq 0 \;\; \mbox{and} \;\;
\bmz^{u} \leq 0 ,
\]
-and the complementary slackness conditions
+and the complementary slackness conditions
\[
( \bmA \bmx - \bmc^{l} )^{T} \bmy^{l} = 0, \;\;
( \bmA \bmx - \bmc^{u} )^{T} \bmy^{u} = 0, \;\;
@@ -1768,7 +1768,7 @@ \subsubsection{To read control parameters from a specification file}
the general linear constraints, and the dual variables for the bounds,
respectively, and where the vector inequalities hold componentwise.
The purpose of presolving is to exploit these equations in order to reduce the
-problem to the standard form defined as follows:
+problem to the standard form defined as follows:
\begin{itemize}
\item The variables are ordered so that their bounds appear in the order
\begin{center}
@@ -1782,8 +1782,8 @@ \subsubsection{To read control parameters from a specification file}
\end{tabular}
\end{center}
-Fixed variables are removed. Within each category, the variables
-are further ordered so that those with non-zero diagonal Hessian
+Fixed variables are removed. Within each category, the variables
+are further ordered so that those with non-zero diagonal Hessian
entries occur before the remainder.
\item
@@ -1798,13 +1798,13 @@ \subsubsection{To read control parameters from a specification file}
non-positivity & & & $\bmA \bmx$ & $\leq$ & 0 \\
\end{tabular}
\end{center}
-Free constraints are removed.
+Free constraints are removed.
\item
In addition, constraints may be removed or bounds tightened, to reduce the
size of the feasible region or simplify the problem if this is possible, and
-bounds may be tightened on the dual variables and the multipliers
-associated with the problem.
+bounds may be tightened on the dual variables and the multipliers
+associated with the problem.
\end{itemize}
The presolving algorithm proceeds by applying a (potentially long) series of
@@ -1821,9 +1821,9 @@ \subsubsection{To read control parameters from a specification file}
\item attempt to exploit the presence of linear singleton columns,
\item attempt to exploit the presence of linear doubleton columns,
\item complete the analysis of the dual constraints,
-\item remove empty and singletons rows,
+\item remove empty and singletons rows,
\item possibly remove dependent variables,
-\item analyze the primal constraints,
+\item analyze the primal constraints,
\item try to make $A$ sparser by combining its rows,
\item check the current status of the variables, dual variables
and multipliers.
@@ -1852,9 +1852,9 @@ \subsubsection{To read control parameters from a specification file}
\vspace*{0.2cm}
\noindent
-\fwbox{initialize}
+\fwbox{initialize}
$\rightarrow$ $\bigg[$ \fwbox{apply transformations}
-$\rightarrow$ (solve problem)
+$\rightarrow$ (solve problem)
$\rightarrow$ \fwbox{restore} $\bigg]$
$\rightarrow$ \fwbox{terminate}
\vspace*{0.2cm}
@@ -1863,10 +1863,10 @@ \subsubsection{To read control parameters from a specification file}
\vspace*{0.2cm}
\noindent
-\fwbox{initialize}
-$\rightarrow$ $\bigg[$ \fwbox{read specfile}
+\fwbox{initialize}
+$\rightarrow$ $\bigg[$ \fwbox{read specfile}
$\rightarrow$ \fwbox{apply transformations}
-$\rightarrow$ (solve problem)
+$\rightarrow$ (solve problem)
$\rightarrow$ \fwbox{restore} $\bigg]$
$\rightarrow$ \fwbox{terminate}
\vspace*{0.2cm}
@@ -1885,22 +1885,22 @@ \subsubsection{To read control parameters from a specification file}
applied to a problem with a different structure.
Note that the values of the multipliers and dual variables (and thus of
-their respective bounds) depend on the functional form assumed for the
+their respective bounds) depend on the functional form assumed for the
Lagrangian function associated with the problem. This form is given by
\[
-L( \bmx, \bmy, \bmz ) =
+L( \bmx, \bmy, \bmz ) =
q( \bmx ) - {\tt y\_sign} * \bmy^T ( \bmA \bmx - \bmc ) - {\tt z\_sign} * \bmz,
\]
(considering only active constraints $\bmA \bmx = \bmc$), where the parameters
{\tt y\_sign} and {\tt z\_sign} are +1 or -1 and can be chosen by the user.
Thus, if {\tt y\_sign = +1}, the multipliers associated to active constraints
originally posed as inequalities are non-negative if the inequality is a lower
-bound and non-positive if it is an upper bound. Obvioulsy they are not
-constrained in sign for constraints originally posed as equalities. These
-sign conventions are reversed if {\tt y\_sign = -1}.
+bound and non-positive if it is an upper bound. Obvioulsy they are not
+constrained in sign for constraints originally posed as equalities. These
+sign conventions are reversed if {\tt y\_sign = -1}.
Similarly, if {\tt z\_sign = +1}, the dual variables associated to active
bounds are non-negative if the original bound is an lower bound, non-positive
-if it is an upper bound, or unconstrained in sign if the variables is fixed;
+if it is an upper bound, or unconstrained in sign if the variables is fixed;
and this convention is reversed in {\tt z\_sign = -1}. The values of {\tt
z\_sign} and {\tt y\_sign} may be chosen by setting the corresponding
components of the {\tt control} structure to {\sym \galsympositive} or {\sym
@@ -1927,7 +1927,7 @@ \subsubsection{To read control parameters from a specification file}
\galexample
Suppose that we wish to solve the quadratic program
-(\ref{objqp})--(\ref{vbqp}) with the data $n = 6$, $m = 5$, $f = 1$,
+(\ref{objqp})--(\ref{vbqp}) with the data $n = 6$, $m = 5$, $f = 1$,
$\bmg = ( 1 \; 1 \; 1 \; 1 \; 1 \; 1)^T$,
\[
\bmH =\left(\begin{array}{cccccc}
@@ -1946,13 +1946,13 @@ \subsubsection{To read control parameters from a specification file}
0 & 0 & 1 & 0 & 0 & 1 \\
0 & 0 & 0 & 1 & 1 & 1 \\
\end{array}\right),
-\]
-$\bmx^l = ( 0\; 0\; 0\; 0\; 0\; 0 )^T$,
-$\bmx^u = ( 1 \; 1 \; 1 \; 1 \; 1 \; 1 )^T$,
-$\bmc^l = ( 0 \; 0 \; 2 \; 1 \; 3 )^T$ and
+\]
+$\bmx^l = ( 0\; 0\; 0\; 0\; 0\; 0 )^T$,
+$\bmx^u = ( 1 \; 1 \; 1 \; 1 \; 1 \; 1 )^T$,
+$\bmc^l = ( 0 \; 0 \; 2 \; 1 \; 3 )^T$ and
$\bmc^u = ( 1 \; 1 \; 3 \; 3 \; 3 )^T$,
using the quadratic programming solver {\tt QPSOLVER} after applying
-the {\tt \packagename} package and then restoring the final solution to the
+the {\tt \packagename} package and then restoring the final solution to the
original
variable formulation. We may use the following code---note that we require
some output from {\tt \packagename} by setting {\tt control\%print\_level} to
@@ -1976,7 +1976,7 @@ \subsubsection{To read control parameters from a specification file}
TYPE ( PRESOLVE_data_type ) :: data
INTEGER :: j, n, m, a_ne, h_ne
! start problem data
- n = 6; m = 5; h_ne = 1; a_ne = 8
+ n = 6; m = 5; h_ne = 1; a_ne = 8
problem%new_problem_structure = .TRUE.
problem%n = n; problem%m = m; problem%f = r1
ALLOCATE( problem%G( n ) , problem%X_l( n ), problem%X_u( n ) )
@@ -2002,8 +2002,8 @@ \subsubsection{To read control parameters from a specification file}
problem%a_ne = a_ne; problem%h_ne = h_ne
! problem data complete
! write the original formulation
- CALL QPT_write_problem( 6, problem )
-! set the default PRESOLVE control parameters
+ CALL QPT_write_problem( 6, problem )
+! set the default PRESOLVE control parameters
CALL PRESOLVE_initialize( control, inform, data )
IF ( inform%status /= 0 ) STOP
control%print_level = 1 ! Ask for some output
@@ -2011,9 +2011,9 @@ \subsubsection{To read control parameters from a specification file}
CALL PRESOLVE_apply( problem, control, inform, data )
IF ( inform%status /= 0 ) STOP
! write the reduced problem
- CALL QPT_write_problem( 6, problem )
+ CALL QPT_write_problem( 6, problem )
! solve the reduced problem
- ! CALL QPSOLVER (unnecessary here, because the reduced problem has a
+ ! CALL QPSOLVER (unnecessary here, because the reduced problem has a
! single feasible point in this example)
! restore the solved reduced problem to the original formulation
CALL PRESOLVE_restore( problem, control, inform, data )
@@ -2032,36 +2032,36 @@ \subsubsection{To read control parameters from a specification file}
This produces the following output:
{\tt \small
\begin{verbatim}
-
+
=============== PROBLEM =====================
-
+
n = 6
-
- variables
-
+
+ variables
+
lower upper
-
+
x( 1) = -3.0000E+00 3.0000E+00
x( 2) = 0.0000E+00 1.0000E+00
x( 3) = 0.0000E+00 1.0000E+00
x( 4) = 0.0000E+00 1.0000E+00
x( 5) = 0.0000E+00 1.0000E+00
x( 6) = 0.0000E+00 1.0000E+00
-
+
m = 5
-
- constraints
-
+
+ constraints
+
lower upper
-
+
c( 1) = 0.0000E+00 1.0000E+00
c( 2) = 0.0000E+00 1.0000E+00
c( 3) = 2.0000E+00 3.0000E+00
c( 4) = 1.0000E+00 3.0000E+00
c( 5) = 3.0000E+00 3.0000E+00
-
- Jacobian
-
+
+ Jacobian
+
A( 3, 3) = 1.0000E+00
A( 3, 4) = 1.0000E+00
A( 3, 5) = 1.0000E+00
@@ -2070,27 +2070,27 @@ \subsubsection{To read control parameters from a specification file}
A( 5, 4) = 1.0000E+00
A( 5, 5) = 1.0000E+00
A( 5, 6) = 1.0000E+00
-
-
+
+
objective function constant term = 1.0000E+00
-
-
- gradient
-
+
+
+ gradient
+
g( 1) = 1.0000E+00
g( 2) = 1.0000E+00
g( 3) = 1.0000E+00
g( 4) = 1.0000E+00
g( 5) = 1.0000E+00
g( 6) = 1.0000E+00
-
- Hessian
-
+
+ Hessian
+
H( 1, 1) = 1.0000E+00
-
+
============ END OF PROBLEM =================
-
-
+
+
********************************************
* *
* GALAHAD presolve for QPs *
@@ -2098,16 +2098,16 @@ \subsubsection{To read control parameters from a specification file}
* problem analysis *
* *
********************************************
-
-
+
+
============ starting problem analysis ============
-
+
checking bounds on x, y, z, and c: 0 transformations
redundant variables and constraints: 0 transformations
============= main processing loop 1 =============
( n = 6 , m = 5 , a_ne = 8 , h_ne = 1 )
-
+
removing empty and singleton rows: 2 transformations
analyzing special linear columns: 3 transformations
analyzing dual constraints: 0 transformations
@@ -2115,37 +2115,37 @@ \subsubsection{To read control parameters from a specification file}
checking dependent variables: 2 transformations
analyzing primal constraints: 5 transformations
checking bounds on x, y, z, and c: 0 transformations
-
+
============= main processing loop 2 =============
( n = 1 , m = 2 , a_ne = 2 , h_ne = 0 )
-
+
removing empty and singleton rows: 2 transformations
analyzing special linear columns: 2 transformations
-
+
======== end of the main processing loop ( loop = 2 ) ========
-
+
all variables and constraints have been eliminated!
-
+
No permutation necessary.
-
+
******************** Bye *******************
-
-
+
+
=============== PROBLEM =====================
-
+
n = 0
-
+
m = 0
-
+
current objective function value = 3.5000E+00
-
-
+
+
objective function constant term = 3.5000E+00
-
-
+
+
============ END OF PROBLEM =================
-
-
+
+
********************************************
* *
* GALAHAD PRESOLVE for QPs *
@@ -2153,25 +2153,25 @@ \subsubsection{To read control parameters from a specification file}
* problem restoration *
* *
********************************************
-
+
verifying user-defined presolve control parameters
=== starting historical loop
=== end of the historical loop
-
+
Problem successfully restored.
-
+
******************** Bye *******************
-
-
+
+
The problem solution X is
-
+
x(1) = -1.0000E+00
x(2) = 0.0000E+00
x(3) = 0.0000E+00
x(4) = 1.0000E+00
x(5) = 1.0000E+00
x(6) = 1.0000E+00
-
+
********************************************
* *
* GALAHAD PRESOLVE for QPs *
@@ -2179,15 +2179,15 @@ \subsubsection{To read control parameters from a specification file}
* workspace cleanup *
* *
********************************************
-
-
-
+
+
+
******************** Bye *******************
-
+
\end{verbatim}
}
\noindent
-The same problem may be solved holding the data in
+The same problem may be solved holding the data in
a sparse row-wise storage format by replacing the lines
{\tt \small
\begin{verbatim}
@@ -2243,8 +2243,8 @@ \subsubsection{To read control parameters from a specification file}
respectively.
(If instead $\bmH$ had been the diagonal matrix
\disp{\bmH = \mat{ccc}{1 & & \\ & 0 & \\ & & 3}}
-but the other data is as before, the diagonal storage scheme
-might be used for $\bmH$, and in this case we would instead
+but the other data is as before, the diagonal storage scheme
+might be used for $\bmH$, and in this case we would instead
{\tt \small
\begin{verbatim}
CALL SMT_put( prob%H%type, 'DIAGONAL' ) ! Specify dense storage for H
@@ -2284,4 +2284,3 @@ \subsubsection{To read control parameters from a specification file}
\end{verbatim}
}
\end{document}
-
diff --git a/include/galahad_cqp.h b/include/galahad_cqp.h
index 98dee70b23..51c71e97df 100644
--- a/include/galahad_cqp.h
+++ b/include/galahad_cqp.h
@@ -16,7 +16,7 @@
*/
/*! \mainpage GALAHAD C package cqp
-
+
\section cqp_intro Introduction
\subsection cqp_purpose Purpose
@@ -30,7 +30,7 @@
\n
\endmanonly
or the shifted least-distance problem
- \f[\mbox{minimize}\;\; \frac{1}{2} \sum_{j=1}^n w_j^2 ( x_j - x_j^0 )^2
+ \f[\mbox{minimize}\;\; \frac{1}{2} \sum_{j=1}^n w_j^2 ( x_j - x_j^0 )^2
+ g^T x + f \f]
\manonly
\n
@@ -51,7 +51,7 @@
x_j^l \[<=] x_j \[<=] x_j^u, j = 1, ... , n,
\n
\endmanonly
- where the \f$n\f$ by \f$n\f$ symmetric, positive-semi-definite matrix
+ where the \f$n\f$ by \f$n\f$ symmetric, positive-semi-definite matrix
\f$H\f$, the vectors \f$g\f$, \f$w\f$, \f$x^0\f$,
\f$a_i\f$, \f$c^l\f$, \f$c^u\f$, \f$x^l\f$,
\f$x^u\f$ and the scalar \f$f\f$ are given.
@@ -61,7 +61,7 @@
or the matrix \f$A\f$ of vectors \f$a_i\f$.
\subsection cqp_authors Authors
- N. I. M. Gould and D. P. Robinson, STFC-Rutherford Appleton Laboratory,
+ N. I. M. Gould and D. P. Robinson, STFC-Rutherford Appleton Laboratory,
England.
C interface, additionally J. Fowkes, STFC-Rutherford Appleton Laboratory.
@@ -77,7 +77,7 @@
Primal-dual interior point methods iterate towards a point
that satisfies these conditions by ultimately aiming to satisfy
(1a), (2a) and (3), while ensuring that (1b) and (2b) are
- satisfied as strict inequalities at each stage. Appropriate norms of the
+ satisfied as strict inequalities at each stage. Appropriate norms of the
amounts by which (1a), (2a) and (3) fail to be satisfied are known as the
primal and dual infeasibility, and the violation of complementary slackness,
respectively. The fact that (1b) and (2b) are satisfied as strict
@@ -113,8 +113,8 @@
weights are nonzero or when every variable is bounded (at least one side),
but may be inefficient if any of the columns of \f$A\f$ is too dense.
- Optionally, the problem may be pre-processed temporarily to eliminate
- dependent constraints using the GALAHAD package FDC. This may
+ Optionally, the problem may be pre-processed temporarily to eliminate
+ dependent constraints using the GALAHAD package FDC. This may
improve the performance of the subsequent iteration.
\subsection cqp_references Reference
@@ -122,37 +122,37 @@
The basic algorithm is a generalisation of those of
Y. Zhang (1994),
- On the convergence of a class of infeasible interior-point methods for the
+ On the convergence of a class of infeasible interior-point methods for the
horizontal linear complementarity problem,
SIAM J. Optimization 4(1) 208-227,
and
G. Zhao and J. Sun (1999).
- On the rate of local convergence of high-order infeasible path-following
+ On the rate of local convergence of high-order infeasible path-following
algorithms for the \f$P_\ast\f$ linear complementarity problems,
Computational Optimization and Applications 14(1) 293-307,
with many enhancements described by
N. I. M. Gould, D. Orban and D. P. Robinson (2013).
- Trajectory-following methods for large-scale degenerate convex quadratic
+ Trajectory-following methods for large-scale degenerate convex quadratic
programming,
Mathematical Programming Computation 5(2) 113-142.
\subsection cqp_call_order Call order
- To solve a given problem, functions from the cqp package must be called
+ To solve a given problem, functions from the cqp package must be called
in the following order:
- \link cqp_initialize \endlink - provide default control parameters and
set up initial data structures
- - \link cqp_read_specfile \endlink (optional) - override control values
+ - \link cqp_read_specfile \endlink (optional) - override control values
by reading replacement values from a file
- \link cqp_import \endlink - set up problem data structures and fixed
values
- - \link cqp_reset_control \endlink (optional) - possibly change control
+ - \link cqp_reset_control \endlink (optional) - possibly change control
parameters if a sequence of problems are being solved
- - solve the problem by calling one of
+ - solve the problem by calling one of
- \link cqp_solve_qp \endlink - solve the quadratic program
- \link cqp_solve_sldqp \endlink - solve the shifted least-distance problem
- \link cqp_information \endlink (optional) - recover information about
@@ -171,32 +171,32 @@
\subsection main_unsymmetric_matrices Unsymmetric matrix storage formats
- The unsymmetric \f$m\f$ by \f$n\f$ constraint matrix \f$A\f$ may be presented
+ The unsymmetric \f$m\f$ by \f$n\f$ constraint matrix \f$A\f$ may be presented
and stored in a variety of convenient input formats.
Both C-style (0 based) and fortran-style (1-based) indexing is allowed.
- Choose \c control.f_indexing as \c false for C style and \c true for
+ Choose \c control.f_indexing as \c false for C style and \c true for
fortran style; the discussion below presumes C style, but add 1 to
indices for the corresponding fortran version.
Wrappers will automatically convert between 0-based (C) and 1-based
(fortran) array indexing, so may be used transparently from C. This
conversion involves both time and memory overheads that may be avoided
- by supplying data that is already stored using 1-based indexing.
+ by supplying data that is already stored using 1-based indexing.
\subsubsection unsymmetric_matrix_dense Dense storage format
- The matrix \f$A\f$ is stored as a compact dense matrix by rows, that is,
+ The matrix \f$A\f$ is stored as a compact dense matrix by rows, that is,
the values of the entries of each row in turn are
stored in order within an appropriate real one-dimensional array.
In this case, component \f$n \ast i + j\f$ of the storage array A_val
- will hold the value \f$A_{ij}\f$ for \f$0 \leq i \leq m-1\f$,
+ will hold the value \f$A_{ij}\f$ for \f$0 \leq i \leq m-1\f$,
\f$0 \leq j \leq n-1\f$.
\subsubsection unsymmetric_matrix_coordinate Sparse co-ordinate storage format
Only the nonzero entries of the matrices are stored.
For the \f$l\f$-th entry, \f$0 \leq l \leq ne-1\f$, of \f$A\f$,
- its row index i, column index j
- and value \f$A_{ij}\f$,
+ its row index i, column index j
+ and value \f$A_{ij}\f$,
\f$0 \leq i \leq m-1\f$, \f$0 \leq j \leq n-1\f$, are stored as
the \f$l\f$-th components of the integer arrays A_row and
A_col and real array A_val, respectively, while the number of nonzeros
@@ -208,7 +208,7 @@
in row i+1. For the i-th row of \f$A\f$ the i-th component of the
integer array A_ptr holds the position of the first entry in this row,
while A_ptr(m) holds the total number of entries plus one.
- The column indices j, \f$0 \leq j \leq n-1\f$, and values
+ The column indices j, \f$0 \leq j \leq n-1\f$, and values
\f$A_{ij}\f$ of the nonzero entries in the i-th row are stored in components
l = A_ptr(i), \f$\ldots\f$, A_ptr(i+1)-1, \f$0 \leq i \leq m-1\f$,
of the integer array A_col, and real array A_val, respectively.
@@ -217,18 +217,18 @@
\subsection main_symmetric_matrices Symmetric matrix storage formats
- Likewise, the symmetric \f$n\f$ by \f$n\f$ objective Hessian matrix
- \f$H\f$ may be presented
- and stored in a variety of formats. But crucially symmetry is exploited
- by only storing values from the lower triangular part
+ Likewise, the symmetric \f$n\f$ by \f$n\f$ objective Hessian matrix
+ \f$H\f$ may be presented
+ and stored in a variety of formats. But crucially symmetry is exploited
+ by only storing values from the lower triangular part
(i.e, those entries that lie on or below the leading diagonal).
\subsubsection symmetric_matrix_dense Dense storage format
- The matrix \f$H\f$ is stored as a compact dense matrix by rows, that is,
+ The matrix \f$H\f$ is stored as a compact dense matrix by rows, that is,
the values of the entries of each row in turn are
stored in order within an appropriate real one-dimensional array.
Since \f$H\f$ is symmetric, only the lower triangular part (that is the part
- \f$h_{ij}\f$ for \f$0 \leq j \leq i \leq n-1\f$) need be held.
+ \f$h_{ij}\f$ for \f$0 \leq j \leq i \leq n-1\f$) need be held.
In this case the lower triangle should be stored by rows, that is
component \f$i \ast i / 2 + j\f$ of the storage array H_val
will hold the value \f$h_{ij}\f$ (and, by symmetry, \f$h_{ji}\f$)
@@ -237,7 +237,7 @@
\subsubsection symmetric_matrix_coordinate Sparse co-ordinate storage format
Only the nonzero entries of the matrices are stored.
For the \f$l\f$-th entry, \f$0 \leq l \leq ne-1\f$, of \f$H\f$,
- its row index i, column index j
+ its row index i, column index j
and value \f$h_{ij}\f$, \f$0 \leq j \leq i \leq n-1\f$, are stored as
the \f$l\f$-th components of the integer arrays H_row and
H_col and real array H_val, respectively, while the number of nonzeros
@@ -250,7 +250,7 @@
in row i+1. For the i-th row of \f$H\f$ the i-th component of the
integer array H_ptr holds the position of the first entry in this row,
while H_ptr(n) holds the total number of entries plus one.
- The column indices j, \f$0 \leq j \leq i\f$, and values
+ The column indices j, \f$0 \leq j \leq i\f$, and values
\f$h_{ij}\f$ of the entries in the i-th row are stored in components
l = H_ptr(i), \f$\ldots\f$, H_ptr(i+1)-1 of the
integer array H_col, and real array H_val, respectively.
@@ -259,8 +259,8 @@
its predecessor.
\subsubsection symmetric_matrix_diagonal Diagonal storage format
- If \f$H\f$ is diagonal (i.e., \f$H_{ij} = 0\f$ for all
- \f$0 \leq i \neq j \leq n-1\f$) only the diagonals entries
+ If \f$H\f$ is diagonal (i.e., \f$H_{ij} = 0\f$ for all
+ \f$0 \leq i \neq j \leq n-1\f$) only the diagonals entries
\f$H_{ii}\f$, \f$0 \leq i \leq n-1\f$ need
be stored, and the first n components of the array H_val may be
used for the purpose.
@@ -288,7 +288,7 @@ extern "C" {
#endif
// include guard
-#ifndef GALAHAD_CQP_H
+#ifndef GALAHAD_CQP_H
#define GALAHAD_CQP_H
// precision
@@ -321,9 +321,9 @@ struct cqp_control_type {
/// \brief
/// the level of output required is specified by print_level
- /// \li \f$\leq\f$ 0 gives no output,
- /// \li = 1 gives a one-line summary for every iteration,
- /// \li = 2 gives a summary of the inner iteration for each iteration,
+ /// \li \f$\leq\f$ 0 gives no output,
+ /// \li = 1 gives a one-line summary for every iteration,
+ /// \li = 2 gives a summary of the inner iteration for each iteration,
/// \li \f$\geq\f$ 3 gives increasingly verbose (debugging) output
int print_level;
@@ -364,10 +364,10 @@ struct cqp_control_type {
/// \li 1 primal indicator: a constraint is active if and only if
/// the distance to its nearest bound \f$\leq\f$ .indicator_p_tol
/// \li 2 primal-dual indicator: a constraint is active if and only if
- /// the distance to its nearest bound \f$\leq\f$
+ /// the distance to its nearest bound \f$\leq\f$
/// .indicator_tol_pd * size of corresponding multiplier
/// \li 3 primal-dual indicator: a constraint is active if and only if
- /// the distance to its nearest bound \f$\leq\f$
+ /// the distance to its nearest bound \f$\leq\f$
/// .indicator_tol_tapia * distance to same bound at previous iteration
int indicator_type;
@@ -376,7 +376,7 @@ struct cqp_control_type {
/// to the solution. Possible values are
/// \li 1 the Zhang linear residual trajectory
/// \li 2 the Zhao-Sun quadratic residual trajectory
- /// \li 3 the Zhang arc ultimately switching to the Zhao-Sun residual
+ /// \li 3 the Zhang arc ultimately switching to the Zhao-Sun residual
/// trajectory
/// \li 4 the mixed linear-quadratic residual trajectory
/// \li 5 the Zhang arc ultimately switching to the mixed linear-quadratic
@@ -402,7 +402,7 @@ struct cqp_control_type {
real_wp_ infinity;
/// \brief
- /// the required absolute and relative accuracies for the primal
+ /// the required absolute and relative accuracies for the primal
/// infeasibility
real_wp_ stop_abs_p;
/// see stop_abs_p
@@ -425,12 +425,12 @@ struct cqp_control_type {
real_wp_ perturb_h;
/// \brief
- /// initial primal variables will not be closer than .prfeas from their
+ /// initial primal variables will not be closer than .prfeas from their
/// bounds
real_wp_ prfeas;
/// \brief
- /// initial dual variables will not be closer than .dufeas from their
+ /// initial dual variables will not be closer than .dufeas from their
/// bounds
real_wp_ dufeas;
@@ -456,7 +456,7 @@ struct cqp_control_type {
/// \brief
/// if the overall infeasibility of the problem is not reduced by at least
- /// a factor .reduce_infeas over .infeas_max iterations, the problem is
+ /// a factor .reduce_infeas over .infeas_max iterations, the problem is
/// flagged as infeasible (see infeas_max)
real_wp_ reduce_infeas;
@@ -472,8 +472,8 @@ struct cqp_control_type {
real_wp_ potential_unbounded;
/// \brief
- /// any pair of constraint bounds \f$(c_l,c_u)\f$ or \f$(x_l,x_u)\f$ that
- /// are closer than .identical_bounds_tol will be reset to the average
+ /// any pair of constraint bounds \f$(c_l,c_u)\f$ or \f$(x_l,x_u)\f$ that
+ /// are closer than .identical_bounds_tol will be reset to the average
/// of their values
real_wp_ identical_bounds_tol;
@@ -483,19 +483,19 @@ struct cqp_control_type {
/// \brief
/// if .indicator_type = 1, a constraint/bound will be
- /// deemed to be active if and only if the distance to its nearest
+ /// deemed to be active if and only if the distance to its nearest
/// bound \f$\leq\f$ .indicator_p_tol
real_wp_ indicator_tol_p;
/// \brief
/// if .indicator_type = 2, a constraint/bound will be deemed to be active
- /// if and only if the distance to its nearest bound \f$\leq\f$
+ /// if and only if the distance to its nearest bound \f$\leq\f$
/// .indicator_tol_pd * size of corresponding multiplier
real_wp_ indicator_tol_pd;
/// \brief
/// if .indicator_type = 3, a constraint/bound will be deemed to be active
- /// if and only if the distance to its nearest bound \f$\leq\f$
+ /// if and only if the distance to its nearest bound \f$\leq\f$
/// .indicator_tol_tapia * distance to same bound at previous iteration
real_wp_ indicator_tol_tapia;
@@ -632,7 +632,7 @@ struct cqp_time_type {
real_wp_ find_dependent;
/// \brief
- /// the CPU time spent analysing the required matrices prior to
+ /// the CPU time spent analysing the required matrices prior to
/// factorization
real_wp_ analyse;
@@ -657,7 +657,7 @@ struct cqp_time_type {
real_wp_ clock_find_dependent;
/// \brief
- /// the clock time spent analysing the required matrices prior to
+ /// the clock time spent analysing the required matrices prior to
/// factorization
real_wp_ clock_analyse;
@@ -792,7 +792,7 @@ struct cqp_inform_type {
// *-*-*-*-*-*-*-*-*-*- C Q P _ I N I T I A L I Z E -*-*-*-*-*-*-*-*-*
-void cqp_initialize( void **data,
+void cqp_initialize( void **data,
struct cqp_control_type *control,
int *status );
@@ -801,7 +801,7 @@ void cqp_initialize( void **data,
@param[in,out] data holds private internal data
- @param[out] control is a struct containing control information
+ @param[out] control is a struct containing control information
(see cqp_control_type)
@param[out] status is a scalar variable of type int, that gives
@@ -811,18 +811,18 @@ void cqp_initialize( void **data,
// *-*-*-*-*-*-*-*-*- C Q P _ R E A D _ S P E C F I L E -*-*-*-*-*-*-*
-void cqp_read_specfile( struct cqp_control_type *control,
+void cqp_read_specfile( struct cqp_control_type *control,
const char specfile[] );
/*!<
- Read the content of a specification file, and assign values associated
+ Read the content of a specification file, and assign values associated
with given keywords to the corresponding control parameters.
By default, the spcification file will be named RUNCQP.SPC and
lie in the current directory.
Refer to Table 2.1 in the fortran documentation provided in
$GALAHAD/doc/cqp.pdf for a list of keywords that may be set.
- @param[in,out] control is a struct containing control information
+ @param[in,out] control is a struct containing control information
(see cqp_control_type)
@param[in] specfile is a character string containing the name of
@@ -836,19 +836,19 @@ void cqp_import( struct cqp_control_type *control,
int *status,
int n,
int m,
- const char H_type[],
- int H_ne,
+ const char H_type[],
+ int H_ne,
const int H_row[],
- const int H_col[],
+ const int H_col[],
const int H_ptr[],
- const char A_type[],
- int A_ne,
+ const char A_type[],
+ int A_ne,
const int A_row[],
- const int A_col[],
+ const int A_col[],
const int A_ptr[] );
/*!<
- Import problem data into internal storage prior to solution.
+ Import problem data into internal storage prior to solution.
@param[in] control is a struct whose members provide control
paramters for the remaining prcedures (see cqp_control_type)
@@ -858,21 +858,21 @@ void cqp_import( struct cqp_control_type *control,
@param[in,out] status is a scalar variable of type int, that gives
the exit status from the package. Possible values are:
\li 0. The import was succesful
- \li -1. An allocation error occurred. A message indicating the
- offending array is written on unit control.error, and the
- returned allocation status and a string containing the name
- of the offending array are held in inform.alloc_status and
+ \li -1. An allocation error occurred. A message indicating the
+ offending array is written on unit control.error, and the
+ returned allocation status and a string containing the name
+ of the offending array are held in inform.alloc_status and
inform.bad_alloc respectively.
- \li -2. A deallocation error occurred. A message indicating the
- offending array is written on unit control.error and the
+ \li -2. A deallocation error occurred. A message indicating the
+ offending array is written on unit control.error and the
returned allocation status and a string containing the
- name of the offending array are held in
+ name of the offending array are held in
inform.alloc_status and inform.bad_alloc respectively.
\li -3. The restrictions n > 0 or m > 0 or requirement that a type contains
its relevant string 'dense', 'coordinate', 'sparse_by_rows',
'diagonal', 'scaled_identity', 'identity', 'zero' or 'none'
has been violated.
- \li -23. An entry from the strict upper triangle of \f$H\f$ has been
+ \li -23. An entry from the strict upper triangle of \f$H\f$ has been
specified.
@param[in] n is a scalar variable of type int, that holds the number of
@@ -882,25 +882,25 @@ void cqp_import( struct cqp_control_type *control,
general linear constraints.
@param[in] H_type is a one-dimensional array of type char that specifies the
- \link main_symmetric_matrices symmetric storage scheme \endlink
- used for the Hessian, \f$H\f$. It should be one of 'coordinate',
+ \link main_symmetric_matrices symmetric storage scheme \endlink
+ used for the Hessian, \f$H\f$. It should be one of 'coordinate',
'sparse_by_rows', 'dense', 'diagonal', 'scaled_identity', 'identity',
- 'zero' or 'none', the latter pair if \f$H=0\f$; lower or upper
+ 'zero' or 'none', the latter pair if \f$H=0\f$; lower or upper
case variants are allowed.
@param[in] H_ne is a scalar variable of type int, that holds the number of
entries in the lower triangular part of \f$H\f$ in the sparse co-ordinate
storage scheme. It need not be set for any of the other schemes.
- @param[in] H_row is a one-dimensional array of size H_ne and type int, that
+ @param[in] H_row is a one-dimensional array of size H_ne and type int, that
holds the row indices of the lower triangular part of \f$H\f$ in the sparse
co-ordinate storage scheme. It need not be set for any of the other
three schemes, and in this case can be NULL.
@param[in] H_col is a one-dimensional array of size H_ne and type int,
- that holds the column indices of the lower triangular part of \f$H\f$ in
- either the sparse co-ordinate, or the sparse row-wise storage scheme. It
- need not be set when the dense, diagonal or (scaled) identity storage
+ that holds the column indices of the lower triangular part of \f$H\f$ in
+ either the sparse co-ordinate, or the sparse row-wise storage scheme. It
+ need not be set when the dense, diagonal or (scaled) identity storage
schemes are used, and in this case can be NULL.
@param[in] H_ptr is a one-dimensional array of size n+1 and type int,
@@ -910,28 +910,28 @@ void cqp_import( struct cqp_control_type *control,
other schemes are used, and in this case can be NULL.
@param[in] A_type is a one-dimensional array of type char that specifies the
- \link main_unsymmetric_matrices unsymmetric storage scheme \endlink
- used for the constraint Jacobian, \f$A\f$. It should be one of 'coordinate',
+ \link main_unsymmetric_matrices unsymmetric storage scheme \endlink
+ used for the constraint Jacobian, \f$A\f$. It should be one of 'coordinate',
'sparse_by_rows' or 'dense; lower or upper case variants are allowed.
@param[in] A_ne is a scalar variable of type int, that holds the number of
- entries in \f$A\f$ in the sparse co-ordinate storage scheme.
+ entries in \f$A\f$ in the sparse co-ordinate storage scheme.
It need not be set for any of the other schemes.
- @param[in] A_row is a one-dimensional array of size A_ne and type int, that
- holds the row indices of \f$A\f$ in the sparse co-ordinate storage scheme.
- It need not be set for any of the other schemes,
+ @param[in] A_row is a one-dimensional array of size A_ne and type int, that
+ holds the row indices of \f$A\f$ in the sparse co-ordinate storage scheme.
+ It need not be set for any of the other schemes,
and in this case can be NULL.
@param[in] A_col is a one-dimensional array of size A_ne and type int,
- that holds the column indices of \f$A\f$ in either the sparse co-ordinate,
- or the sparse row-wise storage scheme. It need not be set when the
+ that holds the column indices of \f$A\f$ in either the sparse co-ordinate,
+ or the sparse row-wise storage scheme. It need not be set when the
dense or diagonal storage schemes are used, and in this case can be NULL.
@param[in] A_ptr is a one-dimensional array of size n+1 and type int,
- that holds the starting position of each row of \f$A\f$, as well as the
- total number of entries plus one, in the sparse row-wise storage scheme.
- It need not be set when the other schemes are used,
+ that holds the starting position of each row of \f$A\f$, as well as the
+ total number of entries plus one, in the sparse row-wise storage scheme.
+ It need not be set when the other schemes are used,
and in this case can be NULL.
*/
@@ -942,7 +942,7 @@ void cqp_reset_control( struct cqp_control_type *control,
void **data,
int *status );
-/*!<
+/*!<
Reset control parameters after import if required.
@param[in] control is a struct whose members provide control
@@ -959,23 +959,23 @@ void cqp_reset_control( struct cqp_control_type *control,
void cqp_solve_qp( void **data,
int *status,
- int n,
- int m,
+ int n,
+ int m,
int h_ne,
- const real_wp_ H_val[],
- const real_wp_ g[],
- const real_wp_ f,
+ const real_wp_ H_val[],
+ const real_wp_ g[],
+ const real_wp_ f,
int a_ne,
- const real_wp_ A_val[],
- const real_wp_ c_l[],
- const real_wp_ c_u[],
- const real_wp_ x_l[],
- const real_wp_ x_u[],
- real_wp_ x[],
- real_wp_ c[],
- real_wp_ y[],
- real_wp_ z[],
- int x_stat[],
+ const real_wp_ A_val[],
+ const real_wp_ c_l[],
+ const real_wp_ c_u[],
+ const real_wp_ x_l[],
+ const real_wp_ x_u[],
+ real_wp_ x[],
+ real_wp_ c[],
+ real_wp_ y[],
+ real_wp_ z[],
+ int x_stat[],
int c_stat[] );
/*!<
@@ -1010,7 +1010,7 @@ void cqp_solve_qp( void **data,
\li -11. The solution of a set of linear equations using factors from the
factorization package failed; the return status from the factorization
package is given in the component inform.factor_status.
- \li -16. The problem is so ill-conditioned that further progress is
+ \li -16. The problem is so ill-conditioned that further progress is
impossible.
\li -17. The step is too small to make further impact.
\li -18. Too many iterations have been performed. This may happen if
@@ -1019,103 +1019,103 @@ void cqp_solve_qp( void **data,
\li -19. The CPU time limit has been reached. This may happen if
control.cpu_time_limit is too small, but may also be symptomatic of
a badly scaled problem.
- \li -23. An entry from the strict upper triangle of \f$H\f$ has been
+ \li -23. An entry from the strict upper triangle of \f$H\f$ has been
specified.
-
+
@param[in] n is a scalar variable of type int, that holds the number of
variables
@param[in] m is a scalar variable of type int, that holds the number of
general linear constraints.
- @param[in] h_ne is a scalar variable of type int, that holds the number of
+ @param[in] h_ne is a scalar variable of type int, that holds the number of
entries in the lower triangular part of the Hessian matrix \f$H\f$.
- @param[in] H_val is a one-dimensional array of size h_ne and type double,
- that holds the values of the entries of the lower triangular part of the
+ @param[in] H_val is a one-dimensional array of size h_ne and type double,
+ that holds the values of the entries of the lower triangular part of the
Hessian matrix \f$H\f$ in any of the available storage schemes.
- @param[in] g is a one-dimensional array of size n and type double, that
- holds the linear term \f$g\f$ of the objective function.
+ @param[in] g is a one-dimensional array of size n and type double, that
+ holds the linear term \f$g\f$ of the objective function.
The j-th component of g, j = 0, ... , n-1, contains \f$g_j \f$.
-
- @param[in] f is a scalar of type double, that
- holds the constant term \f$f\f$ of the objective function.
-
- @param[in] a_ne is a scalar variable of type int, that holds the number of
+
+ @param[in] f is a scalar of type double, that
+ holds the constant term \f$f\f$ of the objective function.
+
+ @param[in] a_ne is a scalar variable of type int, that holds the number of
entries in the constraint Jacobian matrix \f$A\f$.
-
- @param[in] A_val is a one-dimensional array of size a_ne and type double,
- that holds the values of the entries of the constraint Jacobian matrix
- \f$A\f$ in any of the available storage schemes.
- @param[in] c_l is a one-dimensional array of size m and type double, that
+ @param[in] A_val is a one-dimensional array of size a_ne and type double,
+ that holds the values of the entries of the constraint Jacobian matrix
+ \f$A\f$ in any of the available storage schemes.
+
+ @param[in] c_l is a one-dimensional array of size m and type double, that
holds the lower bounds \f$c^l\f$ on the constraints \f$A x\f$.
The i-th component of c_l, i = 0, ... , m-1, contains \f$c^l_i\f$.
-
- @param[in] c_u is a one-dimensional array of size m and type double, that
+
+ @param[in] c_u is a one-dimensional array of size m and type double, that
holds the upper bounds \f$c^l\f$ on the constraints \f$A x\f$.
The i-th component of c_u, i = 0, ... , m-1, contains \f$c^u_i\f$.
-
- @param[in] x_l is a one-dimensional array of size n and type double, that
+
+ @param[in] x_l is a one-dimensional array of size n and type double, that
holds the lower bounds \f$x^l\f$ on the variables \f$x\f$.
The j-th component of x_l, j = 0, ... , n-1, contains \f$x^l_j\f$.
-
- @param[in] x_u is a one-dimensional array of size n and type double, that
+
+ @param[in] x_u is a one-dimensional array of size n and type double, that
holds the upper bounds \f$x^l\f$ on the variables \f$x\f$.
The j-th component of x_u, j = 0, ... , n-1, contains \f$x^l_j\f$.
-
- @param[in,out] x is a one-dimensional array of size n and type double, that
- holds the values \f$x\f$ of the optimization variables. The j-th component
+
+ @param[in,out] x is a one-dimensional array of size n and type double, that
+ holds the values \f$x\f$ of the optimization variables. The j-th component
of x, j = 0, ... , n-1, contains \f$x_j\f$.
-
- @param[out] c is a one-dimensional array of size m and type double, that
+
+ @param[out] c is a one-dimensional array of size m and type double, that
holds the residual \f$c(x)\f$.
The i-th component of c, j = 0, ... , n-1, contains \f$c_j(x) \f$.
-
- @param[in,out] y is a one-dimensional array of size n and type double, that
- holds the values \f$y\f$ of the Lagrange multipliers for the general
- linear constraints. The j-th component
+
+ @param[in,out] y is a one-dimensional array of size n and type double, that
+ holds the values \f$y\f$ of the Lagrange multipliers for the general
+ linear constraints. The j-th component
of y, j = 0, ... , n-1, contains \f$y_j\f$.
-
- @param[in,out] z is a one-dimensional array of size n and type double, that
- holds the values \f$z\f$ of the dual variables.
+
+ @param[in,out] z is a one-dimensional array of size n and type double, that
+ holds the values \f$z\f$ of the dual variables.
The j-th component of z, j = 0, ... , n-1, contains \f$z_j\f$.
-
- @param[out] x_stat is a one-dimensional array of size n and type int, that
+
+ @param[out] x_stat is a one-dimensional array of size n and type int, that
gives the optimal status of the problem variables. If x_stat(j) is negative,
the variable \f$x_j\f$ most likely lies on its lower bound, if it is
positive, it lies on its upper bound, and if it is zero, it lies
between its bounds.
- @param[out] c_stat is a one-dimensional array of size m and type int, that
- gives the optimal status of the general linear constraints. If c_stat(i) is
- negative, the constraint value \f$a_i^Tx\f$ most likely lies on its
- lower bound, if it is positive, it lies on its upper bound, and if it
+ @param[out] c_stat is a one-dimensional array of size m and type int, that
+ gives the optimal status of the general linear constraints. If c_stat(i) is
+ negative, the constraint value \f$a_i^Tx\f$ most likely lies on its
+ lower bound, if it is positive, it lies on its upper bound, and if it
is zero, it lies between its bounds.
-*/
+*/
// *-*-*-*-*-*-*-*-*-*- C Q P _ S O L V E _ S L D Q P -*-*-*-*-*-*-*-*-*-
void cqp_solve_sldqp( void **data,
int *status,
- int n,
- int m,
- const real_wp_ w[],
- const real_wp_ x0[],
- const real_wp_ g[],
- const real_wp_ f,
+ int n,
+ int m,
+ const real_wp_ w[],
+ const real_wp_ x0[],
+ const real_wp_ g[],
+ const real_wp_ f,
int a_ne,
- const real_wp_ A_val[],
- const real_wp_ c_l[],
- const real_wp_ c_u[],
- const real_wp_ x_l[],
- const real_wp_ x_u[],
- real_wp_ x[],
- real_wp_ c[],
- real_wp_ y[],
- real_wp_ z[],
- int x_stat[],
+ const real_wp_ A_val[],
+ const real_wp_ c_l[],
+ const real_wp_ c_u[],
+ const real_wp_ x_l[],
+ const real_wp_ x_u[],
+ real_wp_ x[],
+ real_wp_ c[],
+ real_wp_ y[],
+ real_wp_ z[],
+ int x_stat[],
int c_stat[] );
/*!<
@@ -1150,7 +1150,7 @@ void cqp_solve_sldqp( void **data,
\li -11. The solution of a set of linear equations using factors from the
factorization package failed; the return status from the factorization
package is given in the component inform.factor_status.
- \li -16. The problem is so ill-conditioned that further progress is
+ \li -16. The problem is so ill-conditioned that further progress is
impossible.
\li -17. The step is too small to make further impact.
\li -18. Too many iterations have been performed. This may happen if
@@ -1159,78 +1159,78 @@ void cqp_solve_sldqp( void **data,
\li -19. The CPU time limit has been reached. This may happen if
control.cpu_time_limit is too small, but may also be symptomatic of
a badly scaled problem.
-
+
@param[in] n is a scalar variable of type int, that holds the number of
variables
@param[in] m is a scalar variable of type int, that holds the number of
general linear constraints.
- @param[in] w is a one-dimensional array of size n and type double,
+ @param[in] w is a one-dimensional array of size n and type double,
that holds the values of the weights \f$w\f$.
- @param[in] x0 is a one-dimensional array of size n and type double,
+ @param[in] x0 is a one-dimensional array of size n and type double,
that holds the values of the shifts \f$x^0\f$.
- @param[in] g is a one-dimensional array of size n and type double, that
- holds the linear term \f$g\f$ of the objective function.
+ @param[in] g is a one-dimensional array of size n and type double, that
+ holds the linear term \f$g\f$ of the objective function.
The j-th component of g, j = 0, ... , n-1, contains \f$g_j \f$.
-
- @param[in] f is a scalar of type double, that
- holds the constant term \f$f\f$ of the objective function.
-
- @param[in] a_ne is a scalar variable of type int, that holds the number of
+
+ @param[in] f is a scalar of type double, that
+ holds the constant term \f$f\f$ of the objective function.
+
+ @param[in] a_ne is a scalar variable of type int, that holds the number of
entries in the constraint Jacobian matrix \f$A\f$.
-
-@param[in] A_val is a one-dimensional array of size a_ne and type double,
- that holds the values of the entries of the constraint Jacobian matrix
- \f$A\f$ in any of the available storage schemes.
- @param[in] c_l is a one-dimensional array of size m and type double, that
+@param[in] A_val is a one-dimensional array of size a_ne and type double,
+ that holds the values of the entries of the constraint Jacobian matrix
+ \f$A\f$ in any of the available storage schemes.
+
+ @param[in] c_l is a one-dimensional array of size m and type double, that
holds the lower bounds \f$c^l\f$ on the constraints \f$A x\f$.
The i-th component of c_l, i = 0, ... , m-1, contains \f$c^l_i\f$.
-
- @param[in] c_u is a one-dimensional array of size m and type double, that
+
+ @param[in] c_u is a one-dimensional array of size m and type double, that
holds the upper bounds \f$c^l\f$ on the constraints \f$A x\f$.
The i-th component of c_u, i = 0, ... , m-1, contains \f$c^u_i\f$.
-
- @param[in] x_l is a one-dimensional array of size n and type double, that
+
+ @param[in] x_l is a one-dimensional array of size n and type double, that
holds the lower bounds \f$x^l\f$ on the variables \f$x\f$.
The j-th component of x_l, j = 0, ... , n-1, contains \f$x^l_j\f$.
-
- @param[in] x_u is a one-dimensional array of size n and type double, that
+
+ @param[in] x_u is a one-dimensional array of size n and type double, that
holds the upper bounds \f$x^l\f$ on the variables \f$x\f$.
The j-th component of x_u, j = 0, ... , n-1, contains \f$x^l_j\f$.
-
- @param[in,out] x is a one-dimensional array of size n and type double, that
- holds the values \f$x\f$ of the optimization variables. The j-th component
+
+ @param[in,out] x is a one-dimensional array of size n and type double, that
+ holds the values \f$x\f$ of the optimization variables. The j-th component
of x, j = 0, ... , n-1, contains \f$x_j\f$.
-
- @param[out] c is a one-dimensional array of size m and type double, that
+
+ @param[out] c is a one-dimensional array of size m and type double, that
holds the residual \f$c(x)\f$.
The i-th component of c, i = 0, ... , m-1, contains \f$c_i(x) \f$.
-
- @param[in,out] y is a one-dimensional array of size n and type double, that
- holds the values \f$y\f$ of the Lagrange multipliers for the general
- linear constraints. The j-th component
+
+ @param[in,out] y is a one-dimensional array of size n and type double, that
+ holds the values \f$y\f$ of the Lagrange multipliers for the general
+ linear constraints. The j-th component
of y, i = 0, ... , m-1, contains \f$y_i\f$.
-
- @param[in,out] z is a one-dimensional array of size n and type double, that
- holds the values \f$z\f$ of the dual variables.
+
+ @param[in,out] z is a one-dimensional array of size n and type double, that
+ holds the values \f$z\f$ of the dual variables.
The j-th component of z, j = 0, ... , n-1, contains \f$z_j\f$.
-
- @param[out] x_stat is a one-dimensional array of size n and type int, that
+
+ @param[out] x_stat is a one-dimensional array of size n and type int, that
gives the optimal status of the problem variables. If x_stat(j) is negative,
the variable \f$x_j\f$ most likely lies on its lower bound, if it is
positive, it lies on its upper bound, and if it is zero, it lies
between its bounds.
- @param[out] c_stat is a one-dimensional array of size m and type int, that
- gives the optimal status of the general linear constraints. If c_stat(i) is
- negative, the constraint value \f$a_i^T x\f$ most likely lies on its
- lower bound, if it is positive, it lies on its upper bound, and if it
+ @param[out] c_stat is a one-dimensional array of size m and type int, that
+ gives the optimal status of the general linear constraints. If c_stat(i) is
+ negative, the constraint value \f$a_i^T x\f$ most likely lies on its
+ lower bound, if it is positive, it lies on its upper bound, and if it
is zero, it lies between its bounds.
-*/
+*/
// *-*-*-*-*-*-*-*-*-*- C Q P _ I N F O R M A T I O N -*-*-*-*-*-*-*-*
@@ -1244,7 +1244,7 @@ void cqp_information( void **data,
@param[in,out] data holds private internal data
@param[out] inform is a struct containing output information
- (see cqp_inform_type)
+ (see cqp_inform_type)
@param[out] status is a scalar variable of type int, that gives
the exit status from the package.
@@ -1254,8 +1254,8 @@ void cqp_information( void **data,
// *-*-*-*-*-*-*-*-*-*- C Q P _ T E R M I N A T E -*-*-*-*-*-*-*-*-*-*
-void cqp_terminate( void **data,
- struct cqp_control_type *control,
+void cqp_terminate( void **data,
+ struct cqp_control_type *control,
struct cqp_inform_type *inform );
/*!<
@@ -1263,7 +1263,7 @@ void cqp_terminate( void **data,
@param[in,out] data holds private internal data
- @param[out] control is a struct containing control information
+ @param[out] control is a struct containing control information
(see cqp_control_type)
@param[out] inform is a struct containing output information
@@ -1275,9 +1275,9 @@ void cqp_terminate( void **data,
\f$\label{examples}\f$
\example cqpt.c
This is an example of how to use the package to solve a quadratic program.
- A variety of supported Hessian and constraint matrix storage formats are
+ A variety of supported Hessian and constraint matrix storage formats are
shown.
-
+
Notice that C-style indexing is used, and that this is flaggeed by
setting \c control.f_indexing to \c false.
diff --git a/include/galahad_presolve.h b/include/galahad_presolve.h
index 124ec87a02..a19707f02a 100644
--- a/include/galahad_presolve.h
+++ b/include/galahad_presolve.h
@@ -16,7 +16,7 @@
*/
/*! \mainpage GALAHAD C package presolve
-
+
\section presolve_intro Introduction
\subsection presolve_purpose Purpose
@@ -56,7 +56,7 @@
x_j^l \[<=] x_j \[<=] x_j^u, j = 1, ... , n,
\n
\endmanonly
- where the \f$n\f$ by \f$n\f$ symmetric matrix \f$H\f$,
+ where the \f$n\f$ by \f$n\f$ symmetric matrix \f$H\f$,
the vectors \f$g\f$, \f$a_i\f$, \f$c^l\f$, \f$c^u\f$, \f$x^l\f$,
\f$x^u\f$ and the scalar \f$f\f$ are given.
Any of the constraint bounds \f$c_i^l\f$, \f$c_i^u\f$,
@@ -115,7 +115,7 @@
\f[\mbox{(2a) $\hspace{58mm} H x + g = A^T y + z\hspace{58mm}$}\f]
\manonly
\n
- (2a) H x + g = A^T y + z
+ (2a) H x + g = A^T y + z
\n
\endmanonly
where
@@ -124,7 +124,7 @@
z^l \geq 0 \;\; \mbox{and} \;\; z^u \leq 0,\hspace{24mm}$} \f]
\manonly
\n
- (2b) y = y^l + y^u, z = z^l + z^u, y^l \[>=] 0, y^u \[<=] 0,
+ (2b) y = y^l + y^u, z = z^l + z^u, y^l \[>=] 0, y^u \[<=] 0,
z^l \[>=] 0 and z^u \[<=] 0,
\n
\endmanonly
@@ -138,14 +138,14 @@
(x -x^l)^T z^l = 0 and (x -x^u)^T z^u = 0,
\n
\endmanonly
- where the vectors \f$y\f$ and \f$z\f$ are known as the Lagrange multipliers
+ where the vectors \f$y\f$ and \f$z\f$ are known as the Lagrange multipliers
for2 the general linear constraints, and the dual variables for the bounds,
respectively, and where the vector inequalities hold component-wise.
\subsection presolve_method Method
- The purpose of presolving is to exploit these equations in order to reduce
- the problem to the standard form defined as follows:
+ The purpose of presolving is to exploit these equations in order to reduce
+ the problem to the standard form defined as follows:
- The variables are ordered so that their bounds appear in the order
\f[\begin{array}{lccccc}
\mbox{free} & & & x & & \\
@@ -153,7 +153,7 @@
\mbox{lower} & x^l & \leq & x & & \\
\mbox{range} & x^l & \leq & x & \leq & x^u\\
\mbox{upper} & & & x & \leq & x^u \\
- \mbox{non-positivity} & & & x & \leq & 0
+ \mbox{non-positivity} & & & x & \leq & 0
\end{array}\f]
\manonly
\n
@@ -162,11 +162,11 @@
lower x^l <= x
range x^l <= x <= x^u
upper x <= x^u
- non-positivity x <= 0
+ non-positivity x <= 0
\n
\endmanonly
- Fixed variables are removed. Within each category, the variables
- are further ordered so that those with non-zero diagonal Hessian
+ Fixed variables are removed. Within each category, the variables
+ are further ordered so that those with non-zero diagonal Hessian
entries occur before the remainder.
- The constraints are ordered so that their bounds appear in the order
\f[\begin{array}{lccccc}
@@ -187,11 +187,11 @@
non-positivity A x <= 0
\n
\endmanonly
- Free constraints are removed.
+ Free constraints are removed.
- In addition, constraints may be removed or bounds tightened, to reduce the
size of the feasible region or simplify the problem if this is possible, and
- bounds may be tightened on the dual variables and the multipliers
- associated with the problem.
+ bounds may be tightened on the dual variables and the multipliers
+ associated with the problem.
The presolving algorithm proceeds by applying a (potentially long) series of
simple transformations to the problem, each transformation introducing a
@@ -207,9 +207,9 @@
-# attempt to exploit the presence of linear singleton columns,
-# attempt to exploit the presence of linear doubleton columns,
-# complete the analysis of the dual constraints,
- -# remove empty and singletons rows,
+ -# remove empty and singletons rows,
-# possibly remove dependent variables,
- -# analyze the primal constraints,
+ -# analyze the primal constraints,
-# try to make \f$A\f$ sparser by combining its rows,
-# check the current status of the variables, dual variables and multipliers.
@@ -233,27 +233,27 @@
Overall, the presolving process follows one of the two sequences:
- \f[\fbox{initialize} \rightarrow \left[ \fbox{apply transformations}
+ \f[\fbox{initialize} \rightarrow \left[ \fbox{apply transformations}
\rightarrow \mbox{(solve problem)}
\rightarrow \fbox{restore} \right] \rightarrow \fbox{terminate}\f]
or
- \f[\fbox{initialize} \rightarrow \left[ \fbox{read specfile}
- \rightarrow \fbox{apply transformations}
+ \f[\fbox{initialize} \rightarrow \left[ \fbox{read specfile}
+ \rightarrow \fbox{apply transformations}
\rightarrow \mbox{(solve problem)}
\rightarrow \fbox{restore} \right] \rightarrow \fbox{terminate}\f]
\manonly
(ignore garbled doxygen phrase)
\n
- -------------- [ -------------------------
+ -------------- [ -------------------------
| initialize | -> [ | apply transformations | -> (solve problem) ->
- -------------- [ -------------------------
+ -------------- [ -------------------------
----------- ] -------------
| restore | ] -> | terminate |
----------- ] -------------
- or
- -------------- [ ----------------- -------------------------
+ or
+ -------------- [ ----------------- -------------------------
| initialize | -> [ | read specfile | -> | apply transformations | ->
- -------------- [ ----------------- -------------------------
+ -------------- [ ----------------- -------------------------
----------- ] -------------
(solve problem) -> | restore | ] -> | terminate |
----------- ] -------------
@@ -261,7 +261,7 @@
\endmanonly
where the procedure's control parameter may be modified by
- reading the specfile, and where (solve problem) indicates that the reduced
+ reading the specfile, and where (solve problem) indicates that the reduced
problem is solved. Each of the
``boxed'' steps in these sequences corresponds to calling a specific
routine of the package In the diagrams above, brackated subsequence of
@@ -273,20 +273,20 @@
applied to a problem with a different structure.
Note that the values of the multipliers and dual variables (and thus of
- their respective bounds) depend on the functional form assumed for the
+ their respective bounds) depend on the functional form assumed for the
Lagrangian function associated with the problem. This form is given by
\f[ L(x,y,z) = q x) - y\_{sign} * y^T (Ax-c) - z\_{sign} * z,\f]
(considering only active constraints \f$A x = c\f$), where the parameters
y_{sign} and z_{sign} are +1 or -1 and can be chosen by the user.
Thus, if \f$y_{sign}\f$ = +1, the multipliers associated to active constraints
originally posed as inequalities are non-negative if the inequality is a lower
- bound and non-positive if it is an upper bound. Obvioulsy they are not
- constrained in sign for constraints originally posed as equalities. These
- sign conventions are reversed if \f$y_{sign}\f$ = -1.
+ bound and non-positive if it is an upper bound. Obvioulsy they are not
+ constrained in sign for constraints originally posed as equalities. These
+ sign conventions are reversed if \f$y_{sign}\f$ = -1.
Similarly, if \f$z_{sign}\f$ = +1}, the dual variables associated to active
bounds are non-negative if the original bound is an lower bound, non-positive
- if it is an upper bound, or unconstrained in sign if the variables is fixed;
- and this convention is reversed in \f$z\_{sign}\f$ = -1}. The values of
+ if it is an upper bound, or unconstrained in sign if the variables is fixed;
+ and this convention is reversed in \f$z\_{sign}\f$ = -1}. The values of
\f$z_{sign}\f$ and \f$y_{sign}\f$ may be chosen by setting the corresponding
components of the \p control structure to {\sym \galsympositive} or {\sym
\galsymnegative}
@@ -300,16 +300,19 @@
Mathematical Programming 100(1), pp 95--132.
\subsection presolve_call_order Call order
- To solve a given problem, functions from the presolve package must be called
+ To solve a given problem, functions from the presolve package must be called
in the following order:
- \link presolve_initialize \endlink - provide default control parameters and
set up initial data structures
- - \link presolve_read_specfile \endlink (optional) - override control values
+ - \link presolve_read_specfile \endlink (optional) - override control values
by reading replacement values from a file
- - \link presolve_apply_to_problem \endlink - apply the presolve algorithm
- - \link presolve_restore_problem \endlink - restore data from the presolve
- algorithm
+ - \link presolve_import_problem \endlink - import the problem data and report
+ the dimensions of the transformed problem
+ - \link presolve_transform_problem \endlink - apply the presolve algorithm
+ to transform the data
+ - \link presolve_recover_solution \endlink - restore the solution from
+ that of the transformed problem
- \link presolve_information \endlink (optional) - recover information about
the solution and solution process
- \link presolve_terminate \endlink - deallocate data structures
@@ -326,32 +329,32 @@
\subsection main_unsymmetric_matrices Unsymmetric matrix storage formats
- The unsymmetric \f$m\f$ by \f$n\f$ constraint matrix \f$A\f$ may be presented
+ The unsymmetric \f$m\f$ by \f$n\f$ constraint matrix \f$A\f$ may be presented
and stored in a variety of convenient input formats.
Both C-style (0 based) and fortran-style (1-based) indexing is allowed.
- Choose \c control.f_indexing as \c false for C style and \c true for
+ Choose \c control.f_indexing as \c false for C style and \c true for
fortran style; the discussion below presumes C style, but add 1 to
indices for the corresponding fortran version.
Wrappers will automatically convert between 0-based (C) and 1-based
(fortran) array indexing, so may be used transparently from C. This
conversion involves both time and memory overheads that may be avoided
- by supplying data that is already stored using 1-based indexing.
+ by supplying data that is already stored using 1-based indexing.
\subsubsection unsymmetric_matrix_dense Dense storage format
- The matrix \f$A\f$ is stored as a compact dense matrix by rows, that is,
+ The matrix \f$A\f$ is stored as a compact dense matrix by rows, that is,
the values of the entries of each row in turn are
stored in order within an appropriate real one-dimensional array.
In this case, component \f$n \ast i + j\f$ of the storage array A_val
- will hold the value \f$A_{ij}\f$ for \f$0 \leq i \leq m-1\f$,
+ will hold the value \f$A_{ij}\f$ for \f$0 \leq i \leq m-1\f$,
\f$0 \leq j \leq n-1\f$.
\subsubsection unsymmetric_matrix_coordinate Sparse co-ordinate storage format
Only the nonzero entries of the matrices are stored.
For the \f$l\f$-th entry, \f$0 \leq l \leq ne-1\f$, of \f$A\f$,
- its row index i, column index j
- and value \f$A_{ij}\f$,
+ its row index i, column index j
+ and value \f$A_{ij}\f$,
\f$0 \leq i \leq m-1\f$, \f$0 \leq j \leq n-1\f$, are stored as
the \f$l\f$-th components of the integer arrays A_row and
A_col and real array A_val, respectively, while the number of nonzeros
@@ -363,7 +366,7 @@
in row i+1. For the i-th row of \f$A\f$ the i-th component of the
integer array A_ptr holds the position of the first entry in this row,
while A_ptr(m) holds the total number of entries plus one.
- The column indices j, \f$0 \leq j \leq n-1\f$, and values
+ The column indices j, \f$0 \leq j \leq n-1\f$, and values
\f$A_{ij}\f$ of the nonzero entries in the i-th row are stored in components
l = A_ptr(i), \f$\ldots\f$, A_ptr(i+1)-1, \f$0 \leq i \leq m-1\f$,
of the integer array A_col, and real array A_val, respectively.
@@ -372,18 +375,18 @@
\subsection main_symmetric_matrices Symmetric matrix storage formats
- Likewise, the symmetric \f$n\f$ by \f$n\f$ objective Hessian matrix
- \f$H\f$ may be presented
- and stored in a variety of formats. But crucially symmetry is exploited
- by only storing values from the lower triangular part
+ Likewise, the symmetric \f$n\f$ by \f$n\f$ objective Hessian matrix
+ \f$H\f$ may be presented
+ and stored in a variety of formats. But crucially symmetry is exploited
+ by only storing values from the lower triangular part
(i.e, those entries that lie on or below the leading diagonal).
\subsubsection symmetric_matrix_dense Dense storage format
- The matrix \f$H\f$ is stored as a compact dense matrix by rows, that is,
+ The matrix \f$H\f$ is stored as a compact dense matrix by rows, that is,
the values of the entries of each row in turn are
stored in order within an appropriate real one-dimensional array.
Since \f$H\f$ is symmetric, only the lower triangular part (that is the part
- \f$h_{ij}\f$ for \f$0 \leq j \leq i \leq n-1\f$) need be held.
+ \f$h_{ij}\f$ for \f$0 \leq j \leq i \leq n-1\f$) need be held.
In this case the lower triangle should be stored by rows, that is
component \f$i \ast i / 2 + j\f$ of the storage array H_val
will hold the value \f$h_{ij}\f$ (and, by symmetry, \f$h_{ji}\f$)
@@ -392,7 +395,7 @@
\subsubsection symmetric_matrix_coordinate Sparse co-ordinate storage format
Only the nonzero entries of the matrices are stored.
For the \f$l\f$-th entry, \f$0 \leq l \leq ne-1\f$, of \f$H\f$,
- its row index i, column index j
+ its row index i, column index j
and value \f$h_{ij}\f$, \f$0 \leq j \leq i \leq n-1\f$, are stored as
the \f$l\f$-th components of the integer arrays H_row and
H_col and real array H_val, respectively, while the number of nonzeros
@@ -405,7 +408,7 @@
in row i+1. For the i-th row of \f$H\f$ the i-th component of the
integer array H_ptr holds the position of the first entry in this row,
while H_ptr(n) holds the total number of entries plus one.
- The column indices j, \f$0 \leq j \leq i\f$, and values
+ The column indices j, \f$0 \leq j \leq i\f$, and values
\f$h_{ij}\f$ of the entries in the i-th row are stored in components
l = H_ptr(i), \f$\ldots\f$, H_ptr(i+1)-1 of the
integer array H_col, and real array H_val, respectively.
@@ -414,8 +417,8 @@
its predecessor.
\subsubsection symmetric_matrix_diagonal Diagonal storage format
- If \f$H\f$ is diagonal (i.e., \f$H_{ij} = 0\f$ for all
- \f$0 \leq i \neq j \leq n-1\f$) only the diagonals entries
+ If \f$H\f$ is diagonal (i.e., \f$H_{ij} = 0\f$ for all
+ \f$0 \leq i \neq j \leq n-1\f$) only the diagonals entries
\f$H_{ii}\f$, \f$0 \leq i \leq n-1\f$ need
be stored, and the first n components of the array H_val may be
used for the purpose.
@@ -443,7 +446,7 @@ extern "C" {
#endif
// include guard
-#ifndef GALAHAD_PRESOLVE_H
+#ifndef GALAHAD_PRESOLVE_H
#define GALAHAD_PRESOLVE_H
// precision
@@ -457,16 +460,15 @@ struct presolve_control_type {
/// \brief
/// use C or Fortran sparse matrix indexing
bool f_indexing;
- int termination;
/// \brief
/// Determines the strategy for terminating the presolve
/// analysis. Possible values are:
- /// - REDUCED_SIZE : presolving is continued as long as one of
- /// the sizes of the problem (n, m, a_ne, or h_ne) is
- /// being reduced;
- /// - FULL_PRESOLVE: presolving is continued as long as problem
- /// transformations remain possible.
+ /// \li 1 presolving is continued as long as one of
+ /// the sizes of the problem (n, m, a_ne, or h_ne) is
+ /// being reduced;
+ /// \li 2 presolving is continued as long as problem
+ /// transformations remain possible.
/// NOTE: the maximum number of analysis passes
/// (control.max_nbr_passes) and the maximum number of
/// problem transformations (control.max_nbr_transforms)
@@ -474,125 +476,108 @@ struct presolve_control_type {
/// irrespective of the choice of control.termination.
/// The only effect of this latter parameter is to allow
/// for early termination.
- /// Default: REDUCED_SIZE
- int max_nbr_transforms;
+ int termination;
/// \brief
/// The maximum number of problem transformations, cumulated
/// over all calls to PRESOLVE.
- /// Default: 1000000
- int max_nbr_passes;
+ int max_nbr_transforms;
/// \brief
/// The maximum number of analysis passes for problem analysis
/// during a single call of PRESOLVE_apply.
- /// Default: 25
- real_wp_ c_accuracy;
+ int max_nbr_passes;
/// \brief
/// The relative accuracy at which the general linear
/// constraints are satisfied at the exit of the solver.
/// Note that this value is not used before the restoration
/// of the problem.
- /// Default: 10.**(-6) in double precision,
- /// 10.**(-4) in single precision.
- real_wp_ z_accuracy;
+ real_wp_ c_accuracy;
/// \brief
/// The relative accuracy at which the dual feasibility
/// constraints are satisfied at the exit of the solver.
/// Note that this value is not used before the restoration
/// of the problem.
- /// Default: 10.**(-6) in double precision,
- /// 10.**(-4) in single precision.
- real_wp_ infinity;
+ real_wp_ z_accuracy;
/// \brief
/// The value beyond which a number is deemed equal to
/// plus infinity
/// (minus infinity being defined as its opposite)
- /// Default: 10.**(19).
- int out;
+ real_wp_ infinity;
/// \brief
/// The unit number associated with the device used for
/// printout.
- /// Default: 6
- int errout;
+ int out;
/// \brief
/// The unit number associated with the device used for
/// error ouput.
- /// Default: 6
- int print_level;
+ int errout;
/// \brief
/// The level of printout requested by the user. Can take
/// the values:
- /// - SILENT : no printout is produced
- /// - TRACE : only reports the major steps in the analysis
- /// - ACTION : reports the identity of each problem
- /// transformation
- /// - DETAILS : reports more details
- /// - DEBUG : reports LOTS of information.
- /// - CRAZY : reports a completely silly amount of information
- /// Default: SILENT
- bool dual_transformations;
+ /// \li 0 no printout is produced
+ /// \li 1 only reports the major steps in the analysis
+ /// \li 2 reports the identity of each problem
+ /// transformation
+ /// \li 3 reports more details
+ /// \li 4 reports LOTS of information.
+ /// \li 5 reports a completely silly amount of information
+ int print_level;
/// \brief
- /// .TRUE. if dual transformations of the problem are allowed.
+ /// true if dual transformations of the problem are allowed.
/// Note that this implies that the reduced problem is solved
/// accurately (for the dual feasibility condition to hold)
/// as to be able to restore the problem to the original
- /// constraints and variables. .FALSE. prevents dual
+ /// constraints and variables. false prevents dual
/// transformations to be applied, thus allowing for inexact
/// solution of the reduced problem. The setting of this control
/// parameter overides that of get_z, get_z_bounds, get_y,
/// get_y_bounds, dual_constraints_freq, singleton_columns_freq,
/// doubleton_columns_freq, z_accuracy, check_dual_feasibility.
- /// Default: .TRUE.
- bool redundant_xc;
+ bool dual_transformations;
/// \brief
- /// .TRUE. if the redundant variables and constraints (i.e.
+ /// true if the redundant variables and constraints (i.e.
/// variables that do not appear in the objective
/// function and appear with a consistent sign in the
/// constraints) are to be removed with their associated
/// constraints before other transformations are attempted.
- /// Default: .TRUE.
- int primal_constraints_freq;
+ bool redundant_xc;
/// \brief
/// The frequency of primal constraints analysis in terms of
/// presolving passes. A value of j = 2 indicates that primal
/// constraints are analyzed every 2 presolving passes. A zero
/// value indicates that they are never analyzed.
- /// Default: 1
- int dual_constraints_freq;
+ int primal_constraints_freq;
/// \brief
/// The frequency of dual constraints analysis in terms of
/// presolving passes. A value of j = 2 indicates that dual
/// constraints are analyzed every 2 presolving passes. A zero
/// value indicates that they are never analyzed.
- /// Default: 1
- int singleton_columns_freq;
+ int dual_constraints_freq;
/// \brief
/// The frequency of singleton column analysis in terms of
/// presolving passes. A value of j = 2 indicates that
/// singleton columns are analyzed every 2 presolving passes.
/// A zero value indicates that they are never analyzed.
- /// Default: 1
- int doubleton_columns_freq;
+ int singleton_columns_freq;
/// \brief
/// The frequency of doubleton column analysis in terms of
/// presolving passes. A value of j indicates that doubleton
/// columns are analyzed every 2 presolving passes. A zero
/// value indicates that they are never analyzed.
- /// Default: 1
- int unc_variables_freq;
+ int doubleton_columns_freq;
/// \brief
/// The frequency of the attempts to fix linearly unconstrained
@@ -600,8 +585,7 @@ struct presolve_control_type {
/// value of j = 2 indicates that attempts are made every 2
/// presolving passes. A zero value indicates that no attempt
/// is ever made.
- /// Default: 1
- int dependent_variables_freq;
+ int unc_variables_freq;
/// \brief
/// The frequency of search for dependent variables in terms of
@@ -609,16 +593,14 @@ struct presolve_control_type {
/// dependent variables are searched for every 2 presolving
/// passes. A zero value indicates that they are never
/// searched for.
- /// Default: 1
- int sparsify_rows_freq;
+ int dependent_variables_freq;
/// \brief
/// The frequency of the attempts to make A sparser in terms of
/// presolving passes. A value of j = 2 indicates that attempts
/// are made every 2 presolving passes. A zero value indicates
/// that no attempt is ever made.
- /// Default: 1
- int max_fill;
+ int sparsify_rows_freq;
/// \brief
/// The maximum percentage of fill in each row of A. Note that
@@ -626,52 +608,45 @@ struct presolve_control_type {
/// the storage initially used for A, no matter how large
/// control.max_fill is chosen. If max_fill is negative,
/// no limit is put on row fill.
- /// Default: -1 (no limit).
- int transf_file_nbr;
+ int max_fill;
/// \brief
/// The unit number to be associated with the file(s) used
/// for saving problem transformations on a disk file.
- /// Default: 57
- int transf_buffer_size;
+ int transf_file_nbr;
/// \brief
/// The number of transformations that can be kept in memory
/// at once (that is without being saved on a disk file).
- /// Default: 50000
- int transf_file_status;
+ int transf_buffer_size;
/// \brief
/// The exit status of the file where problem transformations
/// are saved:
- /// KEEP : the file is not deleted after program termination
- /// DELETE : the file is not deleted after program termination
- /// Default: KEEP
- char transf_file_name[31];
+ /// \li 0 the file is not deleted after program termination
+ /// \li 1 the file is not deleted after program termination
+ int transf_file_status;
/// \brief
- /// INTENT( IN )
/// The name of the file (to be) used for storing
/// problem transformation on disk.
- /// Default: transf.sav
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE following PRESOLVE_read_specfile. It can
/// then only be changed after calling PRESOLVE_terminate.
- int y_sign;
+ char transf_file_name[31];
/// \brief
/// Determines the convention of sign used for the multipliers
/// associated with the general linear constraints.
- /// - POSITIVE ( +1 ): All multipliers corresponding to active
- /// inequality constraints are non-negative for
- /// lower bound constraints and non-positive for
- /// upper bounds constraints.
- /// - NEGATIVE ( -1 ): All multipliers corresponding to active
- /// inequality constraints are non-positive for
- /// lower bound constraints and non-negative for
- /// upper bounds constraints.
- /// Default: POSITIVE.
- int inactive_y;
+ /// \li 1 All multipliers corresponding to active
+ /// inequality constraints are non-negative for
+ /// lower bound constraints and non-positive for
+ /// upper bounds constraints.
+ /// \li -1 All multipliers corresponding to active
+ /// inequality constraints are non-positive for
+ /// lower bound constraints and non-negative for
+ /// upper bounds constraints.
+ int y_sign;
/// \brief
/// Determines whether or not the multipliers corresponding
@@ -679,30 +654,28 @@ struct presolve_control_type {
/// corresponding to the reduced point on input of RESTORE
/// must be set to zero. Possible values are:
/// associated with the general linear constraints.
- /// - FORCE_TO_ZERO: All multipliers corresponding to inactive
- /// inequality constraints are forced to zero,
- /// possibly at the expense of deteriorating the
- /// dual feasibility condition.
- /// NOTE: this option is inactive unless
- /// control.get_y = .TRUE.
- /// control.get_c = .TRUE.
- /// control.get_c_bounds = .TRUE.
- /// - LEAVE_AS_IS: Multipliers corresponding to inactive
- /// inequality constraints are left unaltered.
- /// Default: LEAVE_AS_IS
- int z_sign;
+ /// \li 0 All multipliers corresponding to inactive
+ /// inequality constraints are forced to zero,
+ /// possibly at the expense of deteriorating the
+ /// dual feasibility condition.
+ /// NOTE: this option is inactive unless
+ /// control.get_y = true
+ /// control.get_c = true
+ /// control.get_c_bounds = true
+ /// \li 1 Multipliers corresponding to inactive
+ /// inequality constraints are left unaltered.
+ int inactive_y;
/// \brief
/// Determines the convention of sign used for the dual
/// variables associated with the bound constraints.
- /// - POSITIVE ( +1 ): All dual variables corresponding to
- /// active lower bounds are non-negative, and
- /// non-positive for active upper bounds.
- /// - NEGATIVE ( -1 ): All dual variables corresponding to
- /// active lower bounds are non-positive, and
- /// non-negative for active upper bounds.
- /// Default: POSITIVE.
- int inactive_z;
+ /// \li 1 All dual variables corresponding to
+ /// active lower bounds are non-negative, and
+ /// non-positive for active upper bounds.
+ /// \li -1 All dual variables corresponding to
+ /// active lower bounds are non-positive, and
+ /// non-negative for active upper bounds.
+ int z_sign;
/// \brief
/// Determines whether or not the dual variables corresponding
@@ -710,245 +683,224 @@ struct presolve_control_type {
/// corresponding to the reduced point on input of RESTORE
/// must be set to zero. Possible values are:
/// associated with the general linear constraints.
- /// - FORCE_TO_ZERO: All dual variables corresponding to
- /// inactive bounds are forced to zero,
- /// possibly at the expense of deteriorating the
- /// dual feasibility condition.
- /// NOTE: this option is inactive unless
- /// control.get_z = .TRUE.
- /// control.get_x = .TRUE.
- /// control.get_x_bounds = .TRUE.
- /// - LEAVE_AS_IS: Dual variables corresponding to inactive
- /// bounds are left unaltered.
- /// Default: LEAVE_AS_IS
- int final_x_bounds;
+ /// \li 0: All dual variables corresponding to
+ /// inactive bounds are forced to zero,
+ /// possibly at the expense of deteriorating the
+ /// dual feasibility condition.
+ /// NOTE: this option is inactive unless
+ /// control.get_z = true
+ /// control.get_x = true
+ /// control.get_x_bounds = true
+ /// \li 1 Dual variables corresponding to inactive
+ /// bounds are left unaltered.
+ int inactive_z;
/// \brief
/// The type of final bounds on the variables returned by the
/// package. This parameter can take the values:
- /// - TIGHTEST : the final bounds are the tightest bounds
- /// known on the variables (at the risk of
- /// being redundant with other constraints,
- /// which may cause degeneracy);
- /// - NON_DEGENERATE: the best known bounds that are known to
- /// be non-degenerate. This option implies
- /// that an additional real workspace of size
- /// 2 * prob.n must be allocated.
- /// - LOOSEST : the loosest bounds that are known to
- /// keep the problem equivalent to the
- /// original problem. This option also
- /// implies that an additional real
- /// workspace of size 2 * prob.n must be
- /// allocated.
- /// Default: TIGHTEST
+ /// \li 0 the final bounds are the tightest bounds
+ /// known on the variables (at the risk of
+ /// being redundant with other constraints,
+ /// which may cause degeneracy);
+ /// \li 1 the best known bounds that are known to
+ /// be non-degenerate. This option implies
+ /// that an additional real workspace of size
+ /// 2 * n must be allocated.
+ /// \li 2 the loosest bounds that are known to
+ /// keep the problem equivalent to the
+ /// original problem. This option also
+ /// implies that an additional real
+ /// workspace of size 2 * n must be
+ /// allocated.
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE).
- int final_z_bounds;
+ int final_x_bounds;
/// \brief
/// The type of final bounds on the dual variables returned by
/// the package. This parameter can take the values:
- /// - TIGHTEST : the final bounds are the tightest bounds
- /// known on the dual variables (at the risk
- /// of being redundant with other constraints,
- /// which may cause degeneracy);
- /// - NON_DEGENERATE: the best known bounds that are known to
- /// be non-degenerate. This option implies
- /// that an additional real workspace of size
- /// 2 * prob.n must be allocated.
- /// - LOOSEST : the loosest bounds that are known to
- /// keep the problem equivalent to the
- /// original problem. This option also
- /// implies that an additional real
- /// workspace of size 2 * prob.n must be
- /// allocated.
- /// Default: TIGHTEST
+ /// \li 0 the final bounds are the tightest bounds
+ /// known on the dual variables (at the risk
+ /// of being redundant with other constraints,
+ /// which may cause degeneracy);
+ /// \li 1 the best known bounds that are known to
+ /// be non-degenerate. This option implies
+ /// that an additional real workspace of size
+ /// 2 * n must be allocated.
+ /// \li 2 the loosest bounds that are known to
+ /// keep the problem equivalent to the
+ /// original problem. This option also
+ /// implies that an additional real
+ /// workspace of size 2 * n must be allocated.
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE).
- int final_c_bounds;
+ int final_z_bounds;
/// \brief
/// The type of final bounds on the constraints returned by the
/// package. This parameter can take the values:
- /// - TIGHTEST : the final bounds are the tightest bounds
- /// known on the constraints (at the risk of
- /// being redundant with other constraints,
- /// which may cause degeneracy);
- /// - NON_DEGENERATE: the best known bounds that are known to
- /// be non-degenerate. This option implies
- /// that an additional real workspace of size
- /// 2 * prob.m must be allocated.
- /// - LOOSEST : the loosest bounds that are known to
- /// keep the problem equivalent to the
- /// original problem. This option also
- /// implies that an additional real
- /// workspace of size 2 * prob.n must be
- /// allocated.
- /// Default: TIGHTEST
+ /// \li 0 the final bounds are the tightest bounds
+ /// known on the constraints (at the risk of
+ /// being redundant with other constraints,
+ /// which may cause degeneracy);
+ /// \li 1 the best known bounds that are known to
+ /// be non-degenerate. This option implies
+ /// that an additional real workspace of size
+ /// 2 * m must be allocated.
+ /// \li 2 the loosest bounds that are known to
+ /// keep the problem equivalent to the
+ /// original problem. This option also
+ /// implies that an additional real
+ /// workspace of size 2 * n must be
+ /// allocated.
/// NOTES:
/// 1) This parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE).
- /// 2) If different from TIGHTEST, its value must be identical
+ /// 2) If different from 0, its value must be identical
/// to that of control.final_x_bounds.
- int final_y_bounds;
+ int final_c_bounds;
/// \brief
/// The type of final bounds on the multipliers returned by the
/// package. This parameter can take the values:
- /// - TIGHTEST : the final bounds are the tightest bounds
- /// known on the multipliers (at the risk of
- /// being redundant with other constraints,
- /// which may cause degeneracy);
- /// - NON_DEGENERATE: the best known bounds that are known to
- /// be non-degenerate. This option implies
- /// that an additional real workspace of size
- /// 2 * prob.m must be allocated.
- /// - LOOSEST : the loosest bounds that are known to
- /// keep the problem equivalent to the
- /// original problem. This option also
- /// implies that an additional real
- /// workspace of size 2 * prob.n must be
- /// allocated.
- /// Default: TIGHTEST
+ /// \li 0 the final bounds are the tightest bounds
+ /// known on the multipliers (at the risk of
+ /// being redundant with other constraints,
+ /// which may cause degeneracy);
+ /// \li 1 the best known bounds that are known to
+ /// be non-degenerate. This option implies
+ /// that an additional real workspace of size
+ /// 2 * m must be allocated.
+ /// \li 2 the loosest bounds that are known to
+ /// keep the problem equivalent to the
+ /// original problem. This option also
+ /// implies that an additional real
+ /// workspace of size 2 * n must be
+ /// allocated.
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE).
- int check_primal_feasibility;
+ int final_y_bounds;
/// \brief
/// The level of feasibility check (on the values of x) at
/// the start of the restoration phase. This parameter can
/// take the values:
- /// - NONE : no check at all;
- /// - BASIC : the primal constraints are recomputed at x
- /// and a message issued if the computed value
- /// does not match the input value, or if it is
- /// out of bounds (if control.print_level >= ACTION);
- /// - SEVERE: the same as for BASIC, but PRESOLVE is
- /// terminated if an incompatibilty is detected.
- /// Default: NONE
- int check_dual_feasibility;
+ /// \li 0 no check at all;
+ /// \li 1 the primal constraints are recomputed at x
+ /// and a message issued if the computed value
+ /// does not match the input value, or if it is
+ /// out of bounds (if control.print_level >= 2);
+ /// \li 2 the same as for 1, but PRESOLVE is
+ /// terminated if an incompatibilty is detected.
+ int check_primal_feasibility;
/// \brief
/// The level of dual feasibility check (on the values of x,
/// y and z) at the start of the restoration phase.
/// This parameter can take the values:
- /// - NONE : no check at all;
- /// - BASIC : the dual feasibility condition is recomputed
- /// at ( x, y, z ) and a message issued if the
- /// computed value does not match the input value
- /// (if control.print_level >= ACTION);
- /// - SEVERE: the same as for BASIC, but PRESOLVE is
- /// terminated if an incompatibilty is detected.
- /// The last two values imply the allocation of an additional
- /// real workspace vector of size equal to the number of
- /// variables in the reduced problem.
- /// Default: NONE
- bool get_q;
+ /// \li 0 no check at all;
+ /// \li 1 the dual feasibility condition is recomputed
+ /// at ( x, y, z ) and a message issued if the
+ /// computed value does not match the input value
+ /// (if control.print_level >= ACTION);
+ /// \li 2 the same as for 1, but PRESOLVE is
+ /// terminated if an incompatibilty is detected.
+ /// The last two values imply the allocation of an additional
+ /// real workspace vector of size equal to the number of
+ /// variables in the reduced problem.
+ int check_dual_feasibility;
/// \brief
- /// Must be set to .TRUE. if the value of the objective
+ /// Must be set to true if the value of the objective
/// function must be reconstructed on RESTORE from the
/// (possibly solved) reduced problem.
- /// Default: .TRUE.
- bool get_f;
+ bool get_q;
/// \brief
- /// Must be set to .TRUE. if the value of the objective
+ /// Must be set to true if the value of the objective
/// function's independent term is to be be reconstructed
/// on RESTORE from the (possibly solved) reduced problem.
- /// Default: .TRUE.
- bool get_g;
+ bool get_f;
/// \brief
- /// Must be set to .TRUE. if the value of the objective
+ /// Must be set to true if the value of the objective
/// function's gradient must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
- /// Default: .TRUE.
- bool get_H;
+ bool get_g;
/// \brief
- /// Must be set to .TRUE. if the value of the objective
+ /// Must be set to true if the value of the objective
/// function's Hessian must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
- /// Default: .TRUE.
- bool get_A;
+ bool get_H;
/// \brief
- /// Must be set to .TRUE. if the value of the constraints'
+ /// Must be set to true if the value of the constraints'
/// coefficient matrix must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
- /// Default: .TRUE.
- bool get_x;
+ bool get_A;
/// \brief
- /// Must be set to .TRUE. if the value of the variables
+ /// Must be set to true if the value of the variables
/// must be reconstructed on RESTORE from the (possibly
/// solved) reduced problem.
- /// Default: .TRUE.
- bool get_x_bounds;
+ bool get_x;
/// \brief
- /// Must be set to .TRUE. if the value of the bounds on the
+ /// Must be set to true if the value of the bounds on the
/// problem variables must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
/// This parameter is only relevant in the RESTORE mode.
- /// Default: .TRUE.
- bool get_z;
+ bool get_x_bounds;
/// \brief
- /// Must be set to .TRUE. if the value of the dual variables
+ /// Must be set to true if the value of the dual variables
/// must be reconstructed on RESTORE from the (possibly
/// solved) reduced problem.
- /// Default: .TRUE.
- bool get_z_bounds;
+ bool get_z;
/// \brief
- /// Must be set to .TRUE. if the value of the bounds on the
+ /// Must be set to true if the value of the bounds on the
/// problem dual variables must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
/// If set to true, this may require to store specific
/// additional information on the problem transformations,
/// therefore increasing the storage needed for these
/// transformations.
- /// Default: .TRUE.
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE).
- bool get_c;
+ bool get_z_bounds;
/// \brief
- /// Must be set to .TRUE. if the value of the constraints
+ /// Must be set to true if the value of the constraints
/// must be reconstructed on RESTORE from the (possibly
/// solved) reduced problem.
- /// Default: .TRUE.
- bool get_c_bounds=;
+ bool get_c;
/// \brief
- /// Must be set to .TRUE. if the value of the bounds on the
+ /// Must be set to true if the value of the bounds on the
/// problem constraints must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
/// This parameter is only relevant in the RESTORE mode.
- /// Default: .TRUE.
- bool get_y;
+ bool get_c_bounds=;
/// \brief
- /// Must be set to .TRUE. if the value of the multipliers
+ /// Must be set to true if the value of the multipliers
/// must be reconstructed on RESTORE from the (possibly
/// solved) reduced problem.
- /// Default: .TRUE.
- bool get_y_bounds;
+ bool get_y;
/// \brief
- /// Must be set to .TRUE. if the value of the bounds on the
+ /// Must be set to true if the value of the bounds on the
/// problem multipliers must be reconstructed on RESTORE
/// from the (possibly solved) reduced problem.
/// If set to true, this may require to store specific
/// additional information on the problem transformations,
/// therefore increasing the storage needed for these
/// transformations.
- /// Default: .FALSE.
/// NOTE: this parameter must be identical for all calls to
/// PRESOLVE (except INITIALIZE)
- real_wp_ pivot_tol;
+ bool get_y_bounds;
/// \brief
/// The relative pivot tolerance above which pivoting is
@@ -956,9 +908,7 @@ struct presolve_control_type {
/// coefficient matrix A. A zero value corresponds to a
/// totally unsafeguarded pivoting strategy (potentially
/// unstable).
- /// Default: 10.**(-10) in double precision,
- /// 10.**(-6) in single precision.
- real_wp_ min_rel_improve;
+ real_wp_ pivot_tol;
/// \brief
/// The minimum relative improvement in the bounds on x, y
@@ -969,22 +919,20 @@ struct presolve_control_type {
/// lower bound on the same quantity, it is only accepted
/// if
///
- /// new_lower >= lower + tol * MAX( 1, ABS( lower ) ),
+ /// new_lower >= lower + tol * MAX( 1, ABS( lower ) ),
///
/// where
///
/// tol = control.min_rel_improve.
///
/// Similarly, a tentative tighter upper bound new_upper
- /// only replaces the current upper bound upper
+ /// only replaces the current upper bound upper if
///
- /// new_upper <= upper - tol * MAX( 1, ABS( upper ) ).
+ /// new_upper <= upper - tol * MAX( 1, ABS( upper ) ).
///
/// Note that this parameter must exceed the machine
/// precision significantly.
- /// Default: 10.**(-10) in double precision,
- /// 10.**(-6) in single precision.
- real_wp_ max_growth_factor;
+ real_wp_ min_rel_improve;
/// \brief
/// The maximum growth factor (in absolute value) that is
@@ -992,15 +940,13 @@ struct presolve_control_type {
/// problem and any data item in the reduced problem.
/// If a transformation results in this bound being exceeded,
/// the transformation is skipped.
- /// Default : 10.**8 in double precision,
- /// 10.**4 in single precision.
+ real_wp_ max_growth_factor;
};
/**
* inform derived type as a C struct
*/
struct presolve_inform_type {
- int status;
/// \brief
/// The PRESOLVE exit condition. It can take the following
@@ -1242,48 +1188,48 @@ struct presolve_inform_type {
/// a value was not recognized in the analysis of the
/// specification file
/// -63 (G_NOT_ALLOCATED)
- /// the vector prob.G has not been allocated although it
+ /// the vector G has not been allocated although it
/// has general values
/// -64 (C_NOT_ALLOCATED)
- /// the vector prob.C has not been allocated although
- /// prob.m > 0
+ /// the vector C has not been allocated although
+ /// m > 0
/// -65 (AVAL_NOT_ALLOCATED)
- /// the vector prob.A.val has not been allocated although
- /// prob.m > 0
+ /// the vector A.val has not been allocated although
+ /// m > 0
/// -66 (APTR_NOT_ALLOCATED)
- /// the vector prob.A.ptr has not been allocated although
- /// prob.m > 0 and A is stored in row-wise sparse format
+ /// the vector A.ptr has not been allocated although
+ /// m > 0 and A is stored in row-wise sparse format
/// -67 (ACOL_NOT_ALLOCATED)
- /// the vector prob.A.col has not been allocated although
- /// prob.m > 0 and A is stored in row-wise sparse format
+ /// the vector A.col has not been allocated although
+ /// m > 0 and A is stored in row-wise sparse format
/// or sparse coordinate format
/// -68 (AROW_NOT_ALLOCATED)
- /// the vector prob.A.row has not been allocated although
- /// prob.m > 0 and A is stored in sparse coordinate format
+ /// the vector A.row has not been allocated although
+ /// m > 0 and A is stored in sparse coordinate format
/// -69 (HVAL_NOT_ALLOCATED)
- /// the vector prob.H.val has not been allocated although
- /// prob.H.ne > 0
+ /// the vector H.val has not been allocated although
+ /// H.ne > 0
/// -70 (HPTR_NOT_ALLOCATED)
- /// the vector prob.H.ptr has not been allocated although
- /// prob.H.ne > 0 and H is stored in row-wise sparse format
+ /// the vector H.ptr has not been allocated although
+ /// H.ne > 0 and H is stored in row-wise sparse format
/// -71 (HCOL_NOT_ALLOCATED)
- /// the vector prob.H.col has not been allocated although
- /// prob.H.ne > 0 and H is stored in row-wise sparse format
+ /// the vector H.col has not been allocated although
+ /// H.ne > 0 and H is stored in row-wise sparse format
/// or sparse coordinate format
/// -72 (HROW_NOT_ALLOCATED)
- /// the vector prob.H.row has not been allocated although
- /// prob.H.ne > 0 and A is stored in sparse coordinate
+ /// the vector H.row has not been allocated although
+ /// H.ne > 0 and A is stored in sparse coordinate
/// format
/// -73 (WRONG_ANE)
- /// incompatible value of prob.A_ne
+ /// incompatible value of A_ne
/// -74 (WRONG_HNE)
- /// incompatible value of prob.H_ne
- int nbr_transforms;
+ /// incompatible value of H_ne
+ int status;
/// \brief
/// The final number of problem transformations, as reported
/// to the user at exit.
- char [81];
+ int nbr_transforms;
/// \brief
/// A few lines containing a description of the exit condition
@@ -1291,11 +1237,12 @@ struct presolve_inform_type {
/// than indicated in the description of control.status above.
/// It is printed out on device errout at the end of execution
/// if control.print_level >= TRACE.
+ char [81];
};
// *-*-*-*-*-*-*- P R E S O L V E _ I N I T I A L I Z E -*-*-*-*-*-*-
-void presolve_initialize( void **data,
+void presolve_initialize( void **data,
struct presolve_control_type *control,
int *status );
@@ -1304,7 +1251,7 @@ void presolve_initialize( void **data,
@param[in,out] data holds private internal data
- @param[out] control is a struct containing control information
+ @param[out] control is a struct containing control information
(see presolve_control_type)
@param[out] status is a scalar variable of type int, that gives
@@ -1314,20 +1261,445 @@ void presolve_initialize( void **data,
// *-*-*-*-*-*- P R E S O L V E _ R E A D _ S P E C F I L E -*-*-*-*-*-
-void presolve_read_specfile( struct presolve_control_type *control,
+void presolve_read_specfile( struct presolve_control_type *control,
const char specfile[] );
/*!<
- Read the content of a specification file, and assign values associated
+ Read the content of a specification file, and assign values associated
with given keywords to the corresponding control parameters
- @param[in,out] control is a struct containing control information
+ @param[in,out] control is a struct containing control information
(see presolve_control_type)
@param[in] specfile is a character string containing the name of
the specification file
*/
+// *-*-*-*-*-*-*- P R E S O L V E _ I M P O R T _ P R O B L E M -*-*-*-*-*-*-
+
+void presolve_import_problem( struct presolve_control_type *control,
+ void **data,
+ int *status,
+ int n,
+ int m,
+ const char H_type[],
+ int H_ne,
+ const int H_row[],
+ const int H_col[],
+ const int H_ptr[],
+ const real_wp_ H_val[],
+ const real_wp_ g[],
+ const real_wp_ f,
+ const char A_type[],
+ int A_ne,
+ const int A_row[],
+ const int A_col[],
+ const int A_ptr[] );
+ const real_wp_ A_val[],
+ const real_wp_ c_l[],
+ const real_wp_ c_u[],
+ const real_wp_ x_l[],
+ const real_wp_ x_u[],
+ int n_out,
+ int m_out,
+ int H_ne_out,
+ int A_ne_out );
+
+/*!<
+ Import the initial data, and apply the presolve algorithm to report
+ crucial characteristics of the transformed variant
+
+ @param[in] control is a struct whose members provide control
+ paramters for the remaining prcedures (see presolve_control_type)
+
+ @param[in,out] data holds private internal data
+
+ @param[in,out] status is a scalar variable of type int, that gives
+ the exit status from the package. Possible values are:
+ \li 0. The import was succesful
+ \li -1. An allocation error occurred. A message indicating the
+ offending array is written on unit control.error, and the
+ returned allocation status and a string containing the name
+ of the offending array are held in inform.alloc_status and
+ inform.bad_alloc respectively.
+ \li -2. A deallocation error occurred. A message indicating the
+ offending array is written on unit control.error and the
+ returned allocation status and a string containing the
+ name of the offending array are held in
+ inform.alloc_status and inform.bad_alloc respectively.
+ \li -3. The restrictions n > 0 or m > 0 or requirement that a type contains
+ its relevant string 'dense', 'coordinate', 'sparse_by_rows' or
+ 'diagonal' has been violated.
+ \li -23. An entry from the strict upper triangle of \f$H\f$ has been
+ specified.
+
+ @param[in] n is a scalar variable of type int, that holds the number of
+ variables.
+
+ @param[in] m is a scalar variable of type int, that holds the number of
+ general linear constraints.
+
+ @param[in] H_type is a one-dimensional array of type char that specifies the
+ \link main_symmetric_matrices symmetric storage scheme \endlink
+ used for the Hessian, \f$H\f$. It should be one of 'coordinate',
+ 'sparse_by_rows', 'dense', 'diagonal', 'scaled_identity', 'identity',
+ 'zero' or 'none', the latter pair if \f$H=0\f$; lower or upper
+ case variants are allowed.
+
+ @param[in] H_ne is a scalar variable of type int, that holds the number of
+ entries in the lower triangular part of \f$H\f$ in the sparse co-ordinate
+ storage scheme. It need not be set for any of the other schemes.
+
+ @param[in] H_row is a one-dimensional array of size H_ne and type int, that
+ holds the row indices of the lower triangular part of \f$H\f$ in the sparse
+ co-ordinate storage scheme. It need not be set for any of the other
+ three schemes, and in this case can be NULL.
+
+ @param[in] H_col is a one-dimensional array of size H_ne and type int,
+ that holds the column indices of the lower triangular part of \f$H\f$ in
+ either the sparse co-ordinate, or the sparse row-wise storage scheme. It
+ need not be set when the dense, diagonal or (scaled) identity storage
+ schemes are used, and in this case can be NULL.
+
+ @param[in] H_ptr is a one-dimensional array of size n+1 and type int,
+ that holds the starting position of each row of the lower
+ triangular part of \f$H\f$, as well as the total number of entries plus one,
+ in the sparse row-wise storage scheme. It need not be set when the
+ other schemes are used, and in this case can be NULL.
+
+ @param[in] H_val is a one-dimensional array of size h_ne and type double,
+ that holds the values of the entries of the lower triangular part of the
+ Hessian matrix \f$H\f$ in any of the available storage schemes.
+
+ @param[in] g is a one-dimensional array of size n and type double, that
+ holds the linear term \f$g\f$ of the objective function.
+ The j-th component of g, j = 0, ... , n-1, contains \f$g_j \f$.
+
+ @param[in] f is a scalar of type double, that
+ holds the constant term \f$f\f$ of the objective function.
+
+ @param[in] A_type is a one-dimensional array of type char that specifies the
+ \link main_unsymmetric_matrices unsymmetric storage scheme \endlink
+ used for the constraint Jacobian, \f$A\f$. It should be one of 'coordinate',
+ 'sparse_by_rows' or 'dense; lower or upper case variants are allowed.
+
+ @param[in] A_ne is a scalar variable of type int, that holds the number of
+ entries in \f$A\f$ in the sparse co-ordinate storage scheme.
+ It need not be set for any of the other schemes.
+
+ @param[in] A_row is a one-dimensional array of size A_ne and type int, that
+ holds the row indices of \f$A\f$ in the sparse co-ordinate storage scheme.
+ It need not be set for any of the other schemes,
+ and in this case can be NULL.
+
+ @param[in] A_col is a one-dimensional array of size A_ne and type int,
+ that holds the column indices of \f$A\f$ in either the sparse co-ordinate,
+ or the sparse row-wise storage scheme. It need not be set when the
+ dense or diagonal storage schemes are used, and in this case can be NULL.
+
+ @param[in] A_ptr is a one-dimensional array of size n+1 and type int,
+ that holds the starting position of each row of \f$A\f$, as well as the
+ total number of entries plus one, in the sparse row-wise storage scheme.
+ It need not be set when the other schemes are used,
+ and in this case can be NULL.
+
+ @param[in] A_val is a one-dimensional array of size a_ne and type double,
+ that holds the values of the entries of the constraint Jacobian matrix
+ \f$A\f$ in any of the available storage schemes.
+
+ @param[in] c_l is a one-dimensional array of size m and type double, that
+ holds the lower bounds \f$c^l\f$ on the constraints \f$A x\f$.
+ The i-th component of c_l, i = 0, ... , m-1, contains \f$c^l_i\f$.
+
+ @param[in] c_u is a one-dimensional array of size m and type double, that
+ holds the upper bounds \f$c^l\f$ on the constraints \f$A x\f$.
+ The i-th component of c_u, i = 0, ... , m-1, contains \f$c^u_i\f$.
+
+ @param[in] x_l is a one-dimensional array of size n and type double, that
+ holds the lower bounds \f$x^l\f$ on the variables \f$x\f$.
+ The j-th component of x_l, j = 0, ... , n-1, contains \f$x^l_j\f$.
+
+ @param[in] x_u is a one-dimensional array of size n and type double, that
+ holds the upper bounds \f$x^l\f$ on the variables \f$x\f$.
+ The j-th component of x_u, j = 0, ... , n-1, contains \f$x^l_j\f$.
+
+ @param[out] n_out is a scalar variable of type int, that holds the number of
+ variables in the transformed problem.
+
+ @param[out] m_out is a scalar variable of type int, that holds the number of
+ general linear constraints in the transformed problem.
+
+ @param[out] H_ne_out is a scalar variable of type int, that holds the number
+ of entries in the lower triangular part of \f$H\f$ in the transformed
+ problem.
+
+ @param[out] A_ne_out is a scalar variable of type int, that holds the number
+ of entries in \f$A\f$ in the transformed problem.
+
+*/
+
+// *-*-*-*-*- P R E S O L V E _ T R A N S F O R M _ P R O B L E M -*-*-*-*-
+
+void presolve_transform_problem( void **data,
+ int *status,
+ int n,
+ int m,
+ int H_ne,
+ int H_col[],
+ int H_ptr[],
+ real_wp_ H_val[],
+ real_wp_ g[],
+ real_wp_ f,
+ int A_ne,
+ int A_col[],
+ int A_ptr[] );
+ real_wp_ A_val[],
+ real_wp_ c_l[],
+ real_wp_ c_u[],
+ real_wp_ x_l[],
+ real_wp_ x_u[],
+ real_wp_ y_l[],
+ real_wp_ y_u[],
+ real_wp_ z_l[],
+ real_wp_ z_u[] );
+
+/*!<
+ Apply the presolve algorithm to simplify the input problem, and
+ output the transformed variant
+
+ @param[in,out] data holds private internal data
+
+ @param[in,out] status is a scalar variable of type int, that gives
+ the exit status from the package. Possible values are:
+ \li 0. The import was succesful
+ \li -1. An allocation error occurred. A message indicating the
+ offending array is written on unit control.error, and the
+ returned allocation status and a string containing the name
+ of the offending array are held in inform.alloc_status and
+ inform.bad_alloc respectively.
+ \li -2. A deallocation error occurred. A message indicating the
+ offending array is written on unit control.error and the
+ returned allocation status and a string containing the
+ name of the offending array are held in
+ inform.alloc_status and inform.bad_alloc respectively.
+ \li -3. The restrictions n > 0 or m > 0 or requirement that a type contains
+ its relevant string 'dense', 'coordinate', 'sparse_by_rows',
+ 'diagonal', 'scaled_identity', 'identity', 'zero' or 'none'
+ has been violated.
+ \li -23. An entry from the strict upper triangle of \f$H\f$ has been
+ specified.
+
+ @param[out] n is a scalar variable of type int, that holds the number of
+ variables in the transformed problem. This must match the value
+ n_out from the last call to presolve_import_problem.
+
+ @param[out] m is a scalar variable of type int, that holds the number of
+ general linear constraints. This must match the value
+ m_out from the last call to presolve_import_problem.
+
+ @param[out] h_ne is a scalar variable of type int, that holds the number of
+ entries in the lower triangular part of the transformed \f$H\f$.
+ This must match the value H_ne_out from the last call to
+ presolve_import_problem.
+
+ @param[out] H_col is a one-dimensional array of size H_ne and type int,
+ that holds the column indices of the lower triangular part of the
+ transformed \f$H\f$ in the sparse row-wise storage scheme.
+
+ @param[out] H_ptr is a one-dimensional array of size n+1 and type int,
+ that holds the starting position of each row of the lower
+ triangular part of the transformed \f$H\f$ in
+ the sparse row-wise storage scheme.
+
+ @param[out] H_val is a one-dimensional array of size h_ne and type double,
+ that holds the values of the entries of the lower triangular part of the
+ the transformed Hessian matrix \f$H\f$ in
+ the sparse row-wise storage scheme.
+
+ @param[out] g is a one-dimensional array of size n and type double, that
+ holds the the transformed linear term \f$g\f$ of the objective function.
+ The j-th component of g, j = 0, ... , n-1, contains \f$g_j \f$.
+
+ @param[out] f is a scalar of type double, that
+ holds the transformed constant term \f$f\f$ of the objective function.
+
+ @param[out] a_ne is a scalar variable of type int, that holds the number of
+ entries in the transformed \f$A\f$. This must match the value A_ne_out
+ from the last call to presolve_import_problem.
+
+ @param[out] A_col is a one-dimensional array of size A_ne and type int,
+ that holds the column indices of the transformed \f$A\f$ in the
+ sparse row-wise storage scheme.
+
+ @param[out] A_ptr is a one-dimensional array of size n+1 and type int,
+ that holds the starting position of each row of the transformed \f$A\f$,
+ as well as the total number of entries plus one, in the sparse row-wise
+ storage scheme.
+
+ @param[out] A_val is a one-dimensional array of size a_ne and type double,
+ that holds the values of the entries of the transformed constraint
+ Jacobian matrix \f$A\f$ in the sparse row-wise storage scheme.
+
+ @param[out] c_l is a one-dimensional array of size m and type double, that
+ holds the transformed lower bounds \f$c^l\f$ on the constraints \f$A x\f$.
+ The i-th component of c_l, i = 0, ... , m-1, contains \f$c^l_i\f$.
+
+ @param[out] c_u is a one-dimensional array of size m and type double, that
+ holds the transformed upper bounds \f$c^l\f$ on the constraints \f$A x\f$.
+ The i-th component of c_u, i = 0, ... , m-1, contains \f$c^u_i\f$.
+
+ @param[out] c_stat is a one-dimensional array of size m and type int, that
+ gives the optimal status of the general linear constraints. If c_stat(i) is
+ negative, the constraint value \f$a_i^Tx\f$ most likely lies on its
+ lower bound, if it is positive, it lies on its upper bound, and if it
+ is zero, it lies between its bounds.
+
+ @param[out] x_l is a one-dimensional array of size n and type double, that
+ holds the transformed lower bounds \f$x^l\f$ on the variables \f$x\f$.
+ The j-th component of x_l, j = 0, ... , n-1, contains \f$x^l_j\f$.
+
+ @param[out] x_u is a one-dimensional array of size n and type double, that
+ holds the transformed upper bounds \f$x^l\f$ on the variables \f$x\f$.
+ The j-th component of x_u, j = 0, ... , n-1, contains \f$x^l_j\f$.
+
+ @param[out] x_stat is a one-dimensional array of size n and type int, that
+ gives the optimal status of the problem variables. If x_stat(j) is negative,
+ the variable \f$x_j\f$ most likely lies on its lower bound, if it is
+ positive, it lies on its upper bound, and if it is zero, it lies
+ between its bounds.
+
+ @param[out] y_l is a one-dimensional array of size m and type double, that
+ holds the implied lower bounds \f$y^l\f$ on the transformed Lagrange
+ multipliers \f$y\f$.
+ The i-th component of y_l, i = 0, ... , m-1, contains \f$y^l_i\f$.
+
+ @param[out] y_u is a one-dimensional array of size m and type double, that
+ holds the implied upper bounds \f$y^u\f$ on the transformed Lagrange
+ multipliers \f$y\f$.
+ The i-th component of y_u, i = 0, ... , m-1, contains \f$y^u_i\f$.
+
+ @param[out] y_l is a one-dimensional array of size m and type double, that
+ holds the implied lower bounds \f$y^l\f$ on the transformed dual variables
+ \f$z\f$.
+ The j-th component of z_l, j = 0, ... , n-1, contains \f$z^l_i\f$.
+
+ @param[out] z_u is a one-dimensional array of size m and type double, that
+ holds the implied upper bounds \f$y^u\f$ on the transformed dual variables
+ \f$z\f$.
+ The j-th component of z_u, j = 0, ... , n-1, contains \f$z^u_i\f$.
+
+*/
+
+// *-*-*-*-*- P R E S O L V E _ R E S T O R E + S O L U T I O N -*-*-*-*-*-
+
+void presolve_restore_solution( void **data,
+ int *status,
+ int n,
+ int m,
+ real_wp_ x[],
+ real_wp_ c[],
+ real_wp_ y[],
+ real_wp_ z[] );
+
+/*!<
+ Apply the presolve algorithm to simplify the input problem, and
+ output the transformed variant
+
+ @param[in,out] data holds private internal data
+
+ @param[in,out] status is a scalar variable of type int, that gives
+ the exit status from the package. Possible values are:
+ \li 0. The import was succesful
+ \li -1. An allocation error occurred. A message indicating the
+ offending array is written on unit control.error, and the
+ returned allocation status and a string containing the name
+ of the offending array are held in inform.alloc_status and
+ inform.bad_alloc respectively.
+ \li -2. A deallocation error occurred. A message indicating the
+ offending array is written on unit control.error and the
+ returned allocation status and a string containing the
+ name of the offending array are held in
+ inform.alloc_status and inform.bad_alloc respectively.
+ \li -3. The restrictions n > 0 or m > 0 has been violated.
+
+ @param[out] n_in is a scalar variable of type int, that holds the number of
+ variables in the transformed problem. This must match the value
+ n_out from the last call to presolve_import_problem.
+
+ @param[out] m_in is a scalar variable of type int, that holds the number of
+ general linear constraints. This must match the value
+ m_out from the last call to presolve_import_problem.
+
+ @param[in] x_in is a one-dimensional array of size n_in and type double, that
+ holds the transformed values \f$x\f$ of the optimization variables.
+ The j-th component of x, j = 0, ... , n-1, contains \f$x_j\f$.
+
+ @param[in] c_in is a one-dimensional array of size m and type double, that
+ holds the transformed residual \f$c(x)\f$.
+ The i-th component of c, j = 0, ... , n-1, contains \f$c_j(x) \f$.
+
+ @param[in] y_in is a one-dimensional array of size n_in and type double, that
+ holds the values \f$y\f$ of the transformed Lagrange multipliers for
+ the general linear constraints. The j-th component
+ of y, j = 0, ... , n-1, contains \f$y_j\f$.
+
+ @param[in] z_in is a one-dimensional array of size n_in and type double, that
+ holds the values \f$z\f$ of the transformed dual variables.
+ The j-th component of z, j = 0, ... , n-1, contains \f$z_j\f$.
+
+ @param[in] c_stat_in is a one-dimensional array of size m_in and type int, that
+ gives the optimal status of the general linear constraints. If c_stat(i) is
+ negative, the constraint value \f$a_i^Tx\f$ most likely lies on its
+ lower bound, if it is positive, it lies on its upper bound, and if it
+ is zero, it lies between its bounds.
+
+ @param[in] x_stat_in is a one-dimensional array of size n_in and type int, that
+ gives the optimal status of the problem variables. If x_stat(j) is negative,
+ the variable \f$x_j\f$ most likely lies on its lower bound, if it is
+ positive, it lies on its upper bound, and if it is zero, it lies
+ between its bounds.
+
+ @param[out] n is a scalar variable of type int, that holds the number of
+ variables in the transformed problem. This must match the value
+ n_out from the last call to presolve_import_problem.
+
+ @param[out] m is a scalar variable of type int, that holds the number of
+ general linear constraints. This must match the value
+ m_out from the last call to presolve_import_problem.
+
+ @param[out] x is a one-dimensional array of size n and type double, that
+ holds the transformed values \f$x\f$ of the optimization variables.
+ The j-th component of x, j = 0, ... , n-1, contains \f$x_j\f$.
+
+ @param[out] c is a one-dimensional array of size m and type double, that
+ holds the transformed residual \f$c(x)\f$.
+ The i-th component of c, j = 0, ... , n-1, contains \f$c_j(x) \f$.
+
+ @param[out] y is a one-dimensional array of size n and type double, that
+ holds the values \f$y\f$ of the transformed Lagrange multipliers for
+ the general linear constraints. The j-th component
+ of y, j = 0, ... , n-1, contains \f$y_j\f$.
+
+ @param[out] z is a one-dimensional array of size n and type double, that
+ holds the values \f$z\f$ of the transformed dual variables.
+ The j-th component of z, j = 0, ... , n-1, contains \f$z_j\f$.
+
+ @param[out] c_stat_in is a one-dimensional array of size m and type int, that
+ gives the optimal status of the general linear constraints. If c_stat(i) is
+ negative, the constraint value \f$a_i^Tx\f$ most likely lies on its
+ lower bound, if it is positive, it lies on its upper bound, and if it
+ is zero, it lies between its bounds.
+
+ @param[out] x_stat_in is a one-dimensional array of size n and type int, that
+ gives the optimal status of the problem variables. If x_stat(j) is negative,
+ the variable \f$x_j\f$ most likely lies on its lower bound, if it is
+ positive, it lies on its upper bound, and if it is zero, it lies
+ between its bounds.
+
+*/
+
+
// *-*-*-*-*-*-*- P R E S O L V E _ I N F O R M A T I O N -*-*-*-*-*-*-
+
void presolve_information( void **data,
struct presolve_inform_type *inform,
int *status );
@@ -1338,7 +1710,7 @@ void presolve_information( void **data,
@param[in,out] data holds private internal data
@param[out] inform is a struct containing output information
- (see presolve_inform_type)
+ (see presolve_inform_type)
@param[out] status is a scalar variable of type int, that gives
the exit status from the package.
@@ -1348,8 +1720,8 @@ void presolve_information( void **data,
// *-*-*-*-*-*-*-*- P R E S O L V E _ T E R M I N A T E -*-*-*-*-*-*-*-
-void presolve_terminate( void **data,
- struct presolve_control_type *control,
+void presolve_terminate( void **data,
+ struct presolve_control_type *control,
struct presolve_inform_type *inform );
/*!<
@@ -1357,7 +1729,7 @@ void presolve_terminate( void **data,
@param[in,out] data holds private internal data
- @param[out] control is a struct containing control information
+ @param[out] control is a struct containing control information
(see presolve_control_type)
@param[out] inform is a struct containing output information
@@ -1369,9 +1741,9 @@ void presolve_terminate( void **data,
\f$\label{examples}\f$
\example qpbt.c
This is an example of how to use the package to solve a quadratic program.
- A variety of supported Hessian and constraint matrix storage formats are
+ A variety of supported Hessian and constraint matrix storage formats are
shown.
-
+
Notice that C-style indexing is used, and that this is flaggeed by
setting \c control.f_indexing to \c false.