Two stage mini-max algorithm for grid-based wind farm layout optimization