How to set SNOPT tolerances with ezsolve: Difference between revisions

From TomWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 1: Line 1:
[[SNOPT]] tolerances (and other parameters) can be set in the Prob.SOL.optPar vector.
[[SNOPT]] tolerances (and other parameters) can be set in the Prob.SOL.optPar vector. This vector is described in the SNOPT manual, and also in the Matlab help for the function "snoptTL".


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.
With tomSym/ezsolve, the vector is passed as options.Prob.SOL.optPar. It should first be initialized as -999, to leave all other parameters at their default values.


Example:
Example:

Latest revision as of 10:27, 24 December 2015

SNOPT tolerances (and other parameters) can be set in the Prob.SOL.optPar vector. This vector is described in the SNOPT manual, and also in the Matlab help for the function "snoptTL".

With tomSym/ezsolve, the vector is passed as options.Prob.SOL.optPar. It 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)