Optimal crowd management for congested metro stations