Commit Graph

77 Commits (1d7646a6e57190ea5af2a60520c519fbd2ce20ce)

Author SHA1 Message Date
Johannes Pfeifer 9d3722fdcb Add full function header to static and dynamic model files 2013-07-28 11:32:14 +02:00
Sébastien Villemot abd5bfda50 Fix breakage of static file introduced by 8c83135c
In StaticModel, deriv_ids are no longer equal to symb_ids; some parts of the
code were relying on that assumption
2012-12-01 23:32:24 +01:00
Sébastien Villemot dc1be70d82 Add derivatives of static model w.r.t. parameters
The new file is <FILENAME>_static_params_derives.m

Closes: #160
2012-11-29 18:07:48 +01:00
Sébastien Villemot 47c83d839e Remove duplicate information in M_.blocksMFS 2012-11-16 17:39:03 +01:00
Sébastien Villemot 0cae76f0eb Remove duplicate information in M_.blocksEQU 2012-11-16 17:16:40 +01:00
Sébastien Villemot 4541e17e83 Remove various compiler warnings 2012-06-08 19:06:03 +02:00
Sébastien Villemot 67a1737f00 Update copyright notices 2012-06-08 18:22:34 +02:00
Ferhat Mihoubi 6d67c4b9b8 Add options static to model_info command and fixes the ticket #134 2012-06-06 16:36:56 +02:00
Michel Juillard 7093a54f3a fixes the correction of the Jacobian when encountering complex
numbers. This should be 2*imag(g1) and not imag(g1).^2
2012-05-18 16:19:07 +02:00
Ferhat Mihoubi 715df0c634 Adds the index of equations (M_.blocksEQU) for a block decomposed model without bytecode option and use this index in resid.m to retrieve the residuals 2012-03-08 15:29:56 +01:00
Houtan Bastani 67f3a0ecc0 preprocessor: separate dynamic and static functions from their mexfiles 2011-12-23 18:22:41 +01:00
Michel Juillard 16f550a986 preprocessor, auxiliary variables: fixes ordering issue introduced in
347ab4d0c0c79ae9a42898c1d5409d78708bb8a8 and corrects the earlier
ordering problem.
2011-09-28 22:11:44 +02:00
Michel Juillard 09a6b96c5f preprocessor: modified order of auxiliary variables definitions 2011-09-25 20:21:30 +02:00
Houtan Bastani 5dc9092723 cosmetic: simplify jacobianHelper, hessianHelper and sparseHelper functions and fix spacing in dynamic file 2011-08-19 16:59:18 +02:00
Houtan Bastani 31ff8da853 remove unused variables from preprocessor 2011-08-19 16:59:12 +02:00
Houtan Bastani 5c48733f55 output mex file for static model (closes #183) 2011-08-19 16:57:27 +02:00
Houtan Bastani c6a33a96f1 remove writing of getPowerDeriv M function from block code functions 2011-07-25 10:21:02 +02:00
Michel Juillard 4d4456b8d6 adding creation of <fname>_set_auxiliary_variables.m containing recursive definition of auxiliary variables 2011-07-24 20:56:30 +02:00
Houtan Bastani 1e4c0852f6 bug fix: getPowerDeriv not accessible from modfile.m 2011-07-19 14:35:35 +02:00
Sébastien Villemot d2696ca2f0 Preprocessor: factorize code common between StaticModel and DynamicModel, and put it in ModelTree 2011-06-22 11:56:07 +02:00
Sébastien Villemot 06f7d23e90 Preprocessor: fix crash when no computational task is required 2011-06-22 11:34:38 +02:00
Ferhat Mihoubi 53fe3fe8ed - Compute :
+ the number of static, lag, lead and both variables,
  + the lead_lag_incidence matrix for variables related to previous blocks
  + the index of reordered policy rule
for each block during the preprocessing step
- correct a bug in the comment related to first order derivatives in _dynamic.m file for a block decomposed model without bytcode
- avoid simplification of the Jacobian matrix (setting to zero all elements below the cutoff) for  estimated or stochastically simulated models: the cutoff option is set to 0.
2011-06-18 17:53:50 +02:00
Houtan Bastani 7eade47160 external_function: bug fix in writeParamsDerivativesFile, writeDynamicModel and writeStaticMFile 2011-06-10 11:09:43 +02:00
Michel Juillard 912b22d0e9 correcting bug in forcing real values for complex elements of Jacobian in static model 2011-05-11 07:32:00 +02:00
Houtan Bastani d0d9fde6af bug fix: allow use of external functions with model local variables 2011-04-12 16:42:56 +02:00
Sébastien Villemot 60b70df4c1 Updated copyright notices 2011-02-04 17:27:33 +01:00
Sébastien Villemot d264b7b2e3 Reindentation of the preprocessor 2011-02-04 16:25:38 +01:00
Ferhat Mihoubi 1b5418a882 - For static model considers two different management cases for temporary terms: one for an evaluated model and another for a simulated model 2010-12-31 16:46:09 +01:00
Houtan Bastani 448553fe8e fixed bug: end _dynamic and _static and getPowerDeriv functions with "end" tags to comply with commit d8dbc68e841a93b40d2a5005bd69bdd1cbb1778a 2010-12-22 09:48:05 +01:00
Ferhat Mihoubi 7a6776197d - The function getPowerDeriv must end with an "end" instruction 2010-12-17 18:54:02 +01:00
Houtan Bastani 7a26fe2ebd extend domain of derivative of x^p to x=0 under certain conditions (see ticket 78) 2010-12-13 17:03:57 +01:00
Ferhat Mihoubi 751c0da2a1 - external functions are compatible with block decomposition and/or bytecode 2010-12-10 12:06:50 +01:00
Ferhat Mihoubi cf3967d19d - Correction of a bug in the Jacobian Matrix computation for a non block-decomposed model using bytecode 2010-11-25 16:11:22 +01:00
Ferhat Mihoubi c89682670d - The Jacobian matrix in the block decomposed model without bytecode option is now sparse 2010-10-22 16:20:28 +02:00
Ferhat Mihoubi f7f83d6973 - 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 810416ebe6 - Extends the algorithms compatible with bytecode to compute the steady-state (ticket #11). The new values for solve_algo are:
* 0: fsolve
   * 1: solve1
   * 2, 4: solve1 + block decomposition
   * 3: csolve
   * 5: LU decomposition with UMFPack (method handling sparse matrix in Matlab)
   * 6: GMRES
   * 7: BiCGStab
   * 8: bytecode own solver (use Gaussian elimination + sparse matrix)

- Bytecode can now evaluate a specific block instead of the overall blocks (new bytecode's option 'Block = block_number')
2010-10-11 19:21:32 +02:00
Ferhat Mihoubi 5490f1bb09 RESID command is compatible now with block option and without bytecode option (closes ticket #45) 2010-09-17 16:54:43 +02:00
Ferhat Mihoubi f68e4fd455 - compute the jacobian matrix for exogenous, det_exogenous and previous blocks endogenous
- preprocessor provides informations about the dynamic structure of each block
- extends the algorithms available with bytecode: stack_solve_algo = 1, 2, 3 and 4 is compatible the bytecode. Speed and memory requirement are improved with stack_solve_algo = 1 or 4 for large scale models.
- bytecode can be used to evaluate a model
2010-09-17 12:16:47 +02:00
Sébastien Villemot 2c10d03368 Preprocessor: rename "NodeID" in "expr_t" 2010-09-17 12:13:26 +02:00
Sébastien Villemot c8fdd5d9d1 Preprocessor: uniformize typedef names (with a "_t" suffix) 2010-09-16 19:00:48 +02:00
Sébastien Villemot c3c8fa5cca Preprocessor: clean prototypes of ModelTree methods (removed arguments
redundant with data members, added const keywords, use passing-by-reference)
2010-09-16 17:51:50 +02:00
Sébastien Villemot ae3e741cb8 Preprocessor:
- remove useless output type oMatlabDynamicModelSparseLocalTemporaryTerms
(indistinguishable from oMatlabDynamicModelSparseLocal)
- fix bug in output type of sparse static model
2010-09-16 16:57:35 +02:00
Sébastien Villemot 6f9e0ca1e9 Preprocessor: replace non-standard operators 'and'/'or' by '&&'/'||' 2010-04-28 16:03:32 +02:00
Sébastien Villemot 5546658b4d Preprocessor: with 'steady_state_model' command, write auxiliary equations in the steady state file 2010-04-27 17:04:52 +02:00
Houtan Bastani 9abc7563c1 Add support for external functions 2010-02-23 18:15:18 +01:00
ferhat bce6509773 Adds location indications in error message of "bytecode" + minor correction (string passed as &string).
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3374 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-22 16:42:08 +00:00
ferhat f13b95cb87 "bytecode" option can be used without "block" option
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3373 ac1d8469-bf42-47a9-8791-bf33cf982152
2010-01-22 10:03:29 +00:00
sebastien 22000da5ea 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 3aa8876538 Beautified preprocessor code (uncrustify + emacs + manual adjustments, in particular with templates in MacroValue)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3249 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:13:23 +00:00
sebastien 160ec5d7ca preprocessor + bytecode DLL: various enhancements to block and bytecode options (changes by Ferhat)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3244 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 13:21:31 +00:00