Add const to RunOptimalGrd.