code cleanup

issue#70
Houtan Bastani 2011-03-28 11:19:10 +02:00
parent d2a6f0f42c
commit be236c6402
4 changed files with 8 additions and 28 deletions

View File

@ -18,7 +18,6 @@
*/
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <cassert>

View File

@ -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

View File

@ -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;

View File

@ -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);