Changed rescaling strategy in trust region algorithm.

Reverts to the original MINPACK's behaviour.
time-shift
Stéphane Adjemian (Charybdis) 2020-02-20 09:34:13 +01:00
parent 0f23f88700
commit 776f50b124
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 2 additions and 9 deletions

View File

@ -25,7 +25,7 @@ function [x,check,info] = trust_region(fcn,x0,j1,j2,jacobian_flag,gstep,tolf,tol
% none
% Copyright (C) 2008-2012 VZLU Prague, a.s.
% Copyright (C) 2014-2019 Dynare Team
% Copyright (C) 2014-2020 Dynare Team
%
% This file is part of Dynare.
%
@ -95,14 +95,7 @@ while (niter < maxiter && ~info)
dg(dg == 0) = 1;
else
% Rescale adaptively.
% FIXME: the original minpack used the following rescaling strategy:
% dg = max (dg, jcn);
% but it seems not good if we start with a bad guess yielding Jacobian
% columns with large norms that later decrease, because the corresponding
% variable will still be overscaled. So instead, we only give the old
% scaling a small momentum, but do not honor it.
dg = max (0.1*dg, jcn);
dg = max (dg, jcn);
end
if (niter == 1)