Increasing efficiency and resiliency of railway networks