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
Houtan Bastani
34a41b557d
epilogue: output endogs used in epilogue equations
...
#36
2019-12-11 15:51:26 +01:00
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
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
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
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
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
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
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
Dóra Kocsis
926ccccb26
fix missing tokens in the lexer: conditional, unconditional.
2019-11-25 17:34:52 +01: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
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
d38ac48cfa
Create set_auxiliary_series routine in use_dll, block/bytecode and julia modes
...
Closes #34
2019-10-17 15:03:26 +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
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
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
Houtan Bastani
6ced2aaedb
macro processor: fix bug in array power: disallow reals that are not integers
2019-08-22 15:44:31 +02:00
Houtan Bastani
8da3dc5c6b
macro processor: add noexcept to functions
2019-08-21 18:25:08 +02:00
Houtan Bastani
48466f0e10
macro processor: remove double evaluations of ExpressionPtr
2019-08-21 18:07:40 +02:00
Houtan Bastani
92f18f58f5
macro processor: comment If class
2019-08-21 18:04:09 +02:00
Sébastien Villemot
4594fdd0fd
More comment improvements in relation to diff operator expansion/substitution
2019-08-20 18:22:02 +02:00
Houtan Bastani
cfc7a1467b
macro processor: fix error message
2019-08-20 15:21:41 +02:00
Houtan Bastani
6e523aaf28
macro processor: add immutable Range class, making Array immutable
2019-08-20 15:21:41 +02:00
Houtan Bastani
6c72980580
macro processor: replace uses of make_pair
2019-08-20 14:29:44 +02:00
Houtan Bastani
16080f2bb8
macro processor: make Variable class immutable
2019-08-20 11:16:33 +02:00
Houtan Bastani
b3ec807b90
macro processor: move changes from `cd99bb3af9c8ef6fd881fa0457121894f8edd14e` to the header file
2019-08-19 18:31:18 +02:00
Sébastien Villemot
9b9c5beb5c
Ensure that unary ops aux vars are never created when there is a lead
...
The transformation would be incorrect because of the expectation operator.
There was already a safety check, but it was not entirely correct. For example,
if “exp(y)” was appearing before “exp(y(+1))”, the check would not catch the
problem, because it happened after the substitution table had been filled. So
we now do the check before filling that table.
2019-08-19 18:27:57 +02:00
Sébastien Villemot
3941278832
Add more comments in routines for aux vars for unary ops / diff operators
...
By the way, do some small code simplifications.
2019-08-19 18:27:57 +02:00
Sébastien Villemot
8e9f6e4c57
Improve some function prototypes for better distinction between input and output arguments
2019-08-19 18:27:57 +02:00
Houtan Bastani
cd99bb3af9
macro processor: Make @#include and @#includepath immutable
2019-08-19 18:20:53 +02:00
Houtan Bastani
b77f6ecd94
macro processor: add `defined` operator
2019-08-19 15:14:51 +02:00
Houtan Bastani
8ebd2a1735
macro processor: support `@#elseif` directive
2019-08-19 15:14:43 +02:00
Sébastien Villemot
75b000a0b5
Macro processor: ensure that all read-accessors return a const reference
...
Useless copies are thus avoided in some situations.
2019-08-14 17:36:10 +02:00
Sébastien Villemot
8c1e48a09e
Add a few more calls to std::move()
2019-08-14 17:27:31 +02:00
Sébastien Villemot
c4f331c74c
Macro processor: make more node classes immutable
...
Since the node classes are stored and copied as std::shared_ptr, a given class
instance can actually be shared by two different expressions. Hence, in order
to prevent weird bugs, it’s necessary to make these classes immutable.
This commit deals with the easy cases.
The remaining (and more complex) ones are:
— Variable
— Array
— Include
— IncludePath
2019-08-14 17:14:42 +02:00
Sébastien Villemot
46a7cf5db7
Macro processor: fix the use of move semantics in constructor
...
In particular, remove the const keyword before arguments passed-by-value,
because otherwise they can't be moved (since they are immutable).
Also add a few missing calls to std::move(), and remove some calls to
std::move() when they are useless (on class enums, which are fundamental
types.)
2019-08-14 16:43:45 +02:00
Sébastien Villemot
37e7a6d1c1
Now that we require Bison ≥ 3.2, the stack.hh and position.hh files are no longer generated
2019-08-14 15:36:31 +02:00
Sébastien Villemot
b299983a8b
Fix the notmpterms option in the presence of external functions
2019-08-14 15:28:41 +02:00
Sébastien Villemot
ecad2dfb10
Avoid running bison and flex multiple times when doing parallel builds
2019-08-14 11:22:33 +02:00
Sébastien Villemot
30aaf93ca7
Bison 3.2 now generates a default semantic action with variants
...
The minimal required version of Bison is bumped to 3.2, so that we can rely on
those default actions.
2019-08-14 11:22:33 +02:00
Houtan Bastani
2c6a290fb3
remove unnecessary declaration
2019-08-13 13:17:08 -04:00
Houtan Bastani
bb13b93d59
aesthetic fix
2019-08-13 12:37:34 -04:00
Sébastien Villemot
5960a9168c
Macro processor: fix the shift/reduce conflict related to ternary colon operator
...
The idea is to split the expression rule into smaller subrules, hierarchically
organized according to the operator precedence (Bison still does part of the
job of dealing with precedence).
2019-08-13 18:17:14 +02:00
Houtan Bastani
7048a4ff32
macro processor: consolidate precedence rules around unary +/-
2019-08-13 09:56:32 -04:00
Houtan Bastani
0c37da202b
add missing precedence for unary plus
2019-08-13 09:55:41 -04:00
Houtan Bastani
321f70df21
macro processor: consolidate precedence rules around unary +/- and casting
2019-08-12 16:57:39 -04:00
Houtan Bastani
273c54f7fb
macro processor: introduce functions to test types of variables and literals
2019-08-07 14:16:15 -04:00
Houtan Bastani
d35f2609fe
macro processor: implement `isempty`
2019-08-07 11:59:14 -04:00
Houtan Bastani
eeb5600845
more changes missed in `309326c372b140d4e6e459b2139d957c246c6512`
2019-08-07 10:48:25 -04:00
Houtan Bastani
00172ec10b
change missed in `309326c372b140d4e6e459b2139d957c246c6512`
2019-08-07 10:44:11 -04:00
Houtan Bastani
309326c372
macro processor: change name of Double type to Real
2019-08-07 10:37:35 -04:00
Houtan Bastani
ddd4361887
macro processor: remove unnecessary `std` namespace specifier
2019-08-06 17:02:25 -04:00
Houtan Bastani
fcb1982de8
macro processor: only allow conversion to boolean from strings that precisely contain numeric values or true or false
2019-08-06 17:01:10 -04:00
Houtan Bastani
86538bed1c
macro processor: only allow conversion to double from strings that precisely contain numeric values
2019-08-06 14:48:55 -04:00
Houtan Bastani
618bf7c987
macro processor: remove cast to int
2019-08-06 14:10:11 -04:00
Houtan Bastani
72c216fd7c
macro processor: fix error messages
2019-08-06 11:31:56 -04:00
Houtan Bastani
b3798a0baa
macro processor: introduce bool casts
2019-08-05 16:30:29 -04:00
Houtan Bastani
eaa8b8fa84
macro processor: introduce array casts
2019-08-02 17:00:23 -04:00
Houtan Bastani
2b1eedd132
macro processor: introduce tuple casts
2019-08-02 16:56:01 -04:00
Houtan Bastani
7e085855b3
macro processor: introduce string casts
2019-08-02 15:19:00 -04:00
Houtan Bastani
5442512904
macro processor: introduce double casts
2019-08-02 15:03:05 -04:00
Houtan Bastani
5fc83fad29
macro processor: introduce integer casts
2019-08-02 14:53:24 -04:00
Houtan Bastani
4a3423f74f
macro processor: fix typos
2019-08-02 14:34:50 -04:00
Houtan Bastani
b286bedbb6
onlymodel now prints shock_groups block
2019-07-22 15:18:01 -06:00
Houtan Bastani
2c8d0471a4
normalizeEquation not implemented for PacExpectationNodes
2019-07-15 16:34:54 -04:00
Houtan Bastani
866e4d6d39
macro processor: introduce colon operator with three args
...
This introduces a shift/reduce compilation warning in the macro processor because at expr COLON expr . COLON expr the parser doesn’t know whether to shift or reduce
2019-07-15 16:29:04 -04:00
Houtan Bastani
ae0a91256a
add cubic root to dynare language
2019-07-15 12:18:26 -04:00
Sébastien Villemot
deb41a2a8f
Fix comment in previous commit
2019-07-11 18:39:32 +02:00
Sébastien Villemot
e7b619c0ef
Fix handling of underflows and overflows in load_params_and_steady_state
...
Basically revert the change made in 30c205f418
,
since it lead to preprocessor crashes (via C++ exceptions).
2019-07-11 18:35:42 +02:00
Sébastien Villemot
0988a1f755
Generated LaTeX files are now under <basename>/latex/
2019-07-11 17:33:53 +02:00
Sébastien Villemot
ac9d352a2c
use_dll under MATLAB: link only to libraries that are really needed
2019-07-11 16:11:24 +02:00
Sébastien Villemot
176732ee2c
ModelTree: pass argument by const-reference rather than by value in some methods
2019-07-05 18:41:13 +02:00
Sébastien Villemot
17c4104275
ExprNode::removeTrendLeadLag(): pass map argument by const-reference rather than by value
2019-07-05 18:22:24 +02:00
Sébastien Villemot
24d4b2dc77
identification command now accepts the order option
...
Note that this option does not modify the global options_.order, for
consistency with the semantics of the identification command.
The preprocessor will compute dynamic derivatives up to at least order+1.
Closes #10
2019-07-05 17:49:16 +02:00
Sébastien Villemot
4032942fa4
Add “diff” and “flip” options to plot_shock_decomposition and initial_condition_decomposition
...
Ref Dynare/dynare#1649
2019-07-03 16:28:00 +02:00
Houtan Bastani
1562016389
macro processor: handle case of functions without arguments
2019-06-27 16:47:48 +02:00
Houtan Bastani
06b835c2e0
aesthetic changes
2019-06-27 14:27:59 +02:00
Houtan Bastani
63b2117587
macro processor: remove unnecessary includes
2019-06-27 13:57:19 +02:00
Houtan Bastani
8b19565372
macro processor: prefer superfluous parenthesis when printing than printing with incorrect precedence
2019-06-27 11:48:03 +02:00
Houtan Bastani
bde7c47117
macro processor: combine comprehension classes
2019-06-27 11:44:51 +02:00
Houtan Bastani
6686344acb
fix typos introduced in 68789da6a1
2019-06-25 17:02:26 +02:00
Houtan Bastani
68789da6a1
macro processor: aesthetic changes
2019-06-25 16:52:17 +02:00
Houtan Bastani
d5f728c0a3
macro processor: support array comprehension
2019-06-25 16:50:26 +02:00
Houtan Bastani
2bd6282aef
Revert "macro processor: support array comprehension" (should not have been pushed yet)
...
This reverts commit f2c93d377f
.
2019-06-25 12:14:03 +02:00
Houtan Bastani
b041cb4fba
macro processor: remove unnecessary function
2019-06-25 12:12:34 +02:00
Houtan Bastani
f2c93d377f
macro processor: support array comprehension
2019-06-25 11:15:15 +02:00
Houtan Bastani
cd9dfa64cb
macro processor: inline function
2019-06-25 11:14:00 +02:00
Houtan Bastani
e5121176a9
fix typo/aesthetic fixes
2019-06-24 16:55:36 +02:00
Houtan Bastani
4c6032895d
macro processor: fix bug in indexing of strings/arrays
2019-06-24 15:57:00 +02:00
Houtan Bastani
b8205a49df
Revert "macro processor: allow @#includepath to accept a colon-separated list of paths"
...
This reverts commit 12b09073e3
.
2019-06-24 14:39:35 +02:00
Houtan Bastani
12b09073e3
macro processor: allow @#includepath to accept a colon-separated list of paths
2019-06-24 12:20:48 +02:00
Houtan Bastani
6cf9a410d0
macro processor: oblige parens for tuple passed as variable in for loop
2019-06-24 11:58:55 +02:00
Houtan Bastani
a3e63101f4
support `save` option of @#echomacrovars
2019-06-24 11:06:31 +02:00
Houtan Bastani
f400f02432
aesthetic changes
2019-06-24 10:09:37 +02:00
Houtan Bastani
ef62bc6c50
add suppression missed in 5ba2d8500a
2019-06-21 17:08:58 +02:00
Houtan Bastani
5ba2d8500a
suppress macro processor compilation warnings with gcc
2019-06-21 17:07:10 +02:00
Houtan Bastani
17e040f3f6
macro processor 2.0
2019-06-21 16:45:17 +02:00
Sébastien Villemot
69f2f1ca88
UnaryOpCode::eval(): add missing error cases
2019-06-19 17:31:33 +02:00
Sébastien Villemot
fb5518849d
Update comment following the renaming of the perfect_foresight_problem DLL
2019-06-18 15:33:56 +02:00
Sébastien Villemot
271a579808
Remove symmetric elements in 3rd derivatives
2019-06-17 15:28:33 +02:00
Sébastien Villemot
d59f9f75ff
Simplification of previous commit
2019-06-05 15:03:48 +02:00
Houtan Bastani
d873414728
pac_model growth: allow single parameters
2019-05-27 16:06:14 +02:00
Houtan Bastani
3509291b74
pac_model: only write growth fields if growth was passed to pac_model
2019-05-20 16:14:40 +02:00
Houtan Bastani
2753ab9887
pac: collect exogenous variables in growth argument to pass exo use test in ModFile.cc
2019-05-17 15:06:16 +02:00
Sébastien Villemot
51beb9c2ef
New M_.has_external_function field
2019-05-15 15:02:36 +02:00
Sébastien Villemot
840b5f4f7f
Bugfix for M_.dynamic_tmp_nbr: first element was not including temp. terms for model local vars
2019-05-14 17:08:38 +02:00
Houtan Bastani
a0f74f5c16
pac growth: allow linear combination
2019-05-14 12:33:59 +02:00
Houtan Bastani
33c2f9b88b
move macOS compiler to gcc-9
2019-05-08 14:58:45 +02:00
Stéphane Adjemian (Charybdis)
358c3d6716
Revert "Allow th use of EXPECTATION keyword in variables tags."
...
This reverts commit fbc42b1930
, which is
incorrect for the currently used version of Bison (in stretch).
Besides, even if the patch seems to work with recent versions of
Bison, it introduces hard to predict and probably very unpleasant
properties (this patch allows to use the `expectation` word anywhere,
this would be a problem if the user choose to name a variable or
parameter as `expectation`).
2019-05-04 08:40:44 +02:00
Sébastien Villemot
40ef954802
Add new dynamic_g1_nz.m generated file, for perfect_foresight_stacked_solver DLL
2019-05-03 19:25:23 +02:00
Stéphane Adjemian (Charybdis)
fbc42b1930
Allow th use of EXPECTATION keyword in variables tags.
2019-05-03 12:18:45 +02:00
Houtan Bastani
7fb591645f
fix bug in pac equation: match terms of param*linear_expression
2019-05-03 11:54:45 +02:00
Sébastien Villemot
82cd95a653
Remove some unnecessary headers
2019-05-02 15:30:33 +02:00
Stéphane Adjemian (Charybdis)
84d57393dc
Return empty list of names in models without parameters or exogenous variables.
2019-04-29 23:27:26 +02:00
Houtan Bastani
bf89cedd88
fix compilation of static/dynamic files on macOS
2019-04-24 17:40:50 +02:00
Houtan Bastani
21fe0f4bdc
avoid cast warnings when compiling boost headers
2019-04-23 14:57:03 +02:00
Sébastien Villemot
1907249fac
Ask GCC to warn about C-style casts (-Wold-style-cast)
...
Adapt the code accordingly.
2019-04-23 12:54:11 +02:00
Sébastien Villemot
c628f21245
JSON: output derivatives at an arbitrary order
...
Backward incompatible change: the temporary terms for 3rd order are now stored
in "temporary_terms_third_derivative" (without the final "s"; same for external
functions), for consistency with the name of the slot for the derivatives
themselves ("third_derivative").
Ref dynare#217
2019-04-18 17:13:16 +02:00
Sébastien Villemot
43906691d3
JSON: simplification of method for writing temporary terms
2019-04-18 17:10:39 +02:00
Sébastien Villemot
1fee4840b6
More Unicode copyright symbol
2019-04-16 14:29:30 +02:00
Sébastien Villemot
b73d554ad2
Use Unicode copyright symbol (in UTF-8 encoding)
2019-04-16 11:35:31 +02:00
Sébastien Villemot
bbab112d65
Support for output of arbitrary derivation order (in MATLAB and DLL modes)
...
Does not work for Julia mode, neither with block and bytecode.
Note: in DLL mode, the number of temporary terms in no longer given in the
‘ntt’ symbol; it must be computed using ‘M_.dynamic_tmp_nbr’.
Ref dynare#217
2019-04-12 18:13:50 +02:00
Houtan Bastani
e689032c31
fix bug in 3947903f33
2019-04-12 14:34:25 +02:00
Houtan Bastani
7392cd3a6c
add JSON output for plot_shock_decomposition, realtime_shock_decomposition, and initial_condition_decomposition
2019-04-12 14:34:09 +02:00
Houtan Bastani
3947903f33
add JSON output for shock_groups
2019-04-12 14:16:42 +02:00
Houtan Bastani
1edc9af764
remove unused field
2019-04-12 14:16:15 +02:00
Houtan Bastani
dfca3c5933
macroprocessor: fix bug: when macro variables were defined on the command line the resulting .mod file had newlines inserted at the top, resulting in incorrect line numbers when errors were encountered
2019-04-10 15:33:55 +02:00
Houtan Bastani
c6467af814
Read options at top of .mod file as long as they exist on the first *non empty* line
...
In other words, allow newlines before these options
2019-04-10 14:49:33 +02:00
Houtan Bastani
2a9c4b234a
maintain order of macro variables defined on command line when writing them to the .mod file
...
Before this commit, a dynare call such as
```
dynare <<mod file>> -Db=“A” -Da=@{b}
```
would not expand the value of `b` in `a` whereas
```
dynare <<mod file>> -Da=“A” -Db=@{a}
```
would expand the value of `a` into `b` because the arguments were stored in a map which printed the `@#define` statements in the .mod file in alphabetic order.
2019-04-10 12:51:45 +02:00
Houtan Bastani
4d287a94f2
remove leading newlines when noemptylinemacro is passed
2019-04-09 15:11:47 +02:00
Sébastien Villemot
39926133b8
More automatic modernizations with clang-tidy
2019-04-03 16:46:20 +02:00
Sébastien Villemot
8a41a75c85
Apply modernize-raw-string-literal from clang-tidy
...
Use ReplaceShorterLiterals option to enforce replacement of all strings.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-raw-string-literal.html
2019-04-03 16:45:52 +02:00
Houtan Bastani
6ba31087ab
add check for parameter_set option to conditional_forecast
2019-04-03 14:26:02 +02:00
Houtan Bastani
92ada8e7e9
fix bug in writing of JSON output in options list
2019-03-29 17:30:39 +01:00
Houtan Bastani
7b6f23c55a
conditional_forecast_paths: add support to write JSON output
2019-03-29 17:30:39 +01:00
Sébastien Villemot
8dad93964d
Allow linear combination of targets in error correction term of trend component models
2019-03-29 17:06:24 +01:00
Sébastien Villemot
9bc6c57a5c
Factorization: create new utility SymbolTable::getUltimateOrigSymbID()
2019-03-29 17:06:24 +01:00
Sébastien Villemot
9b98da424a
Simplification in BinaryOpNode::getPacAREC()
2019-03-29 17:06:24 +01:00
Sébastien Villemot
4114b8a9e1
Simplification in BinaryOpNode::fillAutoregressiveRow
...
By the way, fix bug in detection of duplicate elements.
2019-03-29 17:06:23 +01:00
Sébastien Villemot
5497936e87
VarModelTable,TrendComponentModelTable: minor simplification
2019-03-29 17:06:23 +01:00
Sébastien Villemot
58adbdeddd
Compatibility fix with MATLAB ≤ R2011a
2019-03-26 15:41:48 +01:00
Sébastien Villemot
fd6e700ec7
Simplification: use std::max when computing maxima
2019-03-21 17:24:49 +01:00
Sébastien Villemot
36fa97e5c5
Merge remote-tracking branch 'origin/identification_wmutschl'
2019-03-20 10:48:20 +01:00
Sébastien Villemot
78583135df
Use true/false instead of 1/0 for boolean options
...
This is more elegant, and makes it easier to distinguish them from integer
options.
2019-03-19 15:15:10 +01:00
Sébastien Villemot
7d5e8a16c0
Add new options for identification
...
Ref Dynare/dynare#1648
2019-03-19 11:59:15 +01:00
Sébastien Villemot
1793078ba2
Minor stylistic improvements
2019-03-18 18:49:55 +01:00
Houtan Bastani
92af6ffbe7
pass flag because regex’s on matlab side depend on it
2019-03-15 16:12:54 +01:00
Houtan Bastani
da9f5dcffb
Revert "make pac expectation JSON output like that of var expectation"
...
This reverts commit 21d42e6010
.
2019-03-15 16:11:55 +01:00
Houtan Bastani
21d42e6010
make pac expectation JSON output like that of var expectation
2019-03-15 15:47:50 +01:00
Houtan Bastani
50c26f4945
further simplifications related to AR matrices
2019-03-15 14:35:57 +01:00
Houtan Bastani
f1d1c1e1c1
trend_component_model: simplify AR
2019-03-15 12:27:32 +01:00
Houtan Bastani
a3c08f932e
simplify code to find autoregressive matrix for VARs
2019-03-15 12:26:59 +01:00
Houtan Bastani
0544141545
pac: fix bug when checking for symb_ids
2019-03-15 12:06:10 +01:00
Stéphane Adjemian (Charybdis)
9632b18c24
Add in M_ a list of exogenous variables that needs to be excluded if the model is not used for estimation.
2019-03-14 11:03:02 +01:00
Houtan Bastani
1e21904496
use emplace_back instead of push_back
2019-03-11 15:51:41 +01:00
Sébastien Villemot
d9f7ac4c9b
Fix bug introduced in 7d16fff786
...
Here, emplace() and insert() are not interchangeable because this is a std::set of
std::vector<int>, and we really want the initializer-list constructor of
std::vector (and not the two int's constructor).
Fixes the test deterministic_simulations/lola_solve_one_boundary.mod
2019-03-08 18:57:17 +01:00
Houtan Bastani
fdefb0f52a
move variable initialization out of body
2019-03-08 16:21:01 +01:00
Houtan Bastani
958661b30f
update comment for map
2019-03-08 12:05:56 +01:00
Stéphane Adjemian (Charybdis)
e0acc669bd
Append a list of observed exogenous variables in M_ if varexo option status is used.
2019-03-07 16:55:20 +01:00
Houtan Bastani
69e7763490
pac: change vectors that store additive parts
2019-03-07 12:57:47 +01:00
Houtan Bastani
2201907245
pac: support additive elements whether optimizing agents are present or not
2019-03-07 12:36:08 +01:00
Houtan Bastani
583c8373d7
pac: add residual to additive part
2019-03-07 12:23:19 +01:00
Houtan Bastani
9b1b4113d9
pac: keep order of variables in ec part of pac equation and add scaling factor to output
2019-03-07 11:31:45 +01:00
Houtan Bastani
b0dac547e9
shorten writing of istarget output
2019-03-07 11:31:45 +01:00
Houtan Bastani
14e7c92f14
pac: fix bug in setting of target variable
2019-03-07 11:31:45 +01:00
Sébastien Villemot
bd7a1f4b44
Minor simplifications in the lexers
...
In particular, no need to put both upper and lower case letters in the
patterns, since the lexer is case-insensitive.
The only simplification that we do not perform is removing the quoting of
single quotes (i.e. replacing \' by '), since it confuses the C++ mode of
Emacs.
2019-03-06 13:58:22 +01:00
Houtan Bastani
8502ebfc06
json output: print statements in original model output
2019-03-06 11:43:30 +01:00
Sébastien Villemot
abfe1a70e7
Fix typo
2019-03-05 18:59:40 +01:00
Houtan Bastani
68850536e6
stop processing if we substitute a unary op with a lead. closes #20
2019-03-05 15:20:32 +01:00
Houtan Bastani
7c9f272e15
always substitute diffs of expressions that contain leads. closes #21
2019-03-05 12:43:54 +01:00
Houtan Bastani
a1c79e6a4c
remove code that should have been removed in 9963686e72
2019-03-05 12:33:21 +01:00
Houtan Bastani
9963686e72
handle additive terms when PAC equation does NOT have non/optimizing agents
2019-03-05 12:20:45 +01:00
Houtan Bastani
a3fc7a7752
pac_model: fix input tests
2019-03-04 11:07:06 +01:00
Stéphane Adjemian (Charybdis)
34f02a37e3
Fixed logic in pac_model command.
...
If option aux_model_name is assigned a value, this value must not be
discarded if options growth and steady_state_growth are simultaneously
used.
2019-03-02 16:37:00 +01:00
Houtan Bastani
e56f994d28
pac_model: write growth argument as string
2019-03-01 11:20:26 +01:00
Houtan Bastani
341b9c6667
pac_model: allow diff as argument to growth option
2019-02-28 19:22:34 +01:00
Houtan Bastani
5f013756f2
find additive parts to pac equation
2019-02-27 23:12:05 +01:00
Stéphane Adjemian (Charybdis)
2312ce13dc
Changed non_optimizing_behaviour.type field to non_optimizing_behaviour.isendo.
...
The elements are logicals true/false (true iff corresponding variable is an endogenous variable).
2019-02-27 15:35:19 +01:00
Houtan Bastani
ec21208ed7
pac: specify type of variables in non optimizing part of equation
2019-02-27 15:10:48 +01:00