Adjoint-based model predictive control of wind farms