Commit Graph

56 Commits (06f665e231c1a66863612eb75802ff4f0b698c57)

Author SHA1 Message Date
Sébastien Villemot 06f665e231
Perfect foresight: LBJ now available under stack_solve_algo=1 (with/without block/bytecode)
Previously, LBJ was available:

– under stack_solve_algo=6 when neither block nor bytecode were present
– under stack_solve_algo=1 with either block or bytecode (but the documentation
  was not making it clear that it was LBJ)

This commit merges the two values for the option, and makes them
interchangeable. LBJ should now be invoked with stack_solve_algo=1 (but
stack_solve_algo=6 is kept for compatibility, and is a synonymous).
2022-06-15 15:06:33 +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 b4ce69db3a
Remove options_.slowc field
There was no user interface, and the feature that it provides has lost
relevance over time.

Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f).
2022-03-31 17:39:43 +02:00
Sébastien Villemot 4da9d1e718
Block (without bytecode): avoid silent failures in some corner cases
Either ensure that oo_.determinstic_simulation.status is set, or really error out.
2022-03-23 17:33:37 +01:00
Sébastien Villemot e5f4d96c71
Fix typo 2022-03-23 16:58:59 +01:00
Sébastien Villemot bef8d80ba8
More conversions to logical values 2022-03-23 16:52:40 +01:00
Sébastien Villemot 0147faad5f
Fix stack_solve_algo=1 without bytecode, on solve two boundaries simple/complete blocks
The result for the last simulation period was wrong.
2022-02-25 16:32:16 +01:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
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 6931614809
Block decomposition: for “solve two-boundaries” blocks, move the iteration loop outside the dynamic file 2020-06-16 18:46:40 +02:00
Sébastien Villemot c25ff09307
Block decomposition: for “solve two boundaries” block, no longer compute “b” (-residuals+g1*y) in the dynamic function 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 bfbff6a2fb
Block decomposition: remove duplicate “periods” arg. to dynamic file of complete two-boundaries blocks 2020-06-15 18:29:42 +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 2015b79279
solve_{one_boundary,two_boundaries}: convert some input arguments to logical type 2020-05-25 16:59:20 +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) d19592f761 Fixed homotopy for perfect foresight models with block option, cosmetic changes. 2015-02-20 14:48:25 +01:00
Houtan Bastani 6f0584fe38 fix copyright dates 2015-02-18 03:06:33 +01:00
Stéphane Adjemian (Charybdis) a894357655 Removed options_ and oo_ globals from *all* generated dynamic model
routines (with block option) and adapted some routines to reflect this change.
2015-02-17 12:57:30 +01:00
Stéphane Adjemian (Charybdis) d3275db830 Removed options_ and oo_ globals from generated dynamic model
routines (with block option).
2015-02-16 16:56:17 +01:00
Houtan Bastani 4f87313ed6 fix comment 2013-11-19 13:47:28 +01:00
Houtan Bastani 7abcd5bcb1 preprocessor: bug fix: return oo 2013-11-19 11:56:39 +01:00
Houtan Bastani aa0af5e556 proprocessor: block code bug fix: M and oo not being passed to solve_two_boundaries 2013-11-19 11:54:00 +01:00
Stéphane Adjemian (Charybdis) cc0d9b42f0 Changed name of options_.maxit as options_.simul.maxit. 2013-10-09 13:06:06 +02:00
Ferhat Mihoubi bdee6d14ec Fix the problems related to the initialization of ilu preconditioner using BiCGStab and also a bug in the BiCGStab in case of block (without bytecode) model options. 2013-06-08 17:16:20 +02:00
Sébastien Villemot c035ca30af Fix nonexistent variable names 2013-05-23 13:03:52 +02:00
Sébastien Villemot 3025a14ed9 Adapt for removal of luinc in MATLAB R2013a 2013-03-25 12:05:56 +01:00
Ferhat Mihoubi ac6326758a Adds new preconditioners in iterative solvers 2013-03-22 15:46:47 +01:00
Ferhat Mihoubi 12187710e7 Get rid of global variables 2011-11-25 13:07:50 +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 43479f6ef3 use short-circuit ops (|| and &&) as opposed to (| and &) to avoid warnings in Octave (and save time) 2011-02-10 15:54:23 +01:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01: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
Ferhat Mihoubi c7eff4ba60 - Adding the relaxation method for block and/or bytecode options
- Changing the the stack_solve_algo option :
Previous version             New version
1 : Sparse LU                0 : Sparse LU
2 : GMRES                    1 : Relaxation
3 : BiCGStab                 2 : GMRES
4 : Sparse LU & Optimal Path 3 : BiCGStab
5 : bytecode own solver      4 : Sparse LU & Optimal Path
                             5 : bytecode own solver
2010-09-17 12:18:25 +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 ed6cda0ca1 New options for block decomposition and bytecode (see http://www.dynare.org/DynareWiki/ByteCode):
- the options "sparse_dll" and "sparse" are no more available. They are replaced by combinations of block (for block decomposition) and bytecode (for model stored in a binary file)
- markowitz is now an option of simul and steady commands


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2873 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-08-29 15:04:11 +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 1d9260251d - sparse_dll option works fine with feedback variables
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2851 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-07-21 15:50:12 +00:00