Filter out cases where stochastic_solvers.m is called at higher order without k_order_solver
parent
ad0bff3771
commit
28b499af3b
|
@ -29,7 +29,7 @@ function [dr,info] = stochastic_solvers(dr,task,M_,options_,oo_)
|
|||
% none.
|
||||
%
|
||||
|
||||
% Copyright (C) 1996-2017 Dynare Team
|
||||
% Copyright (C) 1996-2018 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -57,6 +57,9 @@ if M_.hessian_eq_zero && local_order~=1
|
|||
local_order = 1;
|
||||
warning('stochastic_solvers: using order = 1 because Hessian is equal to zero');
|
||||
end
|
||||
if options_.order>2 && ~options_.k_order_solver
|
||||
error('You need to set k_order_solver for order>2')
|
||||
end
|
||||
|
||||
if (options_.aim_solver == 1) && (local_order > 1)
|
||||
error('Option "aim_solver" is incompatible with order >= 2')
|
||||
|
|
Loading…
Reference in New Issue