[1.1.14] Train blocks itself in train limit

Bugs that are actually features.
Post Reply
ARandomStone
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu Apr 13, 2017 12:09 pm
Contact:

[1.1.14] Train blocks itself in train limit

Post by ARandomStone »

What did you do?
I tried to use the "train limit" feature.
I made a train with a schedule to go from Station "1" (til GREEN >0) to Station "1" (til GREEN >0).
The train is currently stationed at train stop "1" with the train limit set to 1. There are no other train stops "1" with a limit >0 available. I send a green signal to the train stop (and deactivate it afterwards).

What happened?
Given that there is no available station the train doesn't move. Instead it continuously displays "Destination full". The train stop displays a limit off 1/1, the output of the train id reads 0, the cargo wagon is closed, meaning the train isn't at the station.

What did you expect to happen instead?
Given that the train is neither at the station nor pathing towards it, i expected the train limit to switch to 0/1. This would allow the train to reenter the station.
The result in the end should be the limit being 1/1 AND the train being at the station.

Image

How to reproduce:
Place the blueprint, set the train to automatic mode. Switch the constant combinator set to a green signal on and off again.
Blueprint:

Code: Select all

0eNrVmMGSoyAQht+Fs05F1Gg87BPscW9bKYtom6EWMYWY2eyU774gSXQSMgNTs4fNIRUQvu6/oYXOK9qxAQ6CcomKV0Srjveo+PmKerrnhOk+eToAKhCV0KIAcdLqliCUoTFAlNfwGxXRuA0QcEklBTN/apxKPrQ7EGrAdWbfEsZCRtqDoh26Xk3puLajMDF+SgN0QsU6fkoVXXkjRcfKHTyTI+2EHlZRUQ1UlupZfZ3bUNHL8s7nIxVyUD2z8WlE+AMZeC+J1r3SjfZABJHaBvqGRvOcQ6Ut9BoZ6a+9AOBLfbRGRTJuRzXhTjO+mr2YCpWZHeWTmXfEp5P4mgpjXvXYQ9FQJkE8WK9H2r8b7YMWHi0X8Cskx5+VnPxLyUbCA9nqd19qiw1hPXxFEJKrfanShIe97Gx7/bLYTroFkLrUoAPU5YRFhRQDBMbG9ZFfCvQgDawvGW2pfMM895U+O8snfNEidLod37SxDq/yURITGYWyBDudd9wgjlCH05vpPtorE+38JtoW4vpKZJ3avJ2kR7AAcwPMFLATVDHObq6eMuWTfltO+kVX/QIZNgMwLdliL5vjqOO+f5aPNKSzyYUGbGHmzszMmblxZm6cmdHKFZpE7tD5sKmI2HfhC9mrsffI9P0l5EfV1Qk1hA+M2QxhZ+9jd+9jZ6j7fogSZ6j7hogccy/F1tyLbci1q5/Y+JlFb6GZDeqcYWlqhUY2aO4mHicGmTggFxk27C7vvUeZkFlfJnhOKGDKmKBVCBzE/hSqKx6IhlTwcHve6laLsRuaBoQ6A/6Aztbrx2Y6ctwO+SUiNgj2CmuO33qc2JCxl1+3yNSGTDy3aZ46QP2Osjz/eOfjtVeG3iJtSY99k+lWui3tce55BuYbB083noegCzReeZ6CTtDI8xR0gvoeTk5Q38PJCep7ON1D1S2+r56hHti5/Jyvbrq9Xjw3pcPiUhmgF7KsJw3AFIRQnu+8U/Vy/n2uQNF01/10DbooSt6rQ7c6YP+Tu9uppNJ/FhSL/xYCdFRlm1mtPEqyDc5wukmTdD2OfwF97IUG

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

Re: [1.1.14] Train blocks itself in train limit

Post by kovarex »

Hello, I couldn't reproduce it based on the blueprint, but generally i wouldn't consider it a bug.
For example, two trains wanting to go to theirs stations still limit themselves, as the train only removes the current reservation once it can actually leave the station, which is correct and wanted behavriour.
One train doing it is just a special corner case of it, but still internally correct.
Attachments
mutual-limit.png
mutual-limit.png (2.42 MiB) Viewed 1434 times

ARandomStone
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu Apr 13, 2017 12:09 pm
Contact:

Re: [1.1.14] Train blocks itself in train limit

Post by ARandomStone »

Well, it doesn't feel right to me that a train holds the reservation that long. But if you guys feel like it and it's consistent, than it shall be that way.
Thanks for checking it out.

Kalanndok
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sat Dec 12, 2015 9:07 am
Contact:

Re: [1.1.14] Train blocks itself in train limit

Post by Kalanndok »

The problem with this is:
Even though it has the "permission" to depart the train is still blocking access to the station so that no other train can enter it.
Since the train-stop doesn't know about the train's schedule it cannot determine when or even if the train will finally depart so it keeps the reservation.

You can solve that knot however:
You can use circuit-magic to increase the train stop limit by 1 for a single tick if the departure-conditions are met and there is still a train waiting.
Why just one tick? If you keep it longer you might accidently call a train into the free slot that is left by the departing train before the circuitery can reduce the train limit again.

Post Reply

Return to “Not a bug”