diff --git a/preprocessor/DynamicModel.cc b/preprocessor/DynamicModel.cc index e4baa26ff7540fc4be95fa6e2be1659979dc33cb..b2fdc770569f86cba0ba6deb767ecdabf9d32217 100644 --- a/preprocessor/DynamicModel.cc +++ b/preprocessor/DynamicModel.cc @@ -4052,38 +4052,6 @@ DynamicModel::substituteExpectation(bool partial_information_model) } } -void -DynamicModel::substituteLogPow(void) -{ - ExprNode::subst_table_t subst_table; - vector<BinaryOpNode *> neweqs1, neweqs2; - - // Substitute in model local variables - for (map<int, expr_t>::iterator it = local_variables_table.begin(); - it != local_variables_table.end(); it++) - it->second = it->second->substituteLogPow(subst_table, neweqs1, neweqs2); - - // Substitute in equations - for (int i = 0; i < (int) equations.size(); i++) - { - BinaryOpNode *substeq = dynamic_cast<BinaryOpNode *>(equations[i]->substituteLogPow(subst_table, neweqs1, neweqs2)); - assert(substeq != NULL); - equations[i] = substeq; - } - - // Add new equations - for (int i = 0; i < (int) neweqs1.size(); i++) - addEquation(neweqs1[i]); - - // Add the new set of equations at the *beginning* of aux_equations - copy(neweqs2.rbegin(), neweqs2.rend(), front_inserter(aux_equations)); - - if (subst_table.size() > 0) - { - cout << "Adding auxiliary variables for log and pow expressions: added " << neweqs1.size() << " auxiliary variables and equations." << endl; - } -} - void DynamicModel::transformPredeterminedVariables() { diff --git a/preprocessor/DynamicModel.hh b/preprocessor/DynamicModel.hh index 8bfde5079711654942ad62963413381f6baa8d75..0b73ff0b4c5d32fd8129eac5641c694a42fbfcd3 100644 --- a/preprocessor/DynamicModel.hh +++ b/preprocessor/DynamicModel.hh @@ -258,9 +258,6 @@ public: //! Transforms the model by removing all oExpectation void substituteExpectation(bool partial_information_model); - //! Transform the model by add auxiliary variables for log and pow expressions - void substituteLogPow(void); - //! Transforms the model by decreasing the lead/lag of predetermined variables in model equations by one void transformPredeterminedVariables(); diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index 0648cc4706e4fd97d42a1a63337a9434b4cbb929..fb62d7272c64ae80a025fb1926a18ea2afa00798 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -102,7 +102,7 @@ class ParsingDriver; %token <string_val> FLOAT_NUMBER %token DEFAULT FIXED_POINT %token FORECAST K_ORDER_SOLVER INSTRUMENTS PRIOR SHIFT MEAN STDEV VARIANCE MODE INTERVAL SHAPE DOMAINN -%token GAMMA_PDF GRAPH GRAPH_FORMAT CONDITIONAL_VARIANCE_DECOMPOSITION NOCHECK TRANSFORM_LOGPOW STD +%token GAMMA_PDF GRAPH GRAPH_FORMAT CONDITIONAL_VARIANCE_DECOMPOSITION NOCHECK STD %token HISTVAL HOMOTOPY_SETUP HOMOTOPY_MODE HOMOTOPY_STEPS HOMOTOPY_FORCE_CONTINUE HP_FILTER HP_NGRID %token IDENTIFICATION INF_CONSTANT INITVAL INITVAL_FILE BOUNDS JSCALE INIT %token <string_val> INT_NUMBER @@ -875,7 +875,6 @@ steady_options : o_solve_algo | o_markowitz | o_maxit | o_nocheck - | TRANSFORM_LOGPOW { driver.transform_logpow(); }; ; check : CHECK ';' diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index 755bdbe4ac796646e647a31cbbbc8b32dd194e8d..7f5904f27096cc584d55bcbac60d68c934f0b2f7 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -450,7 +450,6 @@ string eofbuff; <DYNARE_STATEMENT>homotopy_steps {return token::HOMOTOPY_STEPS; } <DYNARE_STATEMENT>homotopy_force_continue {return token::HOMOTOPY_FORCE_CONTINUE;} <DYNARE_STATEMENT>nocheck {return token::NOCHECK; } -<DYNARE_STATEMENT>transform_logpow {return token::TRANSFORM_LOGPOW; } <DYNARE_STATEMENT>controlled_varexo {return token::CONTROLLED_VAREXO; } <DYNARE_STATEMENT>parameter_set {return token::PARAMETER_SET; } diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc index 8743cf8ee33e6a5eff9acee2fc1cc036a3a336c8..09368ecb91b0d1ee419577d4a2b760445f56ccb1 100644 --- a/preprocessor/ExprNode.cc +++ b/preprocessor/ExprNode.cc @@ -430,12 +430,6 @@ NumConstNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpN return const_cast<NumConstNode *>(this); } -expr_t -NumConstNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - return const_cast<NumConstNode *>(this); -} - bool NumConstNode::isNumConstNodeEqualTo(double value) const { @@ -1218,12 +1212,6 @@ VariableNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpN return const_cast<VariableNode *>(this); } -expr_t -VariableNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - return const_cast<VariableNode *>(this); -} - bool VariableNode::isNumConstNodeEqualTo(double value) const { @@ -2295,92 +2283,6 @@ UnaryOpNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNo } } -expr_t -UnaryOpNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - if (op_code==oLog && this->containsEndogenous() ) - { - subst_table_t::iterator it = subst_table.find(const_cast<UnaryOpNode *>(this)); - if (it != subst_table.end()) - return const_cast<VariableNode *>(it->second); - - //take care of any nested log expressions by calling arg->substituteLogPow(.), then decreaseLeadsLags for this oExpectation operator - //arg(lag-period) (holds entire subtree of arg(lag-period) - expr_t substexpr = arg->substituteLogPow(subst_table, neweqs1, neweqs2); - assert(substexpr != NULL); - int k = substexpr->maxLead(); - if (k) - substexpr = substexpr->decreaseLeadsLags(k); - it = subst_table.find(substexpr); - if (it != subst_table.end()) - return (it->second)->decreaseLeadsLags(-k); - - //Arriving here, we need to create an auxiliary variable for the argument of the log expression: - //AUX_LOG_(arg.idx) - int symb_id = datatree.symbol_table.addLogAuxiliaryVar(arg->idx); - expr_t newAuxE = datatree.AddVariable(symb_id, 0); - assert(dynamic_cast<VariableNode *>(newAuxE) != NULL); - subst_table[substexpr] = dynamic_cast<VariableNode *>(newAuxE); - - // auxiliary equation with the exponential of the auxiliary variable - expr_t lhs = datatree.AddExp(newAuxE); - neweqs1.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(lhs, substexpr))); - // definition of the auxiliary variable to be used in initval and steadystate files - expr_t definition = datatree.AddLog(substexpr); - neweqs2.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(newAuxE,definition))); - - return newAuxE->decreaseLeadsLags(-k); - } - else if (op_code==oSqrt && this->containsEndogenous() ) - { - subst_table_t::iterator it = subst_table.find(const_cast<UnaryOpNode *>(this)); - if (it != subst_table.end()) - { - // expression to be used instead of sqrt - expr_t constant = datatree.AddNonNegativeConstant("0.5"); - return datatree.AddExp(datatree.AddTimes(constant,const_cast<VariableNode *>(it->second))); - } - - //take care of any nested log expressions by calling arg->substituteLogPow(.), then decreaseLeadsLags for this oExpectation operator - //arg(lag-period) (holds entire subtree of arg(lag-period) - expr_t substexpr = arg->substituteLogPow(subst_table, neweqs1, neweqs2); - assert(substexpr != NULL); - int k = substexpr->maxLead(); - if (k) - substexpr = substexpr->decreaseLeadsLags(k); - it = subst_table.find(substexpr); - if (it != subst_table.end()) - { - // expression to be used instead of sqrt - expr_t constant = datatree.AddNonNegativeConstant("0.5"); - return datatree.AddExp(datatree.AddTimes(constant,(it->second)->decreaseLeadsLags(-k))); - } - - //Arriving here, we need to create an auxiliary variable for the argument of the log expression: - //AUX_LOG_(arg.idx) - int symb_id = datatree.symbol_table.addPowAuxiliaryVar(arg->idx); - expr_t newAuxE = datatree.AddVariable(symb_id, 0); - assert(dynamic_cast<VariableNode *>(newAuxE) != NULL); - subst_table[substexpr] = dynamic_cast<VariableNode *>(newAuxE); - - // auxiliary equation with the exponential of the auxiliary variable - expr_t lhs = datatree.AddExp(newAuxE); - neweqs1.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(lhs, substexpr))); - // definition of the auxiliary variable to be used in initval and steadystate files - expr_t definition = datatree.AddLog(substexpr); - neweqs2.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(newAuxE,definition))); - - // expression to be used instead of sqrt - expr_t constant = datatree.AddNonNegativeConstant("0.5"); - return datatree.AddExp(datatree.AddTimes(constant,newAuxE->decreaseLeadsLags(-k))); - } - else - { - expr_t argsubst = arg->substituteLogPow(subst_table, neweqs1, neweqs2); - return buildSimilarUnaryOpNode(argsubst, datatree); - } -} - bool UnaryOpNode::isNumConstNodeEqualTo(double value) const { @@ -3606,68 +3508,6 @@ BinaryOpNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOpN return buildSimilarBinaryOpNode(arg1subst, arg2subst, datatree); } -expr_t -BinaryOpNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - if (op_code==oPower && this->containsEndogenous() ) - { - NumConstNode *arg2_node = dynamic_cast<NumConstNode *>(arg2); - if (arg2_node != NULL) - { - // the power exponent is a numerical constant - double arg2_val = arg2_node->eval(eval_context_t()); - if (arg2_val == round(arg2_val)) - // the power exponent is an integer, no transformation - { - expr_t arg1subst = arg1->substituteLogPow(subst_table, neweqs1, neweqs2); - expr_t arg2subst = arg2->substituteLogPow(subst_table, neweqs1, neweqs2); - return buildSimilarBinaryOpNode(arg1subst, arg2subst, datatree); - } - } - subst_table_t::iterator it = subst_table.find(const_cast<BinaryOpNode *>(this)); - if (it != subst_table.end()) - return datatree.AddExp(datatree.AddTimes(arg2,const_cast<VariableNode *>(it->second))); - - //take care of any nested pow expressions by calling arg->substituteLogPow(.), - //arg(lag-period) (holds entire subtree of arg(lag-period) - expr_t arg1substexpr = arg1->substituteLogPow(subst_table, neweqs1, neweqs2); - assert(arg1substexpr != NULL); - expr_t arg2substexpr = arg2->substituteLogPow(subst_table, neweqs1, neweqs2); - assert(arg2substexpr != NULL); - - // look for identical expression at the current period - int k = arg1substexpr->maxLead(); - if (k) - arg1substexpr = arg1substexpr->decreaseLeadsLags(k); - it = subst_table.find(arg1substexpr); - // if it exists return it with the appropriate lead/lag - if (it != subst_table.end()) - return datatree.AddExp(datatree.AddTimes(arg2substexpr,(it->second)->decreaseLeadsLags(-k))); - // if not, create an auxiliary variable for the argument of the power expression: - //AUX_POW_(arg.idx) - int symb_id = datatree.symbol_table.addPowAuxiliaryVar(arg1->idx); - expr_t newAuxE = datatree.AddVariable(symb_id, 0); - assert(dynamic_cast<VariableNode *>(newAuxE) != NULL); - subst_table[arg1substexpr] = dynamic_cast<VariableNode *>(newAuxE); - - // auxiliary equation with the exponential of the auxiliary variable - expr_t lhs = datatree.AddExp(newAuxE); - neweqs1.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(lhs, arg1substexpr))); - // definition of the auxiliary variable to be used in initval and steadystate files - expr_t definition = datatree.AddLog(arg1substexpr); - neweqs2.push_back(dynamic_cast<BinaryOpNode *>(datatree.AddEqual(newAuxE,definition))); - - // expression to be used instead of power - return datatree.AddExp(datatree.AddTimes(arg2substexpr,newAuxE->decreaseLeadsLags(-k))); - } - else - { - expr_t arg1subst = arg1->substituteLogPow(subst_table, neweqs1, neweqs2); - expr_t arg2subst = arg2->substituteLogPow(subst_table, neweqs1, neweqs2); - return buildSimilarBinaryOpNode(arg1subst, arg2subst, datatree); - } -} - expr_t BinaryOpNode::addMultipliersToConstraints(int i) { @@ -4270,15 +4110,6 @@ TrinaryOpNode::substituteExpectation(subst_table_t &subst_table, vector<BinaryOp return buildSimilarTrinaryOpNode(arg1subst, arg2subst, arg3subst, datatree); } -expr_t -TrinaryOpNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - expr_t arg1subst = arg1->substituteLogPow(subst_table, neweqs1, neweqs2); - expr_t arg2subst = arg2->substituteLogPow(subst_table, neweqs1, neweqs2); - expr_t arg3subst = arg3->substituteLogPow(subst_table, neweqs1, neweqs2); - return buildSimilarTrinaryOpNode(arg1subst, arg2subst, arg3subst, datatree); -} - bool TrinaryOpNode::isNumConstNodeEqualTo(double value) const { @@ -4829,15 +4660,6 @@ ExternalFunctionNode::substituteExpectation(subst_table_t &subst_table, vector<B return buildSimilarExternalFunctionNode(arguments_subst, datatree); } -expr_t -ExternalFunctionNode::substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const -{ - vector<expr_t> arguments_subst; - for (vector<expr_t>::const_iterator it = arguments.begin(); it != arguments.end(); it++) - arguments_subst.push_back((*it)->substituteLogPow(subst_table, neweqs1, neweqs2)); - return buildSimilarExternalFunctionNode(arguments_subst, datatree); -} - expr_t ExternalFunctionNode::buildSimilarExternalFunctionNode(vector<expr_t> &alt_args, DataTree &alt_datatree) const { diff --git a/preprocessor/ExprNode.hh b/preprocessor/ExprNode.hh index 47f7155c362daae710fb377bc4011ceb3cc8aee0..992ed9e49445b2b7e75f734230caae5b6fc2923c 100644 --- a/preprocessor/ExprNode.hh +++ b/preprocessor/ExprNode.hh @@ -357,13 +357,6 @@ public: */ virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const = 0; - //! Constructs a new expression where log expression are replaced by an auxiliary variable and pow argument by an exponential expression - /*! - \param[in,out] subst_table Map used to store expressions that have already be substituted and their corresponding variable, in order to avoid creating two auxiliary variables for the same sub-expr. - \param[out] neweqs Equations to be added to the model to match the creation of auxiliary variables. - */ - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const = 0; - virtual expr_t decreaseLeadsLagsPredeterminedVariables() const = 0; //! Return true if the nodeID is a numerical constant equal to value and false otherwise @@ -447,7 +440,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; virtual bool containsEndogenous(void) const; @@ -508,7 +500,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; virtual bool containsEndogenous(void) const; @@ -584,7 +575,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; virtual bool containsEndogenous(void) const; @@ -673,7 +663,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; virtual bool containsEndogenous(void) const; @@ -742,7 +731,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; virtual bool containsEndogenous(void) const; @@ -814,7 +802,6 @@ public: virtual expr_t substituteExoLead(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool deterministic_model) const; virtual expr_t substituteExoLag(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs) const; virtual expr_t substituteExpectation(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs, bool partial_information_model) const; - virtual expr_t substituteLogPow(subst_table_t &subst_table, vector<BinaryOpNode *> &neweqs1, vector<BinaryOpNode *> &neweqs2) const; virtual expr_t buildSimilarExternalFunctionNode(vector<expr_t> &alt_args, DataTree &alt_datatree) const; virtual expr_t decreaseLeadsLagsPredeterminedVariables() const; virtual bool isNumConstNodeEqualTo(double value) const; diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index b628c9b396a3a4ba0f2449efb0e6f4fae7781ce5..d6b7e2786ccc70fb292151feb2345ab0e7de119f 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -38,7 +38,7 @@ ModFile::ModFile(WarningConsolidation &warnings_arg) static_model(symbol_table, num_constants, external_functions_table), steady_state_model(symbol_table, num_constants, external_functions_table, static_model), linear(false), block(false), byte_code(false), use_dll(false), no_static(false), - nonstationary_variables(false), transform_logpow(false), ramsey_policy_orig_eqn_nbr(0), + nonstationary_variables(false), ramsey_policy_orig_eqn_nbr(0), warnings(warnings_arg) { } @@ -247,9 +247,6 @@ ModFile::transformPass() // Create auxiliary vars for Expectation operator dynamic_model.substituteExpectation(mod_file_struct.partial_information); - if (transform_logpow) - dynamic_model.substituteLogPow(); - if (nonstationary_variables) { dynamic_model.detrendEquations(); diff --git a/preprocessor/ModFile.hh b/preprocessor/ModFile.hh index 55d46fe8a2cc61e90431cbcb55de2ad18b93395d..6e030d22074737f4fb0d7f7a5d394ad0f9ab199d 100644 --- a/preprocessor/ModFile.hh +++ b/preprocessor/ModFile.hh @@ -78,9 +78,6 @@ public: //! Are nonstationary variables present ? bool nonstationary_variables; - //! Is the log and power functions should be transformed ? - bool transform_logpow; - //! Global evaluation context /*! Filled using initval blocks and parameters initializations */ eval_context_t global_eval_context; diff --git a/preprocessor/ParsingDriver.cc b/preprocessor/ParsingDriver.cc index 88c1d443613075b848021b7aaffddb0ded3e7a8c..5d9ed99bb8de5c23a6b59af0040da8aa37c5af0c 100644 --- a/preprocessor/ParsingDriver.cc +++ b/preprocessor/ParsingDriver.cc @@ -512,12 +512,6 @@ ParsingDriver::mfs(string *value) delete value; } -void -ParsingDriver::transform_logpow() -{ - mod_file->transform_logpow = true; -} - void ParsingDriver::end_initval(bool all_values_required) { diff --git a/preprocessor/ParsingDriver.hh b/preprocessor/ParsingDriver.hh index e6a88fe9aac2f23196f64c90d1176d619b43f126..3ad6439ebda782f5e809ef5dee0b026995868198 100644 --- a/preprocessor/ParsingDriver.hh +++ b/preprocessor/ParsingDriver.hh @@ -247,8 +247,6 @@ public: void cutoff(string *value); //! mfs option of model block void mfs(string *value); - //! transform_logpow for model - void transform_logpow(void); //! Sets the FILENAME for the initial value in initval void initval_file(string *filename); //! Declares an endogenous variable diff --git a/tests/transform_logpow/ramst.mod b/tests/transform_logpow/ramst.mod deleted file mode 100644 index f059ffb5a0430d976c95776fe2cac8c75335ff9b..0000000000000000000000000000000000000000 --- a/tests/transform_logpow/ramst.mod +++ /dev/null @@ -1,40 +0,0 @@ -var c k aa; -varexo x; - -parameters alph gam delt bet rho; -alph=0.5; -gam=0.5; -delt=0.02; -bet=0.05; -rho=0.9; - -model; -c + k - aa*k(-1)^alph - (1-delt)*k(-1); -c^(-gam) - (1+bet)^(-1)*(aa(+1)*alph*k^(alph-1) + 1 - delt)*c(+1)^(-gam); -log(aa) = rho*log(aa(-1))+x; -end; - -initval; -x = 0; -aa = 3; -k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1))+50; -c = aa*k^alph-delt*k+10; -end; - -steady(transform_logpow); - -check; - -shocks; -var x; -periods 1; -values 0.2; -end; - -simul(periods=200); - -rplot c; -rplot k; - -write_latex_dynamic_model; -write_latex_static_model; \ No newline at end of file diff --git a/tests/transform_logpow/ramst0.mod b/tests/transform_logpow/ramst0.mod deleted file mode 100644 index 75735babe72d8dd22da57b1ecfc4aa51af8c7dcd..0000000000000000000000000000000000000000 --- a/tests/transform_logpow/ramst0.mod +++ /dev/null @@ -1,40 +0,0 @@ -var c k aa; -varexo x; - -parameters alph gam delt bet rho; -alph=0.5; -gam=0.5; -delt=0.02; -bet=0.05; -rho=0.9; - -model; -c + k - aa*k(-1)^alph - (1-delt)*k(-1); -c^(-gam) - (1+bet)^(-1)*(aa(+1)*alph*k^(alph-1) + 1 - delt)*c(+1)^(-gam); -log(aa) = rho*log(aa(-1))+x; -end; - -initval; -x = 0; -aa = 3; -k = ((delt+bet)/(1.0*aa*alph))^(1/(alph-1))+50; -c = aa*k^alph-delt*k+10; -end; - -steady; - -check; - -shocks; -var x; -periods 1; -values 0.2; -end; - -simul(periods=200); - -rplot c; -rplot k; - -write_latex_dynamic_model; -write_latex_static_model; \ No newline at end of file