Skip to content
Snippets Groups Projects
  1. May 22, 2024
  2. May 16, 2024
    • Sébastien Villemot's avatar
      Refactor output for complementarity conditions · dc1ec15f
      Sébastien Villemot authored
      The vector of lower and upper bounds is now provided by
      {static,dynamic}_complementarity_conditions.m (which accepts parameters as an
      argument, in preparation for the possibility of having parameters in
      complementarity conditions).
      
      The index that denotes the reordering of equation residuals (so that the
      residual of an equation appears at the index of the endogenous appearing in the
      complementarity condition) is now in “M_.{static,dynamic}_mcp_equations_reordering”.
      
      Constraints declared through the ramsey_constraints block are also incorporated
      in this new interface (and therefore “M_.ramsey_model_constraints” has been
      removed).
      dc1ec15f
  3. Apr 25, 2024
  4. Apr 23, 2024
  5. Jan 31, 2024
  6. Jan 26, 2024
  7. Jan 24, 2024
  8. Dec 14, 2023
  9. Dec 13, 2023
  10. Dec 01, 2023
  11. Nov 30, 2023
  12. Nov 15, 2023
  13. Nov 14, 2023
  14. Nov 07, 2023
    • Sébastien Villemot's avatar
      New structure M_.block_structure.block().bytecode_jacobs_cols_to_sparse · 63f04636
      Sébastien Villemot authored
      It maps column indices in the Jacobian returned by bytecode MEX in evaluate
      mode (which only contains nonzero columns, but also incorporate recursive
      variables), into column indices in the sparse representation (which has 3×n
      columns for two-boundaries blocks and n columns for one-boundary blocks).
      Columns unused in the sparse representation are indicated by a zero.
      63f04636
    • Sébastien Villemot's avatar
      :bug: Bytecode+block+mfs>0: fix Jacobian computation in “evaluate” mode · 3c7b02e8
      Sébastien Villemot authored
      When parsing the FSTPG{2,3} opcodes, the bytecode MEX internally constructs a
      Jacobian with as many lines as feedback variables. But the preprocessor would
      also output instructions for filling derivatives of equations corresponding to
      recursive variables in the “evaluate” mode, thus leading to memory corruption
      in the bytecode MEX.
      3c7b02e8
  15. Oct 25, 2023
  16. Oct 16, 2023
  17. Sep 27, 2023
  18. Jun 23, 2023
  19. May 12, 2023
    • Sébastien Villemot's avatar
      :bug: Bytecode + block decomposition: temporary terms were not correctly output · 150547b5
      Sébastien Villemot authored
      Temporary terms computed in previous blocks were not used in the bytecode
      output of a given block. This was inefficient (because this means that
      expressions already computed and store in the temporary terms vector would be
      recomputed), and incidentally it would break the external functions
      output (because it would trigger a lookup in the “TEF terms”, which would thus
      fail).
      
      Closes: #115
      150547b5
  20. Apr 24, 2023
  21. Apr 18, 2023
  22. Apr 11, 2023
  23. Apr 05, 2023
  24. Mar 28, 2023
    • Sébastien Villemot's avatar
    • 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
  25. Mar 23, 2023
  26. Mar 20, 2023
  27. Mar 02, 2023
    • Sébastien Villemot's avatar
      Performance improvement of chain rule derivation · 7acf2783
      Sébastien Villemot authored
      Commit 23b0c12d introduced caching in chain
      rule derivation (used by block decomposition), which increased speed for mfs >
      0, but actually decreased it for mfs=0.
      
      This patch introduces the pre-computation of derivatives which are known to be
      zero using symbolic a priori (similarly to what is done in the non-chain rule
      context). The algorithms are now identical between the two contexts (both
      symbolic a priori + caching), the difference being that in the chain rule
      context, the symbolic a priori and the cache are not stored within the ExprNode
      class, since they depend on the list of recursive variables.
      
      This patch brings a significant performant improvement for all values of the
      “mfs” option (the improvement is greater for small values of “mfs”).
      7acf2783
  28. Feb 28, 2023
  29. Jan 25, 2023
  30. Jan 24, 2023
  31. Jan 23, 2023
  32. Jan 19, 2023
Loading