Commit Graph

2577 Commits (f9a7d8ded3b680e68d3c4c90eae6f909039afdf7)

Author SHA1 Message Date
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
Stéphane Adjemian (Charybdis) 985d742381
Removed prefixing of doubles between -1 and 1 with 0.
This resulted in values like `00.018` in the AST's NumConstNode which
cannot be read by some JSON readers (e.g. Mathworks' jsondecode).
2020-01-27 16:45:21 +01:00
Sébastien Villemot bef537d40a
Do not simplify constant equations which have a tag attached
In particular, in the case of an 'mcp' tag, this could lead to a convergence
failure.

Ref. dynare#1697
2020-01-27 16:09:05 +01:00
Sébastien Villemot 0f3f6a2332
Add comments and simplify code in function that parses the --+ options: … +-- line 2020-01-23 18:45:02 +01:00
Sébastien Villemot 8496e8287d
Fix source tarball creation following removal of license.txt 2020-01-22 20:14:57 +01:00
Sébastien Villemot 92feb0832d
Remove license.txt, it has been merged back in the main Dynare one 2020-01-22 18:05:17 +01:00
Houtan Bastani c6a52fd778
macro processor: c++ modernization 2020-01-21 15:43:25 +01:00
Houtan Bastani fa2f6c9206
macro processor: use `map.count()` instead of `map.find()` 2020-01-21 15:41:25 +01:00
Houtan Bastani 3c546ddb20
macro processor: declare function const 2020-01-21 15:41:08 +01:00
Sébastien Villemot a8b7bd31c5
Fix bug introduced in use_dll mode in 23a08a3662
Ref. #40
2020-01-20 18:33:31 +01:00
Sébastien Villemot b0c819cb03
Compute 3rd order dynamic derivatives for “dynare_sensitivity(identification)”
Ref. #40
2020-01-20 17:26:31 +01:00
Sébastien Villemot 23a08a3662
Ensure that dynamic model files contains all the derivatives that have been computed
Previously, there could be a discrepancy if the order mandated by
“identification” was less that the one mandated by “stoch_simul”.

Ref. #40
2020-01-20 17:22:32 +01:00
Sébastien Villemot 1c44baea05
New option “filtered_theoretical_moments_grid”, that supersedes “hp_ngrid”
The old option is left for backward-compatibility purposes, but it has the same
effect as the new one.

Ref. dynare#1093
2020-01-20 16:21:25 +01:00
Houtan Bastani e9049aa81f
use prefix notation `R"()"` for quote in quotes 2020-01-16 16:24:21 +01:00
Houtan Bastani 6d1c2ca82b
macro processor: allow colon-separated arrays as command-line defines
colon-separated command line arguments such as
```
dynare <<.mod file>> -DA=1:5 -DAA=1:2:5
```
are now translated as:
```
@#define C = [2, 3, 4, 5, 6]
@#define CC = [2, 5]
```
2020-01-16 16:24:21 +01:00
Houtan Bastani f00d7c4b4c
macro processor: fix bug where command line arguments that began with an integer were being treated as integers even if they weren't (e.g. dates) 2020-01-16 13:09:42 +01:00
Sébastien Villemot e4bdc022a4
Update Dynare Team members list 2020-01-13 18:30:59 +01:00
Houtan Bastani 5cb879268f Merge branch 'JohannesPfeifer-master-patch-60829' into 'master'
Add xls_sheet and xls_range options to calib_smoother

See merge request Dynare/preprocessor!12
2020-01-13 11:50:29 +00:00
Johannes Pfeifer a70511e057 Add xls_sheet and xls_range options to calib_smoother 2020-01-13 11:36:31 +00:00
Houtan Bastani ac3eadc69d
update license dates 2020-01-07 16:00:23 +01:00
Houtan Bastani 15df06bf29
fix bug in writing equation tags in latex output; special characters (`& % $ # _ { } ~ ^ \`) were not escaped 2020-01-07 15:59:01 +01:00
Houtan Bastani 70c3d478ba
add newline after equation tag in latex output 2020-01-07 15:58:58 +01:00
Houtan Bastani acdfeb4ee6
simplify calls to `symbol_list.checkPass` 2020-01-07 15:58:30 +01:00
Houtan Bastani d2860c4f6b
place braces directly around latex name
issue dynare#263
2020-01-07 15:58:00 +01:00
Sébastien Villemot 4e2538a2a2
Ensure original tags and line numbers are preserved with ramsey_model
In particular, introduce a method for clearing all equations, so that tags and
line numbers are also cleared.

Ref. dynare#1685
2020-01-06 18:26:35 +01:00
Houtan Bastani 05f00aa33f
fix bug causing equation tags to be ignored when casting to StaticModel 2020-01-06 16:05:22 +01:00
Houtan Bastani 98a9c88880
Allow `dynasave` and `dynatype` to support exogenous variables in their var_list
issue dynare#1691
2020-01-06 10:52:18 +01:00
Houtan Bastani 54f73e0864
Symbol List check pass: allow caller to specify the valid types of variables in a Symbol List
dynare#1355
2019-12-23 21:16:00 +01:00
Houtan Bastani f2271eb806
Partial reversion of global indentation of macro processor header files introduced in e2d5a83592
The global indentation introduced in e2d5a83592 made the macro processor header files difficult to read. Revert spacing changes that made simple, inline, one-line functions take up 5 lines making headers tougher to read. Similary change for constructors, not to place each brace on an individual line.
2019-12-23 19:39:34 +01:00
Sébastien Villemot ba4fd2d2e0
Bump version number to 4.7-unstable 2019-12-20 17:18:31 +01:00
Sébastien Villemot e2d5a83592
Global reindentation 2019-12-20 16:59:30 +01:00
Houtan Bastani 42106f85a8
det_cond_forecast: fix output aesthetics
- remove semicolon after `end`
- don't test for existence of `oo_`
- fix spacing to conform with MATLAB/Octave spacing

issue #39
2019-12-20 14:51:16 +01:00
Houtan Bastani 0cd59dbcf8
bug fix: clear symbol list and options list after call to `DetCondForecast` constructor
issue #39
2019-12-20 14:51:16 +01:00
Houtan Bastani 9d3be05a2d
remove superfluous comma 2019-12-20 14:51:16 +01:00
Houtan Bastani 76b461de4a
organize function with other members of the same class 2019-12-20 14:51:16 +01:00
Houtan Bastani 32c3910e18
allow symbol list to accept auxiliary variables
dynare#1355
2019-12-20 14:51:15 +01:00
Houtan Bastani 137dc31bb0
remove unnecessary headers 2019-12-20 12:49:23 +01:00
Sébastien Villemot 5f451ebc99
Cosmetic fixes to 8baec1e0ec
Ref. #1673
2019-12-20 11:48:50 +01:00
Sébastien Villemot 82c2682bb2
New “with_epilogue” option of “shock_decomposition”, “realtime_shock_decomposition” and “initial_condition_decomposition”
Ref. dynare!1688
2019-12-20 11:47:54 +01:00
Sébastien Villemot ebafd8f3b6
Epilogue: always initialize M_.epilogue_names and M_.epilogue_var_list_
Ref. dynare!1688
2019-12-20 11:47:54 +01:00
Stéphane Adjemian (Charybdis) 8baec1e0ec Allow k order estimation.
Automatically switch to k_order_solver if order>2. Use old mex file if
order==2 (since it seems unexpectedly significantly faster than
local_state_space_iteration_k, and because it can deal with pruning).
2019-12-20 11:15:16 +01:00