Hello,
I am experiencing an issue when running a Ramsey policy problem that works correctly in Dynare 5.5 but fails in Dynare 6.x and up.
The model solves without any problems under Dynare 5.5. However, in versions above 6, the preprocessing stage stops with the following error:
Starting Dynare (version 6.3).
Calling Dynare with arguments: none
Starting preprocessing of the model file ...
Ramsey Problem: added 99 multipliers.
Substitution of exo leads: added 3 auxiliary variables and equations.
Found 99 equation(s).
Found 202 FOC equation(s) for Ramsey Problem.
Evaluating expressions...
Computing static model derivatives (order 1).
Normalizing the static model...
Finding the optimal block decomposition of the static model...
71 block(s) found:
67 recursive block(s) and 4 simultaneous block(s).
the largest simultaneous block has 112 equation(s)
and 112 feedback variable(s).
Computing dynamic model derivatives (order 1).
Normalizing the dynamic model...
ERROR: log(0) not defined!
A few observations:
-
The problem appears only when using
ramsey_policy. -
The same model runs correctly under Dynare 5.5.
-
I have already removed all explicit logarithms (
log(...)) from the model equations, but the error persists. -
The model’s steady state appears to be correct and is successfully computed.
-
The error occurs during preprocessing, specifically at:
Computing dynamic model derivatives (order 1) Normalizing the dynamic modelbefore the actual solution stage begins.
-
The non-Ramsey version of the model (e.g., Taylor rule/policy rule) runs normally.
My suspicion is that the issue may be related to the additional first-order conditions or auxiliary equations introduced by the Ramsey problem, possibly creating an expression that evaluates to zero inside a logarithm during the normalization step.
I understand that recent Dynare versions generate temporary files differently than older versions. Is there a recommended way to identify which equation or generated Ramsey FOC is triggering the log(0) error in Dynare 6.x? Has anyone encountered similar behavior when migrating Ramsey models from 5.5 to 6.x?
Any suggestions would be greatly appreciated.
Thank you.