Skip to content
Snippets Groups Projects
  1. Mar 28, 2023
    • Sébastien Villemot's avatar
      Ramsey: write derivatives of static model w.r.t. Lagrange multipliers in a new file · 0169240f
      Sébastien Villemot authored
      The computing of the Ramsey steady state relies on the fact that Lagrange
      multipliers appear linearly in the system to be solved. Instead of directly
      solving for the Lagrange multipliers along with the other variables,
      dyn_ramsey_static.m reduces the size of the problem by always computing the
      value of the multipliers that minimizes the residuals, given the other
      variables (using a minimum norm solution, easy to compute because of the
      linearity property). That function thus needs the derivatives of the optimality
      FOCs with respect to the multipliers. The problem is that, when multipliers
      appear in an auxiliary variable related to a lead/lag, then those derivatives
      need to be retrieved by a chain rule derivation, which cannot be easily done
      with the regular static file.
      
      This commit implements the creation of a new file,
      ramsey_multipliers_static_g1.{m,mex}, that provides exactly the needed
      derivatives w.r.t. Lagrange multipliers through chain rule derivation.
      
      Ref. dynare#633, dynare#1119, dynare#1133
      0169240f
    • Sébastien Villemot's avatar
      No longer replace all auxiliary variables by their definition in the static model · fe3f1894
      Sébastien Villemot authored
      This is effectively a revert of commits 1b4f68f9,
      32fb90d5 and f6f4ea70.
      
      This transformation had been introduced in order to fix the computation of the
      Ramsey steady state in the case where Lagrange multipliers appeared with a lead
      or lag ⩾ 2 (and where thus part of the definition of an auxiliary variable).
      
      But this transformation had introduced bugs in the handling of external
      functions which were difficult to tackle.
      
      Moreover, it seems preferable to keep the strict correspondence between the
      dynamic and static model, in order to make reasoning about the preprocessor
      internals easier (in particular, for this reason this transformation was not
      implemented in ModFile::transformPass() but in ModFile::computingPass(), which
      was a bit confusing).
      
      A better solution for the Ramsey steady state issue will is implemented in the
      descendent of the present commit.
      
      Ref. dynare#633, dynare#1119, dynare#1133
      fe3f1894
    • Sébastien Villemot's avatar
      🐛 Suboptimal temporary terms for external functions · f48a6984
      Sébastien Villemot authored
      If a given external function was called two times with different arguments,
      then the second call would always be computed in the same temporary terms
      chunk (derivation order or block) as the first call, even if this was not
      necessary (technically, the second call would be promoted in the temporary
      terms computation in the same category as the first call).
      
      This could possibly lead to an inefficiency.
      f48a6984
    • Sébastien Villemot's avatar
      🐛 Incorrect stochastic transformation with endo lead ⩾ 2 or exo lead ⩾ 1 in external functions · 712b11a0
      Sébastien Villemot authored
      If an endogenous with a lead ⩾ 2 or an exogenous with a lead ⩾ 1 appeared in
      the argument(s) of a call to an external function, the auxiliary variable
      transformation was incorrect (the variable was replaced inside the function
      call, while it is the whole function call that has to be replaced).
      
      This could lead to incorrect results in stochastic contexts, when the external
      function is nonlinear.
      712b11a0
    • Sébastien Villemot's avatar
      ModelTree: fix call to ExprNode::computeTemporaryTerms() · 3b20f835
      Sébastien Villemot authored
      The first argument to ExprNode::computeTemporaryTerms() is supposed to be a
      pair (endo derivation order, param derivation order). The two elements were
      interverted in the call. This would not affect the result, because parameter
      derivatives are not computed there and what matters is the lexical ordering
      which remains the same. But fixing the order is better, for consistency with
      the method description.
      3b20f835
    • Sébastien Villemot's avatar
      🐛 Crash when writing the (static) set_auxiliary_variables file in the presence... · 34c37cfd
      Sébastien Villemot authored
      🐛 Crash when writing the (static) set_auxiliary_variables file in the presence of external functions
      34c37cfd
    • Sébastien Villemot's avatar
      🐛 Julia: auxiliary variables of static model were incorrect in set_auxiliary_variables! · acdfc1ad
      Sébastien Villemot authored
      The output was in MATLAB syntax instead of Julia syntax.
      acdfc1ad
    • Sébastien Villemot's avatar
      🐛 Incorrect cost table used when computing temporary terms in static model with “use_dll” · a8fc8e7a
      Sébastien Villemot authored
      It was erroneously using MATLAB costs, leading to possible
      inefficiencies (though those cost tables are probably not very accurate and
      should be revised).
      a8fc8e7a
  2. Mar 24, 2023
  3. Mar 23, 2023
  4. Mar 20, 2023
  5. Mar 16, 2023
  6. Mar 13, 2023
  7. Mar 03, 2023
    • Sébastien Villemot's avatar
      Fix bytecode for block+mfs>0 in static model · 715ec9e4
      Sébastien Villemot authored
      Variable indices would be incorrect in the evaluated Jacobian if recursive
      variables were present. This would lead to incorrect results and/or crashes in
      bytecode MEX. This bug has been exposed by commit
      f45a99fc, which actually enabled mfs>0 for
      static models.
      715ec9e4
  8. Mar 02, 2023
  9. Mar 01, 2023
    • Sébastien Villemot's avatar
      CI: various cleanups · 13e51fba
      Sébastien Villemot authored
      - drop the Julia stuff, since it is no longer used
        In particular, no longer use static linking, since builds are now only
        for testing purposes and are not shipped
      - drop the Windows i686 build, since we no longer support that configuration
      - bump Boost version used for Windows x86-64 build
      - rename build_linux_aarch64 into build_linux_arm64 for clarity
      13e51fba
  10. Feb 28, 2023
  11. Feb 21, 2023
  12. Feb 17, 2023
  13. Feb 07, 2023
  14. Jan 25, 2023
  15. Jan 24, 2023
  16. Jan 23, 2023
  17. Jan 19, 2023
Loading