From a9c581e2bc5d75d468d208fb5a39de4c1b80f78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 19 Oct 2023 14:10:01 -0400 Subject: [PATCH] No longer forbid bytecode with order=2 or k_order_solver The two are now compatible, even though the bytecode representation will not be used. Print a warning to make this explicit. --- matlab/stochastic_solvers.m | 12 +++++++----- preprocessor | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/matlab/stochastic_solvers.m b/matlab/stochastic_solvers.m index c86484df5..4e34396d5 100644 --- a/matlab/stochastic_solvers.m +++ b/matlab/stochastic_solvers.m @@ -85,6 +85,9 @@ if M_.maximum_endo_lead==0 && M_.exo_det_nbr~=0 end if options_.k_order_solver + if options_.bytecode + warning('Option "bytecode" is ignored when computing perturbation solution at higher order') + end orig_order = options_.order; options_.order = local_order; dr = set_state_space(dr,M_); @@ -112,12 +115,11 @@ if local_order == 1 end elseif local_order == 2 if (options_.bytecode) - error('Option "bytecode" is incompatible with order = 2') - else - [~,jacobia_,hessian1] = feval([M_.fname '.dynamic'],z(iyr0),... - exo_simul, ... - M_.params, dr.ys, it_); + warning('Option "bytecode" is ignored when computing perturbation solution at order = 2') end + [~,jacobia_,hessian1] = feval([M_.fname '.dynamic'],z(iyr0),... + exo_simul, ... + M_.params, dr.ys, it_); [infrow,infcol]=find(isinf(hessian1)); if options_.debug if ~isempty(infrow) diff --git a/preprocessor b/preprocessor index f78c428d9..6235e6907 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit f78c428d99884c4b336dba0a7df20c7ad41fb682 +Subproject commit 6235e6907526d468e2c35f14c38db1e308698bc9