News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[BUG] Deadlocks caused by depots

Started by Mariculous, July 08, 2020, 09:16:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

Hey there,
There is a design issue with depots causing deadlocks.
Trains entering a depot will not reservate the tile of the depot itself. Trains on a depot tile will however occupy that tile.
This will cause deadlocks when multiple trains in a row enter a depot for replacement no matter the used signalling system.

Would it be possible to either
a) Make signalling systems to reservate the depot tile including (in case of drive by sight this would require the depot to be part of a drive by sight block) or
b) Ignore collisions on the depot tile entirely (does also require drive by sight blocks) or
c) Make through depots, so one side can be used as an entry and the other one as an exit.

jamespetts

Thank you for the report. It would be helpful to have a minimal reproduction case for this to allow for more detailed testing. I should note that (c) would be a very major project, as it would fundamentally change the way that depots work (requiring a large set of new graphics for each pakset), and is not likely to be feasible in the foreseeable future.

I will have to investigate very carefully all the implications of either (a) or (b), or possible other solutions.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

Looking into this further, I am afraid that I am unable to reproduce this: railway vehicles do appear to reserve depot tiles both when entering and leaving the depot. Are you able to upload a reliable reproduction case of the circumstance where this does not occur?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

#3
There are no special circumstances. Just make sure multiple vehicles in a row are entering and leaving a depot, for examply by using the "replace" feature.

Edit: See the two attached saves.
The first using drive_by_sight, as there is nothing else available at that early era.
The latter using Absolute block.
It will happen this way with any working method apart from time_interval, though in that case the reason for not deadlocking is not a proper reservation but the fact that 5 minutes are usually enough to enter the depot, leave it and clear the single tracked section.

jamespetts

Quote from: Freahk on July 29, 2020, 09:11:04 PM
There are no special circumstances. Just make sure multiple vehicles in a row are entering and leaving a depot, for examply by using the "replace" feature.

You refer to multiple vehicles - is this a necessary element of the reported issue of vehicles not reserving the depot tile? My tests so far have just been to check whether rail vehicles in the drive by sight working method actually reserve the depot tile by using the reservation display. That shows that they do reserve the depot tile. There is no reason to use multiple vehicles at once for such a test unless somehow the question of whether rail vehicles reserve the depot tile is influenced by other vehicles in some way, but, if so, I do not have a clear understanding from your description of the nature of this influence, as would be necessary for me to create a reproduction case for this, as would be necessary if I were to try to investigate this further.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

See the attached saves, I've edited while you was typing this.
Vehicles seem to reserve the way correctly if it's free but ignore that tile if it's occupied, causing a deadlock.

Further investigating this, it seems the reservations is done properly but the train spawning in the depot will override it on the depot tile, so the train entering the depot won't be able to access that last tile.

A posible, rather simple solution should be to spawn trains in a depot without a reservation at all.