Commit Graph

62 Commits (master)

Author SHA1 Message Date
Sébastien Villemot 88ce107466
Rename ys0_ into oo_.initial_steady_state and ex0_ into oo_.initial_exo_steady_state
Also document these variables.
2023-10-24 09:38:51 +02:00
Sébastien Villemot 2e3fbfc040
New option “from_initval_to_endval” to “homotopy_setup” block 2023-10-10 13:19:12 -04:00
Sébastien Villemot 6b44e08daa
steady: add check over the value of homotopy_mode option 2023-10-06 16:41:54 -04:00
Sébastien Villemot 7f6f66c1c9
steady: add a warning if homotopy_setup block is present but homotopy_mode=0 2023-10-06 16:17:09 -04:00
Sébastien Villemot 727f925f01
steady: set a more sensible default value for homotopy_steps (10)
Also document it.
2023-10-06 16:11:53 -04:00
Sébastien Villemot d4b6e61497
steady: check that the homotopy_setup block is present when homotopy_mode is specified 2023-10-06 16:07:41 -04:00
Sébastien Villemot c3680b9f85
steady: fix typo in comments 2023-10-06 16:02:02 -04:00
Sébastien Villemot 4dea001d8d
steady: variable renamings in relation to homotopy
– use consistent naming for M_, oo_, options_
– use more explicit names for a few other variables
2023-10-06 15:42:34 -04:00
Sébastien Villemot 068070d336
steady: various refactoring related to homotopy
- homotopy_mode = 2: in case of failure, print last successful point as in the
  other two modes
- homotopy_mode = 1: if there is a failure at the first iteration (starting
  values), do not incorrectly report that there was a successful point
- homotopy_mode = 3: if there is a failure at the first iteration (starting
  values), honour the option homotopy_force_continue
– homotopy2: remove globals
2023-10-06 15:42:31 -04:00
Johannes Pfeifer 87ce652088
Account for complex value during resid and steady 2023-09-20 10:08:53 +02:00
Johannes Pfeifer 838bb2f4b5 display_static_residuals.m: fix bug introduced in 4598dba40c 2023-09-13 15:26:05 +02:00
Johannes Pfeifer 050679cd56
Rename resid.m
Closes #1888
2023-06-23 12:10:18 +02: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 1a421d93dd
steady: turn homotopy{1,2,3} into local functions 2023-02-16 14:22:27 -05: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
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 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Johannes Pfeifer 9c52aec23d Adjust output of loglinear option to make clear when a logged variable is used
- use of function for getting labels will allow to accommodate https://git.dynare.org/Dynare/dynare/-/issues/349
- incidentally fixes a bug in the display of the simulated variance decomposition for observables with measurement error
2020-12-23 13:53:44 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +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
Houtan Bastani b89e3b2e85
steady: various simplifications
(cherry picked from commit 31ec5ac90abf3ece558b1c7d0fab3e5baea54e02)
2019-02-15 17:11:38 +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 (Karaba) 515e080f49 Do not compute static residuals if steady state routine failed.
Avoids cryptic model dependent error message.
2017-01-04 10:26:22 +01:00
Johannes Pfeifer f788271b9c In debugging modus, provide termination values of steady state finding.
Closes #3
2015-07-24 10:44:46 +02:00
Johannes Pfeifer 139bebd810 Fix display of residuals before displaying error message
The computed steady state was not updated.
2013-08-25 11:31:32 +02:00
Stéphane Adjemian (Charybdis) 4052d4ccaf Cosmetic changes. Use skipline() instead of disp(' '). 2013-07-10 17:12:34 +02:00
Stéphane Adjemian (Charybdis) 8574dfd053 Adapted print_info routine. 2013-06-12 10:54:33 +02:00
Michel Juillard 7c9ce9152d fixing bug in error message for failed homotopy (steady) 2012-11-28 21:32:15 +01:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Michel Juillard c6fd17bc30 print residuals when steady fails. Printing steady state or residuals
is controlled by options_.noprint
2012-05-20 21:36:29 +02:00
Michel Juillard d064db34ab Cleaning homotopy1. Removing globals from homotopy3. Now it returns
last successful values when it fails
2012-05-20 08:47:54 +02:00
Michel Juillard 1316bd9555 fixed issues relative to homotopy (type I) when the user wants to
continue after homotopy fails. Option stop_on_error is removed. Option
homotopy_force_continue is added.
2012-05-17 17:27:07 +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 41e027aee3 added steady option stop_on_error. stop_on_error = 0 permits to
continue (for example, when chaining homotopy steps), even if the
steady state computation was not successful.
2012-04-16 22:40:50 +02:00
Sébastien Villemot de337ad72e Remove spurious initialization of oo_.endo_simul in steady 2011-12-28 10:52:16 +01:00
Stéphane Adjemian (Charybdis) 7aeb881e3a Temporarily set the variance of the shocks to zero when computing or checking the deterministic steady
state. This is necessary if the model contains mean preverving spread terms.
2011-12-04 23:57:46 +01:00
Michel Juillard 130d9fca76 removed useless set_option() statement 2011-10-20 20:40:15 +02:00
Michel Juillard 36d5462328 options_.jacobian_flag is now set in global_initialization.m 2011-10-20 20:40:15 +02: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
Stéphane Adjemian (Charybdis) e614227c3f Added warning message when some of the deep parameters are not initialized. 2010-11-17 17:09:39 +01:00
Michel Juillard 124a6c5c12 correct bug when <fname>_steadystate.m file changes the value of parameters + display steady state in Ramsey policy 2010-05-29 07:48:00 +02:00
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
sebastien a2cef7009d Fixes for ticket #57
preprocessor:
* add a field "M_.orig_endo_nbr" containing the nbr of endogenous before adding aux vars
* always provide "M_.aux_vars" (define it to "[]" when there is no aux var)
* rename "M_.aux_vars().orig_endo_index" to "M_.aux_vars().orig_index"

M-files:
* for commands which accept a list of variables (stoch_simul, osr, estimation, dynasave, dynatype, datatomfile), when no variable is given, use only the set of original endogenous (without aux vars) as the default
* when displaying the decision rule, when there is aux vars in the state variables, replace them by their original name (with the right lag)
* in "steady", don't display aux vars
* special exception for ramsey policy: all vars (including aux vars) are displayed, because the system of aux vars from ramsey policy is not compatible with the aux vars from the preprocessor


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3166 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-25 10:22:39 +00:00
sebastien a03af050af undoing r2110 and r2111 changesets
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2112 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-25 12:29:35 +00:00
michel 464e29706f reverted r2010 because of problem with FILENAME token
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2111 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-25 12:10:12 +00:00
sebastien 0c23ac2b06 v4 matlab:
* fixed various copyright headers
* added URL pointer to C. Sims' original files
* removed obsolete dgamma.m


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2018 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-02 15:18:05 +00:00
adjemian 4580290dae Bug correction related to initialization of deterministic simulations (i forgot to commit this file).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2011 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-09-01 10:13:10 +00:00
sebastien db50368418 v4 matlab: fixed some existing copyright headers (and some other minor header issues)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1974 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-01 12:40:33 +00:00