From faa1f2111accf6e250cf951b0b9ca53da5ea6bcd Mon Sep 17 00:00:00 2001 From: ferhat Date: Wed, 7 Oct 2009 09:31:58 +0000 Subject: [PATCH] avoid useless iteration in simulation of simple equations git-svn-id: https://www.dynare.org/svn/dynare/trunk@3025 ac1d8469-bf42-47a9-8791-bf33cf982152 --- ExprNode.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ExprNode.cc b/ExprNode.cc index 87f4bc39..e1329f5d 100644 --- a/ExprNode.cc +++ b/ExprNode.cc @@ -558,6 +558,8 @@ void VariableNode::compile(ostream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx, bool dynamic, bool steady_dynamic) const { int i, lagl; + if(type==eModelLocalVariable || type==eModFileLocalVariable) + datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, temporary_terms, map_idx, dynamic, steady_dynamic); if (!lhs_rhs) { if(dynamic) @@ -629,7 +631,7 @@ VariableNode::compile(ostream &CompileCode, bool lhs_rhs, const temporary_terms_ case eModelLocalVariable: case eModFileLocalVariable: //cout << "eModelLocalVariable=" << symb_id << "\n"; - datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, temporary_terms, map_idx, dynamic, steady_dynamic); + break; case eUnknownFunction: cerr << "Impossible case: eUnknownFuncion" << endl; @@ -1237,12 +1239,14 @@ UnaryOpNode::eval_opcode(UnaryOpcode op_code, double v) throw (EvalException) return(sinh(v)); case oTanh: return(tanh(v)); +#ifndef WIN64 case oAcosh: return(acosh(v)); case oAsinh: return(asinh(v)); case oAtanh: return(atanh(v)); +#endif case oSqrt: return(sqrt(v)); case oSteadyState: