How to set SNOPT tolerances with ezsolve

From TomWiki
Revision as of 06:02, 15 December 2015 by Per (talk | contribs) (Example of setting SNOPT options through ezsolve)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

SNOPT tolerances (and other parameters) can be set in the Prob.SOL.optPar vector.

With tomSym/ezsolve, this vector is set as options.Prob.SOL.optPar. The vector should first be initialized as -999, to leave all other parameters at their default values.

Example:

 optPar = repmat(-999,72,1); % -999 means to use default values
 optPar(10) = 1e-3; % set major optimality tolerance
 options.Prob.SOL.optPar = optPar;
 solution = ezsolve(objective, constraints, guess, options)