diff --git a/src/ModFile.cc b/src/ModFile.cc index 50a560a38f1a3dc12cc1c4f39bb873a52a7ff46f..d2195270ebd940ff1318a31acd93194ae5b19461 100644 --- a/src/ModFile.cc +++ b/src/ModFile.cc @@ -1011,6 +1011,8 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo << "M_.ramsey_eq_nbr = " << mod_file_struct.ramsey_eq_nbr << ";" << endl << "M_.set_auxiliary_variables = exist(['./+' M_.fname '/set_auxiliary_variables.m'], 'file') == 2;" << endl; + epilogue.writeOutput(mOutputFile); + if (dynamic_model.equation_number() > 0) { if (linear_decomposition) diff --git a/src/ModelEquationBlock.cc b/src/ModelEquationBlock.cc index a4eaf92b691c80bfe640b70770b43f11e501e438..66a8738761c18e120d8bb338fb905fdd72015e20 100644 --- a/src/ModelEquationBlock.cc +++ b/src/ModelEquationBlock.cc @@ -415,3 +415,16 @@ Epilogue::writeEpilogueFile(const string &basename) const output << "end" << endl; output.close(); } + +void +Epilogue::writeOutput(ostream &output) const +{ + if (def_table.empty()) + return; + + int idx = 1; + output << "M_.epilogue_names = cell(" << def_table.size() << ",1);" << endl; + for (const auto & [symb_id, expr] : def_table) + output << "M_.epilogue_names{" << idx++ << "} = '" + << symbol_table.getName(symb_id) << "';" << endl; +} diff --git a/src/ModelEquationBlock.hh b/src/ModelEquationBlock.hh index 9feb71afc0e3378852fbb45c5e08e6e34beb2e67..434ecbf9ee5d73a20a2147fdb19bde0ecf93a32c 100644 --- a/src/ModelEquationBlock.hh +++ b/src/ModelEquationBlock.hh @@ -95,6 +95,9 @@ public: //! Write the steady state file void writeEpilogueFile(const string &basename) const; + + //! Write Output + void writeOutput(ostream &output) const; };