AI system to end 'leaves on the line' by predicting buildups before they delay trains