Commit Graph

153 Commits (e73630454df7e6cc76d0903fcc92da9aa39f3439)

Author SHA1 Message Date
Houtan Bastani 789d881cca write steady state model 2015-07-28 17:27:56 +02:00
Houtan Bastani dc955b56ee fix writing for julia 2015-07-27 17:33:22 +02:00
Houtan Bastani 2bb2682b50 write dynamic file 2015-07-27 17:02:51 +02:00
Houtan Bastani f3c14ec396 write static model 2015-07-27 15:33:38 +02:00
Houtan Bastani 4102e0cc56 Revert "Merge branch 'rmExtraExo'"
This reverts commit 28ffa9c56fd021cc75415aeafc13d3810d1b3132, reversing
changes made to 60b3577a09f3eb9cf3cc590241343b1f0fee8706.

Conflicts:
	preprocessor/Shocks.cc
	preprocessor/SymbolTable.cc
2015-06-09 16:42:51 +02:00
Houtan Bastani 6d727f534e Merge branch 'rmExtraExo' 2015-05-28 12:33:56 +02:00
Houtan Bastani 0a2f09566f preprocessor: add new field orig_expr for expectation aux vars, closes #773 2015-05-26 15:47:56 +02:00
Houtan Bastani 6a37dc9e21 Merge branch 'master' into rmExtraExo 2015-05-18 17:16:55 +02:00
Houtan Bastani ec82663580 preprocessor: external functions bug fix: fixes the case where an external function is contained in a local variable that’s used in an equation with leads/lags that require auxiliary equations. Closes #916 2015-05-12 16:39:10 +02:00
Houtan Bastani dbf2e0e379 preprocessor: organize external function code 2015-05-11 17:09:29 +02:00
Houtan Bastani 96a5949d9e preprocessor: remove extraneous varexo, update model and statements, #841 2015-03-06 16:44:17 +01:00
Houtan Bastani 4ba729fdd6 preprocessor: new command write_latex_original_model. closes #657 2015-02-16 08:31:30 +01:00
Houtan Bastani 2ca0dec650 Revert "preprocessor: replace oo_.exo_steady_state with steady_state_x, #825"
This reverts commit 2bb97a90d6a346244ca992b9caff6e4c55dd7f66.
2015-01-14 15:14:57 +01:00
Houtan Bastani 1fab5cbdd4 preprocessor: replace oo_.exo_steady_state with steady_state_x, #825 2015-01-14 15:13:48 +01:00
Sébastien Villemot 56e1ed2f12 Fix STEADY_STATE operator for model local variables.
Thanks to Tom Holden for spotting the bug.
2014-08-12 18:53:55 +02:00
Sébastien Villemot bd2405e292 Fix crash when the model contains 1st or 2nd ext fcn deriv nodes.
In the case where the external function computes itself its derivatives, the
TEF terms were not always created before being used, hence leading to a
preprocessor crash. This problem could only happen with ramsey_policy, because
otherwise the model does not contain derivatives of external functions.
2014-03-13 12:27:13 +01:00
Sébastien Villemot 8882f809c3 Introduce a new abstract class for external function nodes.
This fixes the following bugs:

- 1st and 2nd ext fcn deriv nodes were incorrectly added to
  DataTree::external_function_node_map, because of the chaining of
  constructors.

- the following methods of FirstDerivExternalFunctionNode were not overloaded:
  toStatic(), buildSimilarExternalFunctionNode()

- the following methods of SecondDerivExternalFunctionNode were not overloaded:
  toStatic(), buildSimilarExternalFunctionNode(), compile(),
  compileExternalFunctionOutput()
2014-03-13 12:12:17 +01:00
Sébastien Villemot ca7fe60252 Cosmetic renaming for consistency between DataTree method names. 2014-03-11 18:56:48 +01:00
Sébastien Villemot 140db861d5 Implement cloneDynamic() for {First,Second}DerivExternalFunction.
Since the method was not implement, the method of the parent class was used.
This was leading to wrong results in the context of Ramsey Policy (basically
derivative operators on external functions were dropped from FOCs).
2014-03-11 18:56:48 +01:00
Sébastien Villemot 0612bca00f Remove spurious test. 2014-03-11 18:56:48 +01:00
Sébastien Villemot 380df90748 Fix output of external functions (and their derivatives) in LaTeX. 2014-03-11 15:31:08 +01:00
Sébastien Villemot b1d7f8f223 Fix bug in external functions introduced in 711a4f62. 2014-02-25 16:45:55 +01:00
Sébastien Villemot dab2dde8af Small improvements to external functions code. 2014-02-24 17:27:34 +01:00
Michel Juillard 6e0ef026ac write C++ version of model functions without temporary terms 2014-02-24 13:33:48 +01:00
Sébastien Villemot 1414f98cff Refactor code for collecting variables appearing in expressions
- rename ExprNode::collectVariables in ExprNode::collectDynamicVariables
- new ExprNode::collectVariables: same as above, but without lag information
- remove ExprNode::findUnusedEndogenous: essentially redundant with the above)
- remove ExprNode::collectModelLocalVariables: idem
2013-11-29 15:37:11 +01:00
Sébastien Villemot 74ad93e0f4 Remove select1st (GNU extension), replace it by a call to boost::bind 2013-11-05 18:13:29 +01:00
Houtan Bastani 76714b34df new nostrict command-line option does not exit when there are more endogenous than equations (closes #2) 2013-09-13 14:44:01 -04:00
Sébastien Villemot 55a548282c Possibility of restricting differentiate_forward_vars to some variables
Closes #351
2013-05-17 16:53:15 +02:00
Sébastien Villemot 94e6f569b8 Add new model option 'differentiate_forward_vars' (ref. #351) 2013-04-25 18:09:31 +02:00
Sébastien Villemot 75f8467803 Implement tags [static] and [dynamic] for equations
Closes #307
2013-04-11 17:11:35 +02:00
Michel Juillard 24cac29cdf removed changes linked with transforming variables to avoid log or
power of negative numbers
2013-04-09 16:35:57 +02:00
Sébastien Villemot 08c2b6e1c6 Automatic detrending engine can now handle models written in logs (ref. #309)
- new command `log_trend_var'
 - new option `log_deflator' to `var' command
2013-03-26 16:51:17 +01:00
Sébastien Villemot 69a5271db7 Revert spurious preprocessor changes introduced in dfa744f 2013-03-26 16:51:10 +01:00
Ferhat Mihoubi 832c9d37ef - adds new files: Evaluate.cc and Evaluate.hh to bytecode 2013-03-22 16:34:50 +01:00
Sébastien Villemot 6486e529d5 Improve error message for 3rd derivatives of external functions 2013-01-15 11:39:04 +01:00
Michel Juillard 34099da167 fixed bug in computation of derivative of erf() function 2012-12-07 21:46:50 +01:00
Sébastien Villemot 67a1737f00 Update copyright notices 2012-06-08 18:22:34 +02:00
Michel Juillard 78bd465294 finishing implementation of optional transformation of log and non
integer power arguments   to insure that they are positive
2012-05-26 20:53:48 +02:00
Michel Juillard 73b4052f2b first implementation of transform_logpow. It creates too many auxilary
variables and probably violates Jensen inequality in some cases.
2012-05-23 15:09:33 +02:00
Sébastien Villemot fa1572e674 Fix bug where the nth derivative of 0^n evaluated to 0 instead of n!
(complement to commit cd0bc28e)
2012-05-21 18:34:10 +02:00
Houtan Bastani 1d68887387 preprocessor: add subsamples statement 2011-12-21 12:21:30 +01:00
Houtan Bastani b75d0e733f Remove unused expectation syntax 2011-10-26 14:30:47 +02:00
Michel Juillard 3b955481cb factoring out steady-state computations; steady_state_model now
generates <fname>_steadystate2.m returning parameters as well in case
they have been modified by the user. Added several test cases.
2011-10-12 21:51:14 +02:00
Ferhat Mihoubi 780e7515d6 updates normalizeEquation() to deal with abs, sign (Ticket #200) and trigonometric functions. 2011-10-12 15:03:05 +02:00
Houtan Bastani 043de353fc bugfix: sign operator for compiled static file 2011-08-30 16:12:00 +02:00
Houtan Bastani 5c48733f55 output mex file for static model (closes #183) 2011-08-19 16:57:27 +02:00
Houtan Bastani 973105ace3 preprocessor: add absolute value and signum 2011-08-16 14:52:35 +02:00
Houtan Bastani d8c0162e26 bug fix: add parenthesis around STEADY_STATE output in case it contains an expression 2011-08-08 18:49:18 +02:00
Ferhat Mihoubi af1e4837b8 - correction of the bug in normalization process for expressions of the form a^x (Ticket #186)
- If a case is not handled, the equation is supposed to be impossible to normalize.
- comments added to describe the normalization process
2011-06-10 12:41:21 +02:00
Houtan Bastani e95699ffeb cosmetic change 2011-05-11 11:58:33 +02:00