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
6bddbca01d
bytecode_steadystate: turn into a local function of evaluate_steady_state
2023-02-17 22:01:25 -05:00
Sébastien Villemot
cfaf5a685d
Preprocessor: actually obey the “mfs” option for the static model
...
As a consequence, fix steady state computation when mfs > 0.
2023-01-17 19:08:32 +01:00
Sébastien Villemot
8aabdaee9c
Consolidate functions for solving steady state with block and/or bytecode
2023-01-17 15:25:47 +01: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
Johannes Pfeifer
3fbab4cbe0
Provisions for solving steady state with MCP-tag
2022-09-12 17:18:16 +02:00
Johannes Pfeifer
77d6782cb4
evaluate_steady_state.m: check whether planner_discount is actually set for ramsey
2022-06-27 11:17:15 +02:00
Sébastien Villemot
0b32ad5b51
Merge branch 'ramsey_steady' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2022
2022-04-29 17:44:28 +02:00
Sébastien Villemot
418a8ebb5f
Drop steady_.m which is only a thin wrapper around evaluate_steady_state
...
As a consequence, move the sanity checks inside evaluate_steady_state, where
they make more sense.
2022-04-29 15:14:43 +02:00
Johannes Pfeifer
21004adf03
evaluate_steady_state.m: correctly account for presence of auxiliary variables potentially depending on Lagrange multipliers
...
Otherwise error message due to NaN may be thrown out due to them non having been set. Closes https://git.dynare.org/Dynare/preprocessor/-/issues/94
2022-04-28 21:49:05 +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)
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
Johannes Pfeifer
b966e5eb7a
evaluate_steady_state.m: do not check auxiliary initial values if they haven't been set
2021-12-19 11:39:24 +01:00
Johannes Pfeifer
741772d514
evaluate_steady_state.m: correctly condition debugging info on existence of objects from steady state file
2021-12-10 09:05:55 +01:00
Sébastien Villemot
91aa1f940f
Forbid the “block” option with “ramsey_model”/“ramsey_policy”
...
The current implementation needs the Jacobian of the full model, which is not
provided by the block-decomposed routines.
Closes : #1823
2021-11-23 17:40:02 +01:00
Johannes Pfeifer
9a32720ac0
evaluate_steady_state.m: allow debugging of Ramsey equations
2021-11-05 12:22:43 +01:00
Johannes Pfeifer
8e063f0c33
evaluate_steady_state.m: fix missed transition to cell array
2021-10-25 16:44:12 +02:00
Sébastien Villemot
766fff88f6
Use secure URL for link to GNU licenses
2021-06-09 17:35:05 +02:00
Sébastien Villemot
7e9a87c313
evaluate_steady_state.m: small simplification
2020-12-07 16:25:01 +01:00
Sébastien Villemot
1c0d1409ea
Fix the use of [static]/[dynamic] equations with the “block” option
2020-12-07 16:24:13 +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
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