Commit Graph

2577 Commits (f9a7d8ded3b680e68d3c4c90eae6f909039afdf7)

Author SHA1 Message Date
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
Houtan Bastani 217dadabbd
Use `if` statements with initializers allowed by C++17 2019-10-29 11:20:13 +01:00
Houtan Bastani 361e99bee5
simplify code 2019-10-28 17:25:40 +01:00
Houtan Bastani 7b13ee1b3a
macro processor: remove unused variable 2019-10-24 17:52:32 +02:00
Sébastien Villemot d839aea08b
Drop unused functions for writing C and C++ output
These functions should have been deleted in
946d105c04.
2019-10-24 10:54:46 +02:00
Sébastien Villemot ecdca502aa
Modernization: stop using make_pair() and make_tuple()
In many cases, they can be replaced by the curly braces syntax.

Otherwise, we can now use the pair() and tuple() constructors, without the need
to specify template parameters, thanks to class template argument
deduction (new in C++17).
2019-10-24 10:49:13 +02:00
Sébastien Villemot 2a127b1f23
VAR/TCM models: use lag-equivalence relationship to compute maximum lags
This is made possible by the getLagEquivalenceClass() method introduced in the
previous commit.

Previously, the static version of the LHS expressions was used.

As a consequence, drop ModFile::diff_static_model, now useless.
2019-10-22 16:04:24 +02:00
Sébastien Villemot 8a83e08e79
Fix bug with diff or unary ops that have same static representation
Previously, for testing whether two diff() expressions or two unary ops were
the lead/lag of each other, the preprocessor would test whether they have the
same static representation. This is ok for simple expressions (e.g.
diff(x(-1))), but not for more complex ones (e.g. diff(x-y) and diff(x(-1)-y)
should not be given the same auxiliary variable).

This commit fixes this by properly constructing the equivalence relationship
and choosing a representative within each equivalence class. See the comments
above lag_equivalence_table_t in ExprNode.hh for more details.

Closes #27
2019-10-22 15:01:06 +02:00
Sébastien Villemot c5d223a79b
Fix semantics of ExprNode::maxLag(), maxLead() and maxLagWithDiffsExpanded() with constants
Those methods can return a negative value in some cases. For example,
maxLead(x₋₁) = −1.

But constants were always returning a value of zero, which means that we had
inconsistent behaviour like maxLead(x₋₁ + 2) = 0.

This commits fixes the behaviour by making these methods return the smallest
possible integer when called on constants.
2019-10-22 11:35:11 +02:00
Sébastien Villemot 37cc0a0d2f
CI: use our homemade cache for Boost MSYS2 binaries, to avoid useless downloads
The cache in ~/tarballs on the runner is shared with the jobs of the main
dynare repository that create the Windows and macOS packages.

Also use better options for wget.
2019-10-17 16:15:53 +02:00
Sébastien Villemot 12eaf0b8dd
CI: store Boost version in a variable 2019-10-17 15:53:41 +02:00
Sébastien Villemot c30e52dc43
CI: various simplifications 2019-10-17 15:51:35 +02:00
Sébastien Villemot d38ac48cfa
Create set_auxiliary_series routine in use_dll, block/bytecode and julia modes
Closes #34
2019-10-17 15:03:26 +02:00
Stéphane Adjemian (Charybdis) 33d123e74e Added compilation of the preprocessor for all targets...
Windows{32,64}, Linux{32,64} and macOS{64}, also generates
informations required by the Julia package.
2019-10-15 15:59:05 +02:00
Houtan Bastani 7306132644
remove unused headers 2019-10-11 11:44:39 +02:00
Houtan Bastani 8211edc4e8
fix typo 2019-10-10 15:31:03 +02:00
Houtan Bastani 9e454debb5
support external functions in MATLAB namespace. closes dynare#1639 2019-10-09 14:49:05 +02:00