Commit Graph

111 Commits (d0d9fde6afae17df40fdc4f23a5716dabfdf7c04)

Author SHA1 Message Date
Houtan Bastani d0d9fde6af bug fix: allow use of external functions with model local variables 2011-04-12 16:42:56 +02:00
Houtan Bastani be4c5c92ef ramsey_policy: allow discount factor to be an expression 2011-03-29 18:18:32 +02:00
Houtan Bastani be236c6402 code cleanup 2011-03-28 11:34:42 +02:00
Houtan Bastani d2a6f0f42c Implement explicit writing of first order conditions of Ramsey problem (ticket #5) 2011-03-24 17:17:15 +01:00
Ferhat Mihoubi 316b935cc0 Correct a bug when the model contains deterministic exogenous variables and bytecode option is used.
Note that stochastic simulations do not work for the moment with block option.
2011-03-18 01:09:20 +01:00
Michel Juillard 8c9b6e44af put *_params_derivs.m and identification code in conformity with additional steady state argument in *_dynamics.m 2011-03-14 11:40:40 +01:00
Michel Juillard cb1e8a55b1 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
Sébastien Villemot cb64ade507 Preprocessor: added model local variable definitions to parameter derivative file 2011-03-07 11:59:12 +01:00
Sébastien Villemot 72fca072f0 Preprocessor: fix bug in parameter derivatives file 2011-02-21 12:43:11 +01:00
Sébastien Villemot d264b7b2e3 Reindentation of the preprocessor 2011-02-04 16:25:38 +01:00
Ferhat Mihoubi 483b430e54 The derivatives with respect to endogenous variables of the previous blocks are corrected for a block-decomposed model without bytecode option 2011-02-03 17:29:26 +01:00
Ferhat Mihoubi d999d15ff6 - Adds a "lead_lag_incidence" matrix in each block for the endogenous variables belonging to previous blocks (other_endo) 2011-01-31 17:47:22 +01:00
Sébastien Villemot 30a2b2b650 Fix derivatives of STEADY_STATE operator w.r.t. parameters (ticket #128) 2011-01-13 18:08:26 +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
Sébastien Villemot 2984f61fe0 Bugfix at order 3 (hopefully was not affecting final results, thanks to Pablo Winant for spotting this):
- in the 3rd derivatives matrix, among symmetric elements, the first one had
the right values but the following ones were set to zero
- moreover, the k-order DLL was trying to add all the symmetric elements in the
folded tensor, instead of only keeping one value among all the symmetric ones
- hopefully, Ondra's tensor library was (silently) refusing to add symmetric
elements after the first (and right) value had been added
- so the final result was correct
2010-12-06 17:00:46 +01:00
Ferhat Mihoubi 3f6ddd1c3f - Adds the derivatives with respect to deterministic exogenous variables
and corrects the computation of the number of column in the jacobian matrices in a block decomposed model without bytecode
- Identical corrections for models using bytecode without block decomposition
2010-11-25 16:11:12 +01:00
Sébastien Villemot 0269c5766c Preprocessor: max lead/lags in the model are no longer affected by lead/lags on parameters (closes #153) 2010-11-18 11:21:20 +01:00
Ferhat Mihoubi b781c44e5a Check command is now compatible with block and bytecode options 2010-10-27 15:34:48 +02:00
Ferhat Mihoubi ab311cc0fd - Store the incidence matrix containing reordered equations and variable in block_structure 2010-10-27 15:30:01 +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
Houtan Bastani a7fc3361ac trend_var, growth_factor, deflator: stationarize a nonstationary model and test 2010-10-18 16:07:42 +02:00
Sébastien Villemot 3218d3c72f Preprocessor: don't create auxiliary variables for expressions appearing only
in unused model local variables
2010-10-11 12:58:38 +02:00
Sébastien Villemot 63d0fb3f04 Preprocessor: implement STEADY_STATE operator with "use_dll" and "block"
options (closes #98)
2010-09-20 17:04:38 +02:00
Ferhat Mihoubi f026137fa9 - 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
Ferhat Mihoubi 3e1a2ad450 - Substitutes lead for exogenous and endogenous variables in the deterministic case: direct substitution of the variables even in non-linear expressions 2010-09-17 12:17:09 +02:00
Ferhat Mihoubi 2da9d5adda Bug correction in the deterministic simulation: to solve a purely backward or forward looking block requires contemporaneous derivatives only. 2010-09-17 12:17:00 +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 e44c41334e Preprocessor: in the parameter derivatives file, add the global "oo_" when the STEADY_STATE operator is used 2010-08-12 18:16:24 +02:00
Michel Juillard 6c0a0969f6 make sure that 2nd and 3rd order derivatives that haven't been computed are not taken to be zero. 2010-07-17 10:14:22 +02:00
Sébastien Villemot 2356ef7460 Preprocessor: cosmetic changes related to 'size_t' 2010-06-18 15:48:46 +02:00
Sébastien Villemot 1dde6f2ee5 Preprocessor: use a sparse representation for the 2nd derivatives of residual and jacobian w.r.t. parameters and the derivative of hessian w.r.t. parameters 2010-06-07 18:46:57 +02:00
Sébastien Villemot 09bb06b516 Preprocessor: only compute on demand the 2nd derivatives of residual and jacobian w.r.t. parameters and the derivative of hessian w.r.t. parameters 2010-06-07 16:42:27 +02:00
Sébastien Villemot a47a639330 Preprocessor: changing return order of parameter derivatives to match Marco's code 2010-06-04 09:57:56 +03:00
Michel Juillard 188ec4932d preprocessor: corrected missing initialization of v3 in <fname>_dynamic.c 2010-05-21 11:38:23 +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 2cf5c3808d Preprocessor: add a check to DynamicModel::toStatic() 2010-04-23 18:32:30 +02:00
Sébastien Villemot d8dcfa131e Preprocessor: changed the prototype of DataTree::AddLocalVariable() 2010-04-23 18:32:14 +02:00
Houtan Bastani 042a3ced7c second derivatives of model equations w.r.t. parameters. 2010-03-16 10:15:19 +01:00
Houtan Bastani 49e4bc89ae small fix to implementation of second derivatives of jacobian w.r.t. parameters 2010-03-15 17:23:55 +01:00
Houtan Bastani c7093a8385 second derivatives of jacobian w.r.t. parameters 2010-03-15 16:02:07 +01:00
Houtan Bastani 673bf79a5e derivative of hessian w.r.t. params. 2010-03-11 16:51:07 +01:00
Houtan Bastani 9abc7563c1 Add support for external functions 2010-02-23 18:15:18 +01:00
Sébastien Villemot e70d899c66 Preprocessor:
* in DataTree, new functions for testing if some opcode (unary, binary or trinary) is used somewhere in the tree
* removed DataTree::containsSteadyState(), rather use a call to the new utility function
2010-02-23 16:45:56 +01:00