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=7time-shift
parent
38e1ec6b1e
commit
dea930d329
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue