Commit Graph

212 Commits (5a2c0998712c01555f255748f5f90e937d6175f5)

Author SHA1 Message Date
Johannes Pfeifer 5a2c099871 EP: output results explicitly as opposed to assignin-statement 2023-12-14 19:53:07 +01:00
Sébastien Villemot 0f397f40af
Rename “dynare_sensitivity” command to “sensitivity”
The old name is still accepted, but will trigger a deprecation warning.
2023-12-14 18:37:10 +01:00
Sébastien Villemot 8d0e8cca5c
Merge branch 'gsa_namespace' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !96
2023-12-14 18:27:19 +01:00
Johannes Pfeifer 1734491b76 conditional_forecast: remove global variables and move to namespace 2023-12-14 11:42:41 +01:00
Johannes Pfeifer 090945d8a8 Use namespace for identification and sensitivity 2023-12-13 17:51:49 +01:00
Sébastien Villemot 22675728aa
No longer call std::move on trivially-copyable types
Automatically detected by clang-tidy with performance-move-const-arg check.

Do not make the modification for Tokenizer::location type, since we have no
guarantee that the type will remain trivially-copyable in the future.
2023-12-13 15:37:07 +01:00
Johannes Pfeifer 6d9fc367d0 Remove globals from dynare_sensitivity and dynare_identification 2023-12-04 12:01:19 +01:00
Sébastien Villemot c5cc61b110
PlannerObjectiveStatement: turn model_tree into a std::unique_ptr
Avoids an unnecessary copy.
2023-12-01 14:59:20 +01:00
Sébastien Villemot d463607e90
Reformat C++ source code using clang-format 15 2023-11-30 15:58:32 +01:00
Johannes Pfeifer 16b063f666
Remove options_ as third input to set_state_space 2023-10-11 09:22:35 -04:00
Willi Mutschler 37ac40352a
Add options and checks for Bayesian IRF matching 2023-09-28 12:40:03 +02:00
Johannes Pfeifer 35e324fa23 occbin.solver: do not pass and return full oo_ structure 2023-09-25 11:59:12 +02:00
Johannes Pfeifer 27a3a559e4
Move BVAR to +bvar folder 2023-09-14 11:59:06 +02:00
Johannes Pfeifer 5a2b3e052f OSR: allow analytic_derivation option 2023-09-12 09:02:40 +02:00
Sébastien Villemot bd0ba65a61
Merge branch 'osr_global' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !81
2023-09-11 16:45:20 +02:00
Johannes Pfeifer 320ccf46a0 display_static_residuals: remove globals 2023-09-08 14:56:38 +02:00
Johannes Pfeifer 4fc61eec53 Remove globals from OSR 2023-09-08 14:08:34 +02:00
Johannes Pfeifer 43a7d231d0 Rename resid command
Related to dynare#1888
2023-06-22 14:12:39 -04:00
Sébastien Villemot a87f536799
ramsey_policy: implement fully at the preprocessor level
The implementation no longer relies on ramsey_policy.m at the MATLAB/Octave
level.

By the way, drop ModFileStructure::ramsey_model_present, which is now
redundant.
2023-03-29 16:14:59 +02:00
Sébastien Villemot e9babf0242
🐛 ramsey_policy: lift restriction that order must be ⩽ 2
This restriction no longer exists, and is actually not applied to stoch_simul
when following ramsey_model.
2023-03-29 16:05:38 +02:00
Sébastien Villemot d0bc8128c7
ramsey_model: remove useless checks
Options “order”, “partial_information” and “k_order_solver” are not accepted by
the command (this code is probably a remnant of the deprecated “ramsey_policy”
command).
2023-03-29 15:27:57 +02:00
Sébastien Villemot 70192aec71
Always set options_.{ramsey,discretionary}_policy at the preprocessor level
And set them before any computation is done.

These fields should rather be in M_.
2023-03-28 18:29:42 +02:00
Sébastien Villemot a8fc8e7afc
🐛 Incorrect cost table used when computing temporary terms in static model with “use_dll”
It was erroneously using MATLAB costs, leading to possible
inefficiencies (though those cost tables are probably not very accurate and
should be revised).
2023-03-28 13:43:31 +02:00
Sébastien Villemot bff80c0eaf
use_dll: under Windows, append MinGW location to the PATH variable only once
Previously, the MinGW location was appended multiple times to the PATH
variable, which in some cases would make the variable too long and thus
dysfunctional.

The variable is now initialized once when the worker threads are created.

By the way, move the macOS+Octave environment variable initializations to the
same place, for consistency.
2023-03-20 18:27:33 +01:00
Sébastien Villemot 9013a5cb1b
No longer create +<basename>/+block/ folder (now empty) 2023-01-17 18:42:40 +01:00
Sébastien Villemot a7b0a324c9
Drop the “periods” statement 2023-01-16 15:02:50 +01:00
Sébastien Villemot 253fbbe7d6
Use std::filesystem::path in more places 2023-01-05 17:21:28 +01:00
Sébastien Villemot 895a866bb3
Optimization: use move semantics in more places 2022-10-04 16:00:30 +02:00
Sébastien Villemot 7f1b4fcc20
Refactor OptionsList class
In particular, use a std::variant to store the values of options. This ensures
that a given option name can have only one value (previously, for a given
option name, it was possible to store several values as long as they were of
different types).
2022-09-20 11:56:43 +02:00
Sébastien Villemot 8dcdcf1fd4
Fix check of “domain” option of new estimation prior syntax 2022-09-20 11:56:42 +02:00
Sébastien Villemot 3f674c1af9
Fix bug with “graph_format” option of “identification” and “dynare_sensitivity”
The local value of option was not copied to the top-level “options_” structure,
as it is done for “nograph” and “nodisplay”.
2022-09-20 11:56:42 +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 c8b046ec86
Simplification using non-default std::ofstream constructor 2022-07-11 22:17:36 +02:00
Johannes Pfeifer 99337ee32e dyn_forecast: remove unused output argument 2022-07-01 14:31:42 +02:00
Sébastien Villemot c3fc5b1dd7
Enable -Wunused-parameter
As a consequence, add many [[maybe_unused]] attributes for legitimate
cases (mainly in virtual functions).
2022-06-24 17:11:48 +02:00
Sébastien Villemot 17f72d6162
Remove empty checkPass() methods 2022-06-24 17:11:48 +02:00
Sébastien Villemot c94dfb848c
C++20 modernization: use initialization within range-based for loop
In particular, use this feature in many loops which feature a special treatment
for the first iteration, using a boolean variable (replacing iterator
manipulation). By the way, also use std::exchange() to simultaneously test the
value of this variable and update it.
2022-06-07 14:35:59 +02:00
Sébastien Villemot 9ace2dc413
C++17 modernization: take advantage of class template argument deduction 2022-06-07 14:35:26 +02:00
Sébastien Villemot 0b5c88109f
Various simplifications 2022-06-07 14:34:30 +02:00
Sébastien Villemot 591b5e5f9e
Always create bytecode output
And, symmetrically, when the “bytecode” option is requested by the user, always
create the .m static/dynamic files.

The “bytecode” option therefore no longer modifies the preprocessor output.
2022-05-19 14:49:46 +02:00
Sébastien Villemot 0284b249f5
Remove unused “bytecode” argument in {Static,Dynamic}Model::computingPass() 2022-05-19 14:10:22 +02:00
Sébastien Villemot 2483639f4d
Fix bug introduced in 3516894a71 related to new estimation syntax 2022-05-18 19:27:00 +02:00
Sébastien Villemot 3516894a71
JSON output: fix handling of vector value options
The vectors were previously stored as strings internally, which would not
necessarily contain the commas which are required in JSON (but not in
MATLAB/Octave). The fix consists in internally storing those options as
std::vector.

Closes: #96
2022-05-18 17:44:36 +02:00
Sébastien Villemot 701db61e09
JSON output: fix several bugs related to switch/case fallthrough 2022-05-18 16:33:42 +02:00
Sébastien Villemot 8fd1505ca2
C++17 modernization: use std::optional for “periods” option of “plot_conditional_forecast”
Incidentally, in the JSON output, no longer assign a value to the “periods”
field if not passed by the user (previously the value -1 was output in the JSON
file).
2022-05-16 19:10:15 +02:00
Sébastien Villemot b42ee40b55
C++20 modernization: use contains() method on containers 2022-05-04 17:37:57 +02:00
Sébastien Villemot ef02b79486
Various minor simplifications 2022-05-04 17:36:59 +02:00
Sébastien Villemot 8e3590ee71
Reject exogenous deterministic variables in a few places where they were erroneously accepted
– heteroskedastic_shocks block
– generate_irfs command
– new estimation syntax
2022-04-21 17:59:04 +02:00
Sébastien Villemot b5a4df1608
New shocks(learnt_in=…) and endval(learnt_in=…) blocks
For use with perfect_foresight_with_expectation_errors_setup.
2022-04-21 17:07:33 +02:00
Sébastien Villemot a431682697
Fix check for the presence of ramsey_{model,policy} when ramsey_constraints is used
The existing check would incorrectly fail if ramsey_constraints appeared before
ramsey_{model,policy}.

Also, the check would not terminate the processing in case of error.

Closes: #91
2022-04-11 12:28:38 +02:00