First I have 2 questions;
-
should Dynare be able to solve the ramsey_model when there is an inequality constraint in the model (ie. the behaviour of the agents)?
-
If it can, should this work with the perfect_forsight_solver using the lmmcp?
I tried this setup, but the path is quite different from the Social Planner setup, which I am confident is correct. So I want to know if Dynare should have obtained the correct solution with the ramsey_solver as well (and that a error in our code is the likely cause).
My hunch is that it should work in a perfect foresight context, but it may depend on the exact model specification. Could you maybe provide me with more details or the code to check what is going on?
Here’s the code that can replicate my results. Just run the ‘run_SP_vs_Ramsey’, and then you can plot tau with ‘plot_variants’. When there is no inequality constraint the solutions are the same. With the inequality constraint (NNCON definition) the solutions differ widely. And I dont see how the Ramsey solution should be different from the Social Planner solution in this case.
Thank you for you help 
SP_vs_Ramsey_inequality.zip (3.7 KB)
My hunch is that the mcp tag is not properly taken into account for the Ramsey FOC. Have you tried a brute force approach of using a max() operator for the investment constraint instead to see whether the problem persists?