How can you avoid gridlocks at a train circle?
How can you avoid gridlocks at a train circle?
Or, more correctly, how can you avoid gridlocks at a train circle and allow more than one train to use the circle at a time?
See this image for my train circle:
If the circle only has signals at the inputs/outputs, then there wouldn't be a problem: trains would queue up to use the circle and no more than one train would ever enter the circle. Restricting it that way doesn't allow two trains to pass each other at the same time, however, and will limit throughput in other ways. Adding four additional signals, as in the image, splits the circle into four semi-circles. Unfortunately, if four trains enter the circle near the same time, they can cause a gridlock situation. In fact, allowing any more than one train into the circle seems to allow a gridlock situation as far as I can tell.
Is there something that can be done to fix the gridlock scenario? Maybe different signal placements, or maybe adding some extra tracks? I'd prefer the circle to not get larger than it already is.
See this image for my train circle:
If the circle only has signals at the inputs/outputs, then there wouldn't be a problem: trains would queue up to use the circle and no more than one train would ever enter the circle. Restricting it that way doesn't allow two trains to pass each other at the same time, however, and will limit throughput in other ways. Adding four additional signals, as in the image, splits the circle into four semi-circles. Unfortunately, if four trains enter the circle near the same time, they can cause a gridlock situation. In fact, allowing any more than one train into the circle seems to allow a gridlock situation as far as I can tell.
Is there something that can be done to fix the gridlock scenario? Maybe different signal placements, or maybe adding some extra tracks? I'd prefer the circle to not get larger than it already is.
Re: How can you avoid gridlocks at a train circle?
Speaking from experience in Transport Tycoon (and zero in Factorio with trains), nope no way of avoiding it. Can only have one train in the loop at a time...
The only other way to do it would be to route individual lines to each direction and then signal them up.
That is, don't send the trains to the one point to switch their track. Break it up. Give the train an earlier option to go left, a middle option to go right and a late option to go straight.
The only other way to do it would be to route individual lines to each direction and then signal them up.
That is, don't send the trains to the one point to switch their track. Break it up. Give the train an earlier option to go left, a middle option to go right and a late option to go straight.
Re: How can you avoid gridlocks at a train circle?
ah, the good ol' classic Roundabout. Works for loads of Trains... unfortunatly only in OTTD where we have pathsignals (and likely better code for the pathfinding).
I was thinking about enlarging it, but after some thought i dont see a way to do it without pre-signals or pathsignals.
I was thinking about enlarging it, but after some thought i dont see a way to do it without pre-signals or pathsignals.
Re: How can you avoid gridlocks at a train circle?
Last thing I tried were 3 way junctions instead of 4 way, where the right-hand-turn gets an extra 'lane', so they skip the junction altoghether. I haven't really tested it, because the jams just moved further down the line, but it might be worth a try
(I will post a screenshot of it later.)
(I will post a screenshot of it later.)
Re: How can you avoid gridlocks at a train circle?
Having played a lot of OTTD, when I found Factorio and with its trains and signals, I tried doing a lot of "standard builds" from OTTD. I quickly found that the train path-finding in Factorio is very limited compared to OTTD.
The path-finding from Factorio seems to me just a "find me a clear route between A and B". "A bazillion signals in that path? Three stations to go through and a 30min estimated time to destination? Seems like a wonderful route." - says the train - "Give me anything that doesn't involve waiting 5 seconds at the current red signal in the shortest, fastest (some would call it correct) route."
I've simply given up and started building the most possible independent, non-crossing rails ever. Junctions are made only when there's little to no chance the trains will jam up, because they will if they can.
At this point, I would just like to able to set some waypoints that would force the train to go through a certain track.
I'm aware that Factorio is not OTTD. OTTD must spend its sweet time calculating paths, because it's what it does, not minding several thousand items and bots running around in your factory. I would like at least some sense in the path-finding and not having trains go around the world to go to the station next door.
The path-finding from Factorio seems to me just a "find me a clear route between A and B". "A bazillion signals in that path? Three stations to go through and a 30min estimated time to destination? Seems like a wonderful route." - says the train - "Give me anything that doesn't involve waiting 5 seconds at the current red signal in the shortest, fastest (some would call it correct) route."
I've simply given up and started building the most possible independent, non-crossing rails ever. Junctions are made only when there's little to no chance the trains will jam up, because they will if they can.
At this point, I would just like to able to set some waypoints that would force the train to go through a certain track.
I'm aware that Factorio is not OTTD. OTTD must spend its sweet time calculating paths, because it's what it does, not minding several thousand items and bots running around in your factory. I would like at least some sense in the path-finding and not having trains go around the world to go to the station next door.
Re: How can you avoid gridlocks at a train circle?
if you make the circle big enough for a full train between signals at each intersection, then there shouldn't be any jambs. Could also consider using 2 circles (shown).
- Attachments
-
- RRJUNCTION.jpg (57.63 KiB) Viewed 10524 times
-
- Fast Inserter
- Posts: 132
- Joined: Fri Jul 25, 2014 7:03 pm
- Contact:
Re: How can you avoid gridlocks at a train circle?
Maybe just put bypasses on the most used part(s) of the circle?
Re: How can you avoid gridlocks at a train circle?
Because this introduces so many intersections at a 4-way junction, I can't wrap my mind around how to avoid gridlocks even with individual routes. Maybe I'm overthinking.-root wrote:Speaking from experience in Transport Tycoon (and zero in Factorio with trains), nope no way of avoiding it. Can only have one train in the loop at a time...
The only other way to do it would be to route individual lines to each direction and then signal them up.
That is, don't send the trains to the one point to switch their track. Break it up. Give the train an earlier option to go left, a middle option to go right and a late option to go straight.
Calico wrote:I was thinking about enlarging it, but after some thought i dont see a way to do it without pre-signals or pathsignals.
I looked up OTTD pathsignals, seems pretty neat. I wouldn't expect something like that for Factorio, though. I think we'll have to wade through the mess and find solutions that work with the limited tools we have. I agree with making independent and non-crossing rails. I've also found another rule: if a track can be used in both directions, it will jam unless only one train could ever use it by having a turnaround without rail signals, and at least one entrance and at least one exit that goes to a dedicated one-way rail track.micomico wrote:I've simply given up and started building the most possible independent, non-crossing rails ever. Junctions are made only when there's little to no chance the trains will jam up, because they will if they can.
That is pretty awesome. I gave up on keeping the circle small, so maybe this will be a solution. I tried to figure out a situation in which this junction could be jammed, but I wasn't able to. You introduce another good rule for preventing jams, too: never let a train be larger than any block it enters.DerivePi wrote:if you make the circle big enough for a full train between signals at each intersection, then there shouldn't be any jambs. Could also consider using 2 circles (shown).
Inspired by your responses, I'm going to try some more designs now.
Re: How can you avoid gridlocks at a train circle?
my 3 way setup with express-right-hand-turn-lanes, trying to minimize rails crossing.
A bit further down the line I've made the same, but mirrored, for the rails coming in from the south.
A bit further down the line I've made the same, but mirrored, for the rails coming in from the south.
Re: How can you avoid gridlocks at a train circle?
I have been wondering, in that center criss-cross section, does the signal on the horizontal line block trains from entering the criss-cross if a train is on one of the turning tracks? Since it is not a connected segment, is there any way the signal would know about trains in the criss-cross?
Re: How can you avoid gridlocks at a train circle?
The train blocks connect everything that touches, I think. So crossings are all part of the same block.starxplor wrote:I have been wondering, in that center criss-cross section, does the signal on the horizontal line block trains from entering the criss-cross if a train is on one of the turning tracks? Since it is not a connected segment, is there any way the signal would know about trains in the criss-cross?
Re: How can you avoid gridlocks at a train circle?
Thanks for the designs and ideas, they've helped me out on my game!