evaluate_steady_state.m: do not require second solver call if debug is requested

All output has already been computed before
kalman-mex
Johannes Pfeifer 2023-08-27 11:25:29 +02:00
parent 757b6e10ec
commit dafe3fbdb2
1 changed files with 2 additions and 5 deletions

View File

@ -293,22 +293,19 @@ elseif ~options.bytecode && ~options.block
options.mcppath.lb = lb;
options.mcppath.ub = ub;
end
[ys,check,fvec] = dynare_solve(@static_mcp_problem,...
[ys,check,fvec, fjac, errorcode] = dynare_solve(@static_mcp_problem,...
ys_init,...
options.steady.maxit, options.solve_tolf, options.solve_tolx, ...
options, exo_ss, params,...
M.endo_nbr, static_resid, static_g1, ...
M.static_g1_sparse_rowval, M.static_g1_sparse_colval, M.static_g1_sparse_colptr, eq_index);
else
[ys, check] = dynare_solve(@static_problem, ys_init, ...
[ys, check, fvec, fjac, errorcode] = dynare_solve(@static_problem, ys_init, ...
options.steady.maxit, options.solve_tolf, options.solve_tolx, ...
options, exo_ss, params, M.endo_nbr, static_resid, static_g1, ...
M.static_g1_sparse_rowval, M.static_g1_sparse_colval, M.static_g1_sparse_colptr);
end
if check && options.debug
[ys, check, fvec, fjac, errorcode] = dynare_solve(@static_problem, ys_init, ...
options.steady.maxit, options.solve_tolf, options.solve_tolx, ...
options, exo_ss, params, M.endo_nbr, static_resid, static_g1, M.static_g1_sparse_rowval, M.static_g1_sparse_colval, M.static_g1_sparse_colptr);
dprintf('Nonlinear solver routine returned errorcode=%i.', errorcode)
skipline()
[infrow,infcol]=find(isinf(fjac) | isnan(fjac));