Page 2 of 2

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 4:44 pm
by DaveMcW
Mehve wrote:
DaveMcW wrote:...
2. Factorio hates roundabouts because of path recalculation bugs.
Is that a fact? I tend to stick with roundabouts by virtue of a "why not?" mentallity, unless I specifically want to deny the trains the option, but I've never noticed/encountered any particular bugs. But this is a definite thing?
Yes.

You can reduce the risk by never doing anything that forces a train to recalculate:
  • Don't have traffic jams that extend to the roundabout.
  • Don't use multiple stations with the same name.
  • Don't build new rails.

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 5:25 pm
by Mehve
Interesting. Never (knowingly) encountered this myself, although my rail designs have always generally followed those guidelines, as well as minimizing how many possible routes exist between destinations.

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 5:32 pm
by SilverB1rd
DaveMcW wrote:
Mehve wrote:
DaveMcW wrote:...
2. Factorio hates roundabouts because of path recalculation bugs.
Is that a fact? I tend to stick with roundabouts by virtue of a "why not?" mentallity, unless I specifically want to deny the trains the option, but I've never noticed/encountered any particular bugs. But this is a definite thing?
Yes.

You can reduce the risk by never doing anything that forces a train to recalculate:
  • Don't have traffic jams that extend to the roundabout.
  • Don't use multiple stations with the same name.
  • Don't build new rails.

This is not a fact, it is however a very common misconception within the factorio community. A* path finding works just fine with roundabouts. Track layouts are much more of a personal preference and the mental load it places on the player. Some track layouts have simpler interactions which reduce the mental load required to make functional systems, the game does not care either way.

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 5:40 pm
by DaveMcW
It's nothing to do with A* or performace. If a train recalculates at the wrong time, it will deadlock itself in a roundabout.

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 6:06 pm
by impetus maximus
the only reason i can see to use a round about is to send the train back from where it came from.
if you need that, i ask you why are you sending it in the wrong direction to begin with?

Re: Is this intersection going to work?

Posted: Sat Apr 08, 2017 6:24 pm
by Engimage
impetus maximus wrote:the only reason i can see to use a round about is to send the train back from where it came from.
if you need that, i ask you why are you sending it in the wrong direction to begin with?
Roundabout is an easy designed multidirectional intersection. It is easily designed, can implement both 3-way and 4-way intersections without deadlocks (except those self-deadlocks linked above). This is the main reason people use it and not cause train can turn around.

Re: Is this intersection going to work?

Posted: Sun Apr 09, 2017 7:38 am
by iceman_1212
Mehve wrote:
DaveMcW wrote:...
2. Factorio hates roundabouts because of path recalculation bugs.
Is that a fact? I tend to stick with roundabouts by virtue of a "why not?" mentallity, unless I specifically want to deny the trains the option, but I've never noticed/encountered any particular bugs. But this is a definite thing?
Yes, if a train repaths in the middle of a roundabout and the distance between chain signals is shorter than the length of the train, then it'll result in the train deadlocking itself.

Re: Is this intersection going to work?

Posted: Mon Apr 17, 2017 3:34 am
by phi1010
Mehve wrote:
DaveMcW wrote:...
2. Factorio hates roundabouts because of path recalculation bugs.
Is that a fact? I tend to stick with roundabouts by virtue of a "why not?" mentallity, unless I specifically want to deny the trains the option, but I've never noticed/encountered any particular bugs. But this is a definite thing?
Yup, at least in 0.13 it was, and I have no reason to expect that this has changed -- it's caused by the definition of how chain signals work. When a train stops inside a roundabout with signals in it for any reason, e.g. recalculation because a track was destroyed somewhere else in the path, it might need to drive over the piece of track it currently already is on to get to the right destination (e.g. after stopping a really short distance after the turn on the wrong track, or when driving through a roundabout requiring driving an Q-loop to allow a 135° turn to an sharp angle, crossing its own path). The chain signals allow reservating the same track twice (causing green signals to get yellow, or yellow signals to stay yellow). Yet, they do (did?) not allow the train to enter an occupied section, regardless of whether it's the train itself that occupies that track.

Re: Is this intersection going to work?

Posted: Mon May 01, 2017 8:09 pm
by mazedragon
phi1010 wrote:
Mehve wrote:
DaveMcW wrote:...
2. Factorio hates roundabouts because of path recalculation bugs.
Is that a fact? I tend to stick with roundabouts by virtue of a "why not?" mentallity, unless I specifically want to deny the trains the option, but I've never noticed/encountered any particular bugs. But this is a definite thing?
Yup, at least in 0.13 it was, and I have no reason to expect that this has changed -- it's caused by the definition of how chain signals work. When a train stops inside a roundabout with signals in it for any reason, e.g. recalculation because a track was destroyed somewhere else in the path, it might need to drive over the piece of track it currently already is on to get to the right destination (e.g. after stopping a really short distance after the turn on the wrong track, or when driving through a roundabout requiring driving an Q-loop to allow a 135° turn to an sharp angle, crossing its own path). The chain signals allow reservating the same track twice (causing green signals to get yellow, or yellow signals to stay yellow). Yet, they do (did?) not allow the train to enter an occupied section, regardless of whether it's the train itself that occupies that track.
I think that's where the problem/bug is; if a train could say 'Hey, the block past this signal is reserved, but it's reserved only by me, I'm going to ignore the signal and proceed', it would solve that issue and let us have well signal roundabouts working well.. but I'm not sure how easy that would be to implement.

Re: Is this intersection going to work?

Posted: Mon May 01, 2017 10:59 pm
by Shokubai
More than anything else, you need space on either side of your rail. I usually go with a 2 track width gap between rails. More than anything else this allows for room to place chain signals throughout the center of junctions.

Re: Is this intersection going to work?

Posted: Sun May 07, 2017 3:19 am
by searker
Yellow signals do not mean that a train somewhere down the line has reserved that block, but that a train will move into it because its speed is too high to stop before the signal.
if a train could say 'Hey, the block past this signal is reserved, but it's reserved only by me, I'm going to ignore the signal and proceed', it would solve that issue
It would not. Say a roundabout is signalled wrong or had some weird layout that would cause the train to do a 270° turn before leaving it (thus causing it to drive through itself if the train is long enough), then your logic would lead to trains crashing or destroying themselves.

Fact is that roundabouts in Factorio are more error-prone than normal junctions (even though .15 should have minimized recalculations).