AMPL > >Products > >Solvers > >SNOPT Directives for AMPL

SNOPT Directives for AMPL

To set these directives, assign a string specifying their values to the AMPL option snopt_options. You can specify as directives any of the optional parameters described in the SNOPT User’s Guide. Where the option name has several words, replace the spaces between words by _ characters, and always put an equal sign between the option name and value. For example:

​option snopt_options 'central_difference_interval=2.0e-6 check_frequency=40';

​You can abbreviate option names as long as they remain unique:

​option snopt_options 'central=2.0e-6 check=40';

Additionally you may use the following directives which are specific to the SNOPT-AMPL interface.

ftimes   report function evaluation times
		0 = no
		1 = yes (default)
maxfwd max vars in fwd AD of common exprs (default 5)
meminc increment to minimum memory allocation
objno objective number: 0 = none, 1 = first (default)
objrep Whether to replace minimize obj: v; with minimize obj: f(x) when variable v appears linearly in exactly one constraint of the form s.t. c: v >= f(x); or s.t. c: v == f(x); Recognized values are: 0 = no 1 = yes for v >= f(x) 2 = yes for v == f(x) 3 = yes in both cases (default)
outlev output level; 1 = default
qpcheck whether to pass LPs and QPs to SQOPT rather than SNOPT: 0 = no 1 = yes (default)
timing report I/O and solution times: 1 = stdout, 2 = stderr, 3 = both
version report version (keyword only) 0 = no 1 = yes (default)
wantsol solution report without -AMPL: sum of 1 ==> write .sol file 2 ==> print primal variable values 4 ==> print dual variable values 8 ==> do not print solution message