Skip to content
Snippets Groups Projects
Commit c7b47c34 authored by Marco Ratto's avatar Marco Ratto
Browse files

initialize robust to false and fixed indentation of mr_gstep.m

parent b4be2760
No related branches found
No related tags found
1 merge request!2224enhancements and new robust feature in line search within optimizer=5
...@@ -564,7 +564,7 @@ options_.csminwel=csminwel; ...@@ -564,7 +564,7 @@ options_.csminwel=csminwel;
%newrat optimization routine %newrat optimization routine
newrat.hess=1; % dynare numerical hessian newrat.hess=1; % dynare numerical hessian
newrat.robust=0; newrat.robust=false;
newrat.tolerance.f=1e-5; newrat.tolerance.f=1e-5;
newrat.tolerance.f_analytic=1e-7; newrat.tolerance.f_analytic=1e-7;
newrat.tolerance.gstep = NaN; newrat.tolerance.gstep = NaN;
......
...@@ -75,7 +75,7 @@ while i<n ...@@ -75,7 +75,7 @@ while i<n
if gg(i)*(hh(i)*gg(i))/2 > htol(i) if gg(i)*(hh(i)*gg(i))/2 > htol(i)
[ff, xx,fcount,retcode] = csminit1(func0,x,penalty,f0,gg,0,diag(hh),Verbose,varargin{:}); [ff, xx,fcount,retcode] = csminit1(func0,x,penalty,f0,gg,0,diag(hh),Verbose,varargin{:});
if retcode && robust if retcode && robust
% do_nothing=true;
if abs(x(i))<1.e-6 if abs(x(i))<1.e-6
xa=transpose(linspace(x(i)/2, sign(x(i))*1.e-6*3/2, 7)); xa=transpose(linspace(x(i)/2, sign(x(i))*1.e-6*3/2, 7));
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment