Management of train operation and train handling