diff --git a/doc/dynare.texi b/doc/dynare.texi index 5f18125f3..7ddd04dd0 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -2758,7 +2758,8 @@ using the same solver as value @code{1} Use Chris Sims' solver @item 4 -Trust-region solver with autoscaling. +Splits the model into recursive blocks and solves each block in turn +using a trust-region solver with autoscaling. @item 5 Newton algorithm with a sparse Gaussian elimination (SPE) (requires @@ -2777,6 +2778,9 @@ each iteration (requires @code{bytecode} and/or @code{block} option, Newton algorithm with a Stabilized Bi-Conjugate Gradient (BICGSTAB) solver at each iteration (requires @code{bytecode} and/or @code{block} option, @pxref{Model declaration}) + +@item 9 +Trust-region algorithm on the entire model. @end table @noindent diff --git a/matlab/dynare_solve.m b/matlab/dynare_solve.m index 744d174e2..f98980d97 100644 --- a/matlab/dynare_solve.m +++ b/matlab/dynare_solve.m @@ -109,7 +109,11 @@ if options_.solve_algo == 0 info = 1; end elseif options_.solve_algo == 1 - [x,info]=solve1(func,x,1:nn,1:nn,jacobian_flag,options_.gstep, ... + [x,info]=solve1(func,x,1:nn,1:nn,jacobian_flag,options_.gstep, ... + tolf,options_.solve_tolx, ... + options_.steady.maxit,options_.debug,varargin{:}); +elseif options_.solve_algo == 5 + [x,info]=trust_region(func,x,1:nn,1:nn,jacobian_flag,options_.gstep, ... tolf,options_.solve_tolx, ... options_.steady.maxit,options_.debug,varargin{:}); elseif options_.solve_algo == 2 || options_.solve_algo == 4