From de28e06bc4d4a83d96e000a7a6c0b4efec8ca625 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan.bastani@ens.fr>
Date: Mon, 21 Mar 2011 18:36:38 +0100
Subject: [PATCH] bug fix: change order of the way we handle expectation
 operators and trend vars in transformpass

---
 ModFile.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ModFile.cc b/ModFile.cc
index b06b6805..eefeb701 100644
--- a/ModFile.cc
+++ b/ModFile.cc
@@ -226,6 +226,9 @@ ModFile::transformPass()
   if (symbol_table.predeterminedNbr() > 0)
     dynamic_model.transformPredeterminedVariables();
 
+  // Create auxiliary vars for Expectation operator
+  dynamic_model.substituteExpectation(mod_file_struct.partial_information);
+
   if (nonstationary_variables)
     {
       dynamic_model.detrendEquations();
@@ -233,9 +236,6 @@ ModFile::transformPass()
       dynamic_model.removeTrendVariableFromEquations();
     }
 
-  // Create auxiliary vars for Expectation operator
-  dynamic_model.substituteExpectation(mod_file_struct.partial_information);
-
   if (mod_file_struct.stoch_simul_present
       || mod_file_struct.estimation_present
       || mod_file_struct.osr_present
-- 
GitLab