Learning parametric model predictive control strategies for frequency control of a microgrid