I don't think they covered not making your trains too big for your rail setup at all.
Why does the train crash?
- 5thHorseman
- Smart Inserter
- Posts: 1193
- Joined: Fri Jun 10, 2016 11:21 pm
- Contact:
Re: Why does the train crash?
Re: Why does the train crash?
Heh, such is the nature of trains.Nemo4809 wrote: βMon Feb 17, 2020 11:52 amI kind of see it as
"because the tool provide by the game to prevent collisions did not work as advertised"
I don't believe this special exception was ever mentioned in the mini-tutorials - heck, even if it was, I probably forgot about it as I was overwhelmed with information and desperately trying to grasp how the signals work; and how I should be using them.
They can become highly complex and frustrating. Please also consider that the debug tools we now have at our disposal were not available back when this exception was added. I'm not even sure if signal blocks showed as much information while being placed as they do now. My memory might be failing me here however.
Re: Why does the train crash?
The rail network in the FFF is ill formed imho. Along a straight path (no looping back or anything too crazy) a block should not appear twice.
If it does the train should simply fail to reserve the second case. If the train is short enough ti might release the first occurance of the block and then be able to reserve the second and go on. But more likely you end up with a deadlock. But you get what you build. Ideally the game should detect such a setup and make the signals blink green/yellow/red like in other illegal cases. But this case might be hard to detect.
There is a reason for why a train ignores its own reservation and that is: viewtopic.php?f=11&t=19619&p=302527#p302527. But isn't that case obsolete? Trains no longer repath inside chain signals. That path would never have been chosen from outside the turn-around and once inside the path isn't changed anymore.
So this looks like an exception to the rules made as workaround to a problem that has since been solved properly? We could now remove the exception and have train networks save from trains colliding with them self without getting trains stuck in every roundabout. Yes, some existing train system would break but I consider those ill formed to start with, badly signaled like in the FFF.
Taking this one step further the path finder could know how long a train is (+possibly breaking distance) and see that a short train will clear a block before reserving it a second time. As in the score for a red signal caused by the train itself changes depending on the distance traveled since leaving the block. If it's <= train length then cost = infty. Train length < distance < train length + max breaking distance gives a sliding cost since the larger the distance the faster the train can pass through it without breaking for a red signal. Distance > train length + max breaking distance would have cost 0.
Note: this would be for the cases where a track loops over itself. A path that must be avoided for long trains and best suited for short trains. You get those in grids.
Re: Why does the train crash?
I suspect what the ill formed layout FFF-229 is specifically highlighting, is a simplified layout that was causing the increased crash reports (see the graph in the same blog), and the result off an underlying bug.
I might be wrong.
I might be wrong.
Re: Why does the train crash?
Totally. It's probably the simplest case you can have where a train crosses the same block twice.
A more realistic case might be a grid where you can only take left turns. Three lefts make a right but then you cross your own path. Then imagine a giant ore train finding it's way into the grid. It will take 3 left and crash into itself. There is no way to signal this correctly so that a long train will not crash into itself due to the exception.
Re: Why does the train crash?
I can see you feel strongly about this. Consider these:
In real life train signalling does indeed allow the driver to proceed under certain situations; depending on the line owner's rules, company rules, regional rules, and prevailing conditions. It's pretty easy to find images of real life signalling that include red lights (some signals only have red light) meant for proceeding. Factorio does not implement the complex decisions that a train driver makes while driving a train. Factorio approaches trains from more of a logistical perspective; determining ways to move items efficiently from one place to another.
The value in signalling is all about the train's ability to path to its destination in this game, not about anti-collision. Signals provide a way for trains to move closer to their destinations by declaring blocks of tracks that the path finding algorithm can use. Poorly placed signals may result in deadlocks or collisions. In your example, A red signal means nothing if it's red because the same train is occupying the same block. It's a poorly designed example that results in a collision. If you take that design and add 1,200 rails in the middle, stretching the curved ends out so you can't see the whole design in one screen, the value in letting the train proceed becomes more obvious (I hope!)
P.S. Sorry to be pedantic but a conductor does not drive the train.
Re: Why does the train crash?
i didn't really read anything else you wrote because this is my whole point, the original solution to a bad behaviour was more bad behaviour.
My Mods - Crashed spaceship belt balancer
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
Re: Why does the train crash?
mrvn wrote: βMon Feb 17, 2020 3:22 pmThe rail network in the FFF is ill formed imho. Along a straight path (no looping back or anything too crazy) a block should not appear twice.
If it does the train should simply fail to reserve the second case. If the train is short enough ti might release the first occurance of the block and then be able to reserve the second and go on. But more likely you end up with a deadlock. But you get what you build. Ideally the game should detect such a setup and make the signals blink green/yellow/red like in other illegal cases. But this case might be hard to detect.
There is a reason for why a train ignores its own reservation and that is: viewtopic.php?f=11&t=19619&p=302527#p302527. But isn't that case obsolete? Trains no longer repath inside chain signals. That path would never have been chosen from outside the turn-around and once inside the path isn't changed anymore.
thanks, i forgot to mention that earlier when Dominik's thread was linked. the issue there was spontaneous repathing inside chain signal segments.
we can now make trains avoid blocks they occupy because they don't spontaneously repath.
maybe if we all say it 3 times the devs will remember and fix this problem.
My Mods - Crashed spaceship belt balancer
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
Re: Why does the train crash?
Just want to add a note to hopefully close the discussion:
Both with and without the exception there is some bad behavior. With the exception long trains crash into them self. Without the exception trains can deadlock in an example like the FFF. The deciding argument for me is that the deadlock can be avoided by proper signal placement. The long trains can not be prevented from crashing into them self.
So to me clearly the way to go is to leave the things the player can fix to the player and fix the thing the player can't fix.
Both with and without the exception there is some bad behavior. With the exception long trains crash into them self. Without the exception trains can deadlock in an example like the FFF. The deciding argument for me is that the deadlock can be avoided by proper signal placement. The long trains can not be prevented from crashing into them self.
So to me clearly the way to go is to leave the things the player can fix to the player and fix the thing the player can't fix.
Re: Why does the train crash?
Without the exception to long trains deadlock on themselves and the only way to prevent this (large enough circles were they can't block themselves) also fixes the "crashing into itself" problem with the exception.
Re: Why does the train crash?
They deadlock in this simple case (and the player can fix that). Problem is they do crash into them self in more complex cases where they have alternative routes where they don't crash. Without the exception they simply take the longer route.
Re: Why does the train crash?
Both scenarios, train too long for track, and insufficient signalling are equally poor design choices by the player. The train to track length situation is far more obvious, and there is a helper setting that allows us to see how the wagons will fill a track. Insufficient signalling is difficult to foresee, and was especially so when the train would deadlock when its path looked like it should be clear. When space is tight, and a complicated track layout is still in evolution, it is incredibly difficult to catch all possible conflicts. The problems can lay unnoticed for a long time, and then suddenly manifest. It's a trap that I would guess has caught many of us at some time or other. My personal opinion is that a rare train crash due to length is easier to understand and mitigate against, than a subtle signalling issue.
I flippantly remarked earlier that an older Factorio version be played, and the intended message was valid even if it wasn't taken as such. Unless you have actually experienced the subtle deadlock problem, it might be hard to understand the frustrations involved. Also, forcing the old behaviour of a train stopping (deadlocking) at a red signal when crossing its own path statement is equally valid and can still achieved by slaving a circuit controlled signal from the automatic signal that is currently allowing the same ID train to pass its own path.
The only real solution to both problems is to rip up the tracks and ensure that there is both sufficient space and signalling. I'll contend that that is not always possible or obvious in the heat of gameplay.
I flippantly remarked earlier that an older Factorio version be played, and the intended message was valid even if it wasn't taken as such. Unless you have actually experienced the subtle deadlock problem, it might be hard to understand the frustrations involved. Also, forcing the old behaviour of a train stopping (deadlocking) at a red signal when crossing its own path statement is equally valid and can still achieved by slaving a circuit controlled signal from the automatic signal that is currently allowing the same ID train to pass its own path.
The only real solution to both problems is to rip up the tracks and ensure that there is both sufficient space and signalling. I'll contend that that is not always possible or obvious in the heat of gameplay.
Re: Why does the train crash?
your fatal flaw was not understanding or remembering that the original case outlined in the FFF was a problem because trains spontaneously repathed in chain segments.Squelch wrote: βWed Feb 19, 2020 4:44 pmBoth scenarios, train too long for track, and insufficient signalling are equally poor design choices by the player. The train to track length situation is far more obvious, and there is a helper setting that allows us to see how the wagons will fill a track. Insufficient signalling is difficult to foresee, and was especially so when the train would deadlock when its path looked like it should be clear. When space is tight, and a complicated track layout is still in evolution, it is incredibly difficult to catch all possible conflicts. The problems can lay unnoticed for a long time, and then suddenly manifest. It's a trap that I would guess has caught many of us at some time or other. My personal opinion is that a rare train crash due to length is easier to understand and mitigate against, than a subtle signalling issue.
I flippantly remarked earlier that an older Factorio version be played, and the intended message was valid even if it wasn't taken as such. Unless you have actually experienced the subtle deadlock problem, it might be hard to understand the frustrations involved. Also, forcing the old behaviour of a train stopping (deadlocking) at a red signal when crossing its own path statement is equally valid and can still achieved by slaving a circuit controlled signal from the automatic signal that is currently allowing the same ID train to pass its own path.
The only real solution to both problems is to rip up the tracks and ensure that there is both sufficient space and signalling. I'll contend that that is not always possible or obvious in the heat of gameplay.
that's why no one is listening to you, you've got no idea what you're talking about (this "helper setting for displaying train car length" is limited to a low number of wagons and only appears when hilighting or managing a train STATION) - you're not a developer - and you keep telling others to shove it and play an older release if we want the correct behaviour. that's why i told you to go away.
My Mods - Crashed spaceship belt balancer
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
Re: Why does the train crash?
it should be noted this is also something that mods cannot change.
circuit controlled signals can be devastating to game performance. you realise they will be required *everywhere* and trains can still get stuck and it doesn't fix the issue of trains taking the wrong route when we've signalled and pathed a correct option for them. instead, it makes more problems - unnecessary rail traffic, and more.
circuit controlled signals can be devastating to game performance. you realise they will be required *everywhere* and trains can still get stuck and it doesn't fix the issue of trains taking the wrong route when we've signalled and pathed a correct option for them. instead, it makes more problems - unnecessary rail traffic, and more.
My Mods - Crashed spaceship belt balancer
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
PHP Train Schedule Editor
β’ β’ β’
Base: Bob's @ 1 Million SPM
β’ β’ β’
Tool: Linux-optimized Factorio launch script
Re: Why does the train crash?
Do you guys have a source for that?mrvn wrote: βMon Feb 17, 2020 3:22 pmviewtopic.php?f=11&t=19619&p=302527#p302527. But isn't that case obsolete? Trains no longer repath inside chain signals.
Re: Why does the train crash?
This goes nowhere. ptx0 calm down. AFAIK trains are allowed to repath in chain signal sequence, they are only limited at what path they can choose. Train will hit itself when it its longer than a loop and path goes around loop. Closing topic.