[0.11.13] Train blocks itself unnecessarily

Bugs that are actually features.
Post Reply
dee-
Filter Inserter
Filter Inserter
Posts: 415
Joined: Mon Jan 19, 2015 9:21 am
Contact:

[0.11.13] Train blocks itself unnecessarily

Post by dee- »

Not sure if this can be considered a bug or just my bad* rail layout...


Observation:

In the following scenario the train came from north and wants to go south.
From what I can tell it chose the shortest path, straight through the circle.
However if the train choses this path it enters a separate short block, block 2.
The train can not leave block 2 because part of the train is still in the surrounding block 1, thus the signal to leave block 2 and enter block 1 is red.

Image

In case you wonder what's this block 2 for - that's where I normally park my ride :D


If the train logic would not only consider the train's head (telling signals to turn from green to yellow) but also the train's body on the calculated path it would find out that part of the train is still in and therefore reserving block 1 when it would try to leave block 2 and enter block 1. Ergo this solution is not considered, as there is no path, leaving only the other solution, going around the circle and staying in block 1, which I would consider the correct solution.


*) "bad" in the sense of "not suitable for train route planner"

Cloner
Fast Inserter
Fast Inserter
Posts: 100
Joined: Tue Dec 09, 2014 12:59 pm
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by Cloner »

Untill pre-signals are implemented dont place signals inside of intersections.

User avatar
Gandalf
Filter Inserter
Filter Inserter
Posts: 294
Joined: Fri Dec 19, 2014 10:15 pm
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by Gandalf »

It doesn't block itself "unnecessarily", it blocks itself because your signal block is too short. Consider that this isn't so much a matter of
pathfinding. It's really just signals turning red when something's inside that block. Trains don't go across red signals, nothing else matters.

As a rule of thumb you don't want blocks that are shorter than trains. If you need a parking spot, build a side track beside the main line,
not in the middle of an intersection.
OS: Linux Mint 19 x64 | desktop: Awesome 4.2  |  Intel Core i5 8600k  |  16GB DDR4  |  NVidia GTX 1050 Ti (driver version: 410.104)    (2019-03)

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by ssilk »

Blocks are just stupid. I build once such a circle in a form, where it needs to make a 270 degree turn to go into the right direction. This worked perfect up to 7 wagons. The 8th was then just destroyed. It tooks a while for me to find that, cause always when I saw a train with only 7 wagons I coupled a 8th on it. :lol:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

dee-
Filter Inserter
Filter Inserter
Posts: 415
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by dee- »

Good morning ;)

Ah, so it's not considered a bug then.

@gandalf: of course it IS unnecessary blocking itself because for the situation there IS a solution that prevents self-blocking.
The train route planner is just too straight forward (consider only train head and ignore train length, choose shortest path not the self-not-blocked path)

I'll implement workarounds for the train route planner. Read: stops on the side and don't nest blocks that could be too short for the longest train in the system because it will stuck if that's the shortest path.

User avatar
Gandalf
Filter Inserter
Filter Inserter
Posts: 294
Joined: Fri Dec 19, 2014 10:15 pm
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by Gandalf »

My point is, the signals are very simple minded. They don't care who blocks them, if any part of any train
is in that block it's red. And trains don't run across red lights, period. Those rules are intuitive, easy to
understand and remember. If you start adding “smart” exceptions it becomes harder to predict what will
happen and opens the potential for weird edge cases.

For Example, consider a simple loop with two blocks, two stops and two trains (one per block respectively).
Now you tell each train to go to the stop in the opposite block. Again we have a situation where there is
technically a simple solution, but would you want to make it work?

If you start considering every possible situation where a train could technically still run you'll reach the
point where signals just become obsolete because path finding might as well be smart enough to do
everything on its own, regardless of how impractical the rail layout is.

Basically signals in the game are a feature but also a challenge. You have to use them right.
OS: Linux Mint 19 x64 | desktop: Awesome 4.2  |  Intel Core i5 8600k  |  16GB DDR4  |  NVidia GTX 1050 Ti (driver version: 410.104)    (2019-03)

User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 530
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by hitzu »

It is not a bug. It is just wrong layout. You had to place one more signal on the left part of the circle to mark the end of a previous block

dee-
Filter Inserter
Filter Inserter
Posts: 415
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by dee- »

Thanks all.

Yeah, I'll reconsider my expectations on signals and accept they're dumb :D Making it foolproof is part of the challenge ;)

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.13] Train blocks itself unnecessarily

Post by kovarex »

dee- wrote:Thanks all.

Yeah, I'll reconsider my expectations on signals and accept they're dumb :D Making it foolproof is part of the challenge ;)
Yes, and there will be more ways to control it in the future ...

Post Reply

Return to “Not a bug”