Forbid alternative 1st order solvers with k_order_solver option

dprior
Sébastien Villemot 2024-01-05 16:08:09 +01:00
parent ffb578276e
commit cc02690acf
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 11 additions and 1 deletions

View File

@ -1,7 +1,7 @@
function [dr,info] = k_order_pert(dr,M_,options_)
% Compute decision rules using the k-order DLL from Dynare++
% Copyright © 2009-2023 Dynare Team
% Copyright © 2009-2024 Dynare Team
%
% This file is part of Dynare.
%
@ -30,6 +30,16 @@ if M_.maximum_endo_lead == 0 && order>1
'backward models'])
end
if options_.aim_solver
error('Option aim_solver is not compatible with k_order_solver')
end
if options_.dr_cycle_reduction
error('Option dr=cycle_reduction is not compatible with k_order_solver')
end
if options_.dr_logarithmic_reduction
error('Option dr=logarithmic_reduction is not compatible with k_order_solver')
end
try
[dynpp_derivs, dyn_derivs] = k_order_perturbation(dr,M_,options_);
catch ME