Automate the railways