Commit Graph

24 Commits (master)

Author SHA1 Message Date
Sébastien Villemot b2e9ec205e
No longer use reserved identifiers for include guards
Automatically detected using clang-tidy with bugprone-reserved-identifier
check.

By the way, homogeneize the define identifiers in relation to camel case
convention.
2023-12-01 15:39:01 +01:00
Sébastien Villemot d463607e90
Reformat C++ source code using clang-format 15 2023-11-30 15:58:32 +01:00
Sébastien Villemot dec60b25e6
Do not write bytecode for discretionary optimal policy models
Those models do not have as many variables as equations, and this case is not
supported by bytecode.

The present commit is an improvement over commit
a8ea57dd63, which had already removed bytecode
for the planner objective model.
2023-09-27 14:49:06 +02:00
Sébastien Villemot a8ea57dd63
Fix illegal memory access when doing Ramsey
The preprocessor would try to write bytecode for the planner objective. But
bytecode only works when there are as many endogenous as equations, which is
not the case for the PlannerObjective object derived from StaticModel.
2023-09-27 11:23:18 +02:00
Sébastien Villemot 4c58451d83
Factorize computing pass for block decomposition
Also add “block_decomposed” data member for tracking whether the block
decomposition has been successful.
2022-10-04 16:00:30 +02:00
Sébastien Villemot 1088cc4242
Improve informative messages about derivatives and block decomposition
When computing the derivatives or block decomposition of the planner objective,
the epilogue or the original Ramsey model, the preprocessor would talk about
dynamic/static model, which was confusing. It now uses the right terminology.
2022-09-14 17:51:36 +02:00
Sébastien Villemot d67f569035
Always compute block decomposition, even if “block” option was not passed
If block decomposition fails, error out if “block” option was passed, but not
otherwise.

This commit does not modify the generated files.

This is a preliminary step for dynare#1859.
2022-09-13 16:16:00 +02:00
Sébastien Villemot 3b99ac5df0
Remove unused parameters to various methods 2022-06-24 17:11:38 +02:00
Sébastien Villemot 4da901d05f
Fix comment 2022-06-03 20:30:40 +02:00
Sébastien Villemot 2795207802
No longer delete move constructor/assignment operator
We follow the advice given by Josuttis in his book about move semantics.

Deleting those member fuctions can be a bug if we want to allow copy semantics,
because overload resolution will no longer fallback to the copy
constructor/assignment operator when given an rvalue.

In particular, this explain why it was not possible to delete the move
assignment operator of the StaticModel class.
2022-05-18 16:33:48 +02:00
Sébastien Villemot 74ef3457b4
Use secure URL for link to GNU licenses 2021-06-09 17:21:00 +02:00
Sébastien Villemot e2d5a83592
Global reindentation 2019-12-20 16:59:30 +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
Houtan Bastani c1b8cdf811
epilogue: simplify _static file
issue #36
2019-12-12 16:32:12 +01:00
Houtan Bastani 4111bc8cfc
epilogue: create _dynamic and _static files
#36
2019-12-11 16:17:54 +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
Sébastien Villemot b73d554ad2
Use Unicode copyright symbol (in UTF-8 encoding) 2019-04-16 11:35:31 +02:00
Houtan Bastani aad8414f94
allow the use of previously assigned variables in epilogue block in later equations in epilogue block 2018-12-10 16:30:19 +01:00
Houtan Bastani 9d3f104b8c
fix epilogue block 2018-12-10 12:27:27 +01:00
Sébastien Villemot f2cf86b734 Add copy constructors / assignment operators for the DataTree class hierarchy
In particular, it is necessary to turn back DataTree::AddVariable() into a
non-virtual method, because it is called from DataTree's constructor. Enforcing
the absence of leads/lags is now done using a new boolean DataTree::is_static.

Take advantage of the new copy constructor for handling
PlannerObjectiveStatement more elegantly.

Unfortunately it is not possible to implement *move* constructor / assigment
operators, because the reference ExprNode::datatree is not mutable.
2018-10-10 12:53:55 +02:00
Stéphane Adjemian (Charybdis) ec872e63fd
Cosmetic change. 2018-10-04 16:54:57 +02:00
Houtan Bastani 85dbb649b7 move trend_component_table and var_model_table to DynamicModel as they are only used there 2018-09-14 17:04:06 +02:00
Houtan Bastani 9f0c30740e introduce epilogue block 2018-09-05 12:31:49 +02:00