Any tips on computing Optimal Monetary Policy in Dynare?

I’m interested in learning how to numerically compute the Optimal Monetary Policy (for a given structural model) in Dynare. Can you suggest some good online guides? (references, programming codes, and so forth)

What exactly are you looking for? Discretion or commitment? Fully optimal or optimal simple rules?

Well as of now I am looking for optimal simple rules.

A starting point could be Loop over parameters to find maximized welfare