Commit Graph

53 Commits (237aa465d23fb3113a27cf2d8f9932bd3c2e2e8f)

Author SHA1 Message Date
Sébastien Villemot e576dc8c81
Block decomposition: fix evaluation of recursive variables in solved blocks
Ref. #1726
2020-10-06 18:31:13 +02:00
Sébastien Villemot 41fe087106
Block decomposition: static and dynamic files are now pure wrappers around the per-block files
Systematically call top-level static/dynamic files, instead of per-block ones.
2020-06-19 18:46:56 +02:00
Sébastien Villemot 0305b427a6
Block decomposition: use same orientation convention as oo_.endo_simul for matrix of simulated paths
Improves consistency, but also efficiency (less transpose needed).
2020-06-17 18:19:35 +02:00
Sébastien Villemot 20431ed312
Block decomposition: in the dynamic file, y and T are now vectors as in non-block mode 2020-06-17 18:19:21 +02:00
Sébastien Villemot adbb9c9117
Block decomposition, stack_solve_algo=4: fix set of variables over which line search is done 2020-06-16 18:46:40 +02:00
Sébastien Villemot e72bce1a67
Block decomposition: remove useless “y” output for static/dynamic files of solved blocks 2020-06-16 18:46:40 +02:00
Sébastien Villemot 2ec5e4075a
Block decomposition: remove unused 2nd and 3rd derivatives in output of dynamic functions 2020-06-03 17:00:17 +02:00
Sébastien Villemot 0d11f8182a
Block decomposition: no longer compute deterministic simulation from dynamic.m file
By the way, fix bug where oo_ was not modified by solve_one_boundary.

Also convert oo_.deterministic_simulations.status to a boolean in the block
routines, for consistency with the non-block case.
2020-06-02 17:46:29 +02:00
Sébastien Villemot 50209dc56e
Block decomposition: no longer use global variables for temporary terms in the dynamic M-file
Rather use a single vector as in non-block mode.

By the way, change the order of output arguments in static functions, to be
closer to the dynamic ones.
2020-05-26 16:23:46 +02:00
Sébastien Villemot 2c6807a66b
Block decomposition: no longer use global variables for temporary terms in the static M-file
Rather use a single vector as in non-block mode.
2020-05-25 18:36:55 +02:00
Sébastien Villemot caea047c2d
solve_one_boundary: remove unused codepaths for solve_algo={0,1,2,3}
Those cases are handled by dynare_solve.
2020-05-25 17:59:54 +02:00
Sébastien Villemot 2015b79279
solve_{one_boundary,two_boundaries}: convert some input arguments to logical type 2020-05-25 16:59:20 +02:00
Sébastien Villemot d03cc56587 solve_algo=7 and stack_solve_algo=2 are now allowed under Octave
The gmres() function has been implemented (actually since Octave 3.4.1!).
2018-08-02 15:20:39 +02: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
Stéphane Adjemian (Hermes) 837c812c17 Efficiency changes.
+ Use scalar product when possible, ie replace sum(x.*x) by x'*x,
+ Add parenthesis around scalar products, ie replace a*x'*x by a*(x'*x),
+ Removed global options_ in lnsrch1 (only used for solve_tolx).

Note that the scalar products could be replaced by a loop for small
problems. If the number of unknow is smaller than 70 the loop is
faster (10 times faster if the number of unknowns is less than 10).
2016-02-26 22:06:49 +01:00
Stéphane Adjemian (Charybdis) 38b548c4d0 Fixed licence header. 2015-02-20 14:48:25 +01:00
Stéphane Adjemian (Charybdis) d19592f761 Fixed homotopy for perfect foresight models with block option, cosmetic changes. 2015-02-20 14:48:25 +01:00
Stéphane Adjemian (Charybdis) ddd95361ba Cosmetic changes. Added isoctave function to replace exist('OCTAVE_VERSION'). 2013-11-04 10:54:45 +01:00
Stéphane Adjemian (Charybdis) cc0d9b42f0 Changed name of options_.maxit as options_.simul.maxit. 2013-10-09 13:06:06 +02:00
Sébastien Villemot 3025a14ed9 Adapt for removal of luinc in MATLAB R2013a 2013-03-25 12:05:56 +01:00
Houtan Bastani dcaed91f66 fix to license call (checkout only works for Matlab version >= 2011a) 2012-01-09 11:57:47 +01:00
Houtan Bastani 9be84bdf65 make check: fix bug in check for license 2011-12-23 18:22:41 +01:00
Ferhat Mihoubi 12187710e7 Get rid of global variables 2011-11-25 13:07:50 +01:00
Sébastien Villemot c111fc1847 solve_one_boundary: make the case solve_algo=0 work under Octave 2011-09-19 16:41:53 +02:00
Sébastien Villemot c07a915d6e Improve the way we test for existence of toolboxes (more reliable in the case where the toolbox is installed but not activated) 2011-09-19 16:41:53 +02:00
Ferhat Mihoubi 3c818378fe Corrects a bug related to the number of arguments passed to the static m-files 2011-09-16 17:48:23 +02:00
Ferhat Mihoubi 3f48c8723a Additional corrections related to the steady_state operator bug 2011-03-18 14:11:00 +01:00
Michel Juillard 55bb27c5f6 new correction for steady_state operator bug. Steady_state vector is passed as argument to *_dynamic model function. As a result, bytecode is currently broken. 2011-03-13 17:06:57 +01:00
Houtan Bastani 8a0dabd07d use || and && as opposed to | and & where appropriate 2011-02-16 15:14:38 +01:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Sébastien Villemot 757a9067c0 Global reindentation of MATLAB files 2011-02-04 17:17:48 +01:00
Ferhat Mihoubi ce07223628 - The Temporary terms management with bytecode when the model is block decomposed and solve_algo<5 is now compatible with octave
- Gets rid of warning message during the compilation of bytecode
2011-01-14 19:24:18 +01:00
Ferhat Mihoubi 96b6f1bf05 - Corrects the following problem:
Octave BiCGStab algorithm involves a 0 division in case of a preconditioner equal to the LU decomposition of the A matrix (in a linear system of the form A.x = b).
- The solution:
Checks if the linear system is solved simply using: x_new = x_old + U \ (L \ x_old)
Ticket #11
2011-01-14 19:24:17 +01:00
Ferhat Mihoubi 129303430e The direction is not computed in same way in the dynamic case and in the static case 2010-12-31 16:20:35 +01:00
Ferhat Mihoubi 9cebf270e5 - correction of informations displayed in Solve_one_boundary 2010-10-27 15:30:00 +02:00
Ferhat Mihoubi 39718c8645 - extends steady algorithms to solve_algo=5, 6, 7 and 8 for a block decomposed model without bytcode
-  solve_algo is reordered =
   * 0: fsolve
   * 1: solve1
   * 2, 4: solve1 + block decomposition
   * 3: csolve
   * 5: bytecode own solver (use Gaussian elimination + sparse matrix)
   * 6: LU decomposition with UMFPack (method handling sparse matrix in Matlab)
   * 7: GMRES
   * 8: BiCGStab
2010-10-22 16:49:47 +02:00
Ferhat Mihoubi f915cbe92f - Minor corrections in wrapper to compute the steady-state 2010-10-22 11:08:47 +02:00
Ferhat Mihoubi 1a09426706 - Correction of several bugs with Octave
- Add wrapper needed to compute the steady-state using bytecode and solve_algo = 0, ..., 4
2010-10-22 10:09:07 +02:00
sebastien 1be52aaa5f Beautification: removed tabulation characters which were left in previous beautification pass
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3300 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-05 10:46:10 +00:00
sebastien 0011678cb5 Changes by Ferhat:
* fix options stack_solve_algo={2,3,4} (closes #68)
* fix crashes for singular normalizations (closes #44) and implement decreasing cutoff
* fail for stack_solve_algo=2 under Octave (because there is no gmres function in Octave)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3279 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-21 10:29:21 +00: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 74232e9ee5 * Added new option stack_solve_algo to simul
* Added solve_algo=5 for steady
* Remove obsolete method option of simul
* Added various checks to avoid unimplemented combinations of bytecode/block/solve_algo/stack_solve_algo


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2882 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-02 16:34:48 +00:00
ferhat 305914b551 - bug fix when solve_algo = 4 is selected
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2870 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-08-27 13:26:29 +00:00
ferhat d32dd99210 - extension of normalization of equations to nonlinear equations
- mfs: new option for 'steady' and 'model' commands. Determines the equation belonging to the set of feedback variables.
  mfs = 0 => all variables are considered as feedback variables (default value)
  mfs = 1 => using only naturally normalized equation as potential recursive equations (all variables assigned to unnormalized equations are considered as feedback variable)
  mfs = 2 => adding to the set of potential recursive equation with mfs = 1 the linear equation in endogenous variable normalized (all variables assigned to nonlinear unnormalized equations are considered as feedback variable)
  mfs = 3 => adding to the set of potential recursive equation with mfs = 2 the non linear equation in endogenous variable normalized
- correction of few buggs in simulate.dll
- block_mfs_dll: new option for 'steady' command. Use simulate.dll to solve the steady state model (speedup the computation of the steady-state and the homotopy)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2866 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-08-25 09:43:01 +00:00
ferhat 6479edf5a7 - Correction of several bugs
- normalize an equation linear in its endogenous variable
- Chained rule derivatives (necessary to reduce a block to the feedback equations and variables)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2726 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 14:45:23 +00:00
ferhat ca974cdf48 The sparse option in model is now compatible with homotopy => matlab commit
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2589 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-10 16:57:37 +00:00
ferhat 881d2819a3 - Jacobian matrix stored only for blocks -> jacobian matrix only as output argument
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2342 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-12-24 16:29:51 +00:00