Optimal Policy for Large Herding Population