Tuning multigrid methods with robust optimization and local Fourier analysis