Trains not pathing through disabled stations

Place to discuss the game balance, recipes, health, enemies mining etc.
Post Reply
JNJABA
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 12, 2019 12:47 am
Contact:

Trains not pathing through disabled stations

Post by JNJABA »

I'm having an issue where a train refuses to go to an empty station because of some disabled stations in front of it. I've reproduced the problem in a little test BP which you can find here https://pastebin.com/My6AV87t. Here is an image of the BP Image. In this test BP, you will turn on the train on the bottom which will then start going between stations. If you turn this on without modifying anything, the train will go to the inner loop and stop behind the train that is already waiting instead of the free station in the upper loop. If you disable the last station on the Inner loop and turn on the moving train, it'll finally go to the empty train station in the outter loop.

The reason I'm posting here in the balancing board is because I think that disabled train stations should count far less when calculating the pathing for trains. Certainly not a penalty of 2000 which I believe they are receiving. If this is working differently than I'm expecting, i'd love to here what I'm misunderstanding. I do think this will be a nice change for creating fancy train stations in Vanilla.

I've already posted this on Reddit to try and get some solutions, here's a link to that post in case it can provider further details https://www.reddit.com/r/factorio/comme ... ybe_a_bug/.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Trains not pathing through disabled stations

Post by quyxkh »

JNJABA wrote:
Thu Sep 12, 2019 1:06 am
In this test BP, you will turn on the train on the bottom which will then start going between stations. If you turn this on without modifying anything, the train will go to the inner loop and stop behind the train that is already waiting instead of the free station in the upper loop.
That's not what happens for me, I build that, turn on the bottom train, it paths to the empty enabled stop.

JNJABA
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 12, 2019 12:47 am
Contact:

Re: Trains not pathing through disabled stations

Post by JNJABA »

Well that's annoying. You might need to put fuel in all of the stationary trains and then send them to the stations so that they actually count as being at the station. They may not technically be at the station after being placed by the BP.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Trains not pathing through disabled stations

Post by quyxkh »

Ah, I see it now. Sorry for not figuring that out, I'd like to think I could have.

So, the occupied bottom-right stop looks closer than the unoccupied top-left stop.

With the setup you've got here, where the trains in the occupied stops are never going to leave and the disabled stops are never going to be enabled, this produces a confusing result.

But in ordinary setups, trains don't occupy train stops forever, and trains are Very Strongly Discouraged From Pathing Past Stops They're Not Going To. When a train has to path, it can only pick a stop and route based on the current conditions. Ideally it's going to plan its route once, blindly follow that plan from then on, and that'll git r dun. It has rule-of-thumb metrics to guess what things might look like when it gets there. The best it can do is make those guesses mostly right-ish; the alternative is to have every train spending oodles (<-- jargon) of cpu endlessly prognosticating and re-checking and communicating.

They're dumb. You have to help them. That can be Really Annoying.

Or, you can treat it as a design puzzle to solve. The way Factorio's trains are set up, daisy-chained stops like you've got don't work well, you need bypass legs
layout
or the more-popular direct-entry stops off a single multi-stop entry gate.

JNJABA
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 12, 2019 12:47 am
Contact:

Re: Trains not pathing through disabled stations

Post by JNJABA »

Ya there are definitely options I have for a solution here. The paths around the stations seem to be the most basic solution where as deliberately adding more weight to the train path can also resolve this. But a lot of it feels hacky. That's why I personally think the train pathing should be "balanced" to count disabled stations with a smaller weight where the example I posted above wouldn't have any surprising issues. I could also be just getting greedy and want everything my way :D

Post Reply

Return to “Balancing”