Commit Graph

3417 Commits (27a3a559e4dde69cef162dbd4e4b3a778f7f994e)

Author SHA1 Message Date
Johannes Pfeifer 27a3a559e4
Move BVAR to +bvar folder 2023-09-14 11:59:06 +02:00
Sébastien Villemot 978789d02a
Merge branch 'osr' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !83
2023-09-13 11:18:26 +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
Sébastien Villemot ea34761795
Merge branch 'display_static_residuals' of git.dynare.org:JohannesPfeifer/preprocessor
Ref. !82
2023-09-11 16:37:38 +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
Sébastien Villemot 140c91e911
CI: switch to Meson build system 2023-09-01 15:27:37 +02:00
Sébastien Villemot f3acaf32c1
Remove obsolete Julia script 2023-09-01 15:08:50 +02:00
Sébastien Villemot 3a18707685
Bytecode: make destructors of base classes protected
This prevents destruction through a base pointer, which would a memory leak
since the destructor is not virtual (and we cannot make it virtual because it
would break our crude serialization strategy).
2023-09-01 13:50:57 +02:00
Sébastien Villemot c8cd182e98
Build system / Meson: hack for static linking under Windows
[skip ci]
2023-07-28 14:21:09 +02:00
Sébastien Villemot dcb8b50cf8
Build system: split Meson file, for integration with build system for whole of Dynare
[skip ci]
2023-07-28 12:13:46 +02:00
Willi Mutschler 958b0a3800
macOS: use clang if GCC is not available for use_dll
Related to Dynare/dynare#1893 and Dynare/dynare#1894
2023-07-19 10:14:42 +02:00
Sébastien Villemot e1e1a753d0
Do not use C++20 aggregate initialization with parentheses
Initialization with initalizer list is nicer. And, more importantly,
initialization with parentheses is not supported by Clang < 16.
2023-07-07 14:32:16 +02:00
Sébastien Villemot 92f42bdf68 Merge branch 'brooks_gelman_plotrows' into 'master'
Add interface for brooks_gelman_plotrows option

See merge request Dynare/preprocessor!78
2023-07-06 08:09:20 +00:00
Johannes Pfeifer 508f2ff01e Add interface for brooks_gelman_plotrows option 2023-07-05 13:42:46 -04:00
Sébastien Villemot 7870a6c815 Merge branch 'exo_names_orig_ord' into 'master'
Remove unused exo_names_orig_ord

See merge request Dynare/preprocessor!77
2023-07-04 10:24:15 +00:00
Sébastien Villemot 3dc6110211
Build system: add Meson support for building LaTeX documentation 2023-06-23 18:32:13 +02:00
Johannes Pfeifer 0990492e2f Remove unused exo_names_orig_ord 2023-06-23 08:36:37 -04:00
Sébastien Villemot 1b0e558137 Merge branch 'resid' into 'master'
Rename resid command

See merge request Dynare/preprocessor!76
2023-06-23 10:09:31 +00:00
Johannes Pfeifer 43a7d231d0 Rename resid command
Related to dynare#1888
2023-06-22 14:12:39 -04:00
Sébastien Villemot f38d37a188
Build system: improvements to Meson cross-file for Windows
– enforce POSIX version of the MinGW cross-compiler
– add strip binary

[skip ci]
2023-06-22 15:24:47 +02:00
Sébastien Villemot fa5c4c5191
New homotopy options for perfect_foresight_{setup,solver} and perfect_foresight_with_expectation_errors_solver
Also remove homotopy_alt_starting_point option, and some options from
perfect_foresight_with_expectation_errors_setup.
2023-06-21 15:57:43 +02:00
Sébastien Villemot a1b8602760
Drop terminal_steady_state_as_guess_value option to pfwee_solver 2023-06-15 15:23:36 +02:00
Sébastien Villemot 78d6a97e53
CI: stop building i686 (32-bit x86) Linux binaries
That architecture is now essentially obsolete.
2023-06-12 12:04:26 +02:00
Sébastien Villemot 1d305ca12b
Build system: more Meson rewrite
- add proper detection of Boost
- add logic for making FlexLexer.h always available
- statically link the executable if prefer_static=true
- add Homebrew native file
- add Windows cross file
2023-06-08 18:24:08 +02:00
Sébastien Villemot 9011668f3a
Build system: start Meson rewrite 2023-06-07 12:09:24 +02:00
Sébastien Villemot 1947e6de58
Use different filenames for Bison-generated location files 2023-06-07 11:57:12 +02:00
Sébastien Villemot 0dd5e58667
gitignore: remove stack.hh and position.hh, no longer produced by Bison
This is due to our Bison files requiring version 3.2.

[skip ci]
2023-06-07 11:57:12 +02:00
Sébastien Villemot 0de27e8dab
macOS: bump to GCC 13 (for compilation and for use_dll) 2023-06-07 10:48:37 +02:00
Sébastien Villemot 09cff8003a
CI: cache MSYS2 tarball of Boost, following configuration change in the runners 2023-06-07 10:39:41 +02:00
Sébastien Villemot ae4f1c316a
CI: bump version of Boost dependency 2023-06-07 10:29:08 +02:00
Sébastien Villemot 3cc531315b
C++20 modernization: use new standard mathematical constants 2023-05-25 19:06:48 +02:00
Sébastien Villemot a59e8557b4
Misc changes for 2023 Summer School 2023-05-17 10:32:19 +02:00
Sébastien Villemot 150547b560
🐛 Bytecode + block decomposition: temporary terms were not correctly output
Temporary terms computed in previous blocks were not used in the bytecode
output of a given block. This was inefficient (because this means that
expressions already computed and store in the temporary terms vector would be
recomputed), and incidentally it would break the external functions
output (because it would trigger a lookup in the “TEF terms”, which would thus
fail).

Closes: #115
2023-05-12 17:24:31 +02:00
Sébastien Villemot 1024b7de42 Merge branch 'use_psexec' into 'master'
parallel_use_psexec: use correct field

See merge request Dynare/preprocessor!75
2023-05-12 12:42:41 +00:00
Johannes Pfeifer 868e3b6417 parallel_use_psexec: use correct field 2023-05-11 13:14:50 -04:00
Sébastien Villemot 2d3e3eff6f
Block decomposition: add specialized normalization algorithm for purely backward models
If the model is purely backward, determine whether all original equations have
a single contemporaneous endogenous on the LHS. If this is the case, then first
try a normalization by enforcing that each original equation is matched with
the endogenous on the LHS.

This helps with the simulation of purely backward models, where equations are
renormalized with mfs=3, since it produces a simpler system to be recursively
evaluated/solved.
2023-04-24 17:49:54 +02:00
Sébastien Villemot d246f9f99a
ModelTree::computeNormalization(): throw an exception in case of normalization failure
It would previously return a boolean. The exception is more convenient for
producing a different error message in the case of the specialized algorithm
introduced in the next commit.
2023-04-24 17:47:29 +02:00
Sébastien Villemot e761da71bd
ModelTree::compute{,NonSingular}Normalization(): minor improvements 2023-04-24 16:52:10 +02:00
Sébastien Villemot a53426fc1f
Use ModelTree::addAuxEquation() method instead of directly manipulating ModelTree::aux_equations 2023-04-24 16:52:10 +02:00
Sébastien Villemot 34edd4e143
Bytecode: remove useless FBEGINBLOCK_::endo_nbr data member 2023-04-18 16:54:35 +02:00
Sébastien Villemot faa1291055
use_dll: turn getPowerDeriv() and sign() into inline functions
This allows the compiler to better optimize by inlining those call when worth
it.
2023-04-11 15:58:49 +02:00
Sébastien Villemot 1b7b70ec93
Build system: enable the dangling else warning (-Wdangling-else)
Adapt the code accordingly.
2023-04-11 14:22:32 +02:00
Sébastien Villemot 6caf8c6c59
use_dll: simplify definition of getPowerDeriv() function using C99 2023-04-07 16:38:25 +02:00
Sébastien Villemot b1e4884237
🐛 sign(0) was returning 1 instead of 0 with use_dll
The C99 copysign() function was used in the generated C output, but that
function does not correctly handle zero. Replace it by a custom sign()
function.
2023-04-07 16:38:23 +02:00
Sébastien Villemot 5a4297088d
Optimization: use std::unordered_map instead of std::map when computing temporary terms
Improve performance on very large models (⩾ 5000 equations).

Note that std::unordered_set cannot be used for the temporary_terms_t type,
because ordering is needed there (for writing the output files).
2023-04-05 19:49:16 +02:00
Sébastien Villemot e22d9049ee
Optimization: use std::unordered_map instead of std::map for caching chain rule derivation
Improves performance on very very large models (tens of thousands of equations).
2023-04-05 19:49:16 +02:00
Sébastien Villemot b9bfcaad5d
Block+bytecode: minor simplification 2023-04-03 18:29:57 +02: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