lnsrch1.m: do not display debugging info for perfect_foresight_solver

Necessary info does not exist within function to correctly identify problematic variables, leading to crashes with stack_solve_algo=7
time-shift
Johannes Pfeifer 2016-07-03 12:37:30 +02:00 committed by Stéphane Adjemian (Lupi)
parent 38e1ec6b1e
commit dea930d329
1 changed files with 20 additions and 18 deletions

View File

@ -49,6 +49,7 @@ nn = length(j2);
summ = sqrt(p'*p);
if ~isfinite(summ)
if ~isequal(func,@perfect_foresight_problem)
eq_number_string=[];
for ii=1:length(j1)-1
eq_number_string=[eq_number_string, num2str(j1(ii)), ', '];
@ -67,6 +68,7 @@ if ~isfinite(summ)
fprintf('%-s % 8.4g \n',Model.endo_names(ii,:),xold(ii));
end
skipline();
end
error(['Some element of Newton direction isn''t finite. Jacobian maybe' ...
' singular or there is a problem with initial values'])
end