Commit 347ab4d0 authored by MichelJuillard's avatar MichelJuillard
Browse files

preprocessor: modified order of auxiliary variables definitions

parent 83e2d470
......@@ -1702,7 +1702,7 @@ StaticModel::writeLatexFile(const string &basename) const
void
StaticModel::writeAuxVarInitval(ostream &output, ExprNodeOutputType output_type) const
{
for (int i = 0; i < (int) aux_equations.size(); i++)
for (int i = (int) aux_equations.size()-1; i >= 0; i--)
{
dynamic_cast<ExprNode *>(aux_equations[i])->writeOutput(output, output_type);
output << ";" << endl;
......@@ -1730,7 +1730,7 @@ void StaticModel::writeAuxVarRecursiveDefinitions(const string &basename) const
<< "% from model file (.mod)" << endl
<< endl;
for (int i = 0; i < (int) aux_equations.size(); i++)
for (int i = (int) aux_equations.size()-1; i >= 0; i--)
{
dynamic_cast<ExprNode *>(aux_equations[i])->writeOutput(output, oMatlabStaticModel);
output << ";" << endl;
......
......@@ -121,7 +121,7 @@ SteadyStateModel::writeSteadyStateFile(const string &basename, bool ramsey_polic
output << ", exo_)" << endl
<< "% Steady state generated by Dynare preprocessor" << endl;
if (!ramsey_policy)
output << " ys_=zeros(" << symbol_table.orig_endo_nbr() << ",1);" << endl;
output << " ys_=zeros(" << symbol_table.endo_nbr() << ",1);" << endl;
output << " global M_" << endl;
for (size_t i = 0; i < recursive_order.size(); i++)
......
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