Commit Graph

2577 Commits (f9a7d8ded3b680e68d3c4c90eae6f909039afdf7)

Author SHA1 Message Date
Houtan Bastani 4e1b1e4405
fix typo in parser 2019-10-08 15:36:30 +02:00
Houtan Bastani f77413ebb8
remove unused argument to function 2019-10-08 11:22:29 +02:00
Houtan Bastani fac9e4436c
fix bug in `fast` option: printing temporary terms hid changes in model when the temporary term changed as the temporary terms themselves were not printed. closes dynare#1661
Furthermore, modifications to model local variables were not taken into account.

To fix, take checksum of model local variables, temporary terms, and equations

Also, use existing functions to print these to a stringstream instead of repeating print functionality in this function
2019-10-07 18:55:20 +02:00
Houtan Bastani 6e92f79c13
simplify isChecksumMatching, move to filesystem::path 2019-10-07 17:43:45 +02:00
Houtan Bastani 6191c69d74
move to hash algorithm defined since C++11 for calculating checksums. dynare#1661 2019-10-07 17:43:16 +02:00
Houtan Bastani 979453815c
simplify initialization of `hasModelChanged` variable in writing of output 2019-10-07 11:32:02 +02:00
Stéphane Adjemian (Charybdis) 14b6cb6bee Fixed logic for output language. 2019-10-07 09:28:49 +02:00
Houtan Bastani 7b4616e853
fix cross compilation due to bug in MinGW 8.3.0
implicit conversion from `filesystem::path` to `string` not supported even though it's in the standard
2019-10-04 14:41:48 +02:00
Houtan Bastani 1291320053
macro processor: handle empty files 2019-10-04 11:18:03 +02:00
Houtan Bastani 125adff59c
macro processor: insert path instead of string as the path has already been created 2019-10-04 11:10:21 +02:00
Houtan Bastani 2ce6e411b4
remove unused headers 2019-10-04 10:57:36 +02:00
Houtan Bastani 2f6f0d8cf6
use filesystem::path instead of string to hold include paths passed on the command line 2019-10-04 10:57:36 +02:00
Houtan Bastani 0b3cd3ec90
pac: fix parsing of linear combination for growth option 2019-10-03 18:26:09 +02:00
Houtan Bastani 031bc62f3a
macro processor: use filesystem after move to C++17, closes #31
ancillary to this change is the move of `paths` out of the Driver class into an argument to parsing/evaluation #32
2019-10-03 14:24:47 +02:00
Houtan Bastani d7e70a4063
macro processor: fix bug: interpret @#include at node level instead of at the Driver level 2019-10-02 17:39:11 +02:00
Houtan Bastani 310f3936fe
macro processor: fix bug: interpret @#includepath at node level instead of at the Driver level 2019-10-02 17:39:05 +02:00
Houtan Bastani db52e02158
capitalize MATLAB 2019-10-02 14:04:31 +02:00
Houtan Bastani 93077bbcdd
macro processor: fix bug in range when start point == end point 2019-10-02 10:22:46 +02:00
Houtan Bastani 5e54761201
clarify error message in bfcfbac66d. #29 2019-09-30 14:27:58 +02:00
Houtan Bastani bfcfbac66d
change error message when trying to write unused endogenous variable. #29 2019-09-30 14:21:37 +02:00
Houtan Bastani 12bf59ea28
remove unused line. #29 2019-09-30 14:21:37 +02:00
Houtan Bastani e3c23df9b8
fix spacing and typos 2019-09-30 14:21:36 +02:00
Houtan Bastani 6d783ec9cd
add comment 2019-09-30 14:09:49 +02:00
Houtan Bastani 1fcd305015
allow for expressions as upper bound for irf_calibration and moment_calibration. Closes #12 2019-09-30 12:22:59 +02:00
Sébastien Villemot f66e6a7f35
Fix check for unused endos in the presence of PAC model-consistent expectations
Since commit 64f55e4a5e, in the presence of PAC
model-consistent expectations, some endogenous variables are added to the
symbol table at the beginning of ModFile::transformPass(), while their defining
equations are added at a later point.

But commit 7c3f981eac has introduced a check that
verifies that all endogenous are used in equations. That check happens after
the above mentioned endogenous are created, but after their defining equations
are added. Hence it fails.

The fix consists in creating those endogenous after the check. Incidently, they
are no longer part of the saved original model, but this is a good thing.
2019-09-25 12:00:40 +02:00
Houtan Bastani d3db73b7e4
remove unused symbols 2019-09-25 11:36:03 +02:00
Sébastien Villemot b0ac4a4e51
Cosmetic change 2019-09-24 18:47:43 +02:00
Houtan Bastani 92ad5aad2c
Revert "add info about max endo/exo lag by variable. closes dynare#1596"
This reverts commit 7827d2e04d.
2019-09-24 14:03:38 +02:00
Houtan Bastani 047b3b25bb
add print, noprint options to perfect_foresight_solver 2019-09-12 14:35:29 +02:00
Houtan Bastani 04b6a68aef
new calling structure for stoch_simul, discretionary_policy. dynare#1197 2019-09-11 18:05:40 +02:00
Sébastien Villemot bad0c3cf27
Fix preprocessor failure to rename +<model> directory if /tmp is not on the same filesystem
Bug introduced in 0c755460, that manifested on the Gitlab runners.
2019-09-11 17:03:37 +02:00
Sébastien Villemot 2c6fa34a1f
C++17: use structured bindings instead of std::tie whenever possible 2019-09-11 16:40:19 +02:00
Houtan Bastani 9a5ad17349
suppress sign comparison warnings when compiling with g++-9 2019-09-11 16:25:10 +02:00
Houtan Bastani 6a937689d4
ignore warnings from boost headers when compiling with g++-9 2019-09-11 16:25:10 +02:00
Sébastien Villemot 0c755460b1
Use std::filesystem instead of boost::filesystem
Note that there is no equivalent of boost::filesystem::unique_path(), so I
implemented ModFile::unique_path() which does something similar.
2019-09-11 14:47:48 +02:00
Sébastien Villemot 152b2de5b6
Enforce C++17 at the compiler level 2019-09-11 14:47:48 +02:00
Houtan Bastani 0c1373bc5e
stop processing when certain functions are used in a linear context on endogenous/exogenous variables. closes dynare#1537 2019-09-10 12:37:28 +02:00
Houtan Bastani d1be4f4946
remove duplicates from stoch_simul symbol_list. closes dynare#1519 2019-09-10 11:13:33 +02:00
Houtan Bastani 7827d2e04d
add info about max endo/exo lag by variable. closes dynare#1596 2019-09-09 14:29:22 +02:00
Houtan Bastani 7c3f981eac
stop processing if not all endogenous variables are used in the model block. closes #25 2019-09-05 12:19:21 +02:00
Sébastien Villemot fbf535e819
Fix typo 2019-08-27 14:20:00 +02:00
Houtan Bastani 0df8dd3bc2
include header needed to compile 3a21eda40e with g++
#26
2019-08-26 18:17:41 +02:00
Houtan Bastani 3a21eda40e
macro processor: support @#echomacrovars with symbol_list
closes #26
2019-08-26 18:12:04 +02:00
Houtan Bastani 2b3519e3b0
macro processor: add for syntax for shortcut with filtering comprehension
closes #28
2019-08-26 16:08:31 +02:00
Houtan Bastani def99f9dd3
macro processor: simplify parser code 2019-08-26 15:00:53 +02:00
Houtan Bastani d4ad2cbb5e
macro processor: Expression class has to_string function as well, so no need for cast 2019-08-23 12:07:31 +02:00
Houtan Bastani 7f96d4a1c9
macro processor: remove unnecessary check in Function evaluation
Not necessary because of parser rules for function definition
2019-08-23 11:12:36 +02:00
Sébastien Villemot 8cdbdee315
Various cleanups around the “language” option
— allow “language=matlab” for symmetry (this is the default)
— remove the useless “cuda” and “python” values
— give a more meaningful error message when “output” is used in conjunction
  with “language=matlab”
2019-08-22 17:43:34 +02:00
Sébastien Villemot db6d4fb0cd
Support identification(order=3)
In that case, the preprocessor outputs g4 (4th derivatives of model) and
g3p (1st derivs of g3 w.r.t. parameters).

Ref #10
2019-08-22 17:02:40 +02:00
Sébastien Villemot 1491b2d225
Give better names to ostringstream variables storing derivs w.r.t. params. 2019-08-22 17:02:39 +02:00