The railways use a train detection systems which can tell signallers exactly where every train is and how fast they are going. There are also systems that can automatically stop trains if the driver doesn't take the correct course of action or passes through a red signal.