From 4b401e6253ad417b1379089e83c493374c5f9b7f Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Fri, 28 May 2021 12:01:19 +0200
Subject: [PATCH] Preparations for Occbin MR

Related to https://git.dynare.org/Dynare/dynare/-/merge_requests/1863
---
 src/ModFile.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/ModFile.cc b/src/ModFile.cc
index e72e5825..0a13ace9 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -693,13 +693,12 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, bool
     }
 
   if (occbin
-      && (mod_file_struct.stoch_simul_present || mod_file_struct.osr_present
+      && (mod_file_struct.osr_present || mod_file_struct.mom_estimation_present
           || mod_file_struct.ramsey_model_present || mod_file_struct.ramsey_policy_present
           || mod_file_struct.discretionary_policy_present || mod_file_struct.extended_path_present
-          || mod_file_struct.identification_present || mod_file_struct.sensitivity_present
-          || mod_file_struct.mom_estimation_present || mod_file_struct.calib_smoother_present))
+          || mod_file_struct.identification_present || mod_file_struct.sensitivity_present))
     {
-      cerr << "ERROR: the 'occbin' option is not compatible with commands other than 'estimation'" << endl;
+      cerr << "ERROR: the 'occbin' option is not compatible with commands other than 'estimation', 'stoch_simul', and 'calib_smoother'." << endl;
       exit(EXIT_FAILURE);
     }
 
@@ -1041,9 +1040,8 @@ ModFile::writeMOutput(const string &basename, bool clear_all, bool clear_global,
     }
 
   if (occbin)
-    mOutputFile << "options_ = set_default_occbin_options(options_, M_);" << endl
-                << "clear mr_runsim_occbin_fn" << endl
-                << "M_ = get_wish_list(M_);" << endl;
+    mOutputFile << "options_ = occbin.set_default_options(options_, M_);" << endl
+                << "M_ = occbin.get_info(M_);" << endl;
 
   if (onlymodel || gui)
     for (const auto &statement : statements)
-- 
GitLab