An optimal strategy for the control of a train | Synapse