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
Sébastien Villemot
d441ff059a
Fill the “M_.aux_vars(:).orig_expr” field for all auxiliary variables
...
This field contains a string representation of the expression that the
auxiliary variable replaces.
It is non-empty for all auxiliary variables, except for Lagrange multipliers.
Ref. dynare#773
2019-12-19 16:58:26 +01:00
Sébastien Villemot
8b23a2d575
Fix incorrect static model when “diff” operator is present
...
The “diff” operator was incorrectly replaced by its argument in the static
model, leading to an incorrect result for the steady state.
This is because the information contained in the “expr_node” field of the
auxiliary variables storage was not consistent across all types of auxiliary
variables: for a “diff()” operator, it would contain the argument of the
operator, instead of the full node. Hence it would not simplify to zero at the
steady state.
A similar inconsistency was also present for the “expectation()” operator,
though it was not leading to an incorrect static model.
2019-12-19 16:50:40 +01:00
Sébastien Villemot
044258b0a2
Make “datafile” option of “perfect_foresight_setup” (and “simul”) equivalent to “initval_file”
...
Ref. dynare#1663
2019-12-19 14:53:52 +01:00
Sébastien Villemot
d1d244086d
Remove spurious spaces within parentheses in generated MATLAB code
2019-12-18 17:35:25 +01:00
Sébastien Villemot
fe0c781c06
New “planner_discount_latex_name” option of “ramsey_policy”
...
Accepts a TeX name, as for variable declarations (i.e. enclosed within dollar
signs).
Ref. dynare#1686
2019-12-18 17:32:41 +01:00
Sébastien Villemot
1a08cdf01a
BinaryOpNode::findConstantEquations(): fix bug related to nested if/else
...
In the absence of braces, the last “else” clause is always associated with the
closest “if”, which is not what was intended here. The indentation was
misleading.
2019-12-18 16:32:59 +01:00
Houtan Bastani
a4ef5a01d3
Epilogue: handle case where `dseries.firstobservedperiod` ends in an error
...
issue #36
2019-12-18 15:54:50 +01:00
Houtan Bastani
4f20b1146e
Epilogue static file: handle case where RHS is not a dseries
...
issue #36
2019-12-18 15:50:37 +01:00
Houtan Bastani
e2d9e179a2
Include missing header
2019-12-18 15:43:49 +01:00
Houtan Bastani
86c79250cf
Make iterator const
2019-12-18 15:43:49 +01:00
Houtan Bastani
653b2477db
Update for bison 3.5
2019-12-18 15:43:48 +01:00
Houtan Bastani
87870eaae8
Epilogue: remove +1
...
issue #36
2019-12-18 15:43:48 +01:00
Houtan Bastani
efb2752e4e
Ramsey: fix bug: symbol_list is not passed to RamseyPolicy statement when it was not passed options
2019-12-18 12:07:59 +01:00
Sébastien Villemot
c2461981d2
Various provisions for improvements to shock decomposition commands
...
– New “squeeze_shock_decomposition” command
— New “max_nrows” option to “plot_shock_decomposition” and
“initial_condition_decomposition”
— “plot_shock_decomposition” now returns oo_ as an output argument
Ref. dynare#1687, dynare!1655
2019-12-18 11:39:44 +01:00
Sébastien Villemot
031c0cff5f
Various code simplifications and modernizations
2019-12-16 19:42:59 +01:00
Sébastien Villemot
97fa005b33
Use 1-based indexing in M_.nonzero_hessian_eqs
2019-12-13 22:31:49 +01:00
Sébastien Villemot
141cff0761
New field M_.endo_trends
...
For each endogenous variable, gives the deflator and the growth factor (as well
as the “log” versions).
Ref. dynare#1648
2019-12-13 18:02:37 +01:00
Sébastien Villemot
2af26ee2c2
Ramsey: use information from transformed model for filling M_.nonzero_hessian_eqs
...
Since commit 9c9e8f816f
, it’s the information
from the original model which was in this field, which is not what is expected.
By the way, do not output this field (and the related M_.hessian_eq_zero) when
the Hessian is not computed by the preprocessor (i.e. in practice for perfect
foresight), since they would otherwise contain incorrect information.
Ref. dynare#1681
2019-12-13 18:02:35 +01:00
Houtan Bastani
2646f01424
fix quotes from 7958f76fae
2019-12-13 16:03:37 +01:00
Houtan Bastani
fddfb7fe2f
Issue deprecation warning for `simul`
...
closes dynare#1683
2019-12-13 16:01:47 +01:00
Houtan Bastani
c1b8cdf811
epilogue: simplify _static file
...
issue #36
2019-12-12 16:32:12 +01:00
Sébastien Villemot
b58bbb8e84
Ramsey: do not warn if instruments are not defined in steady_state_model block
...
Closes: dynare#1677
2019-12-12 16:19:15 +01:00
Sébastien Villemot
047b397899
Simplify x+y-y in x
...
Note that this actually corresponds to 4 different abstract syntax trees:
— (x+y)-y
— (y+x)-y
— (x-y)+y
— y+(x-y)
2019-12-12 16:19:15 +01:00
Sébastien Villemot
d747b53a8b
Simplify x*y/y in x
...
Note that this actually corresponds to 4 different abstract syntax trees:
— (x*y)/y
— (y*x)/y
— (x/y)*y
— y*(x/y)
2019-12-12 16:19:15 +01:00
Sébastien Villemot
50275f3588
Simplify x-(-y) in x+y
2019-12-12 16:19:15 +01:00
Sébastien Villemot
f24f28b2b2
Simplify x/(1/y) in x*y
2019-12-12 16:19:15 +01:00
Sébastien Villemot
1d3265acb7
C++17: further code simplifications (assignments in if)
2019-12-12 16:19:14 +01:00
Houtan Bastani
44adcbb488
epilogue: replace `dseries__` with `ds` making the file easier to read
2019-12-12 14:46:45 +01:00
Houtan Bastani
dfcd381d20
epilogue: fix bug with external functions in `epilogue` block
...
issue #36
2019-12-12 14:45:49 +01:00
Houtan Bastani
7958f76fae
issue deprecation warning for `ramsey_policy`
...
dynare#1678
2019-12-12 11:36:43 +01:00
Houtan Bastani
8dfa79a0f5
new command `evaluate_planner_objective`
...
dynare#1678
2019-12-12 11:35:26 +01:00
Houtan Bastani
5430bb4bc6
simplify for statement
2019-12-11 16:21:18 +01:00
Houtan Bastani
4111bc8cfc
epilogue: create _dynamic and _static files
...
#36
2019-12-11 16:17:54 +01:00