The SNOPT Solver
The SNOPT solver uses a gradient-based optimization technique to find optimal solutions to a very general class of optimization problems. It requires gradients of both the objective function and all constraints, which can either be computed externally (analytically or seminumerically) or internally, using numeric differentiation.
The underlying algorithm is an implementation of sequential quadratic programming (SQP). This means that SNOPT solves a sequence of approximations to the original problem, where the objective function is assumed to be a quadratic polynomial and constraints are treated as linear. Steps in this sequence are referred to as major or outer iterations. Each approximate quadratic programming (QP) problem is also solved iteratively, requiring a number of minor or inner iterations. The QP solver returns a step direction to the outer SQP algorithm, which decides on a step length and updates the QP approximation before proceeding to the next major iteration.
The overall structure of SNOPT as well as the default QP solver (Cholesky) assume that optimal solutions are more likely to be found at corners of the feasible set, bound by constraints, than in the interior of the feasible set. Therefore, the method performs best on problems with many active constraints relative to the number of control variable degrees of freedom, such that close to the optimum, most degrees of freedom are bound by constraints and only a few are free. Such free degrees of freedom are referred to as superbasic variables. When the number of such superbasic variables becomes large, the full Cholesky factorization-based QP-solver is unsuitable. Instead one of the iterative, conjugate gradients or quasi-Newton, methods should be selected instead. For details, see Ref. 5 and Ref. 6.
Command-Line Options
SNOPT can optionally output diagnostic information to a file. The file contents and format are described in Ref. 5. To turn this functionality on, set the following command-line options when starting COMSOL Multiphysics:
-cs.snoptprintdir <dir> -cs.snoptprintfile <filename>
where <dir> is the desired output directory and <filename> is the filename. You can also specify the same options in the applicable INI file as
-Dcs.snoptprintdir=<dir>
-Dcs.snoptprintfile=<filename>
See The COMSOL Commands in the COMSOL Multiphysics Reference Manual for further information about setting options when starting COMSOL Multiphysics.