From b6176ae406190afbbde1b4fe5ce096b0170131ea Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Mon, 28 Aug 2017 18:19:41 +0200
Subject: [PATCH] preprocessor: add parameter_set option to evaluate_smoother
 command. Closes #1477

---
 ComputingTasks.cc | 5 ++++-
 DynareBison.yy    | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ComputingTasks.cc b/ComputingTasks.cc
index 51f48e2d..400630bb 100644
--- a/ComputingTasks.cc
+++ b/ComputingTasks.cc
@@ -4345,10 +4345,13 @@ void
 CalibSmootherStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const
 {
   options_list.writeOutput(output);
+  OptionsList::string_options_t::const_iterator it = options_list.string_options.find("parameter_set");
+  if (it == options_list.string_options.end())
+    output << "options_.parameter_set = 'calibration';" << endl;
   symbol_list.writeOutput("var_list_", output);
   output << "options_.smoother = 1;" << endl
          << "options_.order = 1;" << endl
-         << "[oo_, M_, options_, bayestopt_] = evaluate_smoother('calibration', var_list_, M_, oo_, options_, bayestopt_, estim_params_);" << endl;
+         << "[oo_, M_, options_, bayestopt_] = evaluate_smoother(options_.parameter_set, var_list_, M_, oo_, options_, bayestopt_, estim_params_);" << endl;
 }
 
 void
diff --git a/DynareBison.yy b/DynareBison.yy
index 52931d89..0c1e6f2b 100644
--- a/DynareBison.yy
+++ b/DynareBison.yy
@@ -2700,6 +2700,7 @@ calib_smoother_option : o_filtered_vars
                       | o_diffuse_kalman_tol
                       | o_diffuse_filter
                       | o_smoothed_state_uncertainty
+                      | o_parameter_set
                       ;
 
 extended_path : EXTENDED_PATH ';'
-- 
GitLab