Commit Graph

2493 Commits (41d38551e5de69d4400d6503f041ce0e6a83503c)

Author SHA1 Message Date
Houtan Bastani 41d38551e5
write names of epilogue variables 2019-12-11 15:51:26 +01:00
Houtan Bastani 3694fc40b3
detrend epilogue equations 2019-12-11 14:45:47 +01:00
Houtan Bastani 8dc70602c8
macro processor: move evaluation of all arguments for unary, binary, and trinary ops into their switch cases 2019-12-10 16:33:32 +01:00
Houtan Bastani 952e899f3a
fix bug in macro processor ensuring short-circuit functionality of `||` and `&&` statements
closes dynare#1676
2019-12-10 16:30:11 +01:00
Sébastien Villemot 5c081db76f
Add option “colormap” to “initial_condition_decomposition” command.
Ref dynare#1586
2019-12-09 15:43:39 +01:00
Sébastien Villemot 8962a9d589
Windows: apply the workaround for +<basename> removal to +objective subfolder
Because MATLAB under Windows maintains a lock on the “+<basename>” subdirectory,
we use a workaround consisting in first renaming the directory, then deleting
it.

But this is not enough when the “ramsey_policy” command is used, because the
latter creates a “+objective” subfolder inside “+<basename>”, on which MATLAB
also maintains a lock.

The fix consists in recursively using the same workaround as for the top-level
directory: renaming before deleting.
2019-12-06 15:19:23 +01:00
Houtan Bastani 3f3ef7ca00
fix bugs in initial_condition_decomposition statement
closes #37
2019-12-06 10:40:44 +01:00
Sébastien Villemot b5b0099064 Merge branch 'compiler' into 'master'
add compiler statement

See merge request Dynare/preprocessor!11
2019-12-04 16:00:50 +00:00
Houtan Bastani 2814f05a67
Add flag to compilation of flex file
Without this flag flex errors out because it hits a hard-coded size limit
2019-12-04 16:57:20 +01:00
Houtan Bastani 02cb4cc973
add compiler statement
Allows the user to set the compiler, flags, and libs to be used with `use_dll`

Issue #35
2019-12-04 16:57:20 +01:00
Houtan Bastani bf56d6fb82
fix LaTeX output for sqrt, exp, sin, cos, tan 2019-12-04 11:26:30 +01:00
Houtan Bastani 2db2133796
fix bugs with cbrt
- it was not handled in the model block
- output was incorrect for MATLAB/Octave and LaTeX
2019-12-04 11:10:19 +01:00
Houtan Bastani abbdbb5862
Clarify part of code 2019-12-03 16:42:38 +01:00
Sébastien Villemot 23ff36a0dd
Systematically compute recursive ordering of auxiliary equations
Auxiliary equations appearing in set_auxiliary_variables.m and
dynamic_set_auxiliary_series.m need to appear in recursive ordering, since
those files are used for sequential evaluation.

Previously, the recursive ordering was guaranteed by a set of ad hoc rules and
workarounds, but that would not cover certain edge cases.

With this commit, the recursive ordering is systematically computed, using a
topological sort on the directed acyclic graph whose vertices are auxiliary
equations and whose edges are dependency relationships.

Closes: #22
2019-12-03 14:26:13 +01:00
Houtan Bastani 4a1fb239da
Add interface for init2shocks
Dynare/dynare#1650
2019-12-02 13:58:44 +01:00
Houtan Bastani de3de15249
add nograph option to plot_shock_decomposition
closes #30
2019-11-29 14:58:42 +01:00
Sébastien Villemot 1fac178cad Merge branch 'master' into 'master'
Pass oo_ as function input for plot_icforecast. Dynare/dynare#1672

See merge request Dynare/preprocessor!10
2019-11-29 11:42:52 +00:00
Dóra Kocsis f11048f2dc Pass oo_ as function input for plot_icforecast. Dynare/dynare#1672 2019-11-29 12:17:02 +01:00
Sébastien Villemot 45383a9cc2
Build system: really error out if LaTeX distribution is not there
The changes in 1ec3923a6b were not working as
intended, because AC_CHECK_PROG expect values and not actions. Hence
AC_MSG_ERROR was not properly executed.
2019-11-28 14:42:43 +01:00
Sébastien Villemot d008113d69
Forbid exogenous and exogenous deterministic variables in STEADY_STATE operator
Closes: dynare#825
2019-11-27 17:27:04 +01:00
Sébastien Villemot 61ea8811de
Remove the undocumented and confusing “linear” option of stoch_simul
Closes: #33
2019-11-27 15:08:56 +01:00
Sébastien Villemot d1d22b95f4 Merge branch 'master' into 'master'
bugfix: forecast type option in shock_decomposition.

See merge request Dynare/preprocessor!9
2019-11-26 17:33:09 +00:00
Dóra Kocsis dfb5a856c4 bugfix: forecast type option in shock_decomposition. 2019-11-26 18:29:12 +01:00
Sébastien Villemot 0573475891 Merge branch 'master' into 'master'
Master

See merge request Dynare/preprocessor!8
2019-11-26 17:08:03 +00:00
Dóra Kocsis 3e43b36cf3 Introduce forecast type option in shock_decomposition command. Dynare/dynare#1657 2019-11-26 17:49:12 +01:00
Dóra Kocsis c23e136f93 Revert "Merge branch 'master' into 'master'"
This reverts commit 3ae92499b8, reversing
changes made to 3ec01b8612.
2019-11-26 16:46:12 +01:00
Dóra Kocsis 28bfc72a5c Revert "Merge branch 'master' into 'master'"
This reverts commit a37fea0dfc, reversing
changes made to 3ae92499b8.
2019-11-26 16:44:17 +01:00
Houtan Bastani e3a3979eba
remove unnecessary line included in 0ff7a9d 2019-11-26 16:37:01 +01:00
Sébastien Villemot 8be9efa425 Merge branch 'exclude_eqs' into 'master'
introduce command line options: `exclude_eqs` and `include_eqs`

See merge request Dynare/preprocessor!7
2019-11-26 15:04:00 +00:00
Houtan Bastani 0ff7a9d2ab
introduce command line options: `exclude_eqs` and `include_eqs`
Allows for the inclusion/exclusion of a set of equations, specified either on the command line or in a text file.

If the equation has a single endogenous variable on the LHS, then the equation is moved. If not, if the equation has an `endogenous` tag then that variable is removed along with this equation. If not, then an error is thrown.

As a command line argument, `exclude_eqs` can take the form (same syntax for `include_eqs`):
* `exclude_eqs=eq1 to remove all equations declared as `[name=eq1]`
* `exclude_eqs=[eq 1, eq 2]` to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`
* `exclude_eqs=[tagname=X]` to remove all equations declared as `[tagname=X]`
* `exclude_eqs=[tagname=(X, Y)]` to remove all equations declared as `[tagname=X]` or `[tagname=Y]`

When declared in a file, the file should be of the form:
```
eq 1
eq 2
```
to remove all equations declared as `[name=eq 1]` or `[name=eq 2]`.

It should be of the form:
```
tagname=
X
Y
```
to remove all equations declared as `[tagname=X]` or `[tagname=Y]`.
2019-11-26 14:16:00 +01:00
Sébastien Villemot 1ec3923a6b
Build system: by default, error out if LaTeX distribution is not there
A new --disable-doc configure flag has been introduced to skip the compilation
of the documentation.
2019-11-26 12:39:48 +01:00
Houtan Bastani a61565bd01
macro processor: fix bug in cast of string to bool
The incorrect `equal` template was being used.
2019-11-26 11:11:34 +01:00
Houtan Bastani 4540bed06c
macro processor: missed if statement with initializer for C++17 2019-11-26 10:40:51 +01:00
Houtan Bastani 4e3bf09495
macro processor: fix typo that caused logical or not to work when one of the arguments is Real == 1 and other arguments are false 2019-11-26 10:39:16 +01:00
Houtan Bastani 8034513578
macro processor: fix bug: allow empty strings
previously, `@#define str=""` caused an error
2019-11-26 10:32:43 +01:00
Sébastien Villemot a37fea0dfc Merge branch 'master' into 'master'
fix missing tokens in the lexer: conditional, unconditional.

See merge request Dynare/preprocessor!6
2019-11-25 16:41:39 +00:00
Dóra Kocsis 926ccccb26 fix missing tokens in the lexer: conditional, unconditional. 2019-11-25 17:34:52 +01:00
Sébastien Villemot 3ae92499b8 Merge branch 'master' into 'master'
Add interface for forecast_shock_decomposition.

See merge request Dynare/preprocessor!5
2019-11-25 16:13:54 +00:00
Dóra Kocsis 8bfcefe7fb Add interface for forecast_shock_decomposition. Dynare/dynare#1657 2019-11-25 17:08:59 +01:00
Houtan Bastani 3ec01b8612
modifications for compiling mex on macOS
* only support 64 bit mex
* check whether local compiler exists; if not use system compiler; if that doesn't exist stop processing
* move to minimum macOS 10.9, corresponding to the MATLAB mex min
2019-11-22 16:36:01 +01:00
Houtan Bastani c6beb6c5c6
macro processor: ignore `@#line` directive 2019-11-22 14:14:05 +01:00
Sébastien Villemot 5a5817b4fe
Improvements to the test for balanced growth path
— Raise the default tolerance for cross-derivatives to 1e-6, to reduce the
  number of false positives

— New option “balanced_growth_test_tol” to the “model” block for changing that
  tolerance

— Turn back test failures into errors. Since there is now an option for
  controlling the tolerance, the user always has the possibility of making the
  test pass.

Closes: dynare#1389
2019-11-14 17:55:17 +01:00
Houtan Bastani 0f0299bc1c
fix to allow for diffs of unary ops to go through variable mapping 2019-11-07 16:15:49 -05:00
Houtan Bastani 0bb233d291
fix bug causing auxiliary variables for pac growth parameters not to contain their original symbol id 2019-11-07 14:17:49 -05:00
Sébastien Villemot 10ed67f6f0 Merge branch 'master' into 'master'
introduce variableMapping, default equation name tags in M_ and JSON output

See merge request Dynare/preprocessor!3
2019-11-07 13:23:21 +00:00
Dóra Kocsis 7a78593df4 introduce variableMapping, default equation name tags in M_ and JSON output 2019-10-30 16:30:51 +01:00
Houtan Bastani fa9c9435ff
add xref for equation tags 2019-10-29 14:05:55 +01:00
Houtan Bastani ef4710cdb1
macro processor: fix for loops 2019-10-29 11:21:09 +01:00
Houtan Bastani 8a789d060f
aesthetic fix: for conformity to the rest of the code, prefer `const auto` to `auto const` 2019-10-29 11:20:27 +01:00
Houtan Bastani 4866bb5902
macro processor: use C++17 structured bindings in for loops 2019-10-29 11:20:21 +01:00