« Previous « Start » Next »
4 Using the NPSOL Solvers in TOMVIEW
This section discusses the use of the NPSOL solvers. In order to use
these solvers efficiently, it is recommended to read the
corresponding user guides as well.
To learn all the different parameter settings for a solver it is
useful to check the user palettes, where all parameters are
included. It might be useful to run the test problems included with
TOMVIEW to learn how to use the NPSOL solvers in the most efficient
way.
4.1 Setting Solver Parameters
The solvers are using a large number of parameters. To handle the
use of the NPSOL solvers, user palettes have been created for each
solver.
Any value of −999 or lower will give the default value used by the
solver.
Other important fields to set when using the NPSOL solvers are the
print and summary files that the solvers create. These files are
very important to look through if any problems are occurring, to
find what the causes might be, and if any warnings or errors are
reported from the NPSOL solvers. To create a print and summary file,
when running
MINOS use the
minosOptions_printing.vi
block.
4.2 Derivatives for the Solvers
The NPSOL solvers have some useful special features, which influence
the way that input is prepared to the solvers.
When defining the gradient vector and the constraint Jacobian matrix
it is often the case that they are only partially known. The NPSOL
solvers give the possibility to mark these elements. They will then
be estimated by finite differences.
In TOMVIEW the gradient and the constraint Jacobian matrix are defined
in two separate routines. If any element is unknown, it is just
marked with the standard element
NaN. The TOMVIEW NPSOL
routines will then convert the
NaN element to the
corresponding element used by NPSOL to mark that the element is
unknown.
If any gradient or constraint Jacobian element is infinite, in LabVIEW
set as
Inf or
-Inf, this element is converted to a big
number, 10
20, in the TOMVIEW NPSOL interface.
The following applies to the sparse nonlinear programming solvers
MINOS and
SNOPT. When the constraint Jacobian matrix
is sparse, then only the nonzero elements should be given. The
sparse pattern is given as a sparse matrix
Prob.ConsPattern.
In this matrix nonzero elements are marking nonzero elements in the
constraint Jacobian. This pattern is static, i.e. given once before
the call to the NPSOL solver.
The TOMVIEW NPSOL solvers assumes the following conventions for the
constraint Jacobian matrix:
-
If the user returns a sparse matrix, and the number of
nonzeros are equal to the number of nonzeros in Prob.ConsPattern, no checks are done.
- If the user returns a sparse matrix, and the number of
nonzeros are not equal to the number of nonzeros in Prob.ConsPattern, the interface is matching all elements in the
sparse array to find which nonzeros they represent, and returns the
correct vector of static nonzeros.
- If the user returns a sparse matrix, and has given no
pattern of nonzeros in Prob.ConsPattern, i.e. it is an empty
array, then the solver and the interface assumes a full, dense
matrix and the interface makes a full matrix before returning the
elements, column by column, to the solver.
- If the user returns a dense matrix, the interface just feeds
all elements, column by column, back to the solver.
- If too few elements are returned, the solver will estimate
the rest using finite differences.
When using the dense SOL nonlinear programming solvers, the
constraint Jacobian matrix is always assumed to be dense. The
interface will convert any sparse matrix returned by the user to a
dense, full matrix, and return the elements, column by column, to
the solver.
If no derivatives are available, it might be better to use the
DERIVATIVE LINESEARCH = 0 in
SNOPT. It is based on
safeguarded quadratic interpolation. The default is to use a
safeguarded cubic interpolation.
4.3 Solver Output to Files
The NPSOL solvers print different amount of information on ASCII
files, one
PRINT FILE with more information, and one
SUMMARY FILE with less information.
The print and summary files will only be generated if PRINT LEVELS
are set. The amount of printing is determined by a print level code,
which is different for different solvers. See the help and manual
for each solver. Some solvers also have two print levels, one major
print level and one minor print level. This applies for
SNOPT,
NPSOL and
NLSSOL. There are also
different other parameters that influence how much output is written
on the files. The following parameters should be used to get maximum
output for
SNOPT on files with user defined names.
MAJOR PRINT LEVEL = 111111
MINOR PRINT LEVEL = 10
PRINT FREQUENCY = 1
SUMMARY FREQUENCY = 1
SOLUTION = 1
| Information stored in the structure Prob.optParam |
« Previous « Start » Next »