Sébastien Villemot
e74bac52e6
Merge branch 'analytic_standard_errors' into 'master'
...
GMM: introduce option analytic_standard_errors
See merge request Dynare/preprocessor!28
2020-12-14 16:09:21 +00:00
Johannes Pfeifer
78f6d48601
GMM: introduce option analytic_standard_errors
2020-12-12 09:36:40 +01:00
Sébastien Villemot
7baeda8b8d
Occbin: add equation number in M_.occbin.constraint structure
...
Ref. #569
2020-12-10 15:57:47 +01:00
Sébastien Villemot
f67e9c044b
JSON output: fix “variable_mapping” for Ramsey models
...
Ref. dynare#1755
2020-12-09 17:32:29 +01:00
Sébastien Villemot
bf1da3c6fb
JSON output: fix logic in “variable_mapping” that could lead to invalid JSON formatting
...
Ref. dynare#1755
2020-12-09 16:47:55 +01:00
Sébastien Villemot
ec779235ea
Macro-processor: move environment out of node classes
...
This completes the separation of parse trees from their evaluation.
Closes : #32
2020-12-07 17:29:05 +01:00
Sébastien Villemot
638b4c7ac5
Ensure that all statements produce an output in JSON mode
2020-11-26 16:25:22 +01:00
Sébastien Villemot
a99ca9f450
Remove obsolete “var_estimation” statement
2020-11-26 16:13:52 +01:00
Sébastien Villemot
1b40327639
Remove obsolete “restrictions” block
2020-11-26 16:13:49 +01:00
Sébastien Villemot
c697a63119
Fix typo
2020-11-25 18:08:49 +01:00
Sébastien Villemot
9292b0692e
Rename DetCondForecast to DetCondForecastStatement, for naming consistency
2020-11-25 17:40:00 +01:00
Sébastien Villemot
4b8290faa5
Do not crash when unknown symbol is passed to “irf_shocks” option
...
Closes : #57
2020-11-18 17:47:37 +01:00
Sébastien Villemot
b1df9ecc38
Parallel config file: switch back to DynarePath field (instead of ProgramPath)
...
This is a partial revert of f022f666b7
Ref. dynare#1748
2020-11-13 15:35:01 +01:00
Sébastien Villemot
cfb41d291c
Substitute out model-local variables early in the model transform pass
...
Incidentally, this makes it possible to use model-local variables with either
the “block” or “bytecode” option. (Ref: dynare#1243)
2020-11-10 18:07:57 +01:00
Sébastien Villemot
1e419a48e4
Remove unused function
2020-11-10 18:02:06 +01:00
Sébastien Villemot
9bca65c7e5
Deterministic models: replace exogenous with lead/lags by auxiliary variables
...
This brings those models in line with stochastic models.
However note that transformation is still not exactly the same on stochastic
and deterministic models, because there is no need to take into account the
Jensen inequality on the latter. In deterministic models, there is a one-to-one
mapping between exogenous with lead/lags and auxiliaries, while in stochastic
models, an auxiliary endo may correspond to a more complex nonlinear expression.
2020-11-09 16:28:32 +01:00
Sébastien Villemot
5d564eed07
Fix the interpretation of @#elseif clauses within an @#ifdef or @#ifndef
2020-11-02 12:47:33 +01:00
Sébastien Villemot
df8d8ef116
Fix logic for @#ifndef
...
Ref. dynare#1747
2020-11-02 12:27:27 +01:00
Stéphane Adjemian (Charybdis)
abf5a6553b
Removed useless subfield (only julia output).
...
TODO: Check that we can do the same in the matlab version…
2020-10-21 18:16:07 +02:00
Stéphane Adjemian (Charybdis)
b8f7b5846b
Fixed flags for temporaries (julia output).
2020-10-21 16:37:13 +02:00
Sébastien Villemot
56581b1dd4
PAC model: make detection of non-optimizing part more robust
...
Introduce a new method for decomposing a product of factors, so that we can
identify expressions of the form (1-optim_share)*A*B.
Also enforce that the optim_share parameter be in a factor of the form
1-optim_share (previously it would accept any expression containing the
parameter).
Note that this fix does not yet allow to actually write non-optimizing parts of
the form (1-optim_share)*A*B, since at a later point the preprocessor imposes
that this part be a linear combination of variables (but in the future we could
think of expanding the A*B product into a linear combination if, for example, A
is a paramater or a constant and B is a linear combination).
Closes : #50
2020-10-19 18:32:30 +02:00
Sébastien Villemot
db3ef925a7
Fix handling of diffLead in SymbolTable::getOrigLeadLagForDiffAuxVar()
2020-10-16 16:31:55 +02:00
Sébastien Villemot
d2cbe2a19e
PAC model: fixes to M_.pac.MODEL.ar (information about autoregressive part)
...
– Fix order of items in this structure. Previously, items were ordered
according to the declaration order of parameters. Now, items are order
according to lag order (first lag appears first)
– Gracefully handle the case where there is no autoregressive part
(Closes : #52 )
2020-10-16 16:31:51 +02:00
Sébastien Villemot
740ea833f6
Block decomposition: bugfix for solve one boundary blocks with mfs>0
...
Ref. dynare#1726
2020-10-07 18:55:19 +02:00
Sébastien Villemot
e736b9234f
Minor simplification
2020-10-07 17:15:53 +02:00
Sébastien Villemot
4560639eb4
Block decomposition: fix evaluation of recursive variables in solved blocks
...
Ref. dynare#1726
2020-10-06 18:30:34 +02:00
Sébastien Villemot
5979885714
Block decomposition, chain rule derivation: code improvement
2020-10-02 18:31:55 +02:00
Sébastien Villemot
d347a92f14
Drop ExprNode::containsExogenous()
...
Replace it by calls to ExprNode::collectVariables() at the single place where
it was used.
2020-09-29 18:41:31 +02:00
Sébastien Villemot
063207e71f
ExprNode::collectEndogenous() is not a virtual method
2020-09-29 18:41:31 +02:00
Sébastien Villemot
2424b7358c
Remove unused ExprNode::collectExogenous()
2020-09-29 18:41:31 +02:00
Sébastien Villemot
b0bd031a9f
Remove unused ExprNode::containsEndogenous()
2020-09-29 18:41:31 +02:00
Sébastien Villemot
7f05489639
Simplify ExprNode::findConstantEquations()
2020-09-29 18:41:31 +02:00
Sébastien Villemot
a377fc8398
Fix various potential bugs with model local variables
...
Many recursive function on ExprNodes were not correctly recursing into the
definition of model local variables.
2020-09-29 18:41:17 +02:00
Sébastien Villemot
e4687bb976
Ensure that negative constants are never marked as temporary terms
2020-09-23 17:28:53 +02:00
Sébastien Villemot
571ea3eb8a
SymbolTable: add some const qualifiers
2020-09-23 17:28:04 +02:00
Sébastien Villemot
8f31e443d6
SymbolTable::getTypeSpecificID() now throws an exception instead of returning -1 when symbol does not have a type-specific ID
...
This can potentially avoid some undetected bugs.
2020-09-23 17:09:36 +02:00
Houtan Bastani
7ba77751c3
simplify external function C output
2020-09-18 17:05:54 +02:00
Sébastien Villemot
98d01cbbb6
Provide a meaningful error message when 'use_dll' option is used without 'matlabroot'
2020-09-18 15:00:47 +02:00
Sébastien Villemot
7e1563fdbb
Allow 'use_dll' option to be specified on the command line
...
Ref. Enteprise/dynare#4
2020-09-18 15:00:00 +02:00
Stéphane Adjemian (Charybdis)
0f268ce70c
Fixed logic.
...
Value passed to steady_state_growth was not acknowledge.
2020-09-18 11:11:50 +02:00
Sébastien Villemot
feee0ffa12
PAC model: better error message when pac_expectation refers to a non-existent pac_model
...
Closes : #53
2020-09-10 14:24:20 +02:00
Sébastien Villemot
de65e74c8f
use_dll: add the “restrict” C99 keyword to all pointers to double in computation functions
...
This greatly facilitates the job of the compiler during the optimization pass,
since we promise that the various pointers do not overlap each other. It may
now be possible to reenable some of the optimization flags that were disabled
without sacrificing compilation time, but this needs more investigation.
For the gory details, see:
https://en.cppreference.com/w/c/language/restrict
https://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html
2020-09-03 18:09:06 +02:00
Sébastien Villemot
5a9d1c4d87
Merge branch 'MoM' into 'master'
...
Remove matched_moments_ as input of method_of_moments
See merge request Dynare/preprocessor!27
2020-09-01 13:13:26 +00:00
Sébastien Villemot
64ebb36290
macOS: use GCC 10 for building, since GCC 9 is no longer in Homebrew
2020-09-01 14:33:59 +02:00
Sébastien Villemot
c6ad212c8a
Merge branch 'typo' into 'master'
...
Fix typo
See merge request Dynare/preprocessor!26
2020-09-01 12:15:44 +00:00
Johannes Pfeifer
9d9a4bd4d1
Remove matched_moments_ as input of method_of_moments
...
Now a subfield of M_
2020-08-05 13:46:09 +02:00
Johannes Pfeifer
d714cac8e1
EquationTags.hh: fix typo
2020-08-04 16:21:50 +02:00
Sébastien Villemot
09054e11dc
Add new “matched_moments” block
...
Closes : #51
2020-07-28 18:30:24 +02:00
Sébastien Villemot
ecf6d67e1c
PAC/MCE model: fix timing of target in PAC expectation term
...
Also be more strict on the form of the target (must now be X(-1) or log(X(-1))
where X is *not* an auxiliary variable).
By the way, improve some comments in SymbolTable.
2020-07-24 18:26:16 +02:00
Sébastien Villemot
3b3589b958
PAC model: rewrite the algorithm for detecting the target, to make it more robust
...
Closes : #54
2020-07-23 17:19:16 +02:00