Commit ade0cd9d authored by Michel Juillard's avatar Michel Juillard
Browse files

steady_state_model: authorizing change in parameter values in...

steady_state_model: authorizing change in parameter values in steady_state_model block + removing ys_ initialization to zero
parent 4f98b560
......@@ -1866,7 +1866,7 @@ ParsingDriver::add_steady_state_model_equal(string *varname, NodeID expr)
}
SymbolType type = mod_file->symbol_table.getType(id);
if (type != eEndogenous && type != eModFileLocalVariable)
if (type != eEndogenous && type != eModFileLocalVariable && type != eParameter)
error(*varname + " has incorrect type");
mod_file->steady_state_model.addDefinition(id, expr);
......
......@@ -31,7 +31,8 @@ void
SteadyStateModel::addDefinition(int symb_id, NodeID expr)
{
assert(symbol_table.getType(symb_id) == eEndogenous
|| symbol_table.getType(symb_id) == eModFileLocalVariable);
|| symbol_table.getType(symb_id) == eModFileLocalVariable
|| symbol_table.getType(symb_id) == eParameter);
// Add the variable
recursive_order.push_back(symb_id);
......@@ -93,8 +94,7 @@ SteadyStateModel::writeSteadyStateFile(const string &basename, bool ramsey_polic
output << "ys_orig_";
output << ", exo_)" << endl
<< "% Steady state generated by Dynare preprocessor" << endl
<< " global M_" << endl
<< " ys_=zeros(" << symbol_table.orig_endo_nbr() << ",1);" << endl;
<< " global M_" << endl;
for(size_t i = 0; i < recursive_order.size(); i++)
{
......
Supports Markdown
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