A simulation-based approach for estimating railway capacity