Commit Graph

54 Commits (73e4ced39a6ecab5163cee037de0af74410ec071)

Author SHA1 Message Date
Sébastien Villemot 73e4ced39a
Remove more unused Dynare++ code
In particular, the libkorder library no longer depends on MatIO.
2023-04-17 18:10:36 +02:00
Sébastien Villemot 99cd06c9fd
Move relevant Dynare++ files to mex/sources/libkorder/. Delete the others.
Also move some useful documentation to doc/.
2023-04-17 18:10:35 +02:00
Sébastien Villemot 8f1a4cb363
Drop block-decomposed first-order perturbation solution and kalman filter 2023-01-13 16:57:49 +01:00
NormannR a245fbb390 Implements a Fortran update of the states variance-covariance matrix for the Kalman filter 2022-11-14 16:24:46 +00:00
NormannR 855887b249 Implements a logarithmic reduction Fortran routine and the associated test 2022-10-11 12:11:06 +02:00
Normann Rion d17204cc84 Implements a cycle reduction Fortran routine and the associated test.
The Fortran routine replaces the former Matlab code in matlab/cycle_reduction.m
2022-10-03 14:38:12 +02:00
Sébastien Villemot 39f47dc957
local_state_space_iteration_k MEX now uses the Fortran code (instead of the C++ code)
Closes: #1802
2022-02-04 11:49:46 +01:00
Sébastien Villemot ae5be8d717
Build system: add provisions for k_order_mean MEX under Octave 2021-12-16 10:42:37 +01:00
Sébastien Villemot 06fd42c19b
Drop the dynare_simul_ MEX in favour of the new Fortran k_order_simul MEX 2021-11-26 17:37:53 +01:00
Normann Rion 6475c52b3d Implements k-order simulation routine in Fortran (Ref: #1802)
`k_order_simul` may replace `dynare_simul_` in the long run
2021-09-24 09:11:15 +02:00
NormannR cab65dabb5 Implements `local_state_space_iteration_fortran`, the Fortran replacement of `local_state_space_iteration_k` (Ref #1802)
- Creates the library `libkordersim` with all the relevant Fortran routines to `folded_to_unfolded_dr` and `local_state_space_iteration_fortran`
   - Implements `folded_to_unfolded_dr`, which converts folded decision rule matrices to their unfolded counterparts
2021-09-22 16:28:46 +02:00
Normann Rion 3d27672c58
kth-order approximation of conditional welfare
Partially addresses issue #1680:
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y
2021-06-15 15:04:31 +02:00
Stéphane Adjemian (Odysseus) 248ad18846 Merge remote-tracking branch 'Dynare/master' into enterprise
Fixed conflicts in:

 - .gitlab-ci.yml
 - matlab/dynare_config.m
 - matlab/dynare_solve.m
 - matlab/initvalf.m
 - matlab/perfect-foresight-models/make_ex_.m
 - matlab/perfect-foresight-models/perfect_foresight_setup.m
 - mex/build/matlab/Makefile.am
 - mex/build/matlab/configure.ac
 - mex/build/octave/Makefile.am
 - mex/build/octave/configure.ac
 - mex/sources/Makefile.am
 - preprocessor
 - tests/Makefile.am
2020-09-17 14:53:32 +02:00
Sébastien Villemot f6c2471eef
New MEX for solving discrete Lyapunov equations with doubling algorithm
This is a Fortran 2008 rewrite of disclyap_fast.m.

Closes: #1737
2020-07-30 16:34:35 +02:00
Sébastien Villemot 43ed7b2b69
Merge remote-tracking branch 'community/master' into enterprise 2020-03-27 16:28:41 +01:00
Sébastien Villemot 996bdd6c64 New local_state_space_iteration_k MEX, for nonlinear filters at k-order
It applies the approximated policy function to a set of particles, using
Dynare++ routines.

There is support for parallelization, using Dynare++ multithreading
model (itself based on C++11 threads; we don’t use OpenMP because it is
incompatible with MKL). For the time being, default to a single thread. This
should be later refined through empirical testing.
2019-12-20 11:31:56 +01:00
Sébastien Villemot 6a26926892
Add new block_trust_region MEX
This MEX solves nonlinear systems of equations using a trust region algorithm.
The problem is subdivided in smaller problems by doing a block
triangularisation of the Jacobian at the guess value, using the
Dulmage-Mendelsohn algorithm.

The interface of the MEX is simply:

  [x, info] = block_trust_region(f, guess_value);

Where f is either a function handle or a string designating a function.
f must take one argument (the evaluation point), and return either one or two
arguments (the residuals and, optionally, the Jacobian).

On success, info=0; on failure, info=1.
2019-12-03 16:17:16 +01:00
Sébastien Villemot 8065e9d439
Build system: by default, error out if some dependency is missing
In particular, if either MATLAB or Octave is missing, one needs to pass either
--disable-matlab or --disable-octave.

Moreover, several new configure flags have been introduced for disabling some
components:
--disable-doc
--disable-dynare++
--disable-mex-dynare++
--disable-mex-ms-sbvar
--disable-mex-kalman-steady-state
2019-11-26 13:53:42 +01:00
Sébastien Villemot 9557061fa3
Add new num_procs MEX file for getting number of available processing units 2019-06-27 14:34:09 +02:00
Sébastien Villemot 5b591fac42
New perfect_foresight_problem MEX file
It constructs the stacked residuals and jacobian of the perfect foresight
problem.

It is an almost perfect replacement for the perfect_foresight_problem.m
routine, while being much more efficient.

Note however that the DLL never return complex numbers (it instead puts NaNs at
the place where there would have been complex). This may create problems for
some MOD files; the algorithms will need to be adapted to use a more
line-search method.
2019-06-24 17:53:59 +02:00
Sébastien Villemot c6f5c804d9
Gensylv MEX also needs MatIO (because Dynare++ code does) 2018-11-12 12:56:01 +01:00
Sébastien Villemot 02084ce310 Remove qzcomplex Oct-file
It's actually not needed. The QZ complex decomposition can be obtained in
Octave on real matrices by casting them to the complex type.
2018-05-17 12:11:15 +02:00
Sébastien Villemot e2c2f2d966 Remove fallbacks for ilu, linsolve and ordschur under Octave
These functions are all included in Octave 4.2.
2018-05-16 10:48:44 +02:00
Houtan Bastani fb6a11f544 move estimation-dll to its own repository: https://github.com/DynareTeam/estimation-dll.git 2017-09-22 15:31:23 +02:00
Sébastien Villemot d0628af1f2 No longer compile ordschur.oct for Octave >= 4.0.
The function is now an Octave builtin.
2015-03-17 17:53:11 +01:00
Houtan Bastani 8d2b79a224 make install, closes #576 2014-07-16 16:18:06 +02:00
Sébastien Villemot 66d48f5917 Compatibility fixes for Octave 3.8.
- no longer use OCTAVE_QUIT in MEX files; this seems now only possible in
  oct-files. (Ref #304)
- do not build linsolve.oct on Octave >= 3.8, it is available natively.
- do not add strjoin.m to the patch on Octave >= 3.8, it is available natively.
- default_save_options has been renamed save_default_options.
2014-01-03 11:05:39 +01:00
Sébastien Villemot 82930ee29a Implementation of steady state computation in estim DLL, using the GSL
Does not seem very robust (fails on fs2000), need to investigate why.
2013-03-06 16:58:22 +01:00
Sébastien Villemot c07ffd8705 Merge branch 'slicot' 2012-09-13 11:11:46 +02:00
Sébastien Villemot 0332309647 Remove embedded SLICOT, rely on external binary 2012-09-13 11:08:42 +02:00
Sébastien Villemot 5f861cb0d8 Use MatIO in Dynare++ instead of the home-made engine 2012-08-23 18:31:07 +02:00
Sébastien Villemot 2e65a9ab96 Provide a better implementation of linsolve for Octave
Closes: #273
2012-08-06 18:26:16 +02:00
Sébastien Villemot ff4285d6fb matio is a requirement for ms-sbvar under Octave 2012-04-20 11:50:03 +02:00
Stéphane Adjemian (Charybdis) 40329e3e29 Added routine to compute one step ahead state space iteration (mex and m). The state space
equations are approximated at order two around the deterministic steady state.
2012-03-04 22:07:27 +01:00
Stéphane Adjemian (Charybdis) 4869fff243 Added new mex file for computing Quasi Monte-Carlo sequences (Sobol), texinfo headers and unitary tests are available in <DYNARE_PATH>/matlab/qmc_sequence.m. 2011-12-21 18:23:15 +01:00
Sébastien Villemot a1ee7f1ee4 block_kalman_filter: add MEX to build system 2011-09-23 18:22:15 +02:00
Houtan Bastani 75f5b88f86 SWZ: integrate ms-sbvar in build system 2011-02-22 15:16:51 +01:00
Houtan Bastani 6674b5ffcf SWZ: remove from swz from mex build system 2011-02-02 19:00:14 +01:00
Sébastien Villemot 80b5c23346 Build system for MEX files:
- remove the dirty vpath hack
- factorize between the two estimation DLLs
- factorize within SWZ makefile
2011-01-25 17:13:00 -05:00
Houtan Bastani e7843e349a Modify configure script to show Kalman Steady State seperately from other mex files 2010-12-14 10:27:39 +01:00
Sébastien Villemot e826fb8239 Build system: kalman_steady_state depends on libslicot and must be built after 2010-12-14 09:57:15 +01:00
Houtan Bastani 41bda1eb07 Mac libslicot compilation optional (because a Fortran compiler is not standard on OS X) 2010-12-13 18:15:11 +01:00
Sébastien Villemot 965ea7280a Build system: add detection and linking of MatIO library for Estimation DLL under Octave 2010-12-08 10:22:44 +01:00
Stéphane Adjemian (Charybdis) 160922a189 Added mex file for computing the fixed point of the riccati equation in the kalman filter.
The mex works with octave but not with matlab (lapack issue again ;-).
2010-11-19 14:39:54 +01:00
Stéphane Adjemian (Charybdis) 382ab96cde Added the Slicot library (distributed under the GNU General Public Licence at www.slicot.org). This library provides routines
for the design and analysis of control systems. Adapted the building system to handle fortran 77 source files.
2010-11-18 10:11:27 +01:00
Sébastien Villemot 48096db2ff Build system: add logMHMCMC DLL 2010-10-28 10:17:58 +02:00
Sébastien Villemot 81823ad035 New oct-file for "ordschur": the diffuse filter now works under Octave 2010-10-21 15:43:13 +02:00
Sébastien Villemot 69fc0e320b New oct-file "qzcomplex" for bringing the complex QZ decomposition to Octave. Fixes issues with partial information under Octave. 2010-10-21 12:33:18 +02:00
Sébastien Villemot acf5451c1f Build system: rename 'loglikelihood' to 'logposterior' 2010-07-09 12:48:08 +02:00
Sébastien Villemot 04905660b8 Added new loglikelihood DLL (does not yet contain prior computation, only the likelihood) 2010-06-11 19:18:16 +02:00