In the UK, a system known as Automatic Power Control (APC) automatically opens and closes the circuit breaker, this being achieved by using sets of permanent magnets alongside the track communicating with a detector on the train.
[