Commit Graph

67 Commits (master)

Author SHA1 Message Date
Stéphane Adjemian (Ryûk) 4982ce06b4
Remove unnecessary square brackets. 2023-12-18 10:49:49 +01:00
Stéphane Adjemian (Ryûk) 735bd66d4d
Remove unused output arguments. 2023-12-18 07:48:27 +01:00
Sébastien Villemot ea28fcb4b4
Merge branch 'model_diag' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2221
2023-12-13 17:37:33 +01:00
Johannes Pfeifer 42fc1ec40a model_diagnostics.m: fix typos
[skip CI]
2023-12-12 19:38:57 +01:00
Johannes Pfeifer 1b4fb46c75 Consistently use nocheck flag for steady state
Fixes a bug in model_diagnostics.m
2023-12-12 18:30:30 +01:00
Johannes Pfeifer b1519b8c3c model_diagnostics.m: add check for non-zero exogenous with OccBin 2023-11-13 18:04:40 +01:00
Sébastien Villemot e4a4d2d8e6
Bytecode MEX: get M_ and options_ through input arguments rather than as global variables 2023-10-11 18:50:32 -04:00
Johannes Pfeifer 328f6f3229
check.m and model_diagnostics.m: use consistent global naming 2023-10-11 09:26:05 -04:00
Sébastien Villemot 37870e4a40
evaluate_steady_state: accept exogenous steady state as argument instead of whole oo_ structure
This is a move towards a more functional programming style.
2023-06-07 17:58:19 +02:00
Sébastien Villemot ffe6eb4d40
Preprocessor: overhaul of M_ fields counting Ramsey/discretionary orig endos/eqs
– new fields: M_.ramsey_orig_{eq,endo}_nbr
– drop M_.ramsey_eq_nbr and M_.orig_eq_nbr
– new field: M_.discretionary_orig_eq_nbr
2023-03-29 14:33:01 +02:00
Sébastien Villemot 060c694066
model_diagnostics: remove workaround for Octave
The rank() and null() functions accept a tolerance argument since at least
Octave 3.8.
2023-03-16 17:24:18 +01:00
Johannes Pfeifer c8045e2c5e model_diagnostics.m: fix logic of using block information
Also fixes bug with rank not working with sparse matrices
2023-03-15 18:11:37 -04:00
Johannes Pfeifer 39ae080997 model_diagnostics.m: fix logic of Ramsey instrument checks
The mapping from economic to steady state instruments is not one-to-one. Trigger warnings instead of errors.
2023-03-13 10:39:06 -04:00
Sébastien Villemot 8f1a4cb363
Drop block-decomposed first-order perturbation solution and kalman filter 2023-01-13 16:57:49 +01:00
Sébastien Villemot 3c55aa57e1
Use sparse representation for evaluating the static model
We also take advantage of the fact that the non-block version is always
available next to the block one, so when we are only interested in the residual
as a whole, we simplify by using the non-block version.
2023-01-10 16:21:44 +01:00
Sébastien Villemot f84753025d
Bytecode: the block and non-block versions now coexist in parallel
As a consequence, a new “block_decomposed” option of the bytecode MEX has been
introduced to explicitly select the block-decomposed version.

Note that we do not always use the “block_decomposed” option even when the
“block” option has been passed to the user, in situations where the block
decomposition brings nothing (e.g. when evaluating the residuals of the whole
model).
2023-01-09 15:20:46 +01:00
Sébastien Villemot 6437fc0fce Merge branch 'model_debug' into 'master'
model_diagnostics.m: use boolean for debug option as block_trust_region expects it

See merge request Dynare/dynare!2066
2022-09-08 15:30:55 +00:00
Johannes Pfeifer ba9ca26bf6 model_diagnostics.m: fix options_-name 2022-08-28 13:30:21 +02:00
Johannes Pfeifer 63469057ca model_diagnostics.m: use boolean for debug option as block_trust_region expects it 2022-08-11 09:43:30 +02:00
Johannes Pfeifer 253c87b894 model_diagnostics.m: allow setting tolerance for singularity checks starting with Matlab 2022a 2022-07-27 13:15:29 +02:00
Johannes Pfeifer 737524d182 model_diagnostics.m: add check for potential naming conflict 2022-05-04 13:05:27 +02:00
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
Johannes Pfeifer 58343c3988 model_diagnostics.m: check for consistent number of equations for Ramsey case before checking for steady state 2021-11-25 16:04:14 +01:00
Johannes Pfeifer fbd4fa7f3d model_diagnostics.m: fix compatibility with loglinear option 2021-09-28 09:35:27 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Johannes Pfeifer 7e72b52677 model_diagnostics.m: only provide message if imaginary component reaches tolerance level 2021-05-20 11:23:48 +02:00
Sébastien Villemot 49b35be90a
Preprocessor: various improvements to the use_dll mode
In particular, higher order derivatives are now returned as sparse matrices by
the static/dynamic files, instead of 3-column matrices (which was inconsistent
with the M-file mode).
2020-06-23 19:38:49 +02:00
Johannes Pfeifer 99f4fcadcc model_diagnostics.m
Update parameter vector from steady state file and provide correct nocheck flag
2020-03-10 11:06:35 +01:00
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot 7a75872f72
Modernization: use tilde (~) syntax for ignored output arguments 2018-11-13 18:02:09 +01:00
Sébastien Villemot a1b8bd39b2 Move the location of various generated files on the filesystem
- M and MEX files are now under +${MODELNAME}/
- bytecode, C source and JSON now under ${MODELNAME}/model/
2018-06-27 17:03:39 +02:00
Johannes Pfeifer a418a04249 model_diagnostics.m: bugfix after transition to cell arrays
disp does not work with cell
2018-01-26 11:45:54 +01:00
Stéphane Adjemian (Scylla) 7be8f10e0e Use cells of strings instead of char arrays. 2018-01-09 22:30:01 +01:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
Johannes Pfeifer 33d0f44c40 model_diagnostics.m: provide warning that check of dynamic model is not supported for block option instead of crashing 2016-12-17 21:28:04 +01:00
MichelJuillard 8045217773 Merge pull request #729 from JohannesPfeifer/complex_jacobian
Deal with debugging info on complex Jacobians
2015-07-20 14:08:33 +02:00
Johannes Pfeifer e4745cbc65 Add missing abs to unit root check in model_diagnostics.m 2014-12-03 13:35:06 +01:00
Johannes Pfeifer 3a9c273535 Allow for check of Hessian at order>2 in model_diagnostics.m 2014-10-29 19:37:03 +01:00
Johannes Pfeifer c1999443ce Condition singularity warning on unit root check
When singularity is detected, try to compute eigenvalues to see if unit root is present and issue warning according to this check
2014-10-29 19:33:33 +01:00
Johannes Pfeifer bf5d8c0546 Add debugging info for complex Jacobian to model_diagnostics.m and stochastic_solvers.m 2014-09-14 19:34:00 +02:00
Johannes Pfeifer d44825723b Adds test whether all parameters are set to model_diagnostics.m 2014-05-07 10:49:50 +02:00
Johannes Pfeifer 9cf83b6e63 Add check to model_diagnostics.m whether Hessian was computed 2014-04-01 14:39:19 +02:00
Johannes Pfeifer 90b4cae92a Expand model_diagnostics.m to check Jacobians for NaN and Inf 2014-03-28 14:52:29 +01:00
Johannes Pfeifer 5835242982 Add message if model_diagnostics found no problems 2014-02-10 18:21:20 +01:00
Johannes Pfeifer f2b75aa3b3 Fix typo in model_diagnostics.m 2013-11-08 08:27:29 +01:00
Johannes Pfeifer 8282e76d61 Add more explicit information in case of singularity problem 2013-10-31 08:14:35 +01:00
Johannes Pfeifer f77c1f2843 Fix model_diagnostics.m for case where check1 contains NaN as second output
Also stops execution when steady state could not be computed as Jacobian at this incorrect steady state is wrong.
2013-08-25 11:31:51 +02:00
Sébastien Villemot ad8b615771 Use maximum_endo_lag instead of maximum_lag
Closes: #292
2013-01-07 10:40:49 +01:00