Sébastien Villemot
215283005e
No longer store symbol type in VariableNode
...
This facilitates switching variable types on the fly. In particular, this
allows removing the hack in DynamicModel::updateAfterVariableChange() that way
basically recreating all the nodes after the type change.
2018-10-10 12:34:05 +02:00
Sébastien Villemot
c47b6e6e4c
Fix bug with notmpterms option
...
Commit c6cb9aa1b8
was not the right fix.
2018-10-05 17:14:27 +02:00
Sébastien Villemot
9043efab32
Replace "class" by "typename" in template declarations
2018-10-04 18:08:19 +02:00
Sébastien Villemot
6d26dc2349
Remove implicitly-defined copy/move constructors/assignments in several classes
2018-10-04 18:08:17 +02:00
Sébastien Villemot
7bb5382428
Always use brace-initializer in constructors
...
The syntax makes clearer the distinction between a function call and an
initialization. Also, it prevents bugs due to implicit type conversions.
2018-10-04 17:19:18 +02:00
Sébastien Villemot
a4aefb4c65
Mark all constructors taking a single argument as "explicit"
...
For a rationale, see http://www.sjbrown.co.uk/2004/05/01/always-use-explicit/
2018-10-04 17:19:18 +02:00
Stéphane Adjemian (Charybdis)
ec872e63fd
Cosmetic change.
2018-10-04 16:54:57 +02:00
Sébastien Villemot
38f13eb0ad
Remove nonsensical check on MS Visual C++ version
...
The check is done at the time the preprocessor is compiled, but it ought to be
done at the time when the C source file generated by the preprocessor is compiled…
Anyways, it is probably irrelevant now, since MSVC has supported
acosh/asinh/atanh for a long time now.
2018-10-02 18:23:39 +02:00
Sébastien Villemot
48940ff899
Convert SvarRestrictionType into a class enum
2018-10-02 18:15:31 +02:00
Sébastien Villemot
3f26933f44
Replace ExternalFunctionSetOrNot enum by integer constants
...
This was not conceptually an enum, but rather a collection of unrelated
constants:
- two constants for use as placeholder for symbol IDs at different places
- one constant for the default number of arguments
2018-10-02 18:10:12 +02:00
Sébastien Villemot
5e6b8f0a6b
No longer test for __MINGW32__ macro, testing for _WIN32 is enough
...
Closes : Dynare/dynare#1315
2018-10-02 16:50:07 +02:00
Sébastien Villemot
15d026e54e
C output: split generated function into several smaller subfunctions
...
This mimicks the structure of M-functions (though the logic for filling the
temporary terms vector is a bit different).
This change implied a modification in the way we compute the checksum in case
of block decomposition (the temporary terms for the C output are not correctly
computed in that case).
2018-10-01 16:04:01 +02:00
Sébastien Villemot
42e31ad6e1
Ensure that linear_decomposition is false by default
2018-10-01 10:52:19 +02:00
Sébastien Villemot
1f987706a9
Remove spurious executable permission
2018-09-28 15:25:09 +02:00
Sébastien Villemot
5e2c2fa7b6
Merge branch 'remots/mytarget/non_linear_decomposition' into 'master'
...
Adds a new model option "linear_decomposition" that creates a block composed of…
See merge request Dynare/preprocessor!1
2018-09-28 12:57:26 +00:00
Ferhat Mihoubi
139e3efa82
Adds a new model option "linear_decomposition" that creates a block composed of the non-linear equations o the model
2018-09-28 14:54:52 +02:00
Michel Juillard
680fb72d0d
allowing for different number of periods in conditional_forecast_path
2018-09-27 15:19:30 +02:00
Houtan Bastani
63a334cfd3
fix typo
2018-09-27 10:47:13 +02:00
Sébastien Villemot
c6cb9aa1b8
Fix bug in option notmpterms with model local variables
...
Since model local variables are now treated as temporary terms, they must be
marked as such even when option notmpterms is present.
2018-09-25 15:57:56 +02:00
Houtan Bastani
fbeae9619a
aesthetic fix
2018-09-25 15:48:05 +02:00
Houtan Bastani
7282b7bf32
fix bug in filling of var AR matrix
2018-09-25 15:47:52 +02:00
Houtan Bastani
6c7d7f5d44
don’t create file if trend_component_model/var_model statement not present
2018-09-25 12:18:52 +02:00
Sébastien Villemot
913bc2f8c2
Macro-processor, comprehension: fix error message, add comments
2018-09-24 18:17:28 +02:00
Sébastien Villemot
3e5c8dd80d
Macro-processor: implement comprehensions
...
Due to a limitation of the current implementation, this breaks syntaxes like
[ (i,j) ] (but not [ (2,j) ]; the problem only occurs when an array is
constructed by specifying as first element a tuple whose first element is a
variable name). Solving this problem requires an overhaul of the
macro-processor, with construction of ASTs at parsing time, and evaluation
later on (instead of doing on-the-fly evaluation).
Ref #5
2018-09-24 18:00:59 +02:00
Sébastien Villemot
7a5cc7e54b
Minor fixes to comments
2018-09-18 19:12:25 +02:00
Houtan Bastani
c9f5cef99b
write AST in JSON
2018-09-18 17:48:04 +02:00
Houtan Bastani
8ec06dddc4
fix typo and remove unnecessary braces
2018-09-18 17:31:51 +02:00
Houtan Bastani
9f9c8fdfbf
fix typo
2018-09-18 14:50:54 +02:00
Houtan Bastani
85dbb649b7
move trend_component_table and var_model_table to DynamicModel as they are only used there
2018-09-14 17:04:06 +02:00
Houtan Bastani
eb74d48393
trend_component_model: replace `trends` option with `targets`
2018-09-13 12:21:23 +02:00
Houtan Bastani
dfb0629c25
fix typo
2018-09-12 18:21:34 +02:00
Houtan Bastani
dc9ecbb49a
fix bug in columns of EC matrix
2018-09-12 17:56:30 +02:00
Houtan Bastani
0376f7f173
fix bugs in creation of AR/EC matrices
2018-09-12 11:57:14 +02:00
Houtan Bastani
aa120abd02
simplify code
2018-09-12 11:57:14 +02:00
Sébastien Villemot
a95cf8118c
CI: put the build job in the build stage
2018-09-11 21:00:54 +02:00
Sébastien Villemot
a8cd7a3346
Parallelize CI build
2018-09-11 19:09:53 +02:00
Sébastien Villemot
26c3926a2b
Basic CI
2018-09-11 19:03:07 +02:00
Houtan Bastani
8acee8fd54
fix AR and EC matrices for double diff
2018-09-11 16:56:05 +02:00
Houtan Bastani
f71c861d5e
output EC matrix in file for trend component models
2018-09-10 17:44:04 +02:00
Houtan Bastani
46709ada3f
output AR matrix in file for trend component models
2018-09-10 14:51:33 +02:00
Stéphane Adjemian(Charybdis)
13a0115bfb
Removed travis-ci configuration file.
2018-09-10 14:49:19 +02:00
Sébastien Villemot
c899314634
Update URLs for the move to GitLab
2018-09-10 12:07:08 +02:00
Houtan Bastani
f1bd4c839a
ignore txt files
2018-09-07 10:14:45 +02:00
Houtan Bastani
f5e5dea1be
support hard-coded parameters and parameter expressions in AR matrix
2018-09-07 10:14:18 +02:00
Houtan Bastani
acc197f539
output AR matrix in file
2018-09-06 18:00:05 +02:00
Sébastien Villemot
e19a14869e
Convert ExprNodeOutputType into a class enum
...
Incidentally, replace the IS_* macros by inline functions.
2018-09-05 18:28:32 +02:00
Sébastien Villemot
c6d4cb88c3
ExprNode and its subclasses are no longer friends of DataTree
...
This ensures a better isolation between the container and the containees.
2018-09-05 18:28:32 +02:00
Sébastien Villemot
004d909621
Use smart pointers for storage of ExprNode in DataTree class
...
- BTW, store them in a std::vector rather than std::list
- incidentally, fix issue in VariableNode::removeTrendLeadLag where expression
sharing was possibly violated when creating a new VariableNode
2018-09-05 18:28:32 +02:00
Sébastien Villemot
5d2e1cf7b9
Use smart pointers for storage of Statement in ModFile class
2018-09-05 18:28:27 +02:00
Houtan Bastani
9f0c30740e
introduce epilogue block
2018-09-05 12:31:49 +02:00