Commit Graph

14768 Commits (10af04c6d88070d61a0b8d6521364947413d2866)

Author SHA1 Message Date
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +02:00
Sébastien Villemot 9c8033d99e
Merge branch 'obs_test' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2019
2022-04-12 15:54:10 +02:00
Sébastien Villemot b70b864829
perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file 2022-04-12 15:51:04 +02:00
Sébastien Villemot a8a9051b31
New option “constant_simulation_length” to “perfect_foresight_with_simulation_errors_solver” command 2022-04-12 15:45:50 +02:00
Sébastien Villemot 08d1426014
Preprocessor: fix check for the presence of ramsey_{model,policy} when ramsey_constraints is used 2022-04-12 14:50:29 +02:00
Johannes Pfeifer e6944521dd testsuite: use file-specific names to prevent overwriting while reading 2022-04-11 18:47:04 +02:00
Stéphane Adjemian 40bba5e0f6 Merge branch 'occbin_ivf' into 'master'
IVF_core.m: directly use solver option fields

See merge request Dynare/dynare!2018
2022-04-11 10:34:41 +00:00
Johannes Pfeifer 23c007e716 IVF_core.m: directly use solver option fields 2022-04-11 08:33:28 +02:00
Stéphane Adjemian (Ryûk) ff9cf3814a
Remove useless copies of options_. 2022-04-10 22:17:45 +02:00
Stéphane Adjemian (Ryûk) b09e91ff55
Add routine description in headers. 2022-04-10 21:22:51 +02:00
Stéphane Adjemian (Ryûk) 87ecfa9ed1
Allow nonlinear solver to fail when simulating a static model.
Print a message instead of throwing an error if the nonlinear solver fails in a
period, since we do not need previous or future values of the endogenous
variables. If the nonlinear solver fails in period t, the endogenous variables
are set to nan in period t.
2022-04-10 20:57:34 +02:00
Stéphane Adjemian (Charybdis) f1aff2b370
Remove calls to dbstack in dynare_solve.
Adding three input parameters for maxit, tolf and tolx.

Closes #1841.
2022-04-10 20:29:57 +02:00
Stéphane Adjemian (Ryûk) 01203f7e39
Stop deterministic simulation if nonlinear solver failure.
Only for purely backward/forward models. In the case of purely static models the
solution for the previous or following period is not required.
2022-04-10 10:55:40 +02:00
Stéphane Adjemian (Ryûk) 23a72d7aaa
Use dynare_solve to simulate purely forward deterministic models. 2022-04-10 09:39:28 +02:00
Stéphane Adjemian (Ryûk) ef2bb4e669
Return and use errorcode from dynare_solve.
Note that the interpretation of the error code depends on the nonlinear solver.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk) fe7d05f46a
Remove unnecessary condition (Octave/fsolve).
Since we already have checked that the initial guess is not a solution.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk) 33b1827ea5
Bug fix (mixed complementarity problems). 2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk) 48c41e6b0d
Return the initial guess if nonlinear system is ill-behaved...
At the initial guess, and we were not able to find another guess (randomizing).
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk) 56863d6e2f
Exit if initial guess is a solution...
Without entering in the nonlinear solvers.
2022-04-09 16:06:24 +02:00
Sébastien Villemot b236027365
Windows: soften wording regarding dependency on MATLAB 2022-04-06 18:37:35 +02:00
Sébastien Villemot 1ed6d0f0e5
Windows package: bump dependencies 2022-04-06 16:48:40 +02:00
Sébastien Villemot 947402c197
Release announcement for 5.1
[skip ci]
2022-04-06 14:34:36 +02:00
Sébastien Villemot 0779816457 Merge branch 'resid' into 'master'
resid: Fix display of name tags with Ramsey equations

See merge request Dynare/dynare!2017
2022-04-05 06:16:39 +00:00
Johannes Pfeifer a5fe22bd1c resid: Fix display of name tags with Ramsey equations 2022-04-04 22:50:16 +02:00
Sébastien Villemot 896a35b07e Merge branch 'chol_SE' into 'master'
chol_SE.m: fix logical condition and assure symmetry instead of erroring out

See merge request Dynare/dynare!2016
2022-04-04 13:51:33 +00:00
Johannes Pfeifer c5557b5418 chol_SE.m: fix logical condition and assure symmetry instead of erroring out 2022-04-04 13:52:54 +02:00
Stéphane Adjemian 700a0e3a6d Merge branch 'test_error' into 'master'
fs2000_uncorr_ME_missing.mod: use calibration instead of estimation

See merge request Dynare/dynare!2015
2022-04-03 05:55:31 +00:00
Johannes Pfeifer b103cc9259 fs2000_uncorr_ME_missing.mod: use calibration instead of estimation
mode on some machines triggered numerical instabilities in the initialization of Pstar due to near singularity
2022-04-02 19:41:00 +02:00
Sébastien Villemot b4ce69db3a
Remove options_.slowc field
There was no user interface, and the feature that it provides has lost
relevance over time.

Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f).
2022-03-31 17:39:43 +02:00
Sébastien Villemot 82070e4048 Merge branch 'mom_xls2' into 'master'
MoM: fix reading of XLS-files by assigning sheet info to base workspace

Closes #1840

See merge request Dynare/dynare!2014
2022-03-31 06:49:59 +00:00
Sébastien Villemot 3b4ef0df49
Add new “log” option to “var” statement
Ref. #349
2022-03-30 18:01:22 +02:00
Johannes Pfeifer 176baa2215 MoM: fix reading of XLS-files by assigning sheet info to base workspace
Closes https://git.dynare.org/Dynare/dynare/-/issues/1840
2022-03-30 09:59:36 +02:00
Sébastien Villemot 7d3ab36743
Merge branch 'occbin_prefilter' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2013
2022-03-29 16:47:32 +02:00
Sébastien Villemot 6988f0a3d8
Preprocessor: refactor parsing of symbol lists
Incidentally, this change allows a sligthly more flexible syntax in
“svar_identification”, so document it.
2022-03-29 15:11:28 +02:00
Sébastien Villemot d9feb04503
Manual: remove nonexisting syntax in “svar_identification” 2022-03-29 15:11:25 +02:00
Sébastien Villemot d7b5973cce
Testsuite: increase tolerance in block_bytecode/lola_stochastic_block.mod
Apparently needed with MATLAB R2022a on AVX-512 processors.
2022-03-29 14:10:41 +02:00
Johannes Pfeifer 35c30dc037 Occbin: use data instead of rawdata and gracefully exit if prefilter option is specified
Closes #1842
2022-03-29 12:16:48 +02:00
Sébastien Villemot c5a3658110
Block trust region: cosmetics
In particular, avoid using the deprecated dble() function. Rather use the
real() cast function, with the appropriate kind parameter.
2022-03-29 10:34:35 +02:00
Stéphane Adjemian (Ryûk) 53324aad69
Return initial guess if trust_region fails. 2022-03-26 09:21:25 +01:00
Stéphane Adjemian (Ryûk) cdd85f32a7
Update unit tests for trust region routines. 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) b9bc1e7cb1
Revert update if residuals or jacobian have NaNs (block_trust_region). 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 4cccdd9074
Bug fix. Revert to previous Jacobian matrix if updated one is ill-behaved. 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 79cad99446
Harmonise exit codes and fix convergence test. 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) f2bf98ee76
Return the value of info as a third argument (block_trust_region). 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 24d5ba0290
Change nonlinear solvers in some integration tests.
Trust region with block decomposition (as provided by dmperm) fails to provide
correct simulations (most likely due to the interpretation of tolf which
depends on the number and size of blocks).
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) aa8439d4cc
New implementation of the trust region algorithm.
Main difference is the presence of traps for NaN/Inf/Complex numbers in
residuals or the Jacobian matrix. Also added new unit tests.
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 1b2b3db380
Fix definition of the Rosenbrock function. 2022-03-25 19:42:40 +01:00
Sébastien Villemot 968eb28771 Merge branch 'fortran_not' into 'master'
perfect_foresight_solver_core.m: fix Fortran not

See merge request Dynare/dynare!2011
2022-03-25 13:34:08 +00:00
Johannes Pfeifer 1ed765b8c4 perfect_foresight_solver_core.m: fix Fortran not 2022-03-25 14:23:11 +01:00
Sébastien Villemot facab0f81b
Merge branch 'mom' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2008
2022-03-25 12:51:40 +01:00