🐛 Perturbation solution: gracefully fail if order=2 is requested with bytecode
parent
91fa8d079e
commit
0923187938
|
@ -24,7 +24,7 @@ function [dr, info] = stochastic_solvers(dr, task, M_, options_, oo_)
|
||||||
% info=6 -> The jacobian matrix evaluated at the steady state is complex.
|
% info=6 -> The jacobian matrix evaluated at the steady state is complex.
|
||||||
% info=9 -> k_order_pert was unable to compute the solution
|
% info=9 -> k_order_pert was unable to compute the solution
|
||||||
|
|
||||||
% Copyright © 1996-2021 Dynare Team
|
% Copyright © 1996-2023 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -115,9 +115,7 @@ if local_order == 1
|
||||||
end
|
end
|
||||||
elseif local_order == 2
|
elseif local_order == 2
|
||||||
if (options_.bytecode)
|
if (options_.bytecode)
|
||||||
[~, loc_dr] = bytecode('dynamic','evaluate', z,exo_simul, ...
|
error('Option "bytecode" is incompatible with order = 2')
|
||||||
M_.params, dr.ys, 1);
|
|
||||||
jacobia_ = [loc_dr.g1 loc_dr.g1_x];
|
|
||||||
else
|
else
|
||||||
[~,jacobia_,hessian1] = feval([M_.fname '.dynamic'],z(iyr0),...
|
[~,jacobia_,hessian1] = feval([M_.fname '.dynamic'],z(iyr0),...
|
||||||
exo_simul, ...
|
exo_simul, ...
|
||||||
|
|
Loading…
Reference in New Issue