Use precompiled models
- If the dynamic and static model functions are written in a module, these modules will be precompiled by Julia as loaded directly as long as the timestamp of the source file is older than the timestamp of the precompiled code. See https://docs.julialang.org/en/v1/manual/modules/#Module-initialization-and-precompilation
- These modules can be dynamically called by DynareJulia with
eval(Meta.parse("using "*<MODFILENAME>*"Dynamic))
eval(Meta.parse("using "*<MODFILENAME>*"Static))
- To use this feature, the preprocessor must write a new version of
<MODFILENAME>Dynamic.jl
,<MODFILENAME>Static.jl
, only if their content is different from the existing version - Functions
<MODFILENAME>_set_auxiliary_series.jl
and<MODFILENAME>_dynamic_set_auxiliary_series.jl
that are currently written in a single file and insidemodule <MODFILENAME>SetAuxiliarySeries
. - In
<MODFILENAME>Dynamic.jl
and<MODFILENAME>Static.jl
, the statementusing Utils
on the 6th line must be replaced by:
using Dynare: get_power_deriv
using StatFuns
It isn't necessary to have a full module just for get_power_deriv()
. Utils.jl
is now include in Dynare.jl
file. Execution of statistical functions need module StatFuns
- After these modifications are implemented in the preprocessor, we need to modify
load_dynare_function
andload_dynare_function_1
inmodel.jl