You have a junction with two independent train lines coming in, and two possible destination lines out. (Or, in general, NxM MUX.) It's easy enough to allow any input train to choose to go to any output track. It's easy to avoid collisions, by having chain signals prior to the junction, and rail signals after the junction. That "locks" the junction itself, for one train at a time.
The question is: is it possible to build a MUX junction, that multiple trains can use simultaneously (assuming they're interested in different destinations)? Without collisions?
The use case is a giant trainyard. All the trains, with different ores, come into my "waiting area". Then any train can get to its correct ore dropoff location. But, as my factory grows, and the number of simultaneous trains grow, I've noticed that they're all waiting too long at the waiting area, even though there are dropoff stations waiting to take their ore ... all because the connection between the waiting and the dropoff has turned into a bottleneck. Only one train can transition from waiting to a dropoff station at a time.
So I was wondering if I could build some kind of clever "multiplexer" in the middle, that would allow 20x trains to come from anywhere in the train waiting area, and allow any of those trains to connect to any of the (ore-specific) dropoff stations that it wanted ... but also allow multiple trains to enter the MUX at the same time, if they happened to come from different places and be heading to different stations.
But I tried to build such a thing myself, and have come close to concluding that it actually isn't possible. Am I right about that? Or did I miss something, and one of you knows a trick to building such a "parallel MUX junction"?
Is a train junction parallel multiplexer possible?
Re: Is a train junction parallel multiplexer possible?
It seems that you're describing a roundabout. You can make them as large as you'd like, and multiple trains can use it at the same time if you have the correct signals, with no collisions.
Re: Is a train junction parallel multiplexer possible?
Huh. I did not make that connection, since I really have all the trains coming from one side, and all exiting on the other side. But the more I think about it ... the more I think you're probably right.
Here (attached) was my own guess. It "kind of" works ... in the sense that, once in awhile, when I get lucky, a new train will enter the junction before the previous train has completed exited.
But, with your hint, now I think you're right. In many ways, the problem I wanted to solve is essentially the problem of a huge roundabout. Just all the inputs on one side, and all the outputs on the other. But maybe based off something like this:
Thanks for the suggestion.
Here (attached) was my own guess. It "kind of" works ... in the sense that, once in awhile, when I get lucky, a new train will enter the junction before the previous train has completed exited.
But, with your hint, now I think you're right. In many ways, the problem I wanted to solve is essentially the problem of a huge roundabout. Just all the inputs on one side, and all the outputs on the other. But maybe based off something like this:
Thanks for the suggestion.
Re: Is a train junction parallel multiplexer possible?
This is doable quite simply. You just need to add signals between the different paths within the junction, so trains passing through only reserve ("lock") the blocks they need.dongeddis wrote: ↑Fri Dec 29, 2023 12:37 amIt's easy to avoid collisions, by having chain signals prior to the junction, and rail signals after the junction. That "locks" the junction itself, for one train at a time.
The question is: is it possible to build a MUX junction, that multiple trains can use simultaneously (assuming they're interested in different destinations)? Without collisions?
Here's a 4 to 6 junction. It's not an optimal layout, and I forgot a few signals, but it should get the idea across.
Re: Is a train junction parallel multiplexer possible?
If you want to optimize such a station + waiting area setup, think in rail blocks. One block can be occupied by one train only, and if the only path from the waiting area to the station contains an occupied block, a waiting train will not start (in case you're separated blocks with chain signals).
You see the blocks colored, if you hold a signal in hand.
Investigate each block that contains some crossing. Imagine this block is occupied. Is this blocking other possible paths that don't need to be blocked? For example, is this blocking some junction? In this case, divide this block into two or even more blocks.
It's difficult to see, but it seems the long exit lane of your stacker is one big block. Divide it into multiple blocks, one part per stacker lane. You have a generous spacing, so it should be possible to put a signal between each stacker exit, separating each exit from its neighbors. So if there is one train just leaving and at the end of the long exit lane, another train would be able to also enter that exit lane and use one of the shortcut exits you added.
You see the blocks colored, if you hold a signal in hand.
Investigate each block that contains some crossing. Imagine this block is occupied. Is this blocking other possible paths that don't need to be blocked? For example, is this blocking some junction? In this case, divide this block into two or even more blocks.
It's difficult to see, but it seems the long exit lane of your stacker is one big block. Divide it into multiple blocks, one part per stacker lane. You have a generous spacing, so it should be possible to put a signal between each stacker exit, separating each exit from its neighbors. So if there is one train just leaving and at the end of the long exit lane, another train would be able to also enter that exit lane and use one of the shortcut exits you added.
Re: Is a train junction parallel multiplexer possible?
Thanks, guys. I think I get it now. I should have a LOT more space in between my wait area and my drop off area, and then build something like sparr's 4-to-6 mux junction (but perhaps scale it up to 20-to-10 or something). I can see now how that would work. Much appreciated!
Re: Is a train junction parallel multiplexer possible?
Maybe, maybe not…
Not necessarily. Depending on how many trains go to each station, it might make sense to split the waiting area into several smaller ones that only serve some of the stations, as result the trains already sort themselves when entering the waiting area.I should have a LOT more space in between my wait area and my drop off area, and then build something like sparr's 4-to-6 mux junction (but perhaps scale it up to 20-to-10 or something).
The main issue I spot in your screenshot is some missing signals that hurt performance. This is, I think, what sparr was hinting at and Tertius tried to explain in more detail. I can't see any signals for the track exiting the waiting area (marked in purple), so only one train can be there at any given point in time. The track for entering the stations has some signals, but every connection from the waiting area exit also blocks the two stations preceding it. Without changing your current layout I'd place a signal each on the straight tracks north of every waiting area to station connection (marked in green).
Re: Is a train junction parallel multiplexer possible?
Yes, agreed. I actually put chain signals pretty much everywhere. It works as suggested.
If I were starting over from scratch, I might leave much more space between the waiting area and the drop off area, and build a more symmetric "christmas tree" MUX junction, like sparr suggested. But I wonder if that would actually only be a little bit better than what I managed to squeeze in, at the cost of very much more space.
If I were starting over from scratch, I might leave much more space between the waiting area and the drop off area, and build a more symmetric "christmas tree" MUX junction, like sparr suggested. But I wonder if that would actually only be a little bit better than what I managed to squeeze in, at the cost of very much more space.