diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index 9f00c2d73bfd9e917ce39900032551e89734f474..b79b05375b0adb9b84332333bf39e61a27783770 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -337,16 +337,12 @@ PacModelStatement::PacModelStatement(string name_arg, string aux_model_name_arg, string discount_arg, expr_t growth_arg, - double steady_state_growth_rate_number_arg, - int steady_state_growth_rate_symb_id_arg, const SymbolTable &symbol_table_arg) : name{move(name_arg)}, aux_model_name{move(aux_model_name_arg)}, discount{move(discount_arg)}, growth{growth_arg}, original_growth{growth_arg}, - steady_state_growth_rate_number{steady_state_growth_rate_number_arg}, - steady_state_growth_rate_symb_id{steady_state_growth_rate_symb_id_arg}, symbol_table{symbol_table_arg} { } @@ -388,12 +384,6 @@ PacModelStatement::writeOutput(ostream &output, const string &basename, bool min { output << "M_.pac." << name << ".auxiliary_model_name = '" << aux_model_name << "';" << endl << "M_.pac." << name << ".discount_index = " << symbol_table.getTypeSpecificID(discount) + 1 << ";" << endl; - if (steady_state_growth_rate_symb_id < 0 && steady_state_growth_rate_number > 0) - output << "M_.pac." << name << ".steady_state_growth_rate = " - << steady_state_growth_rate_number << ";" << endl; - else if (steady_state_growth_rate_symb_id >= 0) - output << "M_.pac." << name << ".steady_state_growth_rate = " - << symbol_table.getTypeSpecificID(steady_state_growth_rate_symb_id) + 1 << ";" << endl; if (growth) { diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh index 989c54c15ff8c21c9cf866fe28b24adbabcb5602..0a79bc149e1a566f20a266d4b55cb5d4691b4df1 100644 --- a/src/ComputingTasks.hh +++ b/src/ComputingTasks.hh @@ -146,8 +146,6 @@ public: const string name, aux_model_name, discount; expr_t growth, original_growth; private: - const double steady_state_growth_rate_number; - const int steady_state_growth_rate_symb_id; const SymbolTable &symbol_table; vector<tuple<int, int, int, double>> growth_info; public: @@ -155,8 +153,6 @@ public: string aux_model_name_arg, string discount_arg, expr_t growth_arg, - double steady_state_growth_rate_number_arg, - int steady_state_growth_rate_symb_id_arg, const SymbolTable &symbol_table_arg); void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void overwriteGrowth(expr_t new_growth); diff --git a/src/DynareBison.yy b/src/DynareBison.yy index 6c4552b604c614482f62c8fef144522b5e816dad..406a0ae01f9e1542f6f245f7eb18dedb17c9f65b 100644 --- a/src/DynareBison.yy +++ b/src/DynareBison.yy @@ -178,7 +178,7 @@ class ParsingDriver; %token METHOD_OF_MOMENTS MOM_METHOD %token BARTLETT_KERNEL_LAG WEIGHTING_MATRIX WEIGHTING_MATRIX_SCALING_FACTOR ANALYTIC_STANDARD_ERRORS ANALYTIC_JACOBIAN PENALIZED_ESTIMATOR VERBOSE %token SIMULATION_MULTIPLE MOM_SEED SEED BOUNDED_SHOCK_SUPPORT ADDITIONAL_OPTIMIZER_STEPS MOM_SE_TOLX SE_TOLX MOM_BURNIN BURNIN -%token EQTAGS STEADY_STATE_GROWTH +%token EQTAGS %token ANALYTICAL_GIRF IRF_IN_PERCENT EMAS_GIRF EMAS_DROP EMAS_TOLF EMAS_MAX_ITER %token NO_IDENTIFICATION_STRENGTH NO_IDENTIFICATION_REDUCEDFORM NO_IDENTIFICATION_MOMENTS %token NO_IDENTIFICATION_MINIMAL NO_IDENTIFICATION_SPECTRUM NORMALIZE_JACOBIANS GRID_NBR @@ -429,7 +429,6 @@ pac_model_options : o_pac_name | o_pac_aux_model_name | o_pac_discount | o_pac_growth - | o_pac_steady_state_growth ; var_expectation_model : VAR_EXPECTATION_MODEL '(' var_expectation_model_options_list ')' ';' @@ -3411,9 +3410,6 @@ o_pac_name : MODEL_NAME EQUAL symbol { driver.option_str("pac.model_name", $3); o_pac_aux_model_name : AUXILIARY_MODEL_NAME EQUAL symbol { driver.option_str("pac.aux_model_name", $3); }; o_pac_discount : DISCOUNT EQUAL symbol { driver.option_str("pac.discount", $3); }; o_pac_growth : GROWTH { driver.begin_pac_growth(); } EQUAL hand_side { driver.set_pac_growth($4); }; -o_pac_steady_state_growth : STEADY_STATE_GROWTH EQUAL signed_number { driver.set_pac_steady_state_growth($3); } - | STEADY_STATE_GROWTH EQUAL symbol { driver.set_pac_steady_state_growth($3); } - ; o_var_name : MODEL_NAME EQUAL symbol { driver.option_str("var.model_name", $3); }; o_series : SERIES EQUAL symbol { driver.option_str("series", $3); }; o_datafile : DATAFILE EQUAL filename { driver.option_str("datafile", $3); }; diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll index 5f82e235f3f33362483fab4d1ee20a17e3e26b08..f9e81bb2edd2e45e122a1f817af2de3f928afe4e 100644 --- a/src/DynareFlex.ll +++ b/src/DynareFlex.ll @@ -934,7 +934,6 @@ DATE -?[0-9]+([ya]|m([1-9]|1[0-2])|q[1-4]) <DYNARE_BLOCK>var_expectation {return token::VAR_EXPECTATION;} <DYNARE_BLOCK>pac_expectation {return token::PAC_EXPECTATION;} <DYNARE_STATEMENT>discount {return token::DISCOUNT;} -<DYNARE_STATEMENT>steady_state_growth {return token::STEADY_STATE_GROWTH;} <DYNARE_STATEMENT,DYNARE_BLOCK>varobs {return token::VAROBS;} <DYNARE_STATEMENT,DYNARE_BLOCK>varexobs {return token::VAREXOBS;} <DYNARE_STATEMENT,DYNARE_BLOCK>nan {return token::NAN_CONSTANT;} diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc index ec75edb86c06c18595b2f3949c3c2fce00e531c6..af2cf849a6f8c68a4f9166be8ff3086c337827ec 100644 --- a/src/ParsingDriver.cc +++ b/src/ParsingDriver.cc @@ -2599,8 +2599,6 @@ ParsingDriver::begin_pac_model() { parsing_pac_model = true; pac_growth = nullptr; - pac_steady_state_growth_rate_number = -1; - pac_steady_state_growth_rate_symb_id = -1; options_list.clear(); } @@ -2612,43 +2610,10 @@ ParsingDriver::pac_model() error("You must pass the model_name option to the pac_model statement."); auto name = it->second; - bool pac_growth_is_param = false; - if (pac_growth && dynamic_cast<VariableNode *>(pac_growth)) - { - set<int> params; - pac_growth->collectVariables(SymbolType::parameter, params); - if (params.size() == 1) - pac_growth_is_param = true; - pac_growth->collectVariables(SymbolType::endogenous, params); - pac_growth->collectVariables(SymbolType::exogenous, params); - if (params.size() != 1) - pac_growth_is_param = false; - } - string aux_model_name; it = options_list.string_options.find("pac.aux_model_name"); if (it != options_list.string_options.end()) - { - aux_model_name = it->second; - if (pac_steady_state_growth_rate_number >= 0 || pac_steady_state_growth_rate_symb_id >= 0) - { - pac_steady_state_growth_rate_number = -1; - pac_steady_state_growth_rate_symb_id = -1; - warning("when aux_model_name is used in the pac_model statement, steady_state_growth is ignored"); - } - } - else - if (pac_growth_is_param - && (pac_steady_state_growth_rate_number >= 0 || pac_steady_state_growth_rate_symb_id >= 0)) - warning("If growth option is constant, steady_state_growth is ignored"); - else if (pac_growth && !pac_growth_is_param - && pac_steady_state_growth_rate_number < 0 - && pac_steady_state_growth_rate_symb_id < 0) - error("The steady state growth rate of the target must be provided (steady_state_growth option) if option growth is not constant"); - - if (pac_steady_state_growth_rate_symb_id >= 0 - && mod_file->symbol_table.getType(pac_steady_state_growth_rate_symb_id) != SymbolType::parameter) - error("pac_model: steady_state_growth accepts either a number or a parameter"); + aux_model_name = it->second; it = options_list.string_options.find("pac.discount"); if (it == options_list.string_options.end()) @@ -2658,8 +2623,6 @@ ParsingDriver::pac_model() mod_file->addStatement(make_unique<PacModelStatement>(name, aux_model_name, discount, pac_growth, - pac_steady_state_growth_rate_number, - pac_steady_state_growth_rate_symb_id, mod_file->symbol_table)); parsing_pac_model = false; } @@ -2671,21 +2634,6 @@ ParsingDriver::set_pac_growth(expr_t pac_growth_arg) reset_data_tree(); } -void -ParsingDriver::set_pac_steady_state_growth(const string &name_or_number) -{ - try - { - pac_steady_state_growth_rate_number = stod(name_or_number); - } - catch (...) - { - if (!mod_file->symbol_table.exists(name_or_number)) - error("Unknown symbol used in pac_steady_state_growth option: " + name_or_number + "\n"); - pac_steady_state_growth_rate_symb_id = mod_file->symbol_table.getID(name_or_number); - } -} - expr_t ParsingDriver::add_exp(expr_t arg1) { diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index f77ccc8501a996bcf7bc6da478282fbdfcd25bcd..af0dca750d46226a54c8ce68da096b912b5ee0b3 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -257,8 +257,6 @@ private: //! Temporary storage for growth declared in pac_model expr_t pac_growth; - double pac_steady_state_growth_rate_number = -1; - int pac_steady_state_growth_rate_symb_id = -1; bool nostrict; @@ -747,8 +745,6 @@ public: void pac_model(); //! Adds growth for pac void set_pac_growth(expr_t pac_growth_arg); - //! Adds steady state growth for pac - void set_pac_steady_state_growth(const string &name_or_number); //! Writes token "diff(arg1)" to model tree expr_t add_diff(expr_t arg1); //! Writes token "adl(arg1, lag)" to model tree