Commit Graph

38 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
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 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
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 37bffddef8 Provide correct error code if no steady_state-file is provided and Ramsey fails to find steady state 2017-05-02 13:48:25 +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 922410e241 dyn_ramsey_static.m: Cosmetic header fix 2016-08-24 13:32:11 +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
Michel Juillard 1628f01fdb fixing problems with Ramsey policy and auxiliary variables 2016-04-04 17:11:03 +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
Michel Juillard 1b822a9105 fix calls to dynare_solve() when Jacobian of function must be computed
numerically. Fix call to dynare_solve() in simulation_core()
2015-05-26 15:51:09 +02:00
Michel Juillard f03839cf12 removed "global options_" in dynare_solve.m and made it an
argument. Modified all calling functions.
2015-05-25 17:15:09 +02:00
Houtan Bastani ca83397d95 update copyright dates for files changed in 2015 2015-02-16 09:08:02 +01:00
Michel Juillard 1b38dc6422 fixing crash in computation of Ramsey steady state 2015-01-11 21:12:32 +01:00
Houtan Bastani f999f960f8 bug fix: add missing comment 2014-11-14 12:27:20 +01:00
Johannes Pfeifer c2da796153 Fix distinction between initial values provided to dyn_ramsey_static.m and stale unchanged initial values in oo_.steady_state
In case of no steady state file, they are identical, but with a steady state file, they are not. Moreover, this fixes a problem with the dimension of the input to the steady state file. ys was not initialized and had wrong dimensions
Also adds comments to file.
2014-10-30 13:31:57 +01:00
Stéphane Adjemian (Charybdis) 7e3114847d Fix crash in Ramsey with more than 1 instrument and steady state file.
Vector ys is undefined.
2014-09-11 15:33:55 +02:00
Johannes Pfeifer 7c09435e5e Fix bug in dyn_ramsey_static.m with steady state file that resulted in incorrect steady state when running twice
The x returned by a steady state file includes Lagrange multipliers. When starting with 0 multipliers, the steady state of the multipliers is computed correctly. But when running it a second time like in a subsequent call to stoch_simul, the algorithm thinks that elements of xx are 0 which they aren't. As a result, it finds minus the multiplier as the solution, resulting in an output of 0 for all multipliers.
2014-07-18 12:35:52 +02:00
Johannes Pfeifer 3f72f394aa Cosmetic fixes to dyn_ramsey_static.m
Also makes sure that the check flag is returned and the steady state file always called if it exists. Otherwise, parameters might not be updated and NaN not detected.
2014-07-18 08:53:51 +02:00
Sébastien Villemot def9ee92e5 Steady state calculation of Ramsey problem: fix bug when params are updated.
If the steady state file was modifying parameters, the changes were not taken
fully taken into account.

Thanks to Junior Maih for noticing and proposing the fix.
2014-07-08 15:06:26 +02:00
Michel Juillard 821389fcc6 checking first whether initval values satisfy static model for Ramsey policy 2014-03-11 13:22:19 +01:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Ferhat Mihoubi a3e1d17b9e Ramsey_policy is now compatible with bytecode option 2012-06-06 16:29:26 +02:00
Michel Juillard f37f4d4b49 fixing bug in computing steady state of Ramsey policy 2012-04-23 13:39:50 +02:00
Michel Juillard a0ffa6a154 fixing bugs in Ramsey policy 2012-04-21 21:16:57 +02:00
Michel Juillard f8ecc4d6ba reorganized code for evaluating steady state file 2012-04-21 10:12:00 +02:00
Michel Juillard f44db9370d fixing problem with Ramsey policy and auxiliary variables 2012-02-02 12:04:41 +01:00
Michel Juillard 380fd37092 fixing bug in ramsey policy when using initval instead of steady_state_model 2012-01-22 00:25:30 +01:00
Michel Juillard 3bc349402f fixing problem wiht Ramsey policy when the steady state is provided by
the user
2011-12-15 17:35:27 +01:00
Michel Juillard e1856be59b fixing problems for computing steady state in ramsey policy 2011-11-14 21:59:39 +01:00
Michel Juillard ee7078e56c factoring out steady-state computations; steady_state_model now
generates <fname>_steadystate2.m returning parameters as well in case
they have been modified by the user. Added several test cases.
2011-10-12 21:51:14 +02:00