Is this train station selection a bug?

Things that has been reported already before.
seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Is this train station selection a bug?

Post by seePyou »

Hello all,

I've been learning how to build up and I thought I had understood how train stops and signals worked. I actually still believe that the design I'm showing in this save SHOULD work. The behaviour though is very peculiar and close to comical.

We start the game on a train going to unload. The train enters a waiting queue. At this point you should disembark from the train and move down and right.
When you can see the train you came with and the unloading stations while sitting in between the two, mouse over the engine of the train you came in with.

You will notice that his path shows that it wants to go to the top "Unload IC" station, which is currently occupied, so the final arrows are red. The one below it, also named "Unload IC" is empty but the train doesn't go there.
Still waiting and having the mouse over the engine, we notice in a bit another train approaching! It passes us and moves to the unoccupied Unload IC. Just as this new train come very close to the station, our train switches paths to the NOW OCCUPIED station. And the one above has left.
So he still goes nowhere, even though it again now has an unoccupied station.

I am using the latest version of the game as of today!

So is this a bug? Or am I designing this in a wrong way?
Attachments
weird train stop selection.zip
(12.82 MiB) Downloaded 121 times


seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

Not exactly, as the train will eventually move to one of the stations, but I do not know if this will be blocked forever provided enough traffic or not.
Also the description of the linked issue seems much more convoluted than my setup. My trains only have two stops and share the one unload station.
Nothing blocks access to the free station, it's only the routing of a train that is waiting behind a blue chain signal! Its signal is blue but it doesn't try to find where it can go based on that blue signal.

Maybe I'm not understanding the issue you linked properly, but I thing in the save I shared, the main issue is that the train "ignored" a blue signal and is stuck on its original choice of a station (but then also switches to a newly occupied one which is the hilarious part ;) )


seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

Not that either! In fact I WISH that the train would change its path, then we would have no problem!

Again, problem is that the train IGNORES a blue chain signal and doesn't move ahead but still waits because his chosen path is blocked and it doesn't look for the open path that the blue chain signal indicates.

Loewchen
Global Moderator
Global Moderator
Posts: 8969
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is this train station selection a bug?

Post by Loewchen »

Had time to load the save, it is the one under the first link I posted.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

I have no reason to doubt you of course. Would like to point out though that one of the answers in that post says that trains are not supposed to be parked on spots that will make them never move! My save should NOT be like this, the train SHOULD have resolved a valid path to go, so it's not a user error (me designing a path and station and signal combination that results in invalid or permanent train block) but an actual defect.

So long as that is understood all is well and I'll patiently wait for this to eventually be resolved!

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 504
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Is this train station selection a bug?

Post by Yoyobuae »

seePyou wrote:it's only the routing of a train that is waiting behind a blue chain signal! Its signal is blue but it doesn't try to find where it can go based on that blue signal.
Train behave really dumb at blue chain signals. They don't react at all to a chain signal changing from red to blue. They only react immediately when signal (both kinds) changes to green.

Sometimes they change path on their own accord (not due to a change in signals). Still takes them a while for that.

Loewchen
Global Moderator
Global Moderator
Posts: 8969
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is this train station selection a bug?

Post by Loewchen »

Yoyobuae wrote:
seePyou wrote:it's only the routing of a train that is waiting behind a blue chain signal! Its signal is blue but it doesn't try to find where it can go based on that blue signal.
Train behave really dumb at blue chain signals. They don't react at all to a chain signal changing from red to blue. They only react immediately when signal (both kinds) changes to green.

Sometimes they change path on their own accord (not due to a change in signals). Still takes them a while for that.
This behaviour has nothing to do with chain signals, if the train has free path along its way it will definitely move, the only problem is, that the path it chose is not ideal.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

Loewchen wrote:This behaviour has nothing to do with chain signals, if the train has free path along its way it will definitely move, the only problem is, that the path it chose is not ideal.
I find it peculiar that you say this, since what Yoyobuae said is exactly what I experience:
Yoyobuae wrote:Train behave really dumb at blue chain signals. They don't react at all to a chain signal changing from red to blue. They only react immediately when signal (both kinds) changes to green.
THIS exactly, to the letter, is the problem I noticed in my specific case! No reaction, until both signals are green despite having a blue signal in front of him.

If this behaviour really has nothing to do with signals, then maybe that is the problem, and trains should be told what a blue chain signal is for.

Loewchen
Global Moderator
Global Moderator
Posts: 8969
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Is this train station selection a bug?

Post by Loewchen »

seePyou wrote:[...]trains should be told what a blue chain signal is for.
All chain signals do, is block if the exit block of the trains path is occupied. The blue signal is completely irrelevant for a train, its only purpose is to tell the player that at least one path is open and at least one is blocked.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

That could be one change then. A train is monitoring the signal, as it has to, so that it knows when a signal turns green from red. So there is a monitoring loop in there somewhere. That loop or process should be extended to include the blue signal, so that the train waiting at a red signal that now is blue, looks ahead at the next blocks and finds the now clear blocks (indicated by the blue signal!) and goes there.

If indeed trains do not consider blue signals, and they are player informational only, then making trains blue signal aware is the answer!

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 504
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Is this train station selection a bug?

Post by Yoyobuae »

Loewchen wrote:This behaviour has nothing to do with chain signals, if the train has free path along its way it will definitely move, the only problem is, that the path it chose is not ideal.
I made that post after verifying the behavior in-game.

Chain signal changes from red to blue, train just sits there.

I then proceeded to make a little circuit network thing which turned all rail signals reachable from the chain signal to green at the same time. The train reacts immediately.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14150
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Is this train station selection a bug?

Post by Rseding91 »

This is a performance thing: if trains constantly tried to re-path the game would be unplayable. Because they don't you get these situation where "the train has a better path but wants to go on the path it already has" because it doesn't know there's a better path without trying to re-path which is incredibly expensive.

You as a human can identify the path visually very quickly but the trains system can't do that - all it has is the A* path finding which has to walk the entire path in front of it to know.

By introducing a circuit network controlled signal you tell the trains "any path with this circuit controlled signal is invalid when the signal is blocked" which forces them to re-path *a lot*.
If you want to get ahold of me I'm almost always on Discord.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

I can appreciate programmatical difficulties and I can be human about them instead of a nagging demanding 5-year-old.

First, we need to identify and admit that there is a problem, though, which I think we all do. So let's not say that this is working fine, or as intended, or that blue chains are supposed to be ignored. There is a problem, and we are aware of it, and now we can move on. The time frame for resolution can be allowed to be whatever the staff requires, which is only human, and so understandable.

Then we need to start discussing solutions. Maybe having two stations with the same name is where the issue starts being difficult and we should not be doing this. Maybe the pathing needs to be rethought. Maybe the chain signals need to be redesigned, I do not know! But I'm willing to be part of the discussion!

As such, might I start with the thought that the pathing does not have to be extensive? Starting from the situation I encountered, why did the train repath away from its original path when the chain was triggered? There was no reason for it! Here is why:
a) If it had stayed on its original path, it would have gone to the top station much sooner than it did. It missed the chance to go there when it decided to change paths.
b) the new path it chose was LONGER in distance so it again made no sense. It tried to recalculate his path and I assume it rejected the previous fork as a recently invalid choice, but it was the wrong decision to make.
c) The new path it chose was also WRONG! It made the choice to go to a track that was already occupied! The choice was made while a train was on that track so not only did it choose the longer one, but one that was occupied as well, making certain that it would be invalid shortly.

If we need to make the train decisions cheap, then let's just keep them constant, no repathing to be done, only listen to signals and do not move until it is green, but so long as it is red, do not recalculate.
Maybe that will work better for a time until a better solution can be found. Or maybe I'm completely wrong!

Rseding91
Factorio Staff
Factorio Staff
Posts: 14150
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Is this train station selection a bug?

Post by Rseding91 »

blue chains are supposed to be ignored
But they are. A blue chain signal means nothing to a train it just means there's a possible exit once entering. It doesn't mean the train can go on the path it wants to go and it doesn't mean that if it tried to use the other path it could get to the place it wants to go. All it means is there is at least 1 exit after entering that section of rail.

You're looking at them assuming they're always used right before multiple train stops and that the train should treat it as an indication it should re-path - which is incorrect.
If you want to get ahold of me I'm almost always on Discord.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

That's why I allow for all possibilities. No blue signal action? Then the train should never repath lest it chooses the wrong one again, as it did in my case.

seePyou
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Apr 03, 2017 3:17 pm
Contact:

Re: Is this train station selection a bug?

Post by seePyou »

I checked the save with the new 0.15.4 experimental release on Steam, and the behaviour is not replicated anymore. Trains find a suitable station as I would expect them to!
Great work!
Having read the changelogs, I cannot say what specifically changed to allow this. Was it a side effect of some general fix/optimisation?
Regardless, thank you!

Post Reply

Return to “Duplicates”