I am asking these questions because I am trying to envisage the exact algorithm for this system, and I am still not able to do so from the information provided. You refer to geographical pairs by co-ordinates; how wide would you envisage the search area being? Remember, passing loops in Simutrans have to be much longer than in reality because of the relationship between the length of vehicles and the tile length, so, for long trains, one might imagine very long passing loops indeed. Now imagine every cabinet checking a radius of the maximum sensible length of a passing loop: this would give rise to two problems. Firstly, it would be very computationally expensive. One train staff cabinets check a radius of 1 tile. That is a total of 8 tiles to check. Increasing that radius by n would increase the number of tiles to be checked by n squared. Secondly, such a large radius could easily catch cabinets that are not intended to be caught, either on unconnected lines, branches, or even the next passing loop along in cases where the distance between passing loops is less than the maximum sensible length of a passing loop; given the proximity of passing loops on some early single track railways (1 mile, i.e., 1.6km on the Stockton & Darlington, for example), this can readily be imagined.
As to enforcing not having branching, the trouble is that players might want the signalling system not to function correctly if the incorrect functioning is beneficial, for example, allowing the far cabinet on a branching section to know whether the line ahead is clear without a train having passed it to give it the token, which I can imagine as one possibility.
The degree of complexity that one would need to overcome all of these difficulties would be very great, making this a seriously huge project to implement this one signalling system. Even if a workable algorithm could be found, it would be many years before I had the time to implement it, given other priorities. It would be different, of course, if another coder could be found to work on this; but the signalling system is very hard to work on, so an experienced coder would be required.