diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc index 23c4d87f57f5451781045db3a4a06751a15fa211..45a1d52cceec05d09c1c8fe017becbf988adb2a3 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 c97d24d9e88265a9710ea042856be1e537998110..3502a87592c146e3363433ea147410d27c3c621f 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 2fbcd2378623a83fad931183d80445c1d9f43c80..de83600caf6475dc1c3e2d6480d90f998034ee10 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 f6ec3cee474d9428c1cc29d2f7bd7ae52f3d2ce9..310011990848269042e6301c11676f9fae24aa4d 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);