Skip to content
Snippets Groups Projects
Verified Commit 3eff2b91 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

rename ds variable in epilogue to a longer name

parent a8c7fb69
No related branches found
No related tags found
No related merge requests found
...@@ -367,20 +367,20 @@ Epilogue::writeEpilogueFile(const string &basename) const ...@@ -367,20 +367,20 @@ Epilogue::writeEpilogueFile(const string &basename) const
} }
ExprNodeOutputType output_type = ExprNodeOutputType::epilogueFile; ExprNodeOutputType output_type = ExprNodeOutputType::epilogueFile;
output << "function ds = epilogue(params, ds)" << endl output << "function epilogue_dseries__ = epilogue(params, epilogue_dseries__)" << endl
<< "% function ds = epilogue(params, ds)" << endl << "% function epilogue_dseries__ = epilogue(params, epilogue_dseries__)" << endl
<< "% Epilogue file generated by Dynare preprocessor" << endl << endl << "% Epilogue file generated by Dynare preprocessor" << endl << endl
<< "epilogue_ds_first_date__ = ds.firstdate;" << endl << "% loop range variables" << endl
<< "epilogue_loop_begin_idx__ = lastdate(ds) - ds.lastobservedperiod;" << endl << "epilogue_loop_begin_idx__ = lastdate(epilogue_dseries__) - epilogue_dseries__.lastobservedperiod;" << endl
<< "epilogue_loop_end_idx__ = lastdate(ds) - firstdate(ds) + 1;" << endl << endl; << "epilogue_loop_end_idx__ = lastdate(epilogue_dseries__) - firstdate(epilogue_dseries__) + 1;" << endl << endl;
output << "% endogenous" << endl; output << "% endogenous" << endl;
for (auto symb_id : endogs) for (auto symb_id : endogs)
output << symbol_table.getName(symb_id) << " = ds." << symbol_table.getName(symb_id) << ".data;" << endl; output << symbol_table.getName(symb_id) << " = epilogue_dseries__." << symbol_table.getName(symb_id) << ".data;" << endl;
output << endl output << endl
<< "% exogenous" << endl; << "% exogenous" << endl;
for (auto symb_id : exogs) for (auto symb_id : exogs)
output << symbol_table.getName(symb_id) << " = ds." << symbol_table.getName(symb_id) << ".data;" << endl; output << symbol_table.getName(symb_id) << " = epilogue_dseries__." << symbol_table.getName(symb_id) << ".data;" << endl;
output << endl output << endl
<< "for epilogue_it__ = epilogue_loop_begin_idx__:epilogue_loop_end_idx__" << endl; << "for epilogue_it__ = epilogue_loop_begin_idx__:epilogue_loop_end_idx__" << endl;
...@@ -404,8 +404,8 @@ Epilogue::writeEpilogueFile(const string &basename) const ...@@ -404,8 +404,8 @@ Epilogue::writeEpilogueFile(const string &basename) const
} }
output << "end" << endl << endl; output << "end" << endl << endl;
for (auto symb_id : endogs) for (auto symb_id : endogs)
output << "ds." << symbol_table.getName(symb_id) << " = dseries(" << symbol_table.getName(symb_id) output << "epilogue_dseries__." << symbol_table.getName(symb_id) << " = dseries(" << symbol_table.getName(symb_id)
<< ", epilogue_ds_first_date__);" << endl; << ", epilogue_dseries__.firstdate);" << endl;
output << endl output << endl
<< "end" << endl; << "end" << endl;
output.close(); output.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment