diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc index f9f2223f8..90f7e9a87 100644 --- a/preprocessor/ComputingTasks.cc +++ b/preprocessor/ComputingTasks.cc @@ -901,7 +901,7 @@ BVARDensityStatement::BVARDensityStatement(int maxnlags_arg, const OptionsList & void BVARDensityStatement::checkPass(ModFileStructure &mod_file_struct) { - mod_file_struct.bvar_density_present = true; + mod_file_struct.bvar_present = true; } void @@ -920,7 +920,7 @@ BVARForecastStatement::BVARForecastStatement(int nlags_arg, const OptionsList &o void BVARForecastStatement::checkPass(ModFileStructure &mod_file_struct) { - mod_file_struct.bvar_forecast_present = true; + mod_file_struct.bvar_present = true; } void @@ -938,7 +938,7 @@ SBVARStatement::SBVARStatement(const OptionsList &options_list_arg) : void SBVARStatement::checkPass(ModFileStructure &mod_file_struct) { - mod_file_struct.sbvar_present = true; + mod_file_struct.bvar_present = true; } void @@ -956,7 +956,7 @@ MS_SBVARStatement::MS_SBVARStatement(const OptionsList &options_list_arg) : void MS_SBVARStatement::checkPass(ModFileStructure &mod_file_struct) { - mod_file_struct.ms_sbvar_present = true; + mod_file_struct.bvar_present = true; } void diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index 77e577161..7201dc281 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -161,8 +161,7 @@ ModFile::transformPass() - a BVAR command is used and there is no equation (standalone BVAR estimation) */ if (!mod_file_struct.ramsey_policy_present - && !((mod_file_struct.bvar_density_present || mod_file_struct.bvar_forecast_present) - && dynamic_model.equation_number() == 0) + && !(mod_file_struct.bvar_present && dynamic_model.equation_number() == 0) && (dynamic_model.equation_number() != symbol_table.endo_nbr())) { cerr << "ERROR: There are " << dynamic_model.equation_number() << " equations but " << symbol_table.endo_nbr() << " endogenous variables!" << endl; diff --git a/preprocessor/Statement.cc b/preprocessor/Statement.cc index 97d4ad64a..786fbc427 100644 --- a/preprocessor/Statement.cc +++ b/preprocessor/Statement.cc @@ -27,8 +27,7 @@ ModFileStructure::ModFileStructure() : osr_present(false), ramsey_policy_present(false), order_option(0), - bvar_density_present(false), - bvar_forecast_present(false), + bvar_present(false), identification_present(false), partial_information(false), shocks_present(false) diff --git a/preprocessor/Statement.hh b/preprocessor/Statement.hh index cfeb071df..5469bb979 100644 --- a/preprocessor/Statement.hh +++ b/preprocessor/Statement.hh @@ -48,14 +48,8 @@ public: //! Derivation order /*! First initialized to zero. If user sets order option somewhere in the MOD file, it will be equal to the maximum of order options. Otherwise will default to 2 */ int order_option; - //! Whether a bvar_density statement is present - bool bvar_density_present; - //! Whether a bvar_forecast statement is present - bool bvar_forecast_present; - //! Whether a sbvar statement is present - bool sbvar_present; - //! Whether a sbvar statement is present - bool ms_sbvar_present; + //! Whether a bvar_density, bvar_forecast, sbvar, ms_sbvar statement is present + bool bvar_present; //! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one bool identification_present; //! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy