Commit Graph

62 Commits (8ac397daa2976c81cc2f81de2c3ab58cdef5ea36)

Author SHA1 Message Date
ferhat d884d8a397 New features:
- Implementation of the simulation of the block decomposed model using sparse matrix using MATLAB code: 
  New option in model : sparse
  Example:
  Model(SPARSE);
  ….
  End;
- Implementation of the simulation of the block decomposed model using sparse matrix for static model. 
- Krylov methods are implemented to solve the linear model J.y=b, with J the Jacobian matrix at each step of  the Newton Method. Two Krylov's solvers are considered : 
   + Generalized Minimum Residual Method (GMRES) 
   + BiConjugate Gradients Stabilized (BICGSTAB)
  To call them the SIMULATE command has to be completed with a new option : METHOD which could have three   different values : 
   + LU : (default value)  Sparse LU resolution
   + GMRES 
   + BICGSTAB
	 	Example:
 			simul(periods=100, method=lu);
                        or        simul(method=Gmres);
- Correction of various bugs in “simulate.dll”.
- Correction of simk.m
- Correction allowing a list of VALUES or PERIODS not necessarily separated by a comma. 

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1447 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-11-20 23:24:01 +00:00
ferhat d53caec4af New logical operators:
"==", "!=", "<", ">", "<=", ">="

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1421 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-10-08 22:52:57 +00:00
ferhat 5e8bf1ef51 Corrections for min, max and dummy functions in DynareBison.yy: hand_side involves hand_side arguments
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1420 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-10-05 22:11:47 +00:00
sebastien 2534f71ec6 v4 ModelTree.cc: reverted bug re-introduced in r1409 in dynamic C file
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1412 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-10-04 09:25:50 +00:00
ferhat abc824dbdf New model option: "NO_COMPILE" (simulation of the block decomposed model without compilation).
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1409 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-10-03 22:01:08 +00:00
sebastien 610d849121 v4 parser: fixed problems with DLL mode
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1384 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-09-13 17:50:32 +00:00
sebastien 446623f576 v4 parser: allow for empty model in some cases (actually for standalone BVAR estimation)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1370 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-07-16 16:47:09 +00:00
michel db89b91a5e v4 parser: NaN() is only available in recent Matlab version, changed to repmat(NaN,..,1);
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1335 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-07-02 12:48:38 +00:00
sebastien 6eec6211fe v4 parser: fixed several problems with USE_DLL option:
* in the .m file, corrected "if exist" and "mex" lines
* in the .c files, fixed problem with model local variables
* reverted Fehrat's change: power operator in C is pow(), not pow1()


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1301 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-06-06 09:58:45 +00:00
ferhat 34004449df Error messages during compilation corrected
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1300 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-06-06 08:35:22 +00:00
ferhat 77d6a24cf7 Adding Markowitz criteria in the linear solver (new option in simul: "Markowitz=val" - with val a strictly positive real)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1298 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-06-03 22:35:30 +00:00
ferhat 9af2e461c3 New release of deterministic simulation.
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1292 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-06-01 11:43:49 +00:00
sebastien 3f6a51bfd4 v4 parser: fixed problem with C code compilation (+ beautification of the code)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1254 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-04-30 14:49:08 +00:00
sebastien 9f33835d6a v4 parser:
* implemented handling of mod file local variables (eModFileLocalVariable)
* renamed "local parameters" to model local variables (eModelLocalVariables)


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1253 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-04-30 12:09:05 +00:00
michel 4271844ffe v4 parser: M_.params initialized with Nan rather than zeros
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1243 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-04-14 16:49:41 +00:00
sebastien 573227a044 v4 parser:
* removed Expression class; the "ExprNode" class is therefore now used everywhere
* removed interprete class, and replaced it by a method in ExprNode and an global evaluation context in ModFile
* fixed breakage of SparseDLL / Block decomposition code introduced in previous revision


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1204 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-03-09 17:27:46 +00:00
sebastien 30c70a35e3 v4 parser:
* reorganised code in ModelTree so that block decomposition and SparseDLL code is clearly separated
* replaced DataTree::offset by ModelTree::mode, using an enumeration of the three modes which is more explicit
* reorganised ExprNode::writeOutput method by using a sixfold enumeration type (ExprNodeOutputType) corresponding to the 6 different contexts in which an expression can be written


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1203 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-03-06 17:14:35 +00:00
sebastien 68c57ae019 v4 parser: no temporary terms in local parameters declaration
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1200 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-02-28 10:21:20 +00:00
michel aa6e833462 v4 parser: bug correction in ModelTree.cc
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1198 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-02-24 15:21:08 +00:00
michel f4d669f3e3 v4 parser: write local parameters before temporary terms in ModelTree
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1196 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-02-24 15:04:03 +00:00
sebastien feec20209d v4 parser: merged Fehrat's changes
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1190 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-02-21 23:28:16 +00:00
sebastien 934f5f21a7 v4 parser:
* added third order derivatives in dynamic file (triggered by order=3 option of stoch_simul/olr/osr/ramsey_policy)
* don't output hessian in dynamic file if order=1 is specified


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1180 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-02-08 11:56:46 +00:00
sebastien 0c16f52806 v4 parser:
* reshaped DataTree/ModelTree using a more object-oriented approach
* improved expression sharing algorithm (temporary terms in output files), resulting in smaller output files for big models
* optimized performance (both in computing time and memory consumption)
* bugfix: the expressions stored in local parameters of models (pound expressions) are now derived
* bugfix: cosh(0) = 1
* removed some useless parentheses in output


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1148 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-01-09 19:00:05 +00:00
michel f67d00cd34 v4 parser: corrected Hessian when declared exogenous variables aren't all present in the model;
add VariableTable::get_dyn_var_nbr()

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1141 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-01-06 11:29:32 +00:00
michel 3773ad9cc3 v4 parser: used initializer to initialize ModelTree::eq_nbr
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1138 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-01-05 19:56:39 +00:00
michel 7793bc700f v4 parser: added initialization of eq_nbr=0 in ModelTree::ModelTree()
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1135 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-01-04 22:25:39 +00:00
sebastien e3bb760692 v4 parser: made OperatorTable static
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1132 ac1d8469-bf42-47a9-8791-bf33cf982152
2007-01-02 15:43:18 +00:00
sebastien 5bbd779bab v4 parser:
* added planner_objective statement, which triggers the creation of filename_objective_static.m
* added computing pass
* added the possibility of writing the hessian in static output file



git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1126 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-18 23:28:52 +00:00
sebastien 0f9ed33f7d v4 parser: removed ModelParameters class, and moved its components to the relevant places
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1125 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-18 11:29:10 +00:00
sebastien c445ce3a98 v4 parser:
* added a computing pass
* ModelTree:
  - separated checking pass, computing pass, and output writing
  - reorganized static and dynamic model file output code


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1121 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-15 17:31:31 +00:00
sebastien 73d3e17540 v4 parser:
* added an embryonic checking pass after parsing
* modified the decision of which derivatives to compute:
  - if a simul statement is present, compute the jacobian vs endogenous variables only, and no hessian
  - if a stoch_simul/estimation/olr/osr statement is present, compute the jacobian vs all variables, plus the hessian
  - if the two previous conditions are simultaneously fulfilled, abort with an error
  - if none of these two conditions are fulfilled, abort with an error (nothing to compute)
* fixed a minor bug with the size of the jacobian matrix when computing it only vs endogenous variables


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1120 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-15 11:44:58 +00:00
sebastien be18e12a43 v4 parser VariableTable:
* cleaned and simplified the code
* incorporated VariableTable as a private member of DataTree/ModelTree


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1118 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-14 22:19:39 +00:00
sebastien 4f9e8a6e27 v4 parser:
* clearly separated the parsing process from the output writing, using an abstract intermediary representation of the mod file
* created the Statement class, and its derivatives, for that purpose
* fixed bug with "corr" statements in "shocks" blocks (variables indexes given to matlab were incorrect)
* fixed bug with "optim" option of "estimation" (this option was not passed to matlab)
* fixed bug with "dynatype" and "dynasave" (variable list was not passed correctly to matlab)
* fixed bug with "calib" and "calib_var" (they were unusable because of flex misspecification)
* fixed segmentation fault with "estimated_params_bound" and "estimation_params_init"


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1117 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-12-12 11:54:30 +00:00
sebastien 09c165f386 v4 parser: fixed bug related to non-associativity of POWER operator
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1113 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-28 15:14:14 +00:00
sebastien d5ac5b1fbd v4 parser: created ModFile class, which is the abstract representation of a mod file; removed all static variables
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1110 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-28 11:56:02 +00:00
sebastien 6d18a704b0 v4 parser: removed ylmm, replaced by Bison C++ support
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1084 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-17 17:48:11 +00:00
sebastien f551a446b5 v4 parser: removed unused eLoopIndex type
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1074 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-15 11:40:27 +00:00
michel 0d6355b95b v4 parser: allowing for unused exogenous variables
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1067 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-12 17:35:53 +00:00
sebastien f5f295ba7b v4 parser: new algorithm for detection of null derivatives
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1059 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-10 23:04:22 +00:00
sebastien c0ae3a0d57 v4 parser ModelTree.cc: minor indentation changes to match Ferhat's
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1033 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-05 00:08:56 +00:00
sebastien 41a18b1da6 v4 parser: reindentation of all C++ code, and conversion to UNIX newline convention
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1031 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-04 23:31:17 +00:00
sebastien c50f757b5d v4 parser: renamed .h files to .hh
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1029 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-04 22:41:30 +00:00
sebastien 6d249ebf09 v4 parser DataTree/ModelTree: removed unused stuff
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1013 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-01 22:48:26 +00:00
sebastien f0c98e9777 v4 parser: fixed output of Matlab/Scilab comments via abstract interface
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1012 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-11-01 15:13:53 +00:00
michel 7f78138f71 v4: corrections for deterministic simulations
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1002 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-29 16:09:25 +00:00
sebastien d0a7a76fa4 v4 parser: removed unused functions or enumeration types, tweaked some documentation strings
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@989 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-18 10:52:41 +00:00
sebastien 5a7f50f48c v4 parser ModelTree/DataTree, ModelTypes.h: incorporated some code as object methods, cleaned up some documentation
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@984 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-13 15:57:25 +00:00
sebastien 8cb9a7a1e2 v4 parser ModelTree.cc: removed redundant matlab code output
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@981 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-13 11:23:16 +00:00
michel cf650ea461 v4 parser: correcting for 64 bits
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@949 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-07 09:50:42 +00:00
michel 68b552aef2 v4 parser.src: undoing rev. 944
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@945 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-10-04 18:32:33 +00:00