Sébastien Villemot
f9ab44da56
JSON output: do not append two underscores after model local variable names in their definition
...
This is inconsistent with the way they are printed in equations (without
underscores).
The practice of appending underscores only makes sense in a MATLAB workspace context.
2020-06-05 16:10:37 +02:00
Sébastien Villemot
931935a942
Bug fix: allow external functions in model local variables
2020-06-05 14:50:06 +02:00
Sébastien Villemot
050f1cdd74
Block decomposition: remove unused 2nd and 3rd derivatives in output of dynamic functions
2020-06-03 16:59:04 +02:00
Sébastien Villemot
f0c8a14551
Block decomposition: no longer compute deterministic simulation from dynamic.m file
2020-06-02 17:42:00 +02:00
Sébastien Villemot
2caad3ee84
Block decomposition: simplify DynamicModel::writeDynamicBlockMFile()
2020-05-29 16:48:38 +02:00
Sébastien Villemot
7b11898689
use_dll: merge the two generated C source files into a single one
...
Also, do various other cosmetic/simplification changes.
2020-05-29 16:12:01 +02:00
Sébastien Villemot
3c5d731500
Fix compilation with GCC 10
2020-05-28 14:21:58 +02:00
Sébastien Villemot
3e0cae650f
Bump Boost version for Julia package
...
Note that MSYS2 has now switched to zstd for compressing their packages.
2020-05-27 18:38:13 +02:00
Sébastien Villemot
3ca1914e03
Block decomposition: fix simulation of blocks of type "evaluate backward" (without bytecode)
...
Ref. dynare#1727
2020-05-26 17:00:21 +02:00
Sébastien Villemot
faa6666abe
Block decomposition: no longer use global variables for temporary terms in the dynamic M-file
...
Rather use a single vector as in non-block mode.
By the way, change the order of output arguments in static functions, to be
closer to the dynamic ones.
2020-05-26 16:21:11 +02:00
Sébastien Villemot
04b7d4386d
Block decomposition: no longer use global variables for temporary terms in the static M-file
...
Rather use a single vector as in non-block mode.
2020-05-25 18:35:36 +02:00
Sébastien Villemot
a5abbae46a
use_dll: remove workaround for char16_t type
...
Should no longer be needed now that the minimal MATLAB version is R2014a.
2020-05-25 16:06:17 +02:00
Sébastien Villemot
b9216be277
Block decomposition: fix incorrect check with model local variables
...
We normally never arrive here, since MLV are not compatible with 'block'
option.
2020-05-25 15:42:16 +02:00
Sébastien Villemot
3033417f5a
Block decomposition: remove ExprNodeOutputType::matlabDynamicSparseSteadyStateOperator
...
It’s not really needed, since it does the same as
ExprNodeOutputType::matlabDynamicSteadyStateOperator.
2020-05-25 15:35:55 +02:00
Sébastien Villemot
7b1a77ca47
Block decomposition: use logical values for some inputs to solve_{one_boundary,two_boundaries}
2020-05-25 15:12:43 +02:00
Sébastien Villemot
a6d9ba6e55
Rename EquationType::evaluate_s to evaluateRenormalized, for clarity
2020-05-20 11:49:32 +02:00
Sébastien Villemot
c6a17913b4
Rename {Static,Dynamic}Model::writeOutput() to ::writeDriverOutput() for clarity
2020-05-20 11:44:40 +02:00
Sébastien Villemot
becc433d56
Rename byte_code to bytecode for consistency with user option name
2020-05-20 11:39:59 +02:00
Sébastien Villemot
c579a45b08
Remove helper now unused because of 1d838e96ff
2020-05-20 11:35:44 +02:00
Sébastien Villemot
96657b4974
Block decomposition: refactor code that writes the block structure to the driver file
2020-05-20 11:35:14 +02:00
Sébastien Villemot
4b28f1fe9c
Bytecode: remove unused data structure
2020-05-20 10:31:31 +02:00
Sébastien Villemot
2944484442
Bytecode: rename output methods for better consistency
2020-05-19 17:45:33 +02:00
Sébastien Villemot
1d838e96ff
Block decomposition: simplify routines for writing output dynamic/static M files
2020-05-19 17:33:58 +02:00
Sébastien Villemot
d05ffde63e
Merge branch 'hif' into 'master'
...
histval_file initval_file refactoring
See merge request Dynare/preprocessor!20
2020-05-14 14:36:36 +00:00
MichelJuillard
ed4c36a267
add first_simulation_period to the lexer
...
(cherry picked from commit c8575e11d2f81ad606ab50849c52127653699a93)
2020-05-14 14:36:35 +00:00
Sébastien Villemot
bca5e0937a
CI: increase expiration delay for intermediate objects
...
Under heavy load, it can happen that no runner is available during one hour.
2020-05-13 20:43:36 +02:00
Sébastien Villemot
a2bea00fee
Block decomposition: another fix related to temporary terms refactoring
...
Temporary terms need to be computed per equation (as was done previously), and
not simply per block.
It’s necessary to track temporary terms per equation, because some equations
are evaluated instead of solved, and an equation E1 may depend on the value of
an endogenous Y computed by a previously evaluated equation E2; in this case,
if some temporary term TT of equation E2 contains Y, then TT needs to be
computed after E1, but before E2.
2020-05-13 16:58:19 +02:00
Sébastien Villemot
c9388da649
Bytecode: still another fix for temporary terms
2020-05-13 15:16:38 +02:00
Sébastien Villemot
2e6bc7ecaa
Bytecode: fix handling of temporary terms
...
They were broken by 49036f166d
2020-05-13 12:53:47 +02:00
Sébastien Villemot
f8796c67c5
ExprNode::computeTemporaryTerms: minor simplifications, for symmetry with blocks code
2020-05-12 18:39:15 +02:00
Sébastien Villemot
49036f166d
Block decomposition: refactor code for computing temporary terms
...
In particular, in dynamic models, temporary terms are now computed for
derivatives w.r.t. exogenous, and also w.r.t. endogenous variables that do not
belong to the block.
2020-05-12 18:39:13 +02:00
Sébastien Villemot
ba214a100d
Block decomposition: bugfix, cutoff option was ignored
...
Introduced in c699d57308
2020-05-07 18:41:01 +02:00
Sébastien Villemot
928aa977b6
Block decomposition: replace expr_t by BinaryOpNode * in a couple of places
2020-05-07 15:24:35 +02:00
Sébastien Villemot
c699d57308
Block decomposition: no longer compute static Jacobian, it’s not used
...
Also remove a message about elements below the cutoff that was no longer
correct (elements below the cutoff have no impact on the incidence matrix
outside of normalization).
2020-05-06 18:11:11 +02:00
Sébastien Villemot
a1b37288f9
Block decomposition: do not write unnecessary zeros in dynamic Jacobian
...
Also do cosmetic change in the corresponding code for static Jacobian.
2020-05-06 14:22:04 +02:00
Sébastien Villemot
9f361e9e37
Block decomposition: simplify code for ordering dynamic Jacobian columns
2020-05-06 14:21:24 +02:00
Sébastien Villemot
061245e50d
Block decomposition: simplify routines that write static model in MATLAB form
...
By the way, this probably fixes a bug in the presence of external
functions (so-called TEF terms were not properly repeated in each per-block
static file).
Also remove debugging output in the M-file.
2020-05-05 18:59:28 +02:00
Sébastien Villemot
38ccd5e0cf
Block decomposition: remove unneeded code for bytecode
2020-05-05 17:15:08 +02:00
Sébastien Villemot
5f22f00436
PAC models: handle PAC data in DynamicModel copy constructor and assignment operator
2020-05-05 16:34:51 +02:00
Sébastien Villemot
4f453320d1
Block decomposition: remove unneeded code for exogenous
2020-05-05 16:17:22 +02:00
Sébastien Villemot
cb61ee8506
Block decomposition: make structures storing derivatives w.r.t. other endo/exo symmetric with those for endos belonging to the block
2020-04-30 18:24:24 +02:00
Sébastien Villemot
b1a739c56a
DynamicModel: add missing members in copy constructor/assignment operator
2020-04-30 14:57:50 +02:00
Sébastien Villemot
a8c2defe26
Block decomposition: compute simulation types into separate function; prologue and epilogue are no longer class members
...
By the way, remove the BlockType stuff which was purely informative (and it’s
not worth carrying over prologue and epilogue information just for that).
2020-04-30 12:48:16 +02:00
Sébastien Villemot
26fc71ffa7
Block decomposition: store max lead/lag of all variables in the “blocks” structure
...
By the way, regroup all code that computes the dynamic structure of a block
into a single function.
2020-04-30 12:03:14 +02:00
Sébastien Villemot
7f57821401
Now compute blocks[].first_equation from ModelTree::computeBlockDecompositionAndFeedbackVariablesForEachBlock
...
Also include various cosmetic changes.
2020-04-29 18:48:42 +02:00
Sébastien Villemot
1886746581
VariableDependencyGraph::reorderRecursiveVariables now returns indices from vertex_index
...
This is for consistency with other graph algorithms. Previously it would return
an index from vertex_index1.
See also 1d92adacf4
(which this commit basically
reverts).
Also do some cosmetic changes in calling graph code.
2020-04-29 18:46:15 +02:00
Sébastien Villemot
24db5e6033
Minor simplifications in graph algorithms
2020-04-29 18:12:22 +02:00
Sébastien Villemot
4948adf2cd
Block decomposition: remove unused data structure
2020-04-29 17:47:48 +02:00
Sébastien Villemot
f39c687d85
Block decomposition: store mapping between endos/eqs and their block
...
Previously this computation was done at several places.
2020-04-29 17:42:46 +02:00
Sébastien Villemot
39407083be
Block decomposition: ensure that the cutoff option only impacts normalization
...
Previously, the cutoff option would also impact the block decomposition itself,
since it would had an influence on the incidence matrix used for computing the
blocks and their derivatives.
The problem is that, in the general case, it’s quite possible that an element
of the numerical Jacobian be zero at the evaluation point, while being quite
different from zero along the simulation path. A typical example is an
expression of the type x*y, where y is an endogenous and x is an exogenous not
present in the initval block (and hence initialized to zero).
2020-04-29 12:41:39 +02:00