Commit Graph

57 Commits (7e770f69e791e705ab535126e0157130dc9d40c6)

Author SHA1 Message Date
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 89a3e94cbf
Use true/false instead of 1/0 for boolean options
This is more elegant, and makes it easier to distinguish them from integer
options.

Also simplify test expressions for these boolean options.
2019-03-19 15:21:16 +01:00
Johannes Pfeifer c16c2fb894 evaluate_steady_state.m: consistently use params
Prevents erroneously relying on stale parameters from M.params (thanks to Tom Holden); closes #1627
2018-11-14 16:01:55 +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 8cb51e26e6
options_.instruments is now a cell array
This fixes crashes under Octave (while MATLAB seems to accept array-indexing
with cell arrays).
2018-10-25 15:01:53 +02:00
Sébastien Villemot 7685a0ccda Octave compatibility fix
Now that the set_auxiliary_variables file is in a "+" directory, Octave fails
at str2func if the file does not exist.
2018-07-13 17:22:27 +02: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
Stéphane Adjemian (Scylla) 7be8f10e0e Use cells of strings instead of char arrays. 2018-01-09 22:30:01 +01:00
Houtan Bastani 718ff3d61c preprocessor: only create *set_auxiliary_variables.m file if there will be something in it. Closes #1384 2017-08-29 14:44:52 +02:00
Houtan Bastani bd81ebc55d evaluate_steady_state: simplify check: the only time this variable is used both of these conditions hold 2017-08-29 11:51:45 +02:00
Johannes Pfeifer c063fe1843 Fix two line breaks 2017-06-11 10:58:19 +02: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
Michel Juillard 73e0f9d591 made evaluate_steady_state file consistent with evaluation of auxiliary
variables in <fname>_static.m file
2016-11-20 15:40:08 +01:00
Johannes Pfeifer e80c1e5a24 evaluate_steady_state.m: make sure ys contains auxiliary variables in case of problem with dynare_solve
Otherwise, evaluate_static_model will crash
2016-10-13 10:50:50 +02:00
Johannes Pfeifer c2b9bd1cff Add missing check for display of results in evaluate_steady_state.m 2016-08-26 18:31:52 +02:00
Johannes Pfeifer 41a714ee2b Move check for correct number of instruments to ramsey_policy.m
No reason to trigger the check in every iteration
2016-08-24 13:32:11 +02:00
Johannes Pfeifer 1f26aed03d Condition output of diagnostics in evaluate_steady_state.m on options.debug
Prevents display during iterations like estimation
2016-08-24 13:32:11 +02:00
Johannes Pfeifer eff52f51b7 Ramsey: exit with error code if solver fails at specified tolerance
Also adds penalty if steady state ventures into complex space
2016-08-24 13:32:11 +02:00
Johannes Pfeifer c470e028e1 Ramsey: add check for complex numbers in conditional steady state 2016-08-24 13:32:11 +02:00
Johannes Pfeifer f60aec3be3 Fix number of Lagrange multipliers in evaluate_steady_state.m
Did not account for auxiliary equations
2016-08-24 13:32:11 +02:00
Johannes Pfeifer d65a2f855f Fix display of instrument termination value in evaluate_steady_state.m
Printed initial instead of terminal value
2016-08-24 13:32:11 +02:00
Johannes Pfeifer 6d3c73a906 Harmonize tolerance criterion used in evaluate_steady_state.m
Should be solve_tolf instead of dynatol.f
2016-08-23 17:28:41 +02:00
Johannes Pfeifer 14ab41e414 Move debugging information removed in 335ce74acb to evaluate_steady_state.m where it belongs 2016-08-21 11:45:11 +02:00
Johannes Pfeifer 317f958184 Ramsey: Test whether number of instruments matches number of missing equation
Otherwise cryptic crashes can result
2016-06-23 20:48:01 +02:00
MichelJuillard a8cc21eb97 Merge pull request #1163 from JohannesPfeifer/Smoother_fixes
Various fixes and documentation improvements related to smoother, trends and selected_variables_only option
2016-04-12 14:22:19 +02:00
MichelJuillard d7e4469a28 Merge pull request #1153 from JohannesPfeifer/steady_check_flag
Make evaluate_steady_state.m honor nocheck flag
2016-04-12 12:04:57 +02:00
Johannes Pfeifer 98384eb6f2 Document variable ordering in various headers 2016-04-12 10:52:37 +02:00
Michel Juillard 2313f20a35 completing replacement of auxiliary variables in static model 2016-04-01 18:45:19 +02:00
Johannes Pfeifer a93d68fb35 Make evaluate_steady_state.m honor nocheck flag
Closes #1054
2016-03-25 22:12:52 +01:00
Johannes Pfeifer af5368e83c Fix number of multipliers added by Ramsey used in evaluate_steady_state.m 2016-03-11 14:55:11 +01:00
Houtan Bastani 710e8ef3a5 fix copyright dates for 2016 2016-02-23 14:04:04 +01:00
Stéphane Adjemian (Hermes) 34bc1ab9de Do not call set_auxiliary_variables routine before evaluating the steady state file. 2016-02-05 00:13:20 +01:00
Johannes Pfeifer 8ef96c46ca Check whether steady state file returns column vector 2015-10-12 16:17:56 +02:00
Johannes Pfeifer ac7b8a691e Fix evaluation of residuals stored in info
They were wrongly based on the initial guess
2015-06-08 18:10:58 +02:00
Johannes Pfeifer a5e60834ca Ascertain that only correct steady states for linear models are accepted
Without the check, incorrect steady states were accepted. This happened for example if the model was not linear in the first place and solving a wrongly presumed linear equation system did not work.
2015-06-08 18:09:39 +02:00
Michel Juillard 92a33f9792 changed another call to dynare_solve() forgotten in last commit 2015-05-25 17:15:09 +02:00
Stéphane Adjemian (Charybdis) f4922a8a27 Cosmetic changes. 2014-10-10 21:46:50 +02:00
Johannes Pfeifer 3187c70b97 Add debugging info on initial values for steady state computation 2014-09-30 15:05:12 +02:00
Johannes Pfeifer 27572277d0 Test the result of steady state computation for correctness
- Checks correctness of steady state file
- Tests whether result of computation really is a steady state
- Also eliminates case that can never be reached
2014-07-18 13:18:14 +02:00
Sébastien Villemot 7400c2c143 evaluate_steady_state.m: fix bugs when static and dynamic models differ.
Closes #661
2014-07-08 16:10:09 +02:00
Johannes Pfeifer 53db31dfd3 Add debugging info to steady state for linear models
Resembles the messages already provided for non-linear models
2013-07-28 00:12:19 +02:00
Johannes Pfeifer c82658a2a5 Bugfix for steady;
1.) Fixes cases where model was not truly linear, but Dynare did not catch mistake because fvec and jacob contained cancelling NaN
2.) Use correct error code 22 if NaN appear instead of generic 20
2013-06-01 16:32:40 +02:00
Sébastien Villemot 38824dc1e5 Implement tags [static] and [dynamic] for equations
Closes #307
2013-04-11 17:11:35 +02:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Johannes Pfeifer d8f82a9638 Fixed bug in evaluate_steady_state.m that prevents parameter updating 2012-05-10 20:48:44 +02:00
Michel Juillard f7cf75a228 fixed problems with trying to make homotopy robust to problems in one run. 2012-04-23 16:57:46 +02:00
Michel Juillard d1120da658 fixing bugs in evaluation of steady state file introduced in last
related commit
2012-04-21 11:39:21 +02:00
Michel Juillard f8ecc4d6ba reorganized code for evaluating steady state file 2012-04-21 10:12:00 +02:00