Commit Graph

2617 Commits (9263a02a9b881d971325fc6c58a036ce5e84ece1)

Author SHA1 Message Date
Sébastien Villemot 9263a02a9b
Skip constant equations replacement only when there is an “mcp” tag
Since bef537d40a, constant equations were not
simplified as soon as they had a tag attached.

But this is too wide a restriction. In particular, this breaks the trend
component models which have a target that is set to a constant.

So we now only skip the replacement in the case where there is an “mcp” tag.

Ref. dynare#1697
2020-03-27 18:17:04 +01:00
Sébastien Villemot 50776a766a
Remove the unsignedness of many integer variables and function arguments
This was only adding unneeded complexity, for no clear reason (we’re very far
from reaching 2³¹ equations, and if we wanted to support models that large, it
would be better to use long integers to avoid being limited to 2³²).
2020-03-24 18:28:03 +01:00
Sébastien Villemot 92c3cbdfa1
Remove unused classes 2020-03-24 17:04:53 +01:00
Sébastien Villemot 78ff24ea14
Block decomposition: misc style and doc improvements 2020-03-24 16:57:45 +01:00
Sébastien Villemot a2caa8b4a8
Block decomposition: in symbolic normalization, no longer insert a null pointer in dynamic Jacobian
Rather use DataTree::Zero, since we use numerical zero for static and
contemporanous Jacobians.
2020-03-24 15:28:22 +01:00
Sébastien Villemot 5d6e6338f4
Block decomposition: remove unused codepaths in computation of normalization 2020-03-20 18:49:31 +01:00
Sébastien Villemot 097bdfde03
Misc simplifications and cosmetics 2020-03-20 18:42:59 +01:00
Sébastien Villemot ce1cbb3e52
Block decomposition: turn EquationType into an enum class 2020-03-20 18:00:56 +01:00
Sébastien Villemot 8b4d046f9f
Block decomposition: turn BlockSimulationType into an enum class 2020-03-20 17:31:14 +01:00
Sébastien Villemot f1061e8df1
Block decomposition: turn BlockType into an enum class 2020-03-20 16:38:43 +01:00
Sébastien Villemot fcef9cf8b9
Block decomposition: further streamlining of function prototypes 2020-03-20 15:23:23 +01:00
Sébastien Villemot bd6eee93df
Block decomposition: refactor the prototypes of various functions
— return output arguments on the left-hand side
— do not pass class members as input/output arguments

By the way, fix a (benign) vector allocation bug in
{Static,Dynamic}Model::computeChainRuleJacobian().
2020-03-19 17:47:12 +01:00
Sébastien Villemot 76c2e87c3b
Block decomposition: factorize data structures between StaticModel and DynamicModel 2020-03-17 18:58:34 +01:00
Sébastien Villemot 7aea50b988
Do not import MFS namespace 2020-03-17 16:49:22 +01:00
Sébastien Villemot ec57ee96c3
MinimumFeedbackSet: make most functions (de facto) private 2020-03-17 16:48:55 +01:00
Sébastien Villemot ca7024802e Merge branch 'shock_decomp' into 'master'
Add missing smoother options to shock_decomposition

See merge request Dynare/preprocessor!18
2020-03-17 13:22:41 +00:00
Sébastien Villemot 55501f2957 Merge branch 'julia' into 'master'
modify Julia output for mapping eqidx

See merge request Dynare/preprocessor!17
2020-03-17 13:08:25 +00:00
Johannes Pfeifer dab769c6f4 Add missing smoother options to shock_decomposition 2020-03-17 11:48:51 +01:00
Michel Juillard d668590ff8 modify Julia output for mapping eqidx 2020-03-17 09:27:10 +01:00
Sébastien Villemot 7d1a467aa3
Transform predetermined variables before computing original model leads/lags
This is necessary to correctly compute those original model leads/lags. In
particular, this is needed for correct interaction with “histval”.

Closes: #47
2020-03-02 17:10:24 +01:00
Stéphane Adjemian (Charybdis) 2a048a487c
Throw an error if mh_tune_guess is used without mh_tune_jscale. 2020-02-29 09:54:18 +01:00
Stéphane Adjemian (Charybdis) 3c6a23137b
Throw an error if mh_tune_jscale is used with mh_jscale. 2020-02-28 18:28:09 +01:00
Stéphane Adjemian (Charybdis) 5a12f56b0f
Cosmetic change (indentation). 2020-02-28 13:17:01 +01:00
Stéphane Adjemian (Charybdis) baa3804314
Shorten option name. 2020-02-28 13:10:47 +01:00
Johannes Pfeifer 02fa6c7814 Add interface to set initial guess for mh_tune_jscale 2020-02-26 11:20:48 +01:00
Sébastien Villemot 9ff10f482a
Fix typos (thanks lintian) 2020-02-25 15:20:33 +01:00
Sébastien Villemot 6241da54fa Merge branch 'patch-1' into 'master'
Provide M_ as an output to stoch_simul and discretionary_policy

See merge request Dynare/preprocessor!15
2020-02-25 13:30:08 +00:00
Johannes Pfeifer 312edf0dba Provide M_ as an output to stoch_simul and discretionary_policy
Related to https://git.dynare.org/Dynare/dynare/issues/1711
2020-02-24 13:06:59 +00:00
Houtan Bastani 2813ef2d18
remove unused header 2020-02-21 19:51:04 +01:00
Houtan Bastani 7371558321
rework equation tags
Create new EquationTags class to simplify use of equation tags throughout the code and avoid repeated code

issue #38
2020-02-21 17:49:38 +01:00
Houtan Bastani 28b98c7c0e
Rework the function that handles the macro-expansion of the .mod file 2020-02-20 15:30:46 +01:00
Houtan Bastani abedb47573
macro processor: allow for the definition of a variable without a value
- by default, set the value of the variable to `1`, as is done on the command line with the `-D` flag

issue #43
2020-02-19 21:40:40 +01:00
Houtan Bastani 4a68f8a38d
dragonfly: add new field to `options_.parallel_info` 2020-02-18 21:31:07 +01:00
Houtan Bastani a3fb2b123e
fix bug introduced in a778ba4 2020-02-18 12:32:34 +01:00
Houtan Bastani a778ba4ab4
fix lookbehind to handle `-` sign in substitution of dates in native statements
closes dynare#1708
2020-02-17 17:37:58 +01:00
Houtan Bastani 976e2ae17a
remove support for weekly dates 2020-02-17 15:03:26 +01:00
Houtan Bastani fb8a26f877
dragonfly: support ProgramConfig config file option 2020-02-13 18:35:56 +01:00
Houtan Bastani f022f666b7
dragonfly: support ProgramPath config file option 2020-02-13 17:47:15 +01:00
Houtan Bastani ac4749edf9
add undocumented `gui` option to preprocessor 2020-02-12 12:32:40 +01:00
Houtan Bastani 14be6bad00
occbin: support occbin tags in equation tags, add occbin_likelihood and occbin_smoother as options to estimation 2020-02-11 14:24:06 +01:00
Houtan Bastani f9a7d8ded3
make loop variables const 2020-02-06 16:09:03 +01:00
Houtan Bastani de6ca5cdcc
Combine `DynareMain.cc` and `DynareMain2.cc` 2020-02-05 16:27:40 +01:00
Houtan Bastani 1dbbd87d3d
Remove options `noemptylinemacro` and `nolinemacro`; add option `linemacro`
This only concerns the situation when `savemacro` is also passed.

When `linemacro` is passed, the macro expanded .mod file is the same as before

When `linemacro` is not passed, the macro expanded .mod file is equivalent to what it was before when both `noemptylinemacro` and `nolinemacro` were passed.

closes #44
closes #45
2020-02-05 15:19:01 +01:00
Sébastien Villemot c4a9f93d40
Do not allow the estimation of a parameter that appears in “planner_discount”
Ref. dynare#1173
2020-02-04 17:49:53 +01:00
Houtan Bastani 12296b620f
macro processor: fix bug in file reported when error encountered after a file has been included
closes #42
2020-02-04 11:12:41 +01:00
Houtan Bastani 6284e991fc
macro processor: remove unnecessary type specifiers 2020-02-04 11:12:41 +01:00
Sébastien Villemot ee972d9638
Fix “planner_discount” option of “discretionary_policy”
Since fe0c781c06, the discount factor would
always be equal to one.

Ref. dynare#1699
2020-01-30 15:42:39 +01:00
Houtan Bastani 3fec11b183
code simplifications 2020-01-30 14:55:39 +01:00
Houtan Bastani 148aa9d924
macro processor: simplify handling of `@#define` 2020-01-29 14:52:01 +01:00
Stéphane Adjemian (Charybdis) 2479a2a78c
Fixed bug introduced in 985d742.
If a float smaller than one in absolute value is written without a
leading zero in the mod file, for instance as `.5`, we really need to
prefix the number with a zero. The simplest approach is to convert
the strings representing the numerical constants into floats.
2020-01-28 18:11:55 +01:00