News:

SimuTranslator
Make Simutrans speak your language.

Bug: Trains ignore timed interval choose signal.

Started by DrSuperGood, April 03, 2018, 06:52:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

Under some very common conditions trains will completely ignore timed interval choose signals, trying to go the scheduled platform even if it is currently occupied. They will reserve junction tiles, completely deadlocking the terminal. Also applies to standard time interval signals which will fail to perform their junction check behaviour and permit the train to enter and block the junction for a station even if the junction+platform is only 500m in total. Basically one cannot set up terminals using timed interval signals currently as they will break badly.

So far the only thing in common with terminals effected by this problem is that reasonably close to the terminal junction the main line undergoes an elevation change. Attempts to recreate this in a test map have failed.

jamespetts

#1
Thank you for the report. Are you able to upload a saved game in which this can reliably be reproduced at a specific time and place?
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.

DrSuperGood

QuoteAre you able to upload a saved game in which this can reliably be reproduced at a specific time and place?
No I cannot. All attempts to recreate this in a simple save have failed with the system working as expected.

It seems to always occur on the server. To the point I have had to revert some of my terminal stations back to drive through loops because they were always deadlocked by platform choose signals.

The only common factor I have between these stops is that there is an elevation change on the main line within breaking distance of the stop. Something my simple test maps did not have.

Ves

Ive captured this bug, I believe. I managed to provoke it on a small test map, and it is repeatable on my computer. Just load the save and fast forward, and the trains will all exit the depot, bump into each other (as they should) kind of space them self appart, but end up piling on one track at the terminus.
The trains also drive utterly slow, making me believe this bug is connected with the other bug DrSupergood mentioned.

https://simutrans-germany.com/files/upload/bug_-_time_interval_choose_signal_bug_state_before_bug_B.sve

I dont know wether the bug has already happened on this map, since I played around with the signals first, and then they worked fine. I was playing around with editing the route by laying out new tracks while the trains where driving, as well as modifying signalboxes.
I will see if I can produce a consistent way to "create" the bug in the first place.

jamespetts

Thank you for the report and the detailed reproduction instructions. I have tracked this down to an earlier attempt to fix this issue, which was apparently not successful in any event.

I should be grateful if you could confirm whether this is fixed with to-morrow's nightly build.
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.

DrSuperGood

#5
Not fixed. Still see trains ignoring a choose signal and then driving straight into the train occupying the platform.

On the server game I seem to have got this continuously and reliably recreated. @6138,1992 going into Evening Parock Vilage Railway Station. The line is serviced very frequently so should be fesible to debug. The station has 2 platforms but the second platform makes part of a loop back and is blocked off by end of choose signal so the choose signal has only 1 platform to select from. I have observed this cycle over 3 times so hopefully it will persist until tomorrow.

It starts with 2 trains queueing behind the choose signal in drive by sight mode. Then when the platform is free the train waiting at the signal goes into the platform and waits for schedule. The train behind that then goes to stop at the choose signal. Upon stopping at the choose signal it then immediatly drives off in timed interval mode towards the ocupied platform. It will reach the ocupied platform and have to perform an emergancy stop. Another train arives at the choose signal and then correctly waits behind it for a free platform. Then the first train departs the platform, with the second train now using drive by sight to enter the platform. Another train queues up behind the train waiting at the choose signal. The second train then departs the platform. The cycle repeats.

The correct behaviour is that trains should be waiting at the choose signal until the platform is clear. There should never be an emergancy stop near the station area.

Possibly the timed interval mechanics are to blame? Timed interval choose signals should be limiting train entry to once every 5 minutes I would imagine, otherwise they would be another kind of choose signal. It seems reasonable that the line the train is comming from will have a convoy spacing of at least 5 minutes if operating correctly, so even if it enforced timed interval 5 minute mechanics it will still work well. The second train in the example cycle arrives at the signal long before 5 minutes have passed since the last train, so I imagine should be getting blocked by the timed interval mechanics, but instead is allowed through.

EDIT: Attached is a map demonstrating the problem. The choose signals are being completely ignored at one of the terminal stations. This map also shows the station signal slow stop approach bug.

jamespetts

Thank you for uploading the saved game. The problem in that saved game is that the (non-telegraph) choose signal is more than 7 tiles from the location of the train stopped in the platform. Because the railway policemen can only see 7 tiles ahead, they cannot tell that a train is waiting >7 tiles ahead in the platform and so send the next train on. The solution is to put the signals as close as possible to the stations, which is a realistic way of signalling in any event.

Time interval signals protecting a junction (which all choose signals are deemed to be), incidentally, cannot sensibly make trains wait for 5 minutes before allowing the next to pass because the following train might be taking a completely different route, meaning that it would make no sense for the following train nonetheless to have to wait 5 minutes. Instead, the following train should be allowed to proceed as soon as its route up to 7 tiles ahead is clear, but be restricted to proceeding at caution speed (as was the case in real life). Good signalling design would then necessitate placing a further time interval signal after the junction but not more than 7 tiles away from the signal protecting the junction.

I will look into the slow approach issue presently.
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.

DrSuperGood

QuoteThank you for uploading the saved game. The problem in that saved game is that the (non-telegraph) choose signal is more than 7 tiles from the location of the train stopped in the platform. Because the railway policemen can only see 7 tiles ahead, they cannot tell that a train is waiting >7 tiles ahead in the platform and so send the next train on. The solution is to put the signals as close as possible to the stations, which is a realistic way of signalling in any event.
Why do you think I placed them so far away in the first place??? They do not work when placed close by. They do not work when placed far away. They never work reliably at all.

If all platforms are occupied the stupid railway policeman mostly sends the train to the default platform instead of getting it to wait at the choose signal. If there is even 1 platform free they work perfectly, just if all are occupied they do not. I guess they are wanting a collision to happen, with all the explosions, just fortunately Simutrans prevents that.

Also 7 tiles is not much. In fact your example video (@7:50) shows a terminal station where the train stops more than 7 tiles from the choose signals...
https://youtu.be/nZ07UmsVqVg?t=455
From choose signal to where train stops is ~10-11 tiles. This configuration does not work. Trains will ignore the choose signal if all platforms are full and drive to their default platform. 100% reproducable on server so far as I can tell. This happens with terminals where the choose signal is under 7 tiles away from the stopping tile.

jamespetts

This is not a very helpful manner of response. The specific thing that you described in this thread as a bug is in fact correct behaviour. If you placed the signals further from the station than they are designed to be placed (as clearly set out in the video tutorial) as a result of another bug, then you will need to post a separate report with that other bug and a saved game in which it can reliably be reproduced at a specific time and place (although I think that I have now managed to fix this - I should be grateful if you could re-test, and, if the problem has not been solved, post a new bug report with a full reproduction case rather than replying here). The behaviour described here is not a bug: it is not only intended, but explicitly explained in the tutorial video to which you link.

As to the separate problem relating to trains approaching stations with station signals very slowly, this is proving extremely difficult to track down. However, it appears to be related at least in part to the very odd arrangement of having a station with a reversing loop immediately beyond it instead of the more ordinary arrangement of having the trains reverse in the stations and also having a station signal. When I modify the track layout in the saved game that you provided either to replace the reversing loop with a normal set of crossovers in front of the station, or when I replace the station signal in the station with an ordinary stop signal at the end of the platform, the problem abates for all trains that depart the terminus station after the new arrangement was put in place. I suspect that the problem is related to the very obscure situation with which the signalling code was not designed to cope, viz. a train departing a station controlled by a station signal, leaving the platform, then, on the same route, returning to the station with the station signal in it before continuing on its way. If you avoid situations in which this occurs, you should be able to avoid the second of the two issues reported here.

Because (1) this issue has proven extremely difficult to resolve; and (2) it only occurs in track configurations that were never intended to be installed and are not realistic, I am considering this a low priority bug at present.
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.

DrSuperGood

Sorry about the previous post but those timed interval choose signals have really been frustrating me recently. Once the server is playable again I will move around the entry signals to minimize distance. Previously I was required to place them at some distance to avoid another bug which might have been fixed.

Could we clarify what this 7 tile range is measured from and to? Is the tile immediately following the signal tile a distance of 1 with 6 tiles later being the final serviced tile?

Must the 7 tile range cover the far end of all platforms at the station? Or is a platform fully checked as long as any tile of it is within the 7 tile range? Or is the signal only aware a platform is occupied if the 7 tile range covers reserved or train occupied tiles? Or does it only work properly if the line scheduled stop tile is within the 7 tile range?

Is the 7 tile distance Manhattan or Euclidian measured?

Could one extend this distance by using telegraphed policeman cottages in any way? Or is this a hard limit to early station junction size? Or is it even a hard limit to early platform length?

Currently I am using a platform length of 3-4 with number of platforms being 2, 4 or 6. This results in a junction length of 1, 2 or 3 tiles before the station after the choose signal. This seems pretty reasonable and realistic so I would expect them to work well in this situation.

jamespetts

#10
I have been investigating further this issue, as further testing has shown problems even where the track is signalled normally, albeit this has still been difficult to track down. However, I have pushed a fix for a related problem, which is that time interval station signals were not behaving correctly when those signals were not protecting any junctions: in those cases, where the signal was at danger, the train would start, but would travel at 1km/h for one tile, then revert to the drive by sight working method. They now correctly wait behind the signal until the requisite time has passed. However, I can no longer reproduce this with the corrected track layout and the latest fix.

For reference, here is the corrected track layout for the saved game that you supplied above.




To answer your questions: the 7 tiles is counted from the signal, and is the number of tiles along the route (i.e., route distance in tiles). The route will be reserved to the nearer of (1) the next signal after the time interval signal protecting a junction; or (2) the 7th tile of track beyond the signal on the train's route. If the route to that point is not clear, the signal will remain at danger and the train will not be able to pass. If the route to that point is clear, the signal will be at caution and the train will be permitted to pass at half line speed.

There is no mechanism for extending this distance other than by using time interval with telegraph signals. In reality, time interval with telegraph was used for all of the more complex junctions from the early days of railways. The time interval with telegraph (albeit the more expensive Cooke & Whetstone type) is now available from quite an early period, so this should be viable.

The time interval with telegraph working method is in reality a half-way house between pure time interval and pure absolute block signalling, and represents (realistically, in so far as I can reproduce this in Simutrans-Extended) the period of transition between time interval and absolute block signalling. Thus, in the time interval with telegraph working method, a signal protecting a junction will always reserve all the way to the next signal along the train's route and will not allow the train to pass unless this entire section is clear. On plain track, however, these signals operate like ordinary time interval signals (save that station signals will make a directional reservation).




Edit: A little more detail on this (and a bug fix report): if any part of the station platform is within 7 tiles of the time interval signal protecting a junction (or any choose signal), the whole station platform will be reserved and must be free for the signal to clear. In the saved game that you had uploaded, the station platform was 8 tiles away from the time interval signal, thus the reservation never reached the station platform.

Further, there was a bug causing the time interval reservation to extend to 1 tile less than the sighting distance, meaning that it would reserve only 6 tiles ahead: I have now fixed this on the master branch.
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.

DrSuperGood

So far things are looking good. Have not seen trains entering station junctions when they should not. I am marking this as solved.

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.

Rollmaterial

Elsfont station on the server still regularly deadlocks.

DrSuperGood

Elsfont station seems to be on the boarder of choose signal range, with the end of platforms being over 7 tiles away if Euclidian distance is used. However it is using telegraph policeman cottage so that should not be a problem?

Ves

What I have found help sometime is to completely redo the schedule and signals. Can be a hassle though if you have alot of convoys

jamespetts

It is not clear from the above description whether the deadlocks reported are as a result of a bug or not, as deadlocks can arise as a result either from a bug or from the design of the track layout/signalling/scheduling.
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

#17
The layout should be correct. It seems like it is always a train that is sent into the second platform from the east when it is occupied that causes the deadlock.

Update: Netstoke Southern Harbour is deadlocked at the moment.

Ves

Yes, This bug has occured at Netstoke Southern Harbour, messing around with our joint connection. I will rebuild the signals to see if it persists.

Rollmaterial

It now also occurs at Okeinglow Heath, which was built from scratch under the current version.

jamespetts

I am still not clear on the nature of this issue - can I ask for more details of precisely where and when this issue can be seen to occur in the server game?
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

I believe that I have caught it in laboratory conditions. It seems to occur when a train already proceeding over an alternative route (in this save convoy No. 10) is caught up. It will lose its reservation and the train behind it will reserve a route and proceed to the same platform, creating the deadlock.
.sve: https://simutrans-germany.com/files/upload/Broken_time_interval.sve

jamespetts

I think that I have now pushed a change which fixes this: emergency stops no longer clear a reservation. I should be grateful if you could confirm whether this assists the problem with the next nightly build.
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.