diff --git a/src/ExprNode.cc b/src/ExprNode.cc index 3169024776967303320ddcb575ada229e2effe7c..38c7cec691cfb4a636d9cc4f64cd9158e7a30121 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -1075,7 +1075,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type, output << LEFT_ARRAY_SUBSCRIPT(output_type) << lag << RIGHT_ARRAY_SUBSCRIPT(output_type); break; case ExprNodeOutputType::epilogueFile: - output << "dseries__." << datatree.symbol_table.getName(symb_id); + output << "ds." << datatree.symbol_table.getName(symb_id); output << LEFT_ARRAY_SUBSCRIPT(output_type) << "t"; if (lag != 0) output << lag; @@ -1135,7 +1135,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type, output << LEFT_ARRAY_SUBSCRIPT(output_type) << lag << RIGHT_ARRAY_SUBSCRIPT(output_type); break; case ExprNodeOutputType::epilogueFile: - output << "dseries__." << datatree.symbol_table.getName(symb_id); + output << "ds." << datatree.symbol_table.getName(symb_id); output << LEFT_ARRAY_SUBSCRIPT(output_type) << "t"; if (lag != 0) output << lag; @@ -1195,7 +1195,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type, output << LEFT_ARRAY_SUBSCRIPT(output_type) << lag << RIGHT_ARRAY_SUBSCRIPT(output_type); break; case ExprNodeOutputType::epilogueFile: - output << "dseries__." << datatree.symbol_table.getName(symb_id); + output << "ds." << datatree.symbol_table.getName(symb_id); output << LEFT_ARRAY_SUBSCRIPT(output_type) << "t"; if (lag != 0) output << lag; @@ -1209,7 +1209,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type, case SymbolType::epilogue: if (output_type == ExprNodeOutputType::epilogueFile) { - output << "dseries__." << datatree.symbol_table.getName(symb_id); + output << "ds." << datatree.symbol_table.getName(symb_id); output << LEFT_ARRAY_SUBSCRIPT(output_type) << "t"; if (lag != 0) output << lag; diff --git a/src/ModelEquationBlock.cc b/src/ModelEquationBlock.cc index 07cc78809b583e3261bd6a4e0594064f979bfa57..32867240c957dab24c66630138c39860ac50edba 100644 --- a/src/ModelEquationBlock.cc +++ b/src/ModelEquationBlock.cc @@ -389,10 +389,10 @@ Epilogue::writeEpilogueFile(const string & basename, bool dynamic_file) const exit(EXIT_FAILURE); } - output << "function dseries__ = epilogue_" << (dynamic_file ? "dynamic" : "static") << "(params, dseries__)" << endl - << "% function dseries__ = epilogue_" << (dynamic_file ? "dynamic" : "static") << "(params, dseries__)" << endl + output << "function ds = epilogue_" << (dynamic_file ? "dynamic" : "static") << "(params, ds)" << endl + << "% function ds = epilogue_" << (dynamic_file ? "dynamic" : "static") << "(params, ds)" << endl << "% Epilogue file generated by Dynare preprocessor" << endl << endl - << "simul_end_date = lastdate(dseries__);" << endl; + << "simul_end_date = lastdate(ds);" << endl; int def_table_idx = 0; deriv_node_temp_terms_t tef_terms; @@ -406,7 +406,7 @@ Epilogue::writeEpilogueFile(const string & basename, bool dynamic_file) const expr->collectVariables(SymbolType::exogenous, used_symbols); expr->collectVariables(SymbolType::epilogue, used_symbols); - output << "simul_begin_date = firstobservedperiod(dseries__{"; + output << "simul_begin_date = firstobservedperiod(ds{"; for (auto it1 = used_symbols.begin(); it1 != used_symbols.end(); it1++) { if (it1 != used_symbols.begin()) @@ -417,11 +417,11 @@ Epilogue::writeEpilogueFile(const string & basename, bool dynamic_file) const output << "}) + " << max_lag << " + 1;" << endl; else output << "});" << endl; - output << "if ~dseries__.exist('" << symbol_table.getName(symb_id) << "')" << endl - << " dseries__ = [dseries__ dseries(NaN(dseries__.nobs,1), dseries__.firstdate, '" << symbol_table.getName(symb_id)<< "')];" << endl + output << "if ~ds.exist('" << symbol_table.getName(symb_id) << "')" << endl + << " ds = [ds dseries(NaN(ds.nobs,1), ds.firstdate, '" << symbol_table.getName(symb_id)<< "')];" << endl << "end" << endl << "from simul_begin_date to simul_end_date do " - << "dseries__." << symbol_table.getName(symb_id) << "(t) = "; + << "ds." << symbol_table.getName(symb_id) << "(t) = "; if (dynamic_file) expr->writeOutput(output, ExprNodeOutputType::epilogueFile, temporary_terms, temporary_terms_idxs, tef_terms); else