From e9babf024254c17a345390fd9fbebcb6ce62bb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Wed, 29 Mar 2023 16:05:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20ramsey=5Fpolicy:=20lift=20restri?= =?UTF-8?q?ction=20that=20order=20must=20be=20=E2=A9=BD=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This restriction no longer exists, and is actually not applied to stoch_simul when following ramsey_model. --- src/ComputingTasks.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index ab0d9c38..fdba1fde 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -614,15 +614,7 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct, WarningConso Since ramsey policy needs one further order of derivation (for example, for 1st order approximation, it needs 2nd derivatives), we add 1 to the order declared by user */ if (auto opt = options_list.get_if<OptionsList::NumVal>("order")) - { - int order = stoi(*opt); - if (order > 2) - { - cerr << "ERROR: ramsey_policy: order > 2 is not implemented" << endl; - exit(EXIT_FAILURE); - } - mod_file_struct.order_option = max(mod_file_struct.order_option, order + 1); - } + mod_file_struct.order_option = max(mod_file_struct.order_option, stoi(*opt)); // Fill in mod_file_struct.partial_information if (auto opt = options_list.get_if<OptionsList::NumVal>("partial_information"); -- GitLab