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.jland<MODFILENAME>_dynamic_set_auxiliary_series.jlthat are currently written in a single file and insidemodule <MODFILENAME>SetAuxiliarySeries. - In
<MODFILENAME>Dynamic.jland<MODFILENAME>Static.jl, the statementusing Utilson 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_functionandload_dynare_function_1inmodel.jl