Commit Graph

254 Commits (9e73eec31bbcb6d339fa96d39d7dc4979dffe204)

Author SHA1 Message Date
sebastien a8c2baa936 Preprocessor: changes to code for chain rule derivation
* fixed a bug in the handling of VariableNode: we now make a copy of the recursive_variables map, instead of modifying that of the caller
* factorized code shared with standard derivation
* various minor cleanups


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2811 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-07-06 09:34:21 +00:00
sebastien 8a09ce6769 Changes to the write_latex_{static,dynamic}_model:
* fixed bug in the dynamic version (was putting time subscripts to parameters)
* changed symbol for multiplication to a space (was a dot)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2802 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-07-02 14:51:14 +00:00
sebastien aedc60cbc1 trunk preprocessor: added new option "block_mfs" to "steady"
* normalizes the static model
* computes its block decomposition, using topological order
* for each block, computes minimum feedback set of variables
* at this stage, only produces text output (no change in the computation of steady state)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2798 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-30 15:07:09 +00:00
sebastien 762c5140fe trunk preprocessor: various minor changes in MinimumFeedbackSet.{cc,hh}
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2797 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-30 14:43:59 +00:00
sebastien 0e665123e7 trunk preprocessor: M_.NNZDerivatives is now a column vector instead of a matrix
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2794 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-29 10:52:57 +00:00
sebastien 3041db17c6 trunk preprocessor: fixed bug with sparse Hessian and USE_DLL
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2793 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-29 09:27:09 +00:00
sebastien e749a3f979 trunk preprocessor: output the number of non-zero derivatives in main M-file
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2792 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-26 13:57:07 +00:00
sebastien 421b8d4f65 trunk preprocessor:
* for 2nd and 3rd derivatives of static and dynamic model, create the sparse matrices in a more efficient way (thanks to Pablo Winant for suggesting this and providing a patch)
* this breaks USE_DLL option at order 2
* fixed bug when hessian or 3rd deriv. matrix was all zero: the matrix was not constructed at all, leading to crashes in Matlab code


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2787 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-25 09:56:41 +00:00
sebastien b9d42ca614 trunk preprocessor: fixed logical and operator (thanks to Pablo Winant for pointing this out)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2785 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-25 07:35:08 +00:00
sebastien a8dec6adf9 trunk preprocessor: fixed bug when loading non-existent steady-state file
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2753 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-10 14:45:41 +00:00
sebastien 5886d3f010 trunk: build system updates
* top-level Makefile now generated
* automatic rules for regenerating configure and Makefiles
* enhanced source tarball creation (no longer destroys SVN subdirs)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2734 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-08 10:04:06 +00:00
sebastien ade56acc5e trunk: fixed preprocessor/Makefile.in
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2730 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 17:01:15 +00:00
ferhat ce9e38b781 - ModelBlocks.cc and ModelBlocks.hh erased
- Makefile.in corrected

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2729 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 16:04:23 +00:00
ferhat 4a54f3f538 - References to ModelNormalization erased
- Use derivatives w.r. to lead and lag endogenous in BlockTriangular.cc

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2728 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 15:30:32 +00:00
ferhat 983d7e030a Minor corrections (comments corrected in MinimumFeedBackSet.hh, makefile updated and ModelNormalization erased)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2727 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 15:04:09 +00:00
ferhat 3737c1aa2e - Correction of several bugs
- normalize an equation linear in its endogenous variable
- Chained rule derivatives (necessary to reduce a block to the feedback equations and variables)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2726 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-06-05 14:45:23 +00:00
sebastien 518c5fba93 trunk preprocessor BlockTriangular.cc: fixed misleading error message
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2689 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-25 09:46:40 +00:00
sebastien 7bcc55c266 trunk: fixed several copyright headers
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2681 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-19 08:57:07 +00:00
michel df8bd94394 4.1: corrected typo in file include name
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2680 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-18 05:02:20 +00:00
ferhat 78eb785d55 - Bugs correction in the new block decomposition (incorporating the feedback variables)
- First draft of DynamicModel.cc files with feedback variables. 
TODO : 
- reduction of the Jacobian matrix 
- symbolic normalization of equations
- application to the binary code evaluation (simulate.dll).

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2678 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-15 22:41:51 +00:00
ferhat 71f3364e05 Correction of few bugs in DynamicModel and BlockTriangular
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2674 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-13 22:16:51 +00:00
ferhat 916e950df9 New implementation of block decomposition & feedback variables using Boost for DynamicModel
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2671 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-12 23:03:40 +00:00
michel f01306a29b v4.1: added to preprocessor int NNZDerivatives[3] with number of non-zeros derivatives at order 1, 2, and 3
used it to initialize sparse g2 and g3 in Matlab <modfile>_dynamic.m


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2668 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-12 20:32:27 +00:00
sebastien 37f1057c4e trunk preprocessor:
* change the way we check for success of strtod() in NumericalConstants::AddConstant, because of Windows compatibility problem
* reverted r2660 changeset


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2661 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-07 08:50:59 +00:00
michel 811601334e 4.1: added -DNDEBUG in Makefile.in to avoid assert() problem under Windows. This is a quick fix that needs to be redone correctly
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2660 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-07 07:46:02 +00:00
sebastien a34aeeca5b trunk preprocessor:
* fixed bug with normcdf() when converting to static model
* fixed description of derivative computation


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2655 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-05-04 12:59:21 +00:00
sebastien 181bda4853 trunk preprocessor: added new statements "write_latex_dynamic_model" and "write_latex_static_model" which list model equations in LaTeX code
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2654 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-30 13:14:33 +00:00
sebastien 5437ff057a trunk preprocessor: cosmetic changes
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2653 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-30 13:05:21 +00:00
sebastien 3a9b262af7 trunk preprocessor:
* removed obsolete output type CDynamicSparseDLL
* probably fixed a bug in BlockTriangular::Reduce_Blocks_and_type_determination


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2652 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-29 14:16:14 +00:00
sebastien f19f36d9ac trunk preprocessor: enforce impossibility of mixing deterministic and stochastic statements, even in Sparse/SparseDLL modes
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2649 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-29 11:35:44 +00:00
sebastien d65978ff94 trunk preprocessor: in NumericalConstants
* fixed bug introduced in r2642 with NaN
* added a check to verify that the conversion to double succeeded (use strtod() instead of atof())
* store the double values in a vector


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2647 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-29 11:05:40 +00:00
sebastien 63c018a64f trunk preprocessor:
* finished normalization algorithm
* added routine for computing the equations which are already in normalized form


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2645 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 17:11:48 +00:00
sebastien d88a689876 trunk preprocessor: added method VariableNode::get_symb_id()
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2643 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 17:03:21 +00:00
sebastien 9179ebe4cf trunk preprocessor: use assert() function at several places
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2642 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 16:21:39 +00:00
sebastien b527623967 trunk preprocessor: small simplification of the Makefile
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2641 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 16:16:12 +00:00
sebastien 3f7d1bd6a3 trunk preprocessor: added two more symbolic simplication rules, particularly useful for the static model
* x-x=0
* x/x=1


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2640 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-28 16:04:29 +00:00
sebastien 261f08dce3 trunk StaticModel.cc: added model normalization (still need to force normalization of equations of the form a = f(b,c))
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2638 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-27 17:15:14 +00:00
michel 02d388d6b9 4.1: changed mex LDFLAGS option for compiling *_dynamics.c to make the Dynamic function public.
This most likely makes it unusable for compilers other than gcc


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2632 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-25 13:06:36 +00:00
sebastien 177da869b1 trunk:
* use autoconf to create the preprocessor Makefile
* the preprocessor now displays the version number
* the top-level Makefile triggers compilation of the preprocessor and of the documentation


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2621 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-23 15:52:00 +00:00
sebastien 331edd8d92 trunk preprocessor: cosmetic changes
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2614 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-20 15:54:19 +00:00
sebastien 34ee60fbe7 trunk preprocessor:
* added support for derivatives of Hessian w.r. to parameters
* added "identification" command which does nothing for the moment, except triggering those derivatives w.r. to params


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2613 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-20 13:58:15 +00:00
sebastien a0af8f7ea0 trunk preprocessor: restructuring the way we decide which derivatives to compute
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2610 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-20 10:48:54 +00:00
sebastien d99229ca24 trunk preprocessor:
* fixed bug with planner_objective
* fixed another bug due to unitialized max_{lead,lags} values


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2604 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-18 18:07:28 +00:00
sebastien d2b347eb3a trunk: reverted r2572 changeset
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2601 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-18 14:07:57 +00:00
sebastien 1d0d05cee1 trunk preprocessor: fixed bug with normcdf derivative (introduced in r2596)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2598 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-17 21:22:44 +00:00
sebastien 90e8fbda8b trunk preprocessor: restructuration of the code before adding derivatives w.r. to parameters (in particular, removed VariableTable, and replaced it by a system of derivation IDs)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2597 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-17 16:26:23 +00:00
sebastien 51378821aa trunk preprocessor:
* enforce lag=0 for DataTree and StaticModel
* various minor and cosmetic changes


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2596 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-16 10:33:30 +00:00
sebastien 7afeae2fca trunk preprocessor: some cleanups related to sparse mode (removed SimulSparseStatement class and incorporated it into SimulStatement, determine mode at preprocessing time instead of runtime in StochSimulStatement)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2595 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-14 15:02:51 +00:00
sebastien a2da8397f8 trunk preprocessor: added missing headers for recent versions of GCC
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2594 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-14 14:47:57 +00:00
sebastien 3e6faafbec trunk preprocessor: cosmetic change for consistency in bison file
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2593 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-14 14:43:54 +00:00