Improve treatment of error messages in homotopy
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2895 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
85ac76b9ae
commit
d97683c26e
|
@ -77,9 +77,5 @@ function homotopy1(values, step_nbr)
|
||||||
oo_.exo_steady_state(values(ix,2)) = points(ix,i);
|
oo_.exo_steady_state(values(ix,2)) = points(ix,i);
|
||||||
oo_.exo_det_steady_state(values(ixd,2)) = points(ixd,i);
|
oo_.exo_det_steady_state(values(ixd,2)) = points(ixd,i);
|
||||||
|
|
||||||
try
|
steady_;
|
||||||
steady_;
|
|
||||||
catch
|
|
||||||
error('HOMOTOPY mode 1: failed')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -100,11 +100,7 @@ function homotopy2(values, step_nbr)
|
||||||
|
|
||||||
disp([ 'HOMOTOPY mode 2: lauching solver with ' strtrim(varname) ' = ' num2str(v) ' ...'])
|
disp([ 'HOMOTOPY mode 2: lauching solver with ' strtrim(varname) ' = ' num2str(v) ' ...'])
|
||||||
|
|
||||||
try
|
steady_;
|
||||||
steady_;
|
|
||||||
catch
|
|
||||||
error('HOMOTOPY mode 2: failed')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -103,7 +103,8 @@ function homotopy3(values, step_nbr)
|
||||||
end
|
end
|
||||||
oldvalues = curvalues;
|
oldvalues = curvalues;
|
||||||
inc = 2*inc;
|
inc = 2*inc;
|
||||||
catch
|
catch E
|
||||||
|
disp(E.message)
|
||||||
disp('HOMOTOPY mode 3: failed step, now dividing increment by 2...')
|
disp('HOMOTOPY mode 3: failed step, now dividing increment by 2...')
|
||||||
inc = inc/2;
|
inc = inc/2;
|
||||||
oo_.steady_state = old_ss;
|
oo_.steady_state = old_ss;
|
||||||
|
|
Loading…
Reference in New Issue