Use precompiled models

  1. 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
  2. These modules can be dynamically called by DynareJulia with
eval(Meta.parse("using "*<MODFILENAME>*"Dynamic))
eval(Meta.parse("using "*<MODFILENAME>*"Static))
  1. 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
  2. Functions <MODFILENAME>_set_auxiliary_series.jl and <MODFILENAME>_dynamic_set_auxiliary_series.jl that are currently written in a single file and inside module <MODFILENAME>SetAuxiliarySeries.
  3. In <MODFILENAME>Dynamic.jl and <MODFILENAME>Static.jl, the statement using 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

  1. After these modifications are implemented in the preprocessor, we need to modify load_dynare_function and load_dynare_function_1 in model.jl