From 330b11ba4888cf22bfe0238a9e97cae7ba12cbb6 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan.bastani@ens.fr>
Date: Mon, 28 Mar 2011 11:19:10 +0200
Subject: [PATCH] code cleanup

---
 preprocessor/DynamicModel.cc |  1 -
 preprocessor/DynamicModel.hh |  1 +
 preprocessor/ExprNode.hh     |  2 +-
 preprocessor/ModFile.cc      | 32 ++++++--------------------------
 4 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc
index 23c4d87f57..45a1d52cce 100644
--- a/preprocessor/DynamicModel.cc
+++ b/preprocessor/DynamicModel.cc
@@ -18,7 +18,6 @@
  */
 
 #include <iostream>
-#include <sstream>
 #include <cmath>
 #include <cstdlib>
 #include <cassert>
diff --git a/preprocessor/DynamicModel.hh b/preprocessor/DynamicModel.hh
index c97d24d9e8..3502a87592 100644
--- a/preprocessor/DynamicModel.hh
+++ b/preprocessor/DynamicModel.hh
@@ -286,6 +286,7 @@ public:
 
   //! Replaces model equations with derivatives of Lagrangian w.r.t. endogenous
   void computeRamseyPolicyFOCs(const StaticModel &static_model, const string &discount_factor);
+  //! Replaces the model equations in dynamic_model with those in this model
   void replaceMyEquations(DynamicModel &dynamic_model) const;
 
   //! Writes LaTeX file with the equations of the dynamic model
diff --git a/preprocessor/ExprNode.hh b/preprocessor/ExprNode.hh
index 2fbcd23786..de83600caf 100644
--- a/preprocessor/ExprNode.hh
+++ b/preprocessor/ExprNode.hh
@@ -657,7 +657,7 @@ public:
   virtual expr_t removeTrendLeadLag(map<int, expr_t> trend_symbols_map) const;
   //! Function to write out the oPowerNode in expr_t terms as opposed to writing out the function itself
   expr_t unpackPowerDeriv() const;
-  //! Returns AUX_LAMBDA*(lhs-rhs) = 0, creating lagrange multiplier AUX_LAMBDA
+  //! Returns MULT_i*(lhs-rhs) = 0, creating multiplier MULT_i
   expr_t addMultipliersToConstraints(int i);
   //! Returns the non-zero hand-side of an equation (that must have a hand side equal to zero)
   expr_t getNonZeroPartofEquation() const;
diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index f6ec3cee47..3100119908 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -560,21 +560,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
   if (dynamic_model.equation_number() > 0)
     {
       if (dynamic_model_needed)
-        /* to be removed before ramsey_policy commit
-        if (mod_file_struct.ramsey_policy_present)
-          ramsey_policy_FOC_dynamic_model.writeOutput(mOutputFile, basename, block, byte_code, use_dll, mod_file_struct.order_option);
-        else
-        */
         dynamic_model.writeOutput(mOutputFile, basename, block, byte_code, use_dll, mod_file_struct.order_option);
       else
         dynamic_model.writeOutput(mOutputFile, basename, false, false, false, mod_file_struct.order_option);
       if (!no_static)
-        /* to be removed before ramsey_policy commit
-        if (mod_file_struct.ramsey_policy_present)
-          ramsey_policy_FOC_static_model.writeOutput(mOutputFile, block);
-        else
-        */
-          static_model.writeOutput(mOutputFile, block);
+        static_model.writeOutput(mOutputFile, block);
     }
 
   // Print statements
@@ -614,23 +604,13 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
   if (dynamic_model.equation_number() > 0)
     {
       if (!no_static)
-        /* to be removed before ramsey_policy commit
-        if (mod_file_struct.ramsey_policy_present)
-          ramsey_policy_FOC_static_model.writeStaticFile(basename, block, byte_code);
-        else
-        */
-          static_model.writeStaticFile(basename, block, byte_code);
+        static_model.writeStaticFile(basename, block, byte_code);
 
       if (dynamic_model_needed)
-        /* to be removed before ramsey_policy commit
-        if (mod_file_struct.ramsey_policy_present)
-          ramsey_policy_FOC_dynamic_model.writeDynamicFile(basename, false, false, false, mod_file_struct.order_option);
-        else
-        */
-          {
-            dynamic_model.writeDynamicFile(basename, block, byte_code, use_dll, mod_file_struct.order_option);
-            dynamic_model.writeParamsDerivativesFile(basename);
-          }
+        {
+          dynamic_model.writeDynamicFile(basename, block, byte_code, use_dll, mod_file_struct.order_option);
+          dynamic_model.writeParamsDerivativesFile(basename);
+        }
       else
         {
           dynamic_model.writeDynamicFile(basename, false, false, false, mod_file_struct.order_option);
-- 
GitLab