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