The International Simutrans Forum

 

Author Topic: Miscellaneous issues with the one train staff working method  (Read 438 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • *
  • Posts: 231
  • Languages: DE, EN
Miscellaneous issues with the one train staff working method
« on: August 23, 2019, 02:18:17 PM »
I have two more one_train_staff related bugs:
Sometimes the reservation does not reserve the whole track to the next one_train_staff cabinet. First I thought this only happens when using the explained exploit, but it does also occur when used at dead-end tracks.
When this happens and another train comes to a halt at the one_train_staff cabinet, the train at the cabinet will wait in drive_by_sight (or maybe any other mode it was in, but I didn't test this) but also reserve these tiles.
When the train in the one_train_staff block returns to that tile, it will come to a halt and will wait for the track to be cleared, which will never happen.
See the attached images for this.

I don't know how to exactly reproduce this but it will happen in the savegame at layouts 6 and 8, whereas layout 7, which is exactly the same as layout 8, except being rotated by 1080° does not seem to be affected.
Also, layout 10 seems to be perfectly working, which is exactly the same as layout 6, except that the cabinets are connected diagonally.
Just unlock the deadlocked trains by stopping the one waiting at the one_train_staff cabinet and clearing the reservation of that train and watch them moving. There will be a missing reservation soon that will be reserved by the train waiting at the cabinet in drive_by_sight soon.

Yet another one:
When a train has to wait at a one_train_cabinet, its reservation will be only one tile instead of the whole train length. You can see this in on the images and in layouts 5,6,7,8,9 and 10.
Other trains can then stack at the exactly same tile and this will very likely cause a wrong reservation when the staff is returned. You can see this when you start the train in the depot of layout 7.


Furthermore, at layout 9 some poor one_train_staff cabinets are being abused for some kind of perfectly working absolute block signaling, theoretically being available even before time interval signaling was invented.
« Last Edit: August 23, 2019, 02:49:07 PM by Freahk »

Offline Freahk

  • *
  • Posts: 231
  • Languages: DE, EN
Re: Miscellaneous issues with the one train staff working method
« Reply #1 on: August 23, 2019, 06:50:50 PM »
After further testing, I expect the reservation/deadlocking bugs to be related to the following 2 bugs:
- trains arriving at a one_train_staff cabinet will immediately clear its whole reservation except for one tile.
- trains at a one_train_staff cabinet tile will _always_ start greedily reserving blocks as far as they can even if not the whole route is free.
This can bee spectated when a train in drive_by_sight mode is moving away from one_train_staff cabinet and a train is waiting there

Due to the first bug, the waiting train will start moving, when the other train is still on that track but without reservation, so they will just pass through each other.
Since a train in drive_by_sight, which is our train that just left the single tracked section, does always clear any reservation on a tile when its last car leaves that tile it will start clearing parts of the one_train_staff reservations of the entering train. The entering train will re-reservate these tiles when its first car enters that tile but the first train_length/2 tiles won't be re-reservated because the reservation will be erased after the first car had already passed that tile.
When any train arrives at the entering one_train_staff cabinet now, the second bug will reserve the first free tiles, deadlocking the system.

A workaround to this bug is to NEVER EVER place the entry one_train_staff cabinet directly adjacent to the junction.
If you do so, there will always be at least one tile after the junction reserved by the train in the single tracked area so any train waiting at the one_train_staff cabinet can not start reserving tiles of the single tracked area when it's not yet clear AND to ensure that trains do never stack up at the same tile, for example by using only 2 trains or schedules because trains stacking up at the same tile can cause deadlocks because in that case sometimes one train reserves the black and starts moving in drive_by_sight, so the other train will start reserving the tiles behind that train so it will continue to its turnaround point and deadlock the system.
« Last Edit: August 23, 2019, 07:19:05 PM by Freahk »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Miscellaneous issues with the one train staff working method
« Reply #2 on: August 23, 2019, 10:59:41 PM »
I have split this from the original topic to comply with the requirement that each individual bug report needs to be in its own post. This is very important for me to be able to manage bug reports effectively, as I need to be able to see clearly whether any given bug is outstanding or has been fixed: any fixed bug will be moved to the solved bug reports subforum.

As with other bug reports, I will have to look into this once I have a computer that can run this sensibly; I am still awaiting optimum part availability. Given the number of reports that have accumulated, it might take some time for some of the reports to be reached.

Offline Freahk

  • *
  • Posts: 231
  • Languages: DE, EN
Re: Miscellaneous issues with the one train staff working method
« Reply #3 on: August 29, 2019, 01:42:25 PM »
There seems to be an additional issue where trains sometimes don't switch from one_train_staff -> drive_by sight or vice versa when passing a one_train_staff cabinet.
That's yet another issue I can't reproduce yet nor I have seen this in action. The only thing I see is a train of this line deadlocking with an other line because it is standing in token_block mode in the absolute_block controlled section.
This happens at my narrow gauge network which is quite simple.

I had ovserved this network for a while and everything worked as expected.