As noted in #564 (comment 9765), ramsey_policy only allows for order=1. The solution is to replace it by
ramsey_model;stoch_simul(order=2)
But the downside of this approach is that we do not compute the welfare function in this case and one cannot add it to the model-block. For that reason, we need to provide the user with an interface to call evaluate_planner_objective
That is a tricky issue. The evaluation of the planner objective at higher order it not done yet and I don't think it will be for 4.6. But it's probably a good idea to nevertheless phase out ramsey_policy with a warning. That way, people can still simulate their model at higher order. We can then add a warning to evaluate_planner_objective that we are currently not computing the objective at higher order.
@JohannesPfeifer thanks. Is this OK or would you prefer something else for the warning text: "Warning: the ramsey_policy statement is deprecated. Please use ramsey_model, stoch_simul and evaluate_planner_objective instead."