Commit e90859ba authored by MichelJuillard's avatar MichelJuillard

adding ramsey_model to ParsingDriver

parent 17477ab0
......@@ -214,7 +214,7 @@ ParsingDriver::declare_optimal_policy_discount_factor_parameter(expr_t exprnode)
string *optimalParName_declare = new string("optimal_policy_discount_factor");
string *optimalParName_init = new string("optimal_policy_discount_factor");
if (mod_file->symbol_table.exists(*optimalParName_declare))
error("Symbol optimal_policy_discount_factor is needed by Dynare when using an ramsey_policy or a discretionary_policy statement");
error("Symbol optimal_policy_discount_factor is needed by Dynare when using a ramsey_model, a ramsey_policy or a discretionary_policy statement");
declare_parameter(optimalParName_declare, NULL);
init_param(optimalParName_init, exprnode);
}
......@@ -1775,6 +1775,16 @@ ParsingDriver::end_planner_objective(expr_t expr)
reset_data_tree();
}
void
ParsingDriver::ramsey_model()
{
if (!mod_file->symbol_table.exists("optimal_policy_discount_factor"))
declare_optimal_policy_discount_factor_parameter(data_tree->One);
mod_file->addStatement(new RamseyModelStatement(symbol_list, options_list));
symbol_list.clear();
options_list.clear();
}
void
ParsingDriver::ramsey_policy()
{
......
......@@ -493,6 +493,8 @@ public:
void begin_planner_objective();
//! End a planner objective statement
void end_planner_objective(expr_t expr);
//! Ramsey model statement
void ramsey_model();
//! Ramsey policy statement
void ramsey_policy();
//! Discretionary policy statement
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment