Branch-Merge junctions are twisting arrangements of track that prevent any two trains, coming from different directions and heading in different directions, from getting in each other's way if they hit the junction at the same time. They take up more space than simpler junctions, but can't deadlock as no loops are involved (notwithstanding larger loops in the network).
Simplistic junction design is thwarted by:
Simplistic signalling — Signals and trains aren't smart enough to determine that they won't cross each other's path in a shared signal space, so one will wait for the other unnecessarily. It's also hard to get trains to wait before crossing a genuinely shared piece of track until they know they can clear it.
Turns — Sharp turns reduce the maximum speed permitted on a route through the junction, and so increase its transit time.
Hills — Hills caused by tunnels and bridges also reduce maximum speed.
Bridges — Signals are not (yet) possible on bridges, so long bridges delay rapid successions of trains. Bridges have speed limits, and the very shortest bridges cannot be upgraded to faster ones. Ideally, a bridge should be four tiles long.
Tunnels — Signals are not (yet) possible in tunnels, so long tunnels delay rapid successions of trains. Preferably, no tunnel should be more than four tiles long, or there should be redundant tracks.
Space — Junctions often have to fit between towns and industries, and between hills, lakes and valleys.
Breakdowns — Even if main lines are replicated to allow faster trains to overtake slower (or broken-down) ones, a route across a junction with only a single path can become congested.
The challenge for all junction design is therefore to be:
Tetrathorps allow forward routes to go straight. Stars have rotational symmetry.
This star junction concentrates on getting the right-hand turns resolved nearest the centre, then worries about left and straight ahead.
It's almost inevitable that some line will be busier than the others, and the exit onto that line will become a bottleneck. Instead of merging the three tracks from the other lines onto that line's track, why not keep them separate, but allow them to cross over each other?
This increases the line's capacity, and allows it to cope with breakdowns better.
However, there is only one track from any source line to any destination line, so popular routes still risk congestion. What is really needed is a separate junction per track. (Something like this!)
In this junction, each line has two tracks each way, and has a route to every other line. A train arriving on the left track of any line will leave on the left track if it is turning right, or the right track otherwise. Meanwhile a train arriving on the right track will leave on right track if turning right, but on the left otherwise. Effectively, this is really two independent 4-way branch-merge junctions interleaved into the same space.
This junction takes a different approach to achieve the same thing – two separate junctions interleaved – but it has used space more liberally, so turns should be smoother.
This example shows that you can wrap one junction round another. It turns out to be smaller than attempting other tricks, probably because it tries to achieve right turns on the inside.
This one tries to resolve the straight and left-turn routes first for both tracks, but then requires that the right turns go out a long way around the outside of that resolution.
Same as before, but rather more compact. (I didn't quite get the exit cross-overs right on this one.)
This one allows resolves the inner track's right-hand turn on the inside, but leaves the outer track to take a longer route. Burger — it's got a merge before branch!