Why train is not entering empty space?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Shadow_87pl
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Sep 08, 2018 12:25 pm
Contact:

Why train is not entering empty space?

Post by Shadow_87pl »

Hi, why train is not entering empty space? What can i do so they use it?
please check attached picture
Attachments
question
question
q1.png (4.6 MiB) Viewed 4529 times
Loewchen
Global Moderator
Global Moderator
Posts: 9148
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Why train is not entering empty space?

Post by Loewchen »

Make sure it can actually path to the next station from the stations with the gap, if you are sure, post the save.
Shadow_87pl
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Sep 08, 2018 12:25 pm
Contact:

Re: Why train is not entering empty space?

Post by Shadow_87pl »

Thanks, i tried to investigate your question more and here is the answer i think:
just FYI I made a system where there is a waiting bay (on ss) and after there are multiple unloading/loading platform with only rail chain signal in between so if there is no empty station all trains are waiting.
To answer your question: yes i there is a path to the next station (with multiple platforms) from this one. I realized however that there is different number of rail chain signals between waiting bay and platforms.
I read somewhere that algorithm uses number of signals to calculate shortest route. SO i needed to change number of signals after my waiting bay and train moved which fixed the problem.

However what i didnt know: I thought that train only checks only current goal (as you can see on SS there is same number of signals between train and each platform) in reality i think that he already checks not only this goal, but the next one as well because then he wanted to use "shortest way" to the next goal. I thought that making a station will fix this but it did not. Path algorithm outsmart me;)

Thanks again Loewchen i needed your input to solve this:)
Loewchen
Global Moderator
Global Moderator
Posts: 9148
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Why train is not entering empty space?

Post by Loewchen »

The number of signals is not relevant, the PF logic is quite sophisticated though: https://wiki.factorio.com/Railway/Train_path_finding
Dimanper
Inserter
Inserter
Posts: 47
Joined: Sat Sep 17, 2016 9:50 am
Contact:

Re: Why train is not entering empty space?

Post by Dimanper »

What happens in your instance is train calculates its path to the station somewhere long before it actually arrives here (most likely from its previous station), because trains calculate and recalculate their paths only when they need to stop, with chain signals being exception (they actually don't need to fully stop, they just need to start decelerating, at least i believe it's how it works).

Let's say when the train calculates its path somethere long before the arrival, all stations from your example have two trains on them but station #4, which has only 1 train, so the train sets its path to that station and it doesn't change it at any point (if it didn't need to stop at some point. For clarity, let's say it didn't). Then, while our train is on its way, another train arrives at station #4, then 1 train leaves station #3. So now there are 2 trains on every station but #3, but our train already set #4 as its destination and it doesn't change it mid-way because that's how developers did their pathfinding logic (reason being is CPU efficiency). Eventually our train arrives and it's waiting for station #4 to free, even though #3 has only 1 train on it.

To fix the problem you need to basically force the train to recalculate its path right before the stations. Good solution to this is having 2 consecutive signals right before the first chain signal (where the train is waiting on your screenshot), with last one set to close whenever the first one is open. Example blueprint:
I stick these guys basically before any station with multiple platforms and any stacker.
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Why train is not entering empty space?

Post by zOldBulldog »

Can't tell too well from the screenshot but it really looks like it must be an issue with the exit path...which is easy to happen when you have such a jumble of tracks. I might suggest trying to streamline the stacker exit.
monty1510
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon Dec 12, 2016 12:51 pm
Contact:

Re: Why train is not entering empty space?

Post by monty1510 »

Dimanper wrote: Sun Sep 09, 2018 1:19 pm To fix the problem you need to basically force the train to recalculate its path right before the stations. Good solution to this is having 2 consecutive signals right before the first chain signal (where the train is waiting on your screenshot), with last one set to close whenever the first one is open. Example blueprint:
I stick these guys basically before any station with multiple platforms and any stacker.
Thank you. I I have been having this issue since started with trains
Mr. Tact
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Mar 26, 2016 3:37 pm
Contact:

Re: Why train is not entering empty space?

Post by Mr. Tact »

Dimanper wrote: Sun Sep 09, 2018 1:19 pmTo fix the problem you need to basically force the train to recalculate its path right before the stations. Good solution to this is having 2 consecutive signals right before the first chain signal (where the train is waiting on your screenshot), with last one set to close whenever the first one is open. Example blueprint:
I stick these guys basically before any station with multiple platforms and any stacker.
Why doesn't this cause the trains to slow down when approaching it? I mean one of the signals is red, yet when I tried this trains flew through it into empty parking slots seemingly at full speed.
Professional Curmudgeon since 1988.
Mr. Tact
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Mar 26, 2016 3:37 pm
Contact:

Re: Why train is not entering empty space?

Post by Mr. Tact »

Looks like maybe the approaching train turns the first signal yellow allowing the second to go green early enough that the train doesn't need to slow down?
Professional Curmudgeon since 1988.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Why train is not entering empty space?

Post by Optera »

The findings of this thread may be relevant to your stacker problems.
Post Reply

Return to “Gameplay Help”