The International Simutrans Forum

 

Author Topic: Time interval with telegraph station signal makes incorrect reservation  (Read 310 times)

0 Members and 1 Guest are viewing this topic.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 539
  • Languages: EN, FR, DE, FI, SE
In the save provided below at land stop 1, an incoming train on line 1 will cut through the reservation of an outgoing line 2 train.
.sve: https://drive.google.com/file/d/1IPw77KLaAE2hrIkzXfKf15aziMNov35v/view?usp=sharing

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18061
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Time interval with telegraph station signal makes incorrect reservation
« Reply #1 on: February 11, 2019, 11:29:36 PM »
Thank you for this report.

Looking into this, this is actually an extremely difficult problem, conceptually, to solve. The problem is this: the directional reservation is intended to allow a block reservation of any train travelling in the same direction as the train making the reservation. Each tile is checked one by one, and an algorithm is called on each tile to check whether the reserved direction is the same as the direction of the convoy wishing to travel over the section.

However, things get more complex at junctions. Suppose that one train wishes to go one way at a junction and another another way. That the following train wishes to take a different route over the junction should not affect whether it can make the reservation, so, for junction tiles, the check is not just whether the directions are the same, but whether they are compatible.

In this case, the two reservations (northeast and northwest) are regarded as compatible, as this is consistent with a train approaching from the north and diverging either to the east or the west. Unfortunately, in this case, the trains are approaching from east and west and both diverging to the north, giving rise to a conflicting route.

I cannot think of any way of solving this that does not greatly increase the complexity of the directional reservation system to check the previous direction of travel, which would then require storing the previous direction of travel and so forth.
Because of the amount of work involved, this may have to wait until the loss of synchronisation bug has been fixed.

Offline Rollmaterial fi

  • Devotee
  • *
  • Posts: 539
  • Languages: EN, FR, DE, FI, SE
Re: Time interval with telegraph station signal makes incorrect reservation
« Reply #2 on: February 11, 2019, 11:34:19 PM »
The bug here seems to be that it should be making a block reservation to the signal at the exit rather than a directional reservation, as this is a junction and not a single-track line.

Edit: Also, placing the station signal at the end of the platforms doesn't fix the issue.
« Last Edit: February 12, 2019, 01:06:41 AM by Rollmaterial »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18061
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Time interval with telegraph station signal makes incorrect reservation
« Reply #3 on: February 12, 2019, 09:44:42 PM »
Yes, I see - I have now modified this so that the block (red) reservation is used within sighting distance and the directional (blue) reservation is used beyond that, which seems to prevent the issue from occurring in this scenario.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18061
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Time interval with telegraph station signal makes incorrect reservation
« Reply #4 on: February 18, 2019, 01:20:45 AM »
Can I confirm that this can no longer be reproduced?