News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Time interval with telegraph station signal makes incorrect reservation

Started by Rollmaterial, January 18, 2019, 08:19:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rollmaterial

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

jamespetts

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.
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.

Rollmaterial

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.

jamespetts

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.
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

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.