Commit Graph

59 Commits (74ed99c6cac1df5456f197cea88ca054353c59f1)

Author SHA1 Message Date
Houtan Bastani d564d832dd preprocessor: add normcdf for MSVC. closes #1259 2016-10-14 16:11:44 +02:00
Houtan Bastani 7cd072e064 preprocessor: clean up writePowerDeriv code. it only writes C code, so no need for use_dll argument 2016-10-14 14:30:14 +02:00
Houtan Bastani c88c17728e preprocessor: issue warning when param used with lead/lag. closes #976 2015-07-30 14:40:03 +02:00
Houtan Bastani 383a852c9c Revert "Merge branch 'rmExtraExo'"
This reverts commit 28ffa9c56f, reversing
changes made to 60b3577a09.

Conflicts:
	preprocessor/Shocks.cc
	preprocessor/SymbolTable.cc
2015-06-09 16:42:51 +02:00
Houtan Bastani 82f83a58d2 preprocessor: move external_functions_table reindexing to modfile::transformpass 2015-05-19 16:32:26 +02:00
Houtan Bastani 524528bbde preprocessor: take care of expressions_tree and steady_state_model 2015-04-21 15:06:56 +02:00
Houtan Bastani 8975110bcf preprocessor: take care of extra exos in external functions 2015-04-08 16:23:30 +02:00
Houtan Bastani f4e40dcf83 more explicit warning when dividing by zero in conversion to static model and when reading model #730 2014-10-03 17:04:07 +02:00
Sébastien Villemot da615507f4 Cosmetic renaming for consistency between DataTree method names. 2014-03-11 18:56:48 +01:00
Sébastien Villemot 48672ad10f Preprocessor: handle underflows and overflows as MATLAB and Octave do
i.e. don't fail when they happen and instead return 0 or Inf
2012-07-12 12:46:22 +02:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Sébastien Villemot f36f76760a 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 ce9fe30a7a Remove unused expectation syntax 2011-10-26 14:30:47 +02:00
Houtan Bastani 0da1aab3a8 preprocessor: add absolute value and signum 2011-08-16 14:52:35 +02:00
Houtan Bastani 509cc15191 bug fix: getPowerDeriv not accessible from modfile.m 2011-07-19 14:35:35 +02:00
Sébastien Villemot 89b5022f9b Preprocessor: more explicit error message when users enter invalid floating
point numbers (like "1e-10000")
2011-02-16 11:08:40 +01:00
Sébastien Villemot f4557cb195 Reindentation of the preprocessor 2011-02-04 16:25:38 +01:00
Sébastien Villemot 9c6d65bc0a Fix derivatives of STEADY_STATE operator w.r.t. parameters (ticket #128) 2011-01-13 18:08:26 +01:00
Sébastien Villemot fa37a6c0a2 getPowerDeriv: workaround for MS Visual Studio 2010-12-22 13:50:13 +01:00
Houtan Bastani 1a9d6eece5 fixed bug: end _dynamic and _static and getPowerDeriv functions with "end" tags to comply with commit d8dbc68e84 2010-12-22 09:48:05 +01:00
Michel Juillard e6da2849c8 preprocessor: Matlab function getPowerDeriv should not be terminated by 'end' because neither _static nor _dynamic are 2010-12-21 20:42:35 +01:00
Ferhat Mihoubi d8dbc68e84 - The function getPowerDeriv must end with an "end" instruction 2010-12-17 18:54:02 +01:00
Houtan Bastani 35450a292b extend domain of derivative of x^p to x=0 under certain conditions (see ticket 78) 2010-12-13 17:03:57 +01:00
Houtan Bastani 641f03b8d0 fixed bug that would force node sharing when two or more expectation operators had the same expression but different information sets 2010-12-08 12:29:47 +01:00
Sébastien Villemot 771b4e766c Preprocessor: various cleanups related to the signed vs non-negative numerical constants issues 2010-11-25 13:45:35 +01:00
Sébastien Villemot 4a252d8d7c Histval block:
- fail when user tries to initialize a variable at a period which is not in the model, and make the error message explicit
- correctly handle exogenous variables in stochastic mode, which are also substituted with an aux var
- added test files
2010-10-20 14:47:03 +02:00
Houtan Bastani bcc590aafa add preprocessor simplification rule 2010-10-18 15:51:07 +02:00
Sébastien Villemot dbc9795a08 Preprocessor: rename "NodeID" in "expr_t" 2010-09-17 12:13:26 +02:00
Sébastien Villemot 25cf12f4f1 Preprocessor: uniformize typedef names (with a "_t" suffix) 2010-09-16 19:00:48 +02:00
Sébastien Villemot e2c0854cd4 Preprocessor: removed useless version of DataTree::AddVariable() 2010-04-23 18:32:25 +02:00
Sébastien Villemot 12ca3fe707 Preprocessor: removed useless version of DataTree::AddExternalFunction() 2010-04-23 18:32:19 +02:00
Sébastien Villemot 4b96b35dad Preprocessor: changed the prototype of DataTree::AddLocalVariable() 2010-04-23 18:32:14 +02:00
Houtan Bastani 1c3f7b83e5 Added erf as an internally supported function and updated manual. 2010-03-11 12:00:37 +01:00
Houtan Bastani 5d45bf947d Added normpdf as an internally supported function and updated manual. 2010-03-11 10:16:40 +01:00
Houtan Bastani 4f6a3669c6 Added expression sharing for external functions 2010-03-03 11:43:22 +01:00
Houtan Bastani 12c4a52ebc Add support for external functions 2010-02-23 18:15:18 +01:00
Sébastien Villemot eba049899e Preprocessor:
* in DataTree, new functions for testing if some opcode (unary, binary or trinary) is used somewhere in the tree
* removed DataTree::containsSteadyState(), rather use a call to the new utility function
2010-02-23 16:45:56 +01:00
houtanb 77897d691e expectation conditional on a restricted information set
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3367 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-18 22:08:44 +00:00
sebastien e6f1a53e60 Beautified preprocessor code (uncrustify + emacs + manual adjustments, in particular with templates in MacroValue)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3249 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:13:23 +00:00
sebastien 76e691c651 preprocessor:
* fixed a bug with EXPECTATION operator: now handle model local variables
* substitute EXPECTATION operator even in deterministic models (for avoiding crashes, even if use of this operator doesn't make sense there)
* forbid the use of EXPECTATION and STEADY_STEATE outside model block
* minor implementation changes in EXPECTATION and STEADY_STATE operators

reference manual:
* documented EXPECTATION and STEADY_STATE operators
* added a note in write_latex_{static,dynamic}_model commands documentation about auxiliary variables and other model transformations


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3145 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-09 15:13:47 +00:00
houtanb c6ae95e084 changed expectation operator from BinaryOpNode to UnaryOpNode
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3102 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-30 05:21:54 +00:00
sebastien ffd9b2d405 preprocessor: clean-up workaround for acosh(), asinh(), atanh() on Win 64 platforms
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3101 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-29 17:16:10 +00:00
houtanb b765264621 fixes global oo_ declaration for steady state operator as discussed on 14 Sep
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3020 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-02 18:36:07 +00:00
sebastien 97cb944831 preprocessor:
* In stochastic mode, now transforms the model by removing leads and lags greater or equal to 2 (creating auxiliary variables and equations in the process)
* Information about these variables is in structure M_.aux_vars
* Automatically add the necessary initialization for auxiliary vars after the initval block or load_params_and_steady_state


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3002 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-30 15:10:31 +00:00
houtanb e08fa1f618 added steady_state operator to preprocessor
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2916 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-10 20:09:16 +00:00
sebastien 84ba1aff7c trunk preprocessor: use assert() function at several places
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2642 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 16:21:39 +00:00
sebastien a7e32f5025 trunk preprocessor: added two more symbolic simplication rules, particularly useful for the static model
* x-x=0
* x/x=1


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2640 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 16:04:29 +00:00
sebastien d55470ca88 trunk preprocessor: cosmetic changes
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2614 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-20 15:54:19 +00:00
sebastien 4bb5ce9b86 trunk preprocessor: restructuration of the code before adding derivatives w.r. to parameters (in particular, removed VariableTable, and replaced it by a system of derivation IDs)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2597 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-17 16:26:23 +00:00
sebastien 03ce535f04 trunk preprocessor:
* enforce lag=0 for DataTree and StaticModel
* various minor and cosmetic changes


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2596 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-16 10:33:30 +00:00