The International Simutrans Forum

Simutrans Extended => Simutrans-Extended future development discussion => Simutrans-Extended development => Implemented feature ideas => Topic started by: Octavius on October 26, 2015, 09:37:24 PM

Title: Discussion of new signalling system
Post by: Octavius on October 26, 2015, 09:37:24 PM
Mod note: This post has been split from this (http://forum.simutrans.com/index.php?topic=14721.0) topic as the discussion has strayed into substantive issues of signalling rather than the videos themselves.

Quote from: jamespetts on August 10, 2015, 07:59:20 PM
Whenever a train stops at a station or a reversing waypoint, it reverts automatically to drive by sight until it passes a signal: this is why there usually need to be signals at the end of a platform.
I agree with the reversing, but I think a train should not revert to drive by sight automatically at a station. This would still necessitate the special long block signals to protect a single track section with intermediate halts. And on modern double track lines (at least over here) there are only automatic block signals at regular intervals, ignoring the positions of the halts (defined as small stations without any points). A signal may as well be placed just after a platform as just before it, although usually not on top of the platform. So I'd say that trains should revert to drive by sight only when reversing, leaving a depot or passing a drive by sight sign or a signal showing a drive by sight aspect (also known as call on). In reality they also revert to drive by sight when changing driver.
Quote from: jamespetts on August 13, 2015, 10:11:26 AM
As to the number of tiles reserved, I think that this is probably accurate, especially since t is not really practical for a train/tram to keep speeding up/slowing down depending on whether there are any bends. In reality, it would be hills, undulations, slight corners not simulated in Simutrans combined with lineside obstructions, etc. that would also interfere with sighting, so a sighting distance of over 1km will not be realistic. However, I do plan for the sighting distance to be set in the pakset eventually.
Furthermore, in reality there is also weather. Timetables have to be designed with a speed and therefore visibility in mind that can be expected at least 95% of the time. There may be mist, heavy rain, snow etc. If you design a timetable for trains running on sight, you cannot assume they will be able to look more than about 200 m ahead, even when most of the time they can. So the train will be slow.
Title: Re: Discussion of new signalling system
Post by: jamespetts on October 26, 2015, 11:56:32 PM
The reason that trains generally revert to drive by sight in stations is that, in most working methods, trains only reserve up to the next stop and not beyond, which would be necessary were they to remain in their current working method after starting from a station. However, in token block and one train staff working method, trains do remain in their current working method at stops, as the line is in any event reserved up to the next signal and beyond stations.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 08, 2015, 11:07:26 PM
I must agree with octavius in regard that trains should not revert to drive-by-sight on stops. Here is a bit longer explanation why:

I had researched a bit about signalling on Czechoslovak railways.
- Drive by sight is used only for shunting (leaving depot), trams, permissive and call-on signals.
- One-train staff is probably not used at all. Maybe some very early or museum railways do/did use it. It was in consideration for single tracked tram lines (like Kirnitzstalbahn in Bad Schandau), but a more complex and flexible circuit block system is in use. It is used as a temporary measure during repairs of otherwise double tracked tram lines.
- Timetable based - single tracked trams (replaced with circuit block after fatal accidents), some less used local railways, most narrow-gauge railways. Sometimes used in addition with direct traffic control. https://en.wikipedia.org/wiki/Direct_traffic_control
- Token block - (with telegraph based token machine with multiple tokens) - probably never used at all. However the simulated behaviour could be the same as for direct traffic control. Just the token is not physical, but verbal.
- Absolute block - still used in multiple variations - early with only telegraph / telephone verbal communication between signalboxes and visual check of tracks, points and trains. Later improved by half automatic equipment reducing the potential of human error. Used with semaphore signals as well as colour light signals.
- Circuit block - fully automatic permissive signals (on track between stations), improved safety on stations, used on main double tracked lines, more expensive equipment than absolute block, but less man-power (and signalboxes) needed.
- in cab signalling - used alongside to circuit block, mostly for comfort and safety - better visibility in fog, automatic braking if driver falls asleep, etc.

The important thing is that there are many stops/halts that have no sidings, no signals and no personel. Cargo trains just pass through them, and passenger trains continue at full speed after stopping there. The track is reserved through the stop(s) up to the next signal. Also the block is freed only when the train is completely out of the block. Thus there is no need for tokens at single tracked railways. So I think the reservation system for absolute and circuit block should be changed in this way:

At any time the train should have reserved track up to next signal facing in BOTH directions. Any signal counts except for end-of-choose and minimum speed signs. Single-way signal and drive-by-sight signal counts as end of block. Track is cleared when the train passes a signal facing in opposite direction. Track is reserved when the train approaches next signal (facing in the right direction), or its distant (pre-) signal. An attempt is made to reserve aspect-1 blocks ahead, unless there is a scheduled stop closer than that. For in-cab or moving block signalling a reservation equal to braking distance is attempted. The track reservation always ends at signal, even if there is a scheduled stop (or more stops) before the signal. This removes the need for token block.

Further, a directional (blue) reservation is made beyond the next stop up to the next junction (the signal in front of it), choose signal, or signal of other signalling system. Directional reservation is restored when the train leaves the block. Directional reservation can be only on plain blocks that do not contain any junctions. Directional reservation can be removed (reversed), only if the whole track to the next junction is free. This applies for both absolute block and track circuit block. This allows to split single track in multiple blocks, allowing for more trains in the same direction.

Czechoslovak railways distinguish between signalboxes at stations (with sidings) and those along the line, just dividing the line in blocks. I'm not sure if that distinction is worth implementing. E.g. the directional reservation would then be made from one "station" signalbox to another, ignoring the "block" signalboxes on the way. Also choose signals would be allowed only with station signalbox. This could allow for some simple junctions or sidigns without passing loops on single track. But it might be overcomplicating things.

The use of single-way signs would change a little. They should be placed at the end of the track (instead of entry) that is to be used only in one direction, so that they can act as end of block markers.

I'll prepare some screenshots to illustrate if necessary.

Title: Re: Discussion of new signalling system
Post by: jamespetts on November 09, 2015, 12:04:40 AM
That is an interesting overview of Czech signalling - thank you. Direct traffic control can probably (I have only looked briefly at the Wikipedia article) be simulated using the token block working method in Experimental; I do this with Radio Electronic Token Block signalling in Pak128.Britain-Ex, which system also has no physical tokens and seems quite similar in principle (at least in general terms) to Direct Traffic Control.

As to the stations without any signalling, are these single track or double track? If single track, token block signalling can be used, as this is designed to work with unsignalled stations (but incurs additional complexity as a result).

I do not think that it is desirable to use directional reservations with absolute block signalling: this type of signalling is intended to represent signalling technology when the electric telegraph was the only way of communicating a train's presence, and this was not sophisticated enough to accomplish what amounts to directional reservations. Can two aspect track circuit block signals not be used for this purpose, or are they problematic in some other way? If you would use two aspect track circuit block signals but for the fact that the signals that you are trying to simulate are normal danger rather than normal clear, the much easier answer would be to allow track circuit block signals to be normal danger by a .dat file setting, which would be quite straightforward to implement.

Can you tell me more about how end of block markers work in Czech signalling?
Title: Re: Discussion of new signalling system
Post by: Vladki on November 09, 2015, 01:01:10 AM
Quote from: jamespetts on November 09, 2015, 12:04:40 AM
As to the stations without any signalling, are these single track or double track?
Both.

Quote
If single track, token block signalling can be used, as this is designed to work with unsignalled stations (but incurs additional complexity as a result).
I'm not sure if simutrans trains are required to stop or slow down to collect the token. Is it possible to have choose signal with token block method?

Quote
I do not think that it is desirable to use directional reservations with absolute block signalling: this type of signalling is intended to represent signalling technology when the electric telegraph was the only way of communicating a train's presence, and this was not sophisticated enough to accomplish what amounts to directional reservations.
Unfortunately I found only czech documentation, but the system that is closest to absolute block signalling has provision for specifying the direction on single track. The signalman on station (with passing loop), has indication not only whether the next block is clear, but also whether he is allowed to depart trains. If he is not, he has first to ask the other station to give up the right to depart trains. There may be intermediate "block" signalboxes, which report only if the train has passed, know the negotiated direction, but cannot change it.

Quote
Can two aspect track circuit block signals not be used for this purpose, or are they problematic in some other way? If you would use two aspect track circuit block signals but for the fact that the signals that you are trying to simulate are normal danger rather than normal clear, the much easier answer would be to allow track circuit block signals to be normal danger by a .dat file setting, which would be quite straightforward to implement.
Probably yes. Anyway the difference between absolute and circuit block is quite cosmetic - default clear, more signals per signalbox (or even without signalbox), no mechanical semaphores.

Quote
Can you tell me more about how end of block markers work in Czech signalling?
Uh, there is nothing like that. Blocks are delimited by signals. On real railways there are almost no one-way tracks (thus no single-way signs). Even on double tracked lines (except for metro and tram), both tracks can be used in both directions. If you imagine a station, you have a departure signal on both ends of platform (or passing loop), before the switches. Thus the whole block between departure signals can be reserved for the train. In simutrans you often want to make a passing loop with use of single-way signs to avoid deadlocks. Thus you need to put something on one end of passing loop instead of signal. A single-way sign is a logical thing to put there. A train could enter such a block in the wrong direction, but could not leave it.

See the attached screenshots. One is regular station with 3 bidirectional tracks and choose signals at entry. The other has 2 single-directional tracks for and no choose signals. In both cases when the train is in the station the reservation will be between signals (either regular or single-way signs). When the train is on track, whole track will be reserved - from one choose signal to another, or even up to the passing loop if there's no choose signal.
Title: Re: Discussion of new signalling system
Post by: Junna on November 09, 2015, 07:42:30 PM
Three-track (or greater) stations of that sort were always rare in the UK, where the norm is passing loop with stations on it and a siding (often only accessible from one direction). I assume that most of those stations with several tracks like that were built such during the CSSR times or prior because of high volume of goods traffic necessitated frequent sidings for overtaking, whereas in the UK goods traffic was in free-fall from an early age and besides, a lot of lines were double-track already and goods trains were generally short. Also the general european practice generally favoured bidirectional lines (almost all Swedish lines have some bidirectional capacity), but UK did not quite follow this. It seems hard to signal these effectively though, because trains could get stuck easier since there is no actual despatching.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 09, 2015, 10:51:39 PM
I would say that here would be a three track station considered a bare minimum. Two track passing loops (though they exist) do not deserve the name "station"  :police:   I think most of those stations were built before WWII, when local cargo trains were common - calling at every small town or even village to drop a few cars and pick up other cars. Mixed (pax+cargo) trains were also common on branch lines. Then you needed quite some more tracks not only for passing but also for shunting and loading. Of course times have changed and many stations have been reduced to passing loops or even to simple stops.

I was thinking more about the reservation algorithm - the releasing the reservation could be as it is now (every tile), but I wanted to keep the block reserved up to the next signal behind the train, for the case when train reverses. So at station, it makes sense to reserve up to the next signal in both directions. However on the running line it makes more sense to reserve blocks between two signals facing in the same direction. So perhaps a signal in any direction could be considered. But more important is IMHO to reserve beyond the stop up to the next signal.

Directional reservation on absolute block is perhaps not very important. If the track between stations is split only in two blocks (one intermediate signalbox), and the blocks overlap (or a bidirectional signal is allowed), then it would work fine even without directional reservation. And I think it is very uncommon to have single track divided in more than 2 blocks.

Is it possible to have an absolute block signal that is signal, presignal and choose signal at the same time? like: aspect=3 and freeroute=1. What about choose signals in token block system?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 09, 2015, 11:31:30 PM
I will have to give some thought to the question of reserving beyond a station stop: it may be that it is an important thing for the purposes of priority reservations (which already has about half of its code: these will be coloured in yellow) that allow some trains to take priority over another by making a special type of reservation ahead of the normal reservation, which can be overridden by a train with a higher priority level (or the same priority level if a block reservation is requested over a priority reservation). The plan is for both the number of blocks ahead and the priority level to be customisable by line/convoy in the schedule. However, I worry a little that this will increase computational load in circumstances where some users are already reporting a higher computational load than before I implemented the signalling changes.

The optional normal danger for track circuit block should be fairly straightforward, and this seems worthwhile if this will assist paksets with realistic signalling for particular countries. Incidentally, from what pakset are the screenshots above taken? Are there any plans for a Czech pakset? It would be a rather splendid thing to have a Czech as well as Swedish pakset for Experimental.

Quote
Anyway the difference between absolute and circuit block is quite cosmetic - default clear, more signals per signalbox (or even without signalbox), no mechanical semaphores.

Actually, apart from normal clear and whether it is possible to have signals without a signalbox, the things listed, including the number of signals per signalbox and whether semaphore signals are permitted are things that can be set in the pakset (or did you mean to distinguish the real life differences? If so, normal clear is not necessarily a feature of track circuit block, although it usually is; but note that normal clear applies only to signals controlling a section of track with no junctions, even in modern times). However, it is perfectly possible to have track circuit block semaphore signals - I have recently implemented some in Pak128.Britain (to simulate the very early automatic signalling from around 1902, before lamps were bright and reliable enough for colour light signalling to work effectively).

Bearing that in mind, was there a particular reason to have a 3-aspect choose signal in absolute block mode, or did you really just want a combined junction semaphore signal? (These have been implemented as track circuit block automatic semaphores in Pak128.Britain-Ex). I have not tested a combined choose signal in absolute block mode, but I cannot immediately think of a reason why having is_presignal=1, is_signal=1, aspects=3 and free_route=1 should not create a working signal that is a combination of a choose signal and a combined signal, provided that the usual combined signal rules (will only show a clear aspect and reserve through if the next signal's signalbox is in range) are obeyed. Because this has not been tested, it is possible that anomalies may arise in operation. If you need to code this type of signal for a Czech or Swedish pakset (or otherwise) and you find anomalies, I will try to fix them if you upload a copy of the pakset and a saved game in which any issues can be reproduced reliably.

I do not think it sensible to have one way signs as end of block markers, as this would be difficult for users to understand and is not intuitive: one would expect that a one way sign would do no more and no less than determine the direction in which convoys may pass them.

As Junna says, in the UK, unidirectional track is very common even now (and was near universal for stretches of double track main line in previous centuries).

Thank you again for your feedback, which is appreciated.
Title: Re: Discussion of new signalling system
Post by: Ves on November 10, 2015, 12:29:31 AM

Quote from: jamespetts on November 09, 2015, 11:31:30 PM
I do not think it sensible to have one way signs as end of block markers, as this would be difficult for users to understand and is not intuitive: one would expect that a one way sign would do no more and no less than determine the direction in which convoys may pass them.
Would it make sense to create special sign that makes what Vladki suggest? An "observation point" to put on the tracks, when the entire train has passed this "point" the block behind is cleared. Could be used together with signal boxes as there need to be a guy standing there, observing the train and then releasing the signals.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 10, 2015, 08:00:04 AM
James: the screenshot ideed is from pak128.cs (czechoslovak). You can get it from simutrans SVN @SF, or from the forum. It is a standard pakset, but I'd like to add at least some exp features to it.

Czech semaphore signal (on station entry) has these aspects: danger, clear, caution and caution+40 km. The last I wanted to use as choose aspect.

Swedish 3 arm semaphore could be also used in such way although the meaning of its aspects is different.

Ves: observation point must be implicit, otherwise players will be confused.

I think the unreserving of track behind the train could be left as is, if the reservation ahead continues to the next signal beyond station. A reversing train then may revert to drive by sight (shunting)
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 10, 2015, 10:24:25 AM
Ahh, I do have a recollection of a Standard Czechoslovakian pakset - it would be splendid to have an Experimental version of that. I shall look forward to trying it one day.

As to the Czech semaphore signal, this could indeed be simulated by a choose signal in the track circuit block working method; you could either have both the clear (subsidiary) aspect and the caution (subsidiary) aspect having the same "caution + 40km/h" indication as one another, or have the both the clear (main) and clear (subsidiary) indications being the same as one another, and the caution + 40km/h indication being the caution (subsidiary) aspect only. Choose signals are normal danger in any event (as are all signals facing junctions), but plain signals on straight line would be normal clear in the current system, but this would be customisable if I introduce optional normal danger for track circuit block signalling.

Currently, a choose signal (and, indeed, any signal immediately before a train's next destination) will display a clear aspect. However, if I change the behaviour as you suggest and have it reserving beyond the station unless the station is a reversing point, it may well display a caution aspect depending on (1) the implementation (whether it reserves the normal number of blocks ahead or is limited to reserving just up to the signal immediately after the station - not an easy choice when one thinks about all the implications of both in many situations; in reality, this will vary depending on the situation); and (2) whether the section beyond the station is clear.

As to observation point signs, do these have any precedent in reality?
Title: Re: Discussion of new signalling system
Post by: Ves on November 10, 2015, 11:29:34 AM
I don't think there is explicitly observation points, but in real life there are tools to know wether the train has passed a certain point.
It would be like a tool for the player to simulate logic on the railways.
"When entire train is on track 1, the line behind is considered free and may be booked by another train"
Title: Re: Discussion of new signalling system
Post by: Vladki on November 10, 2015, 05:02:29 PM
That combined semaphore will show caution + 40 even for clear + choose. Thats what it shows in reality. Theoretically it could have clear + 40 but that is not used.

If you decide to touch that code, may I ask that multi aspect signals show caution if the train has reversing stop in the next block?

Czech rail has a marker for track circuit border. But it is used only if there is no other indication (signal) that this is not a good place to leave parked waggons.
No 975 at: http://mujweb.cz/mikulda/d1/htm/jedenac2.htm

I found that czech railways have interesting maps about used signalling systems:
http://provoz.szdc.cz/PORTAL/Show.aspx?path=/Data/Mapy/zabezpecovac.pdf
http://provoz.szdc.cz/PORTAL/Show.aspx?path=/Data/Mapy/TZZ.pdf

I'm still not sure about the main difference between absolute block and circuit block. I just have the feeling that semaphores+curcuit block are nonsense.
Czech rules distinguish 3 levels of security (but signals are mostly the same):
1 - everything is checked by human - telephone or telegraph is used to communicate between signalboxes
2 - partial level of protection - electromechanic or electric relay systems to prevent human error (clearing signal at occupied block), still requires human interaction, track clearance is checked by humans (end of train signs) and short circuits that say - something has passed through.
3 - fully automatic - track circuits or axle counters that make sure the block is clear. No human interaction required.
Would 1 and 2 fit in "absolute block" system ?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 11, 2015, 12:09:36 AM
I will give consideration to the onward reservation beyond non-reversing stops and caution aspect approaching a terminus station issues; on the latter, real life practice has varied over the years.

In real life, there have indeed been semaphore signals on the track circuit block principle in the early 20th century (the Liverpool Overhead Railway, the District Railway, the London and South-Western Railway and the North-Eastern Railway all being pioneers in the UK); there can also be colour light signals using the absolute block system.

The main feature of track circuit block in reality is the automatic signal: a signal which, on a straight piece of track (i.e., with no junctions between it and the next signal) will automatically revert to danger on sensing a train in the next block, and will automatically clear when there is no train in the next block (either all the time for normal clear signals or on the approach of a train for normal danger signals). Signals at junctions in track circuit block are semi-automatic: they automatically revert to danger when they detect the passing of a train, but remain at danger until a route which is sensed by the track circuit (or axle counter or similar) to be clear is set from them to another signal. Another important (but not universal) feature of track circuit block is the multiple aspect signal: a single signal which contains indications not just as to whether the block ahead is free, but also as to whether the next signal (or the second or third next signal in four or five aspect signalling) is clear. Again, there have been three aspect semaphore signals: in the US, this was done by having three position arms similar to the old days of time interval signalling, but, in the UK, this was generally done by having a stop and distant arm on the same post. Significantly, the distant arm in this context referred only to the state of the very next signal, not all the stop signals controlled by the same signalbox as had hitherto been the case with absolute block signalling.

Absolute block signalling, in UK practice in any event, is largely in conformity with your descriptions at both (1) and (2) (what you describe at (2) being called in the UK "Welwyn Control" after an accident at that location that caused the introduction of that safety feature). It has the particular feature of generally having only two aspect signals (there were combined signals, with a stop and distant arm on the same post, but the distant arm was in this case worked by the next signal box along the line compared to the stop arm, and specially interlocked to prevent the distant arm showing clear when the stop arm showed danger) and distant signals indicating, not the aspect of just the next signal, but the aspects of all the signals controlled by the same signalbox. In effect, in absolute block, a "section" is the line controlled by a single signalbox, whereas in track circuit block, a "section" is the line between a pair of signals. (This latter principle was moderated in later years by the introduction of "intermediate block" signals, which allowed a section to be split into subsections, each with its own distant signal; but these were introduced only after automatic signalling was invented, and was just a cheaper means of increasing capacity on a line without a full resignalling to track circuit block; the London, Tilbury and Southend used this in the early 1910s). Absolute block working (in the UK at least) also generally assumed running lines to be unidirectional (there being no system for determining the direction of a line), bidirectional lines generally being worked by the token block system, or, in earlier times before the telegraph, by the staff and ticket method (not implemented in Experimental because of its propensity to result in deadlocks).

In Simutrans-Experimental, the differences between track circuit block and absolute block can be summarised as follows:

(1) in absolute block, a distant signal (or a caution aspect on the distant arm of a combined signal) will show whether all the signals controlled by the same signalbox as controls the distant signal are clear, whereas in track circuit block, a distant signal (or a caution aspect on a multiple aspect signal) gives only an indication of the very next signal;

(2) in absolute block, it is not possible to have signals of more than three aspects, and the only three aspect signal allowed is a combined signal, the distant arm of which will only work if the signal is within range of the next signalbox (and will work as described above); in track circuit block, signals can have up to 5 aspects showing the state of the succeeding 1-3 signals, and they do not need to be in range of more than one signalbox to work;

(3) absolute block signals are normal danger, whereas track circuit block signals on plain line (i.e. with no junctions to the next signal) are normal clear, although I am considering allowing them to be normal danger if so specified in the .dat files; and

(4) bidirectional signals are not permitted in absolute block, whereas they are permitted in track circuit block; bidirectional signals will in track circuit block engender a directional reservation until the next one way sign or reversing point when they are passed.

What applies to track circuit block above also applies to cab signalling, although this need not be more than 2 aspect because caution aspects are redundant in cab signalling. Thus, if a particular country's signalling system did not have the rule about distant signals referring to all signals controlled by the same signal box and did allow for directional reservations, even signals of type (1) in your list could be simulated by the track circuit block method in Experimental (possibly with the addition of normal danger).

Does this all make sense?
Title: Re: Discussion of new signalling system
Post by: Vladki on November 11, 2015, 07:54:57 AM
Thanks for nice explanation. I think that for cz signalling I'll just ignore absolute block - it seems too UK specific. I'll just use circuit block. And perhaps the same for swedish signals.

Default clear is in cz shown only on permissive 3 aspect signals. 2 aspect signals even in curcuit block are default danger. Could the number of aspects be used to set the default? What about UK and sweden?

At 4, by one way signal you mean a signal pointing only in one direction or single way sign? In which direction it has to be to stop the directional reservation?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 11, 2015, 12:36:10 PM
It does sound as though Experimental's implementation of track circuit block is closer to what you want for these purposes. I do not think it sensible for the number of aspects to alter the default position as to whether signals are normal danger or normal clear because this would be confusing and it varies by country in any event, but having an option for this in the .dat files (default: normal clear) would leave full flexibility for pakset authors.

As to (4), bidirectional signals are those that point in both directions along a line. This starts a directional reservation. It is ended not by a signal but by a one way sign (which will have to allow passage in the direction in which the train is set to travel, or else a route will not be found past it).
Title: Re: Discussion of new signalling system
Post by: Ves on November 12, 2015, 10:15:17 PM
Quote(3) absolute block signals are normal danger, whereas track circuit block signals on plain line (i.e. with no junctions to the next signal) are normal clear, although I am considering allowing them to be normal danger if so specified in the .dat files;
Apparently, the first versions of track circuit block signals in Sweden (from 1920 and onwards) got turned completely of when no route is booked.
Title: Re: Discussion of new signalling system
Post by: Octavius on November 15, 2015, 08:42:25 PM
Interesting discussion on Czech signalling.

In the Netherlands, from an operational point of view, there are 2 kinds of signals:
- Controlled signals. The signaller can set it to show stop, proceed (but it will still show red if the track is not clear or a conflicting route is already set) and drive by sight, for call on. By default they are set to stop. Since the 1990s, they are computer controlled, so if a train is expected according to the time table and no conflicting routes by earlier (but delayed) trains are expected, the computer reserves the track and sets the signal to proceed. After the first axle of the train has passed the signal, it reverts to stop.
- Automatic signals. The signaller has no control over the signal. It just shows whether the track is clear to the next signal. By default these show clear. However, when a train stops at a platform just before the automatic signal and there is a level crossing directly beyond it, the signal may show stop until shortly before departure of the train to prevent the level crossing from closing for too long.

Both kinds come in different versions, depending on the speed aspects they have to show, or for the distant signals, dwarf signals and some special signals applicable only to some (heavy, underpowered) trains. Controlled and automatic signals look identically, apart from an ID plate.

When a controlled signal is set to proceed, it makes a directional reservation of all track until the next controlled signal. Points must always be protected by a controlled signal. When showing proceed, the signal also indicates the maximum safe speed at which the next signal can be approached. The end of the track is considered a red signal, there also exists a fixed sign to be interpreted as a distant signal at caution.

A special version is the locally controlled safety system, used on some (but not all) single track railways. When the driver or guard of the train operates the button, key or infrared remote control at one station with a passing loop, then the decentral safety system checks whether the track is available, reserves the track up to the signal at the next passing loop, sets the points, closes the level crossing (if any right after the signal) and clears the colour light signal. This is somewhat similar to a token system in the sense that it can be operated by the train staff.

All other lines use centralised traffic control, mostly with absolute or permissive colour light signals, but a few lines have been equipped with ETCS-2 (cab signalling only) or dual systems: two different systems on the same line, which never give conflicting information, so that trains can choose which system to use depending on top speed and installed equipment.

Behind a train the reservation is freed immediately. So, when a train has passed some points, then another route over those points can be reserved immediately for another train, speeding up operations. There is no need to wait until the first train has passed the next signal. This means that when a train reverses, the driver can't know whether the track has been reserved for him. It may be unreserved or even reserved for a different train. Therefore he has to drive by sight and check alignment of the points, until he can see a signal telling him to proceed. This arrangement is used in Belgium too. At every location where it's likely that trains reverse, controlled signals have been placed, which in practice means at the ends of all platforms of major (junction) stations, the ends of most passing loops and in yards, but not at minor stations.

I don't really know about signalling in the Netherlands before 1930. Practices were largely similar to British practices I think, although I'm not aware of any large-scale token block working. I think it was mostly flag or semaphore signalled single track with electrical (or optical) telegraph, or signalmen walking from one signal box to the next to make sure the track was free. There were only a few trains per day anyway. Development of the dutch rail network was slow until 1860.

I have found one painting though, made around 1845, showing a train on the then single track main line from Amsterdam to Haarlem. The signaller waves a white flag to instruct the train to proceed. An electrical telegraph had just been installed and an optical telegraph was still present. It looks a bit like a semaphore signal with tilting discs, but it was for communication with the next block post, not with the train driver.

In 1933 automatic block signalling was introduced, along with colour light signalling. This also allowed bidirectional working, so that on a double track line trains could either use the left or the right hand line. Before that, trains of one company always had to keep left and trains of the other company always had to keep right. Nowadays, bidirectional working is possible almost everywhere.

Signals and points where mostly power operated by 1950, maybe before that. From then on the mechanical interlocking mechanisms where replaced by electrical relays. Every station and yard still had to be staffed, as no cables for remote control had been installed past yard limits. In the 1970s there was a brief experiment with radio controlled signalling with spring-loaded points, which depended on verbal instructions by radio (some of the last mechanical signals were removed), but after a large rail crash in 1980 (https://en.wikipedia.org/wiki/Winsum_train_disaster), locally controlled colour light signals were installed after all. From then on things have been centralised. After 1990 everything has been computerised. Signallers only have to act to set signals to drive by sight (aka call on) or to change the routes or chronological order of trains to something different than scheduled. Nowadays there are only 13 control centres left, but some people think that's too few. If there is a problem in one of them, not only an important junction is disabled, but all bypass routes along with it, stranding half a million passengers. People are trying to get some flexibility, so that stations or complete lines can be transferred from one control centre to another when the need arises, or just during the night.

Concerning Simutrans, this means that
- Track is reserved up to the next signal, past the next stop. If the train reverses you can't really reserve past the platform (to which signal?), so although realistically it should be reserved to the next signal, you can't in Simutrans. That doesn't really matter as that only allows few additional movements and only if no signal is build at the end of the platform, but at stations where trains reverse there should normally be a signal at the end of the platform.
- Except when using a token block system (which is not used in the Netherlands), trains revert to drive by sight when reversing. Other countries may have different practices though.
- Tied to the statement above, except when using a token block system, track is released as soon as the train has passed.
- There would be two kinds of signals, the controlled signals (or absolute signals, or whatever you call them) and the automatic signals (or permissive signals, or whatever you call them). Track reservations run from one signal to another, direction reservations from one controlled signal to another controlled signal. A controlled signal can only be cleared when there is a reservation to the next signal (or end of line, or reversing stop) and a directional reservation to the next controlled signal. A directional reservation cannot be made if a tile already has a directional reservation from a different tile, but it may have a directional reservation to a different tile, that is, directional reservations may branch, but not merge.
But directional reservations are not extremely important. Single track sections with only a single block signal can already be made and single track operations with more intermediate blocks are rare, except for emergency use, which doesn't happen in Simutrans.

Quote from: Ves on November 12, 2015, 10:15:17 PM
Apparently, the first versions of track circuit block signals in Sweden (from 1920 and onwards) got turned completely of when no route is booked.
A number of years ago I saw something similar at a block signal on a single track line of the Rhätische Bahn in Switzerland. When the block was free, it showed green, when occupied, it showed red, when the direction was reversed, the signal was dark.

Quote from: jamespetts on November 09, 2015, 11:31:30 PM
I will have to give some thought to the question of reserving beyond a station stop: it may be that it is an important thing for the purposes of priority reservations (which already has about half of its code: these will be coloured in yellow) that allow some trains to take priority over another by making a special type of reservation ahead of the normal reservation, which can be overridden by a train with a higher priority level (or the same priority level if a block reservation is requested over a priority reservation). The plan is for both the number of blocks ahead and the priority level to be customisable by line/convoy in the schedule. However, I worry a little that this will increase computational load in circumstances where some users are already reporting a higher computational load than before I implemented the signalling changes.
Interesting idea to allow high-priority trains overtake low-priority trains. Until now we needed either low speed tracks on loops with some weirdly placed signals and then hope the fast train would be so close behind the slow one that it would overtake (which meant it was already slowed down by the slow train), or use specially crafted timetables. I tried that on a few occasions, but the downside was that I needed a simple station, which looks silly, only works on straight track and forces trains to wait at least the minimum loading time, which with 15 minutes was far longer than the typical waiting time of 5 minutes.
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 15, 2015, 10:10:33 PM
Thank you for that interesting insight into Dutch signalling: what you describe, including the difference between automatic and controlled signals, is extremely similar to UK track circuit block practice (and is simulated in Experimental by a setting which detects whether there are any points to the next signal, which determines whether the signals are normal clear or normal danger, the former for automatic, the latter for controlled signals).
Title: Re: Discussion of new signalling system
Post by: Vladki on November 15, 2015, 10:38:44 PM
Thanks for nice description of netherland's signalling.
I think it is not in conflict with what I wanted. We could sum these things up.

- Reservation goes up to the next signal (or more if aspects > 2), or to reversing stop.
- Train goes to drive-by-sight only after reversing (or leaving depot)
- Multi aspect signals show caution if the next stop is reversing.
- Track is freed immediately. (as is now)
- Directional reservation is only in circuit-block, and ends at single-way sign. (as is now)
- Absolute block can have only one block signal between stations on single track, so it does not need directional reservation. Single track split in more block is extremely rare anyway. (as is now)

The first two points, make token-block (radio token, one-train staff, direct control, etc) not necessary in most cases. I think that in real life tokens are used only in places, where building proper signals and signal boxes would not be economical. I think that from the game point of view the difference is really small. Perhaps only that the track is freed only when the train returns the token (at next signal). Thus it won't revert to drive-by-sight even if reversing.
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 15, 2015, 10:55:16 PM
Ahh, the importance of token block signalling is that it is necessary when track circuit block signalling is unavailable. Since, in Pak128.Britain-Ex, track circuit block signalling is available only from 1902 (and then, when the balance is completed at least, at a cost to make it uneconomic for lightly used single track lines), token block will be necessary for single lines for many decades.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 16, 2015, 07:49:33 AM
With reservations modified as above suggested, you can signal single track lines with absolute block. But absolute block should be more expensive than token block.
Title: Re: Discussion of new signalling system
Post by: Octavius on November 16, 2015, 07:32:34 PM
Quote from: Vladki on November 15, 2015, 10:38:44 PM
Thanks for nice description of netherland's signalling.
I think it is not in conflict with what I wanted. We could sum these things up.

- Reservation goes up to the next signal (or more if aspects > 2), or to reversing stop.
To make that one even clearer, in multiple aspect signalling reservation goes multiple signals ahead (maybe not necessarily aspects-1 signals ahead), but if a train has a non-reversing stop only to the first signal after the stop. Reserving multiple signals ahead happens no earlier than when the train is ready to depart from the station.
Quote
- Train goes to drive-by-sight only after reversing (or leaving depot)
Maybe add a revert to drive-by-sight sign to that. I'm thinking of trams that run some distance on a railway at high speed, using railway signals, and then continue through city streets driving by sight. These trams exist in The Hague and other cities.
Quote from: jamespetts on November 15, 2015, 10:55:16 PM
Ahh, the importance of token block signalling is that it is necessary when track circuit block signalling is unavailable. Since, in Pak128.Britain-Ex, track circuit block signalling is available only from 1902 (and then, when the balance is completed at least, at a cost to make it uneconomic for lightly used single track lines), token block will be necessary for single lines for many decades.
The painting I mentioned (this one (https://commons.wikimedia.org/wiki/File:Wouterus_Verschuur_Semafoor_en_wachter_nabij_Haarlem.jpg); yes, it's broad gauge, the Dutch were inspired by Brunel) seems to indicate that there was absolute block signalling in use around 1845 on single track lines. Back then there was one train every 3 hours in each direction and the primary task of the signalmen was to check the tracks for defects after each train. Now it's 8 trains every hour in each direction, but the line has been doubled.

That doesn't mean such signalling ought to be available in every pakset of course.
Title: Re: Discussion of new signalling system
Post by: Ves on November 16, 2015, 08:01:23 PM

Quote from: Octavius on November 16, 2015, 07:32:34 PMMaybe add a revert to drive-by-sight sign to that. I'm thinking of trams that run some distance on a railway at high speed, using railway signals, and then continue through city streets driving by sight. These trams exist in The Hague and other cities.
This is already possible by creating a "signal" with working_method=drive_by_sight. The signal will in effect become exactly such a sign.
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 16, 2015, 11:11:56 PM
Ves is correct about the end of signalling signs: these are already implemented in Pak128.Britain-Ex.

As to that lovely Dutch painting, I see telegraph wires, so there was some way of communicating between adjoining signal cabins/huts. Would this signalling system, however, not have behaved in the same way as the token block working method, at least at the level of abstraction in which Simutrans-Experimental simulates these things, even if not actually using physical tokens?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 17, 2015, 09:53:43 PM
I have now implemented an option for normal danger: if a signal of track circuit block or cab signalling type has "normal_danger=1" defined, the signal will not reset to clear after a train has passed it. I have not tested this because there are not any signals of this type in Pak128.Britain-Ex; would one of the authors of the Swedish pakset care to test it to make sure that it works?
Title: Re: Discussion of new signalling system
Post by: Vladki on November 18, 2015, 01:06:38 AM
I'll check that. In the meantime I have a few questions:

Should/must drive_by_sight sign have is_singal=1 ?  Can it have two aspects?

Is there a possibility of choose sign that would work similar to road choose sign for drive_by_sight, one_train_staff and token block?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 19, 2015, 12:11:10 PM
The drive by sight/end of signalling sign should have is_signal=1. The "aspects" parameter is ignored, as the signal's states will not be used and it will only display the one base graphic (it is intended to represent a fixed sign: nothing else makes sense in the context of the logic of drive by sight).

I have not tested choose signals with those working methods; it should work for token block, but I am not quite sure whether and if so how it might work for the other methods. It does not really make sense in one train staff mode, as that is intended to reserve the entire route from beginning to end in advance and work only when there is only one train in an entire and separate section of line. In drive by sight mode, it could in theory work in the same way as the choose signs for road vehicles, but I have not tested this. Is there a real precedent or demand for this?
Title: Re: Discussion of new signalling system
Post by: Ves on November 19, 2015, 06:07:46 PM

Quote from: jamespetts on November 19, 2015, 12:11:10 PM
I have not tested choose signals with those working methods; it should work for token block, but I am not quite sure whether and if so how it might work for the other methods. It does not really make sense in one train staff mode, as that is intended to reserve the entire route from beginning to end in advance and work only when there is only one train in an entire and separate section of line. In drive by sight mode, it could in theory work in the same way as the choose signs for road vehicles, but I have not tested this. Is there a real precedent or demand for this?
It could be handsome to have choose functionality in drive by sight. Maybe an automated choose function (no sign or signal is needed) but the train automatically find an empty platform? The end of choose sign could then be used to reserve platforms from choose function.

Alternatively a choose sign?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 19, 2015, 06:11:42 PM
I am not sure what you mean by, "The end of choose sign could then be used to reserve platforms from choose function;" can you rephrase?
Title: Re: Discussion of new signalling system
Post by: Ves on November 19, 2015, 06:16:19 PM
I'm just meaning that the end of choose sign would work as it does currently, and a way to get rid of unwanted trains on wrong platforms would be to place such a sign on the specific platform (as it does already today)
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 19, 2015, 06:18:04 PM
Ahh, I see, yes. I am not sure that having an automatic choose system (without any sign) would be sensible, but having a choose sign for drive by sight should work. It would be helpful if you could test whether this works already so that I know whether I need to alter the code for this.
Title: Re: Discussion of new signalling system
Post by: Ves on November 19, 2015, 09:48:21 PM
Quote from: jamespetts on November 19, 2015, 06:18:04 PM
Ahh, I see, yes. I am not sure that having an automatic choose system (without any sign) would be sensible, but having a choose sign for drive by sight should work. It would be helpful if you could test whether this works already so that I know whether I need to alter the code for this.
Do you mean a signal with:
working_method=drive_by_sight and free_route=1 together?
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 19, 2015, 09:52:09 PM
Yes.
Title: Re: Discussion of new signalling system
Post by: Ves on November 19, 2015, 10:50:46 PM
Quote from: jamespetts on November 19, 2015, 09:52:09 PM
Yes.
Putting working_method=drive_by_sight and free_route=1 together doesnt make it behave different than a normal "end of signalling"-sign
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 19, 2015, 11:28:52 PM
Thank you for letting me know. I will have to see how easy that this is to change.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 20, 2015, 12:07:31 AM
Quote from: jamespetts on November 19, 2015, 12:11:10 PM
In drive by sight mode, it could in theory work in the same way as the choose signs for road vehicles, but I have not tested this. Is there a real precedent or demand for this?

Well, e.g. a tram terminus - trams running in drive by sight, terminus has two or more tracks, so that one tram can arrive, while the other is reversing.
Title: Re: Discussion of new signalling system
Post by: Junna on November 20, 2015, 03:09:02 AM
Quote from: Vladki on November 20, 2015, 12:07:31 AM
Well, e.g. a tram terminus - trams running in drive by sight, terminus has two or more tracks, so that one tram can arrive, while the other is reversing.

I generally use choose signals and then end of signalling for trams departing for that. Usually such a set-up would have indicator tram-signals, but in the absence of specific tram signals, it works.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 30, 2015, 08:35:58 PM
Quote from: jamespetts on November 17, 2015, 09:53:43 PM
I have now implemented an option for normal danger: if a signal of track circuit block or cab signalling type has "normal_danger=1" defined, the signal will not reset to clear after a train has passed it. I have not tested this because there are not any signals of this type in Pak128.Britain-Ex; would one of the authors of the Swedish pakset care to test it to make sure that it works?

Makeobj version 55.4 for simutrans 120.0.1 Experimental Development build 12.9000 and higher says Entry "normal_danger=1" ignored (check spelling)
I have pulled fresh from git, but make makeobj says nothing to do...
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 30, 2015, 10:00:33 PM
I can't reproduce this, I am afraid. Do you want to have another go at pulling Makeobj and recompiling it after a "make clean" command? I have fixed one signal related bug in makeobj just now related to the maximum number of signal graphics for each signal.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 30, 2015, 11:11:50 PM
Hmm, I have probably somehow broken makefile. Make clean did not clean everything. I have deleted all files in build (left only the directory structure), make makeobj and make makeobj-experimental says theres nothing to do. But there's  no executable...
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 30, 2015, 11:40:52 PM
Very odd. I am not sure that I can assist here, as I do not develop on Linux regularly. Can anyone else assist Vladki here?
Title: Re: Discussion of new signalling system
Post by: Ves on December 01, 2015, 11:04:44 PM
As this is the signalling discussion, I have some suggestions:

More clear what working type a signal use.
When playing around, its not necesarily obvious which working method different signals use. Eg as a non native english person, I dont know what a "vane" signal is or what to expect of it. If I easy can find that it uses the "time interval working method", I can read about that method elsewhere and then use the signal. Currently I have to ask, guess or check the sources to find this information.
Places to show this info could be:
In the tooltip when mouse is hovered above the icon (together with price etc)
In the signal window (when clicking on an existing signal on the map)

Same goes for signal boxes. I would like to know what working methods a signalbox can use (goes along with the earlier proposal that build signalboxes from special menu)

Show current working method in the convoy window.
A field in the convoy window that always shows in which working method the train is.
Deluxe version would be with additional information like "waiting for the onetrainstaff" or "waiting for token", "waiting for 100% load" so the player more easy can get information about the vehicle.
Currently some of this ("waiting for clearance", "waiting for % load" etc) are already showed, however only as a popup on the map when hovering with the mouse over the train. Would this be possible and/or desired to show permanently in the convoy window?
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 01, 2015, 11:41:23 PM
Thank you for your suggestions. This is not entirely straightforward: the tooltips are already rather long and have difficulty fitting on smaller screens (I often test Simutrans-Experimental using my secondary monitor, which is only 1024x768, and the existing tooltips barely fit on that). Less problematic, but also less useful, would be to show the working method on the information window displayed when clicking on a signal after it has been placed. The state might also be shown here in words in case the state is not visible from all angles (as with some of the colour light signals in the Swedish pakset; you might want to look at the method that I have used in Pak128.Britain-Ex to make colour light signals visible from the side, which is to use a large spheroidal coloured object to represent the light so that it spills out over the sides of the signal as if the player could see a glow or reflected light from surfaces on the signal).

There is no (reasonably easy) way of doing this for signal boxes, however, as signal boxes do not necessarily work with signals only of one working method. Indeed, the signal boxes do not store information about what signals work with them: only the other way around.

One thing that I am considering for the convoy window is replacing the speed indication with a status indication when the convoy is stationary to explain what it is doing. The text for this should be the same as the currently displayed tool tip. There is not an easy way to display precisely why a train is waiting for clearance, however: doing so would require a great deal more processing and considerably more coding, so I do not think that this is practical for the effect that might be achieved. The next phase of development after signalling will be to alter schedules and the way in which convoys work to simulate maintenance and deal with convoy re-combination as well as schedule logic and parameterisation, so such changes may make more sense when I do this, as there may well be more states introduced (including "layover", where the convoy will not be in use and the fixed cost will not be payable).
Title: Re: Discussion of new signalling system
Post by: Rollmaterial on December 02, 2015, 12:51:32 AM
Quote from: Ves on December 01, 2015, 11:04:44 PM
Currently some of this ("waiting for clearance", "waiting for % load" etc) are already showed, however only as a popup on the map when hovering with the mouse over the train. Would this be possible and/or desired to show permanently in the convoy window?
The tooltip can be set to be shown permanently in the display settings.
Title: Re: Discussion of new signalling system
Post by: Ves on December 02, 2015, 07:47:41 AM
QuoteLess problematic, but also less useful, would be to show the working method on the information window displayed when clicking on a signal after it has been placed. The state might also be shown here in words in case the state is not visible from all angles (as with some of the colour light signals in the Swedish pakset; you might want to look at the method that I have used in Pak128.Britain-Ex to make colour light signals visible from the side, which is to use a large spheroidal coloured object to represent the light so that it spills out over the sides of the signal as if the player could see a glow or reflected light from surfaces on the signal).
That would be very helpfull if the working method could be shown upon clicking the signal after creation.
Also showing the state is not a bad idea! Problems with some of the swedish signals are the dwarfsignals, where the lights are put in a square.

Is there no way to show the current working method while the train is moving?

QuoteThe tooltip can be set to be shown permanently in the display settings.
Im aware of that, but this information I would like in the vehicle window :)

Another thing that comes to my mind is if it could be possible to get the behaviour of the presignal in absolute block working method as in track circuit method?
Reason is that signals where mostly used at stations in old days, and the presignal shoud show wether the entry signal shows clear or danger. Currently ALL signals (facing that direction?) must be clear for the presignal to show clear. I would like to use absolute block working method for semaphore.
Title: Re: Discussion of new signalling system
Post by: Vladki on December 02, 2015, 07:59:25 AM
One fundamental idea. In real world it is the signalbox that decides what signalling is used. Not the signal. E.g. czech color light signals are used for absolute block, circuit block and cab signalling. Theres no way to distinguish them without visiting the signalbox.

Probably also the same semaphores could be used with absolute and curcuit block.

The part which decides if the signalbox can operate mechanical or electric light signals is imho less important than communication with other signalboxes and free track detection methods.

I have seen stations with mechanical semaphores as main signals, but color light distant signals. I guess the cost of upgrading the old signalbox was offset by reduced maintenance and improved reliability. (and could be ignored in simulation)

Imho signalbox should state one signalling method, signals could set more of them.
Title: Discussion of new signalling system
Post by: Ves on December 02, 2015, 10:15:53 AM
Couldn't that be simulated by restrict different signals to different signal boxes? Otherwise I would rather keep the current behavior as the signalbox building and the mechanics inside not necessarily needs to be completely rebuilt due to track circuit implementation. I think that often the existing equipment inside the box where kept and upgraded as long as possible. Also, a mechanical signalbox could in theory operate both track circuit, absolute block, token block and one train staff at the same time (if one train staff is connected to one). Also another signalbox could in theory operate both track circuit, cab signaling and moving block.
Title: Re: Discussion of new signalling system
Post by: Vladki on December 02, 2015, 05:21:44 PM
I just wanted to point out, that  you have to upgrade the signalbox equipment (not the buliding itself) to change signalling method, but the signals can be used without any change. I just feel silly painting the same signals for three different signallings. An upgrade of signalbox without destroying the signals would be nice.
Title: Re: Discussion of new signalling system
Post by: Ves on December 02, 2015, 07:17:20 PM
Could be nice in general if you could upgrade signalbox without having all signals disappear.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 03, 2015, 12:53:48 AM
Briefly, as I have not much time this evening: I will look into providing more information in the signal information dialogue when I have time. I will also look into providing working method information for running convoys - perhaps in the convoy detail window, as the convoy information window is a little crowded.

Signals rather than signal boxes need to set the working method for quite a number of reasons, not least of which is that changing that would require fundamentally rewriting all the code that I have spent the last 5 months or so writing. Also, however, there are some instances where a single signal box needs to be able to deal with multiple types of signal: mechanical signal boxes can deal both with token block and absolute block signals, for example, and power signal boxes of later eras can deal both with track circuit block and radio-electronic token block signals. ETRMS signalling centres can deal with ETRMS levels 2 and 3 (that is, cab signalling and track circuit block). Indeed, there might be something to be said for having them deal with track circuit block signalling, too, as ETRMS level 1 is more or less just track circuit block with an element of standardisation. All of these combinations have real world precedents.

As to upgrading signal boxes without deleting all the signals, provided that the signals are to stay the same and only the box is to change, just use the reassign signals tool in the special construction tools menu in Pak128.Britain-Ex (I recommend that this tool be added to the Pak128.Sweden-Ex, too, if it is not already there: feel free to re-use the graphic, or adapt it using a Swedish signal). First, build the new box, then reassign the signals to it, and finally demolish the old box.

For a more comprehensive resignalling, however, involving changing the type of signalling (e.g., from absolute block to track circuit block), the signals should need to be deleted, as it is realistic that the actual signals themselves would be replaced in such circumstances.

As to Ves's request about the pre-signal in absolute and track circuit block, I thought that the Swedish pakset was going to use two aspect track circuit block signals with normal_danger=1 for the semaphore signals in any event - what would altering the absolute block working method, one of the major features of which over track circuit block with two aspects is this particular behaviour as to distant signals, have over just using two aspect track circuit block signals here?
Title: Re: Discussion of new signalling system
Post by: Vladki on December 03, 2015, 07:52:38 AM
Ad. Presignals in absolute block. Iirc presignal shows clear if all signals of the same signalbox are clear. So to get the swedish (and) czech behavior, one has to put a signalbox on each end of station. Thus the presignal and entry signal will be connectrd to one signalbox, while departure signals to the other one, not affecting the presignal state.
Title: Re: Discussion of new signalling system
Post by: Ves on December 03, 2015, 09:10:48 AM
QuoteAs to upgrading signal boxes without deleting all the signals, provided that the signals are to stay the same and only the box is to change, just use the reassign signals tool in the special construction tools menu in Pak128.Britain-Ex (I recommend that this tool be added to the Pak128.Sweden-Ex, too, if it is not already there: feel free to re-use the graphic, or adapt it using a Swedish signal). First, build the new box, then reassign the signals to it, and finally demolish the old box.
Great that there already exists such a tool! But I have trouble get it working. A window telling me that this signal is not compatible with this box, even though they are the same box. However, I dont use the latest builds, so there might be a clue in there as well.
Could it be possible to click a box, and then another box to make all signals from the first box go to the second?

QuoteAs to Ves's request about the pre-signal in absolute and track circuit block, I thought that the Swedish pakset was going to use two aspect track circuit block signals with normal_danger=1 for the semaphore signals in any event - what would altering the absolute block working method, one of the major features of which over track circuit block with two aspects is this particular behaviour as to distant signals, have over just using two aspect track circuit block signals here?
Well, I think the absolute block is the one that best describe the early signalling done in Sweden (before track circuit becomes available).
Track circuit block signals (the light signals) are the ones that will go back to red with normal_danger=1

QuoteAd. Presignals in absolute block. Iirc presignal shows clear if all signals of the same signalbox are clear. So to get the swedish (and) czech behavior, one has to put a signalbox on each end of station. Thus the presignal and entry signal will be connectrd to one signalbox, while departure signals to the other one, not affecting the presignal state.
That could be done, but that is a bit teddious? Also, most signals on a normal station would be controlled from the same signalbox.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 03, 2015, 10:56:14 AM
Quote from: Ves on December 03, 2015, 09:10:48 AM
Great that there already exists such a tool! But I have trouble get it working. A window telling me that this signal is not compatible with this box, even though they are the same box. However, I dont use the latest builds, so there might be a clue in there as well.

Can you retry with the latest build and post a full bug report if it still does not work?

QuoteCould it be possible to click a box, and then another box to make all signals from the first box go to the second?

I will look into this.

QuoteWell, I think the absolute block is the one that best describe the early signalling done in Sweden (before track circuit becomes available).
Track circuit block signals (the light signals) are the ones that will go back to red with normal_danger=1

Does it matter what the system is called so long as the function of the signals is realistic? This might be a reason against showing the name of the working method in the GUI.

QuoteThat could be done, but that is a bit teddious? Also, most signals on a normal station would be controlled from the same signalbox.

I am still not clear on precisely what function is sought to be achieved here. Can anyone elaborate?
Title: Re: Discussion of new signalling system
Post by: Ves on December 03, 2015, 11:31:17 AM
Quote from: jamespetts on December 03, 2015, 10:56:14 AMDoes it matter what the system is called so long as the function of the signals is realistic? This might be a reason against showing the name of the working method in the GUI.
Hmm, I will have to think of this...
Quote
I am still not clear on precisely what function is sought to be achieved here. Can anyone elaborate?
That was just a way to, in absolute block, to make an presignalled entrysignal, by putting a signalbox for each entry (and another one for the exits)
Title: Re: Discussion of new signalling system
Post by: Vladki on December 03, 2015, 08:09:14 PM
Quote from: jamespetts on December 03, 2015, 10:56:14 AM
I am still not clear on precisely what function is sought to be achieved here. Can anyone elaborate?

See the attached picture. It is a typical small station with signals according to czech (and perhaps also swedish) practice. Signalbox is usually just a room in the station building and operates all signals of the station. In reality the distant signal is affected only by entry signal. But in the current implementation of absolute block signalling it would show clear only if both entry and departure signals would be clear. Entry signal is 2-aspect (choose) signal. Czech entry signals were upgraded to 3-state since 1950's, but swedish were not. Drivers were expected to slow down in the station as if the entry signal had only danger/caution.

One solution is to use circuit block, which is quite unusual for semaphores, second to use two signalboxes (one on each end of station).
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 04, 2015, 12:04:20 AM
For simulation purposes, does it matter if you are using track circuit block? Now that there is a normal danger option, this distinction should be invisible to the player unless I add the requested feature of showing working method names in the UI.

Incidentally, at present, the distant in your example will show clear if the entry signal is clear and the train is stopping at the station, though this may well change if I implement another feature requested in this thread, being the reservation beyond a station stop to the next signal.
Title: Re: Discussion of new signalling system
Post by: Ves on December 04, 2015, 12:23:06 AM
Quote from: jamespetts on December 04, 2015, 12:04:20 AM
Incidentally, at present, the distant in your example will show clear if the entry signal is clear and the train is stopping at the station, though this may well change if I implement another feature requested in this thread, being the reservation beyond a station stop to the next signal.
Aha ok! Well, if thats the case, then at least Im satisfied! :)
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 04, 2015, 12:24:47 AM
Quote from: Ves on December 04, 2015, 12:23:06 AM
Aha ok! Well, if thats the case, then at least Im satisfied! :)

Would you still be satisfied if and when I implement the proposed change? The track circuit block working method with two aspect signals would do this in any event, however.
Title: Re: Discussion of new signalling system
Post by: Ves on December 04, 2015, 12:44:21 AM
QuoteWould you still be satisfied if and when I implement the proposed change? The track circuit block working method with two aspect signals would do this in any event, however.
I guess you mean the change that the reservation from the entry signal will go through the station up until the next signal (if no signal is put on the station)?

Then I guess so as long as the presignal in Vladkis example still would show clear when entrysignal (choose signal) shows clear.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 04, 2015, 12:57:02 AM
Yes, indeed, and this would remain the behaviour only for the track circuit block working method.
Title: Re: Discussion of new signalling system
Post by: Ves on December 04, 2015, 01:07:32 AM
Quote from: jamespetts on December 04, 2015, 12:57:02 AM
Yes, indeed, and this would remain the behaviour only for the track circuit block working method.
Do I understand you correct? will what I write underneath be true if you implement the changes?

Using vladkis example:
Track circuit block = the presignal will show clear if the entry (choose) signal shows clear. The entry (choose) signal will ALWAYS book through platforms up until next signal (if no signal on platform).
Absolute block = the presignal will show clear when entry (choose) signal shows clear. If train is scheduled to stop, reservation will end on the platform, even if there are no signal on it.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 04, 2015, 11:59:26 AM
I have not implemented the reservation through system yet, so there is no final decision about exactly how it will work.
Title: Re: Discussion of new signalling system
Post by: Rollmaterial on January 13, 2016, 10:40:45 PM
Speaking of reservation through platforms, it would be nice if the entire platform could stay reserved when a train is calling at it. Trains routed to a free section of an occupied platform are my most common cause of gridlocks.
Title: Re: Discussion of new signalling system
Post by: Vladki on January 14, 2016, 07:44:02 AM
Do you have signals in the middle of platform?
Title: Re: Discussion of new signalling system
Post by: Rollmaterial on January 14, 2016, 08:59:53 PM
Quote from: Vladki on January 14, 2016, 07:44:02 AM
Do you have signals in the middle of platform?
No. It happens mainly when a train much shorter than the platform is routed to its end. Then a fair amount of platform length is cleared behind it and a train can be routed there.
Title: Re: Discussion of new signalling system
Post by: Ves on January 14, 2016, 09:32:44 PM
I also had some issue with trains being sent to occupied platforms, but I have never managed to narrow it down to what caused it.
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 14, 2016, 10:16:30 PM
Quote from: Rollmaterial on January 13, 2016, 10:40:45 PM
Speaking of reservation through platforms, it would be nice if the entire platform could stay reserved when a train is calling at it. Trains routed to a free section of an occupied platform are my most common cause of gridlocks.

Trains should reserve the whole platform: can you give me a saved game and/or steps to reproduce? This seems like a bug.
Title: Re: Discussion of new signalling system
Post by: Rollmaterial on January 14, 2016, 11:10:43 PM
Quote from: jamespetts on January 14, 2016, 10:16:30 PM
Trains should reserve the whole platform: can you give me a saved game and/or steps to reproduce? This seems like a bug.
Here you go: https://www.dropbox.com/s/n0ujxroa5kjbdxz/Platform%20reservation.sve?dl=0
It usually happens at the station shown at load and at Tarington Inchbury Street.
Title: Re: Discussion of new signalling system
Post by: Vladki on January 31, 2016, 10:25:39 PM
Hi James, Ves and others.

recently I was working on signals for pak128.CS (standard and experimental as well), and I have searched and read a lot about the history of signalling in Czechoslovakia and Austria-Hungary. There's a lot of differences to British practices. I can't speak for other continental countries though, but you may compare for yourself.

The main difference was perhaps that all railways were first built as single track. Second track was laid only when the traffic was high. Even the first steam railway in Austria-Hungary - KFNB (which was quite important) was double tracked some 20-30 years after being built. Though on my search on early signalling I never found info about using tokens or similar things. Perhaps only some small private branch railways with low traffic did use that. What I read was that the early railways used time-interval signalling. Probably in 1870's-1880's absolute block signalling was introduced. (Sources are not really clear, sometimes contradicting each other). However, that means that both time-interval and absolute-block were widely used on single tracked railways. But IIRC, simutrans-ex implementation expects these two methods to be used on double track lines. The signalmen at stations, where trains could pass and overtake, had to agree on the direction of travel. (Which is sort of equivalent with the blue directional reservation in circuit block). They could use telegraph, and later telephone or special electromechanic devices for that. To notify the signalmen (watchmen) on the track a special optical telegraph was used - see http://www.laenderbahn-forum.de/journal/heldenzuege_1859/heldenzuege_1859.html If you scroll down you can see on the picture something that resembles T-semaphore, but I think these were used to pass info from one signalbox to another, not to the engine driver. This was later replaced with bell signals - series of rings informed which way the next train is going, or if any exceptional case happened (like runaway wagons, help engine needed, ...) From all what I collected, there is no big difference between absolute and circuit block here - at least from the engine driver point of view. The difference is in the (speed of) communication between signalboxes, means of detecting that the track is clear, and human factor involved. You can see that even now there are lots of single track lines on this map: http://provoz.szdc.cz/portal/Show.aspx?path=/Data/Mapy/TZZ.pdf (red lines - cab signalling, blue - circuit block, others - absolute block, thin black - D3 direct control via radio (verbal token block), dashed black - D4 something like RETB). The simplified D3 system is in use since 1960's, and D4 is brand new. So, not much token block in history anyway.

Time-interval is yet something different. Sources are not very specific, but flags and lanterns were used for that. At some time, the color was not important, but the movement was used to distinguish different signals. Some sources state that the earliest color flags were black=danger, red=caution, but no idea what was used for clear. (And in night ???). Yellow/blue/white colors were used for similar purposes as optical telegraph - send help engine up or down the track.

There are contradicting sources on early signals (for time-interval), and whether classic (upper quadrant) semaphores were used for time-interval or not. It seems that lower quadrant was not used here at all. However I found a lower quadrant signal in rule-book from 1914, but it was a fixed signal meaning "proceed slowly" - i.e. speed limit sign.

I found that a T signals were used in czechoslovakia at the beginning od 20th century: http://www.k-report.net/ukazobrazek.php?soubor=805778.jpg&httpref=/
However the text says that it is just an alternative to two normal signals. The signalbox you see is on single track somewhere in the middle between two stations. So instead of having one signal on each side of track, they built one T-signal - the train had to stop in front of that signal.

At that page, there is another interesting rule described - if the signalman does not get confirmation that the last train has arrived to the next station, and upon query does not get information that the train is still on its way, but according to schedule the train should have arrived few minutes ago, then next train can be sent on the track (with command to drive slowly). Perhaps some sort of fallback in case the telephone/telegraph is broken.

Another interesting thing is that Austrian rulebooks have "distanzsignal" and "vorsignal". Vorsignal means presignal, and shows caution/clear, just like UK distant signal. Distanzsignal means literally distant signal, but shows danger/clear. Its name is from the fact that it was built at long distance from station (500 m from outermost points), protecting the entry. It had no presignal on its own. It was supposed to be built on such place that it could be seen from big distance, so the driver could stop the train. Later when entry signals were moved closer to the station (50-100 m), these were probable repainted to vorsignals. You can see them here: http://www.modellode.cz/Doplnky-zeleznice.html
Picture 1,2 - Distanzsignal, 3 - normal and T-signal, 4,10 - optical telegraph (balloon signal), 5 - flag signal, 9 - vorsignal, 11 - shunt signals
I think the distanzsignal is technically similar to the swedish "plate signal". And it seems that it predates the use of absolute block, but the sources are very vague about that.


So to sum it up. For Czech signalling, the implementation of absolute block is not very useful. I'll use circuit block with normal_danger=1.

It would be nice if time-interval signalling is usable with single track - i.e. having the directional reservation as circuit block has. Otherwise I'll just fall back to 3-state or permissive circuit block.

For token block - to avoid most of the token block usage in simutrans, it would be sufficient if train does not revert to drive by sight when departing from station (unless it turns back).
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 31, 2016, 10:37:34 PM
Thank you for that. To implement time interval signalling for single track railways (and to consider whether doing so is feasible) I will need quite a bit more detail on precisely how this worked in practice; are you able to assist with this?
Title: Re: Discussion of new signalling system
Post by: Vladki on February 07, 2016, 12:31:04 PM
With the help of Leartin, I got some nice source of information: https://archive.org/stream/geschichtedereis03aust#page/56/mode/2up
Now I have to refresh my knowledge of German and pick up the relevant info from there. However at quick blick, it seems that many of the incomplete sources I came upon earlier were referring to this book.
Title: Re: Discussion of new signalling system
Post by: jamespetts on February 07, 2016, 12:34:57 PM
That looks interesting - it is rather a shame that I know only a minuscule amount of German. However, I have since realised that a similar thing existed in the UK (time interval working with telegraph). I am considering whether to add this as a distinct working method, although that will take some time, and I will have to finish the pending pakset work and fix existing signalling systems before I make a start on that. It might be a useful transition between full time interval working with line of sight signalling only and the later, more sophisticated telegraph worked absolute block, however.
Title: Re: Discussion of new signalling system
Post by: Spenk009 on February 07, 2016, 06:06:54 PM
I speak German, I could assist here. What sections were you thinking of?
Title: Re: Discussion of new signalling system
Post by: Vladki on February 07, 2016, 06:23:27 PM
I think that the first two sections have the most interesting info, especially the second (from page 57 to 118)
Title: Re: Discussion of new signalling system
Post by: jamespetts on February 07, 2016, 08:38:44 PM
Quote from: Spenk009 on February 07, 2016, 06:06:54 PM
I speak German, I could assist here. What sections were you thinking of?

That is helpful - a summary of the way in which the telegraph was used with time interval signalling (especially on single lines and at junctions) would be useful. Thank you.
Title: Re: Discussion of new signalling system
Post by: Spenk009 on February 20, 2016, 04:05:33 PM
This is the gist of up to around page 63, at which point the author delves deep into his fascination for the bell operated signalling. I know it's not a summary, but I decided to retain as much informations as possible.




In 1851 under orders from the emperor it was decreed that the crown lands were to follow a collective of regulations governing the operation of railways. The signals "drive slowly" for sections in poor condition, "front and rear lighting" on trains, "whistle", "points", communication signals between driver and train guard, staff at stations ("clear", "slow" and "stop"), for the driver "engage brakes" and "release brakes", and finally line signalling informing of  a train having departed, was not departing and locomotive assistance required. All these signals must be communicable even by telegraph or in the event of this being broken without it.

Because these clever regulations only governed the terms of signalling and the types of signals without further establishment of signage and design of the signs (except for "whistle"), the development of signalling was little impeded. But as the years passed, the increase in traffic and convoy speeds naturally required an equivalent increase in signals and signalling assemblies, which necessitated a further batch of regulations that found their inauguration in 1877.

In this set of regulations the successor to the optical telegraphs is cited, this being "electrical, through line signalling". Page 40 (image 3) shows the evolution of these, which emerged from the unreliability of optical signalling that wished for a second signal that could be viewed at night, fog, etc. and was not affected by viewing distance. This is for the signal guards to ensure that the signals had operated correctly. In 1854 & 1855 (Semmering & Karst), electric bells were introduced next to the electric line signals. Due to this, the amount of guards along the track could be reduced significantly. An engineer named Schnirch suggested using the telegraph poles to anker the steel wires that were used to transfer the optical signals across long distances. This simultaneous working of optical and electrical signals was generally used until 1861 and in some cases kept for far longer until 1877. Due to the hilly nature of Austria, the signals "stop all trains" and "track unusable" were added. Unlike in Germany, where the amount of rings the bells give matter, these signals were ascertained by constant ringing of the bell. All other signals are given by telegraph communications or telephone lines. The fact that in Austro-Hungary every guard post must be able to communicate bell signals necessitated the operation with batteries.
Title: Re: Discussion of new signalling system
Post by: Vladki on February 20, 2016, 09:28:29 PM
Spenk: thanks for the summary. I'm also slowly getting through it.

However I have more thoughts about singalling. From my tests with circuit block signals in experimental, I fell there is something fundamentally wrong. So this is gonna be long and theoretic post.

I have read a lot about various signalling methods recently. There is lot of differences between countries, and also between real world and simutrans. E.g. czech railway rules have strict distinction between station (where trains can pass and overtake), and running line - with or whithout signals and singalboxes that split it in multiple blocks. There is no such distinction in simutrans, but perhaps may be useful. Perhaps for UK absolute block I could say that a station is between home and start signal (or entry and departure on the continent), and that singalboxes on the line have home and start as one signal (block signal). Well at least that's how it works in CZ. (And the home signal can be in the form of combined signal acting as distant for the next start signal, both operated from the same signalbox). Maybe an example savegame with signals arranged as they are usually on UK railways may be useful. And I will provide one with CZ examples.

I think that for the needs of simutrans we should distinguish between signalling methods used on uni-directional track (i.e. double track where directions are fixed), and bi-directional track. At least in czech practice there are two signalling layers. One is used to negotiate the direction of traffic, and second to ensure safe distance between trains in the same direction. Let's first look at the second - safe distance in the same direction. There are probably the same options as in simutrans now:
- drive by sight (used by trams)
- time interval (obsolete now, but may be used combined with drive by sight in case of total failure of communications between stations)
- absolute block (either telephonic, or semi-automatic, used with both mechanical and color-light signals. Perhaps morse telegraph was in use as well. In all cases it depends on visual check by signalman that the train passed completely)
- circuit block (improvement of absolute block by removing the human factor - track clearance is checked electrically, signals return to clear automatically)
- cab signalling (improved circuit block - there are two different implementations - one that just shows the next signal in drivers cab, thus increasing the visibility of signal. For trains without the necessary equipment it is just like circuit block. Second that has no track-side signals, just signs as block-delimiters, cab signalling equipment is a must on such track.
- moving block (further improvement, driver has only the speed indication in cab, no signals along the track, blocks (beacons) are quite short. could be emulated as multiple aspect signalling with very many aspects.

- side note about speed signalling - there are two of them: one that is defined by path over junctions and switches, and tells the driver max. allowed speed over the switches for his specific path. The second that is defined by the lenght of clear track ahead. Simutrans trains do not need either, they always calculate their allowed speed over turns and breaking distance automatically. Path speed signals can be used at choose signals with has_selective_choose=1, distance speed signals can be used as multiple aspect signals. In some countries the rules define the speed at which signal at caution (or preiminary caution) may be passed, and in some not - it is the drivers responsibility to brake accordingly.

All these methods can be nicely described, and perhaps well implemented if the track is used only in one direction. If the track is to be used in both directions, we need first to negotiate the direction of movement before using the above described methods. These methods are (at least in CZ) used also for double (or more) track lines, when one of the tracks is not usable (accident, maintenance, repair) or, when a fast train has to overtake a slower commuter train in the same direction. To negotiate the direction, devices that are used for absolute or circuit block signalling are extended with button for "track permission" (CZ: traťový souhlas). There is one permission for each track, and only the station that has the permission can depart trains in that direction. The permission can be given to the other station only if the whole track is clear. When the permission is given-up, all signals in one direction become locked at danger, and signals for the opposite direction are unlocked. Circuit block signals on czech railways are usually unlit (eh I wanted to say turned off, but that may be confused with pull off = clear) in the opposite direction, but the meaning of such unlit signal is the same as danger.

Interesting stuff I found is the method used by CZ railways in case of comunication failure. If stations cannot communicate (not even by phone) with each other, there is a paper form of track permission. That is normally locked at one of the station and not used until necessary. This paper permits the station to dispatch trains in time intervals (10 minutes), train drivers have to get written order to proceed in drive by sight, ignore signals until the next station, and tell all the signalmen along the track that signalling is broken. The paper permission can be sent to the other station (by train or any other means) to allow trains to proceed in opposit direction. So - it is just the classic staff & tickets method.

Anyway, if you look at absolute block and all the modern methods, it is just a token block system with virtual tokens, that are transferred by electric wires between signalboxes. Also Direct traffic control (CZ rule D3), or RETB (CZ rule D4) are just a virtual (verbal or electronic) token methods. Even if you think about the electric token machine system - the token "returns" immediately, there's just a limited amount of them :) If you think more about it, you find out that token block and absolute block are very close - there is just a limit on the number of trains in one direction - you run out of tokens and have to send some of them back.

For ancient signalling, the direction was negotiated either by telephone, morse telegraph, ring (bell) signals or optical telegraph. I found a note that trains were carrying flags that told the signalmen if another train is following in the same direction (during that half of day....) Hmm, perhaps there was some timetable saying that trains go "up" in the morning, and "down" in the afternoon ;) perhaps they carried not only flags but also some sort of token for the next station.

I think that in simutrans the directional (blue) reservation should be used on top of all above mentioned methods using the staff+ticket method. I could imagine it so that the directional reservation is more "persistent" and is still in effect, when train has passed. When a train in opposite direction is needed - the whole line has to be checked for clearance and then the direction can be swapped. The question is where should be the limits of directional reservation - I would think that each section delimited by junctions could do.

I feel It would be better to discuss all this live with pen and paper (and beer). Maybe you already solved lot of the things I'm thinking about and that are hard to describe (and even harder to describe in foreign language).

To put it short, something like staff & ticket method should be used on top of the others (drive by sight, time interval, absolute, circuit, cab sig, moving block) to provide the direction of movement, while the other methods deal only with spacing of trains in the same direction.

Title: Re: Discussion of new signalling system
Post by: jamespetts on February 21, 2016, 01:13:20 PM
Thank you very much both for spending the time and effort to translate the very interesting Austrian signalling history and to set out your thoughts on the signalling system (respectively): it is much appreciated.

Replying to those points that seem to merit a reply: Vladki, you write that you think that there is something fundamentally wrong with the signalling as it is, but it is not clear from what you have written what you think that the fundamental problem is. Can you elaborate?

The current situation is that drive by sight, absolute block, token block, track circuit block, cab signalling and moving block working methods are (subject to any specific bugs that have yet to be found) complete and one train staff and time interval still need significant work to bring them into operation fully (they both exist, but do not work properly at present).

I did consider adding staff and ticket working when I was first deciding what working methods to implement, but realised that this system is one in which deadlocks can very easily arise (if the staff is at the wrong end of the section) and would thus create innumerable difficulties for players in working out with great mathematical complexity which trains to tell to take the staff rather than a ticket in order to avoid problems.

However, one additional working method that may well be worthwhile considering, as discussed a few posts ago, is time interval with telegraph. There are records of that being used in the UK. It may well be able (for example) to reserve a section over a junction greater than the sighting distance, and to allow directional reservations along single track lines (as denoted by the use of bidirectional signals, as with other working methods). I shall have to give some consideration to quite how to implement this once I have finished working on the left over pakset work from the Christmas period, which is taking me longer to process than I had anticipated. I shall at the same time look into the question of reserving through beyond non-reversing stops for absolute block, track circuit block and cab signalling as previously discussed.
Title: Re: Discussion of new signalling system
Post by: Ves on February 22, 2016, 10:19:45 AM
From the other thread:

Quote from: jamespetts on February 21, 2016, 02:16:05 PM
As to directional reservations, do see my reply in the other post to Vladki regarding these in the earlier signalling systems. Do I understand correctly that your issue is regarding the use of bidirectional signals? The system was designed thus to be relatively simple: anything that uncouples bidirectional signals with bidirectional track would take a huge amount of time and effort that could better be spent on other things. The basic principle is that a directional reservation is made from the first bidirectional signal on a train's route to the first unidirectional signal after the first bidirectional signal on that route. That should be simple enough to remember. The reason to use bidirectional signals at the North station is to start the directional reservation for trains heading towards the single track section: the deadlocks occur when trains enter that single track section without having made a directional reservation because they have yet to encounter a bidirectional signal.

Yes, It is regarding the need to use bidirectional signals.
Ok, I understand that separating the two again (after you have first coded it) is not nessecarily the optimum. Also I agree that a simple way to distinguish between directional and nondirectional reservations is to use single and bidirectional signals, like the way it is currently.
However, in some occasions, it can get a bit unflexible, for instance in some of the examples in the other thread. A (maybe easy, I dont know :P ) way to add flexibility could be to introduce a "Bidirectional reservation sign" which would force any signal behind the sign to behave as if it was a bidirectional signal in the sence of reservations. Whenever a signal tries to reserve through the sign, it will check if its possible to create directional reservation from the next signal (or at the end of the current moving block). If not, then the signal in front of the sign will remain at danger (the moving block may not proceed behind the sign).

The sign should be placed on any of the tiles between the first signal on the bidirectional line and the last signal on the onedirectional line. The first signal would then behave as if it was a bidirectional signal. In the sence of moving block, the stretch behind the currently reservated area will become direction reserved.
Title: Re: Discussion of new signalling system
Post by: Ves on March 09, 2016, 12:55:10 AM
I was considering to use the "spoken" token block system because, to my knowledge, this is a good representation on how early trains are operated in Sweden:
When a clearance is given, nobody (except the train it self) will know where it is along the route. If there are crossing tracks, the dispatchers at the stations on those tracks would also be contacted to make sure a train can be sent (in real life, I guess there would not really be any ungarded junctions like this, but that cant be prevented in Simutrans..). A train cannot be sent if not the former one had arrived at its next station.
If there are ungarded platforms (with no dispatchers) along the route, the trains would still keep their clearance through those, even when stopping.

Problems with using token block signals is that if they are put on platforms, they will keep reserving the platform after leaving the station. Therefore they must be placed "behind" the station, although, that would risk to create a deadlock if a head on train is released at the same time.

I did not think it through about creating directional reservations with the other working methods, but I guess it would not make much sense if directional reservations are to be made only with double faced signals.

And yes I guess you have a valid point about track circuit signals not unreserving behind the train.

However, a solution could maybe be to reintroduce the Simutrans old fashioned "2 block signal" (signal will only clear if next signal is also clear)?
In fact, that would probably solve all the issues described I think:
Exit signal is token block: If token cant be released, signal will stay at DANGER on platform
Exit signal is track circuit block: If exit signal cant create a directional reservation (after the bidirectional signal on the line) it will remain at danger, thus the 2 block signal at the platform will also remain at DANGER.
Exit signal is a one train staff: Same as with token block, if the staff is not inside the cabinett, the signal will remain at DANGER.
Title: Re: Discussion of new signalling system
Post by: Vladki on March 22, 2016, 09:05:37 PM
I think there could be another solution to the directional reservation problem. Binding it to bidirectional signals is maybe easy to code, but bound only to circuit block and not practical in many cases. E.g. Bidirectional exit/entry signal would need to be choose signal in one direction, but normal signal in the other. Also 2-block pre-signal (like in standard) would be needed to avoid deadlocks.

My proposal is to extend the use of long block signals, so that they are no more synonym for token block signal. Long block signals would be the explicit boundary for directional reservation. So a train approaching a longblock signal would attempt to make directional reservation up to the next longblock signal, possibly passing many "normal" signals on the way. If it succeeds, it will try to reserve the next block as normal signal according to its working method - drive by sight, time interval, absolute block, track circuit, cab signalling, moving block. Problem is with choose signals - how would directional reservation behave on choose signal? Simplest solution would be to end directional reservation at choose signal too.

Choose signals for all methods - even the early ones (time interval, drive by sight, tokens) should work similar to absolute/circuit block. In reality - entry to stations was secured differently to line blocks. It was decided by signalman by visually checking clearance of tracks, ensured by some locking mechanism - track ahead of choose signal should be in any case reserved at least up to the halt point or end-of-choose sign (or the next signal ahead).

I'm not really confident how token/staff methods are implemented, but what about this:
- token can be picked up and returned only at long block signal (only with token/staff method, not others)
- choose signal does not affect token ownership.
- normal signal would not exist at all (or would act as long signal)

Title: Re: Discussion of new signalling system
Post by: jamespetts on March 28, 2016, 11:37:13 PM
Thank you for your feedback, and apologies for not having had time to reply earlier: I am afraid that I have been rather busy with work of late.

Can you both clarify the working methods for which the current system relating to directional reservations (or lack thereof) is problematic? Do you see this as problematic even when emulating UK signalling, or is this an issue specifically for emulating Swedish/Czeslovakian signalling systems? Where, in track circuit block with appropriately placed double facing signals, can deadlocks occur as a result of this? I seem to remember seeing a deadlock in an example uploaded that could be cured by changing one particular signal from unidirectional to bidirectional. The idea of the directional reservation was to reserve it for modern signalling systems, since only modern signalling systems have the concept of a directional reservation, which allows much more flexibility of track usage than older signalling systems that either require strict directional separation of tracks or cumbersome methods such as token block. Directional reservations might be useful to simulate the old time interval with telegraph system discussed above, which was in fact used on single lines before token block systems were invented.

I am afraid that it is not always easy to keep up with what is being discussed if one only has an opportunity to consider it briefly after long breaks and remembering all the (very detailed) context and previous information is not easy, so forgive me if I am asking things that I have asked before.

I see that the discussion has moved beyond track circuit block to token block systems. Is the problem that the current token block system, as implemented, does not properly represent UK signalling (or otherwise causes significant game-play issues when so used), or is the issue that it cannot properly be adapted to represent Swedish/Czeslovakian signalling systems? I should note that token block signals should clear the reservation of a platform for which they are the starting signal once a train has passed it (provided that the signal is actually on a platform tile, not beyond the station). Can you confirm that this works? If this has ceased to work, I should be grateful if you could start a new thread with a bug report, as I am afraid that I shall not remember to look back at this thread to remind myself of all the bugs that need fixing when I return to coding signalling. The idea is that the token block signals are used as the starter signals on platforms, with normal (uindirectional) distant and stop signals on the single line section itself.

As to choose signals, is there an issue with these in any method other than time interval (which is currently not working)? It is important to separate the concept of a choose signal (one which tells a train to take the next free platform at its destination station even if its chosen platform is not free, and is specifically placed by a player) and a signal protecting a junction (which does not tell the train to alter its platform, and which is detected automatically by the code). The currently stalled upgrade of time interval is intended precisely to make junction (not just choose) signals work somewhat like junction signals in absolute block, except that the reservation will only be able to be made within the sighting distance set by the pakset (750m in Pak128.Britain-Ex for now). Beyond this limit, there will be no reservation, and the train will be free to travel to its speed limit (or half the track speed limit if another train has passed in the last 10 minutes) until the next signal. The time interval with telegraph system that I plan will not have this limitation (on the assumption that pointsmen can telegraph each other from different sides of the junction if it be a long one). As to choose signs (not signals) in the drive by sight method, these should work in the same way as road choose signs, as it is implicit in drive by sight that there is no signalling of any type at all. As for token block systems, one should not have a token block choose signal as such: one should use the absolute block choose signal facing a station on a single line, and only use the token block signals facing out of stations (i.e. as platform starters) on single line sections.

Note that the current implementation of the token block and one train staff system does not rely on the concept of the game actually simulating the staff directly or storing the location of a staff or token: they work merely by setting up rules about when certain segments of track are to be reserved and unreserved. The one train staff system is not currently working and needs fixing, once I have worked my way thorough a large queue of other Simutrans tasks.

Title: Re: Discussion of new signalling system
Post by: Ves on March 31, 2016, 09:52:45 PM
Ok, throwing in an effort of mixing this down, joining two parallel discussions:

Quote
It is important for me to know whether any given reported problem is common to all implementations, including British implementations, or whether any such problem is only a problem in so far as implementing other signalling systems is concerned, as I need to know whether I am likely to need to change the existing system or add further options, leaving the existing system in tact.
As far as I can tell, most of the issues that Vladki and I are pointing out relates to "our" countries (sweden and czeck), not to the way the signals works in England.
I have not had time to study english signalling, but I trust that you know that subject and have coded the current system accordingly (A small note to that: there should be a guide where to place the signals according to ENGLISH practice inside Simutrans. I think my documents are (still) too vague on that subject).
However, see the example below regarding the token block signals.

Quote
This may have been different in the days of time interval signalling, but I have not had any success in finding detailed information about how stations, in particular, were signalled, save that smaller stations often had a single "T" shaped signal (similar to the Swedish practice previously discussed) for all trains departing from that station. I cannot find any information about what signalling was used for arriving trains.
Was the T-signal not used for the arrivals too? Otherwise, maybe just hand signals where used?
 
Quote
I am not entirely sure that I understand the reference to time interval and token block not making much sense in the context of line block signalling and signalling at stations. As stated on the public forum, time interval signalling in the context of junctions (including those at stations) is not currently working and awaiting being fixed: I am in the process of making this work as I have discovered it worked in reality (but have been distracted by pakset works since December and have not had the chance to finish this). As to token block, this should work correctly for stations if it be used correctly (the token block signals as the starter signals, absolute block signals (including choose signals if appropriate) as the home and distant signals).

- and -

I see that the discussion has moved beyond track circuit block to token block systems. Is the problem that the current token block system, as implemented, does not properly represent UK signalling (or otherwise causes significant game-play issues when so used), or is the issue that it cannot properly be adapted to represent Swedish/Czeslovakian signalling systems? I should note that token block signals should clear the reservation of a platform for which they are the starting signal once a train has passed it (provided that the signal is actually on a platform tile, not beyond the station). Can you confirm that this works? If this has ceased to work, I should be grateful if you could start a new thread with a bug report, as I am afraid that I shall not remember to look back at this thread to remind myself of all the bugs that need fixing when I return to coding signalling. The idea is that the token block signals are used as the starter signals on platforms, with normal (uindirectional) distant and stop signals on the single line section itself.
As stated earlier, Im talking out from a swedish perspective, however the situation explained below, I find difficult to imagine how it would work also in an english enviroment with the current implementation.

Imagine a station on a line with a branching line going out from that station:


                                            / /
              _____________________________/ /
West   ______/_____________________/_\______/             East
       _____/_____________________/___\________________________
        [station house]

This illustrates a station with three tracks on a double tracked line, with a single tracked line branching out to the east.
The double tracked line outside the station is equipped with track circuit block signals (or absolute block signals), and choose signals facing towards the station. The single tracked line also has a choose signal facing towards the station.

The single tracked line has stops along the way, so token block signals are needed on the east side.

With the token block signals placed at the platform ends on the east side of the station, a train departing from the station heading out on the single tracked line will reserve the junctions and keep them reserved until it arrives at the next signal, possibly after a LOOOONG distance, blocking acces to the platforms from the other tracks. Trains going on the double tracked line would also have this problem, however a reservation could be much earlier resolved by placing signals quite close to the station facing from the station.

This cannot be resolved by putting a single token block signal on the single tracked line outside the station as that would create another problem: trains will be released from the track and held at that signal (if it is in danger), possibly blocking the junctions and possibly creating a deadlock if another train is released from the other end of the line.

If this is too complicated in written text, I can upload a savegame to illustrate what I mean.

Note: This would be a problem also for the one train staff, as you want the train to stand still at the station until the staff is returned.

Title: Re: Discussion of new signalling system
Post by: jamespetts on June 17, 2016, 11:56:04 PM
Apologies for the delay in progressing this topic: I had been rather busy with some other things, including bug fixes and pakset work, as well as non-Simutrans matters. I am now turning my attention to signalling again. As some may have noticed, I have now fixed time interval signalling, which should, at least for the most part, work correctly.

I am having some trouble with the time interval with telegraph mode at this juncture: in particular, finding a way of making it usable for single line working whilst retaining a reason for the player to upgrade to token block working when that becomes available. The difficulty is made all the greater by a lack of material about the details of how time interval signalling actually worked when accompanied by the telegraph.

The material that I have found so far is from rule books of the Eastern Counties Railway from 1848 and 1856, which do not go much further than stating that the signalman must send a telegraph message to the signalman at the other end of the single line section to check whether the line is clear, and, if it is, may send a train along it. I had thought that this might work in a similar way to token block, but without reserving beyond a station stop (as there would always have to be a signal at the end of the section), but this is problematic when used with double track running as it reserves rather too much rather too soon.

As to the diagram drawn by Ves above, does anyone have any idea as to precisely how such a layout might have been signalled in the days of time interval signalling? I am trying to avoid if possible having to create any significant new abstractions or mechanisms, which would involve a very significant amount of work and may possibly have adverse performance implications.

Finally for now, I have implemented an earlier suggestion on this thread of having a signal's working method visible in the tooltip and the signal's information window, and also having a train's current working method visible in the convoy detail window, which I hope is helpful.
Title: Re: Discussion of new signalling system
Post by: Ves on June 18, 2016, 08:47:57 AM

Don't worry, take the time that is needed! :-)
Quote from: jamespetts on June 17, 2016, 11:56:04 PM
As to the diagram drawn by Ves above, does anyone have any idea as to precisely how such a layout might have been signalled in the days of time interval signalling? I am trying to avoid if possible having to create any significant new abstractions or mechanisms, which would involve a very significant amount of work and may possibly have adverse performance implications.

I don't have any concrete Swedish or English example at the moment, but I would assume that, whatever the signal system is used, the train would be held back at the platform/siding until the entire trip to next station/siding can be booked. In other words a combination of absolute block and whatever working method on the line it self.

Quote
Finally for now, I have implemented an earlier suggestion on this thread of having a signal's working method visible in the tooltip and the signal's information window, and also having a train's current working method visible in the convoy detail window, which I hope is helpful.
That is really great news! This will help troubleshooting and add some clearance as to what is happening on the tracks I think!


Sent from my iPhone using Tapatalk
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 18, 2016, 10:37:54 AM
Quote from: Ves on June 18, 2016, 08:47:57 AM
Don't worry, take the time that is needed! :-)
I don't have any concrete Swedish or English example at the moment, but I would assume that, whatever the signal system is used, the train would be held back at the platform/siding until the entire trip to next station/siding can be booked. In other words a combination of absolute block and whatever working method on the line it self.

From what I have read of UK practice concerning diverging single and double track other than at stations, there was generally a short stretch of double track (about a train's length) on what was otherwise the single track line just beyond the junction. If replicated in Simutrans, this would allow for a mix of token and absolute block signalling to work as currently implemented. In more modern times, this practice has largely been discontinued (and it is not necessary in the current implementation of track circuit block, cab signalling or moving block).

This is why I asked for detailed examples: I do not know whether there were any junctions signalled in this way without a short stretch of double track until modern times and, if so, how they were signalled. One thing that would be very difficult to achieve in the current implementation of signalling is having a signal behave differently depending on the route beyond the signal that the train takes. This is (in simple terms) because the code iterates over the route tile by tile, and triggers the signal's behaviour when it gets to the tile with the signal on it, without yet having checked what tiles are ahead. It is also conceptually very difficult for the code to determine which tiles belong to a stretch of double track and which tiles belong to a stretch of single track.

Quote
That is really great news! This will help troubleshooting and add some clearance as to what is happening on the tracks I think!

I am glad that this is helpful.

Edit: I have now fixed the issue with reservations clearing behind a train that is entering a platform and scheduled to reverse there.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 18, 2016, 01:58:17 PM
That's good news ;)

I'm trying to set up a testing server (thank to Isaac), where we could test various layouts. Do you have any sugesstions or hints how to compile (without SDL) or just any useful tips for running a experimental game server?

As I said earlier, Czech railways do not use token block too much. The transition went from time-interval to absolute block. The only reason to use token block is to save on infrastructure and operation costs (signals, signalmen). But you lose on throughput, so now something like token-block is used only on very low traffic branches.

For implementing telegraph + time interval, I think that the directional reservation could be used for that - reserve as far as next junction, clear right after the train. Similar method cloud be used to enable sigle track operation with absolute block. Or you could reconsider my earlier sugesstion on changing how longblock signals work: Do not make them an alias for token block, but make them as explicit markers for directional reservations in all working methods. (Or at least time interval, absolute, circuit block, cab signalling, movng block). E.g. for absolute block - normal signal would make "red" reservation up to next signal, long singal would make "blue" reservation up to the next long singal (in addition to normal "red" reservation to next signal). Choose signals pose a little problem so blue reservation could end on choose signal to make it simpler.

Junctions out of station: Most of railway junctions (I know about) that are not within a station, are usually not far from the station (a few km at most) - and were for long time operated in absolute block mode (even on single tracks). To avoid deadlock, the direction of traffic had to be agreed between stations on both sides of junction (just as if there was no junction at all). It certainly needed a smart signalmen (and timetable) to avoid deadlocks.

Combination of token-block with other methods. In real life, the drivers and signalmen know whether a token is needed for particular stretch of track or not. But we do not have such information in simutrans. Neither the token itself is simulated (if I recall correctly what James said). I have played a bit with token block and find it quite unpractical and non-intuitive how to use at all. Consider a simple line with passing loops (two tracks with one-way sings on one side and token-block signal on the other. Trains arrive from both sides, stop, and wait forever because the track behind is still reserved for them. I can fix that by putting an entry signal in front of the station, but then next train can follow in the same direction, while the passing loop is occupied. Deadlock again. Unfortunately I have no good idea how to solve that.
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 18, 2016, 03:38:13 PM
Quote from: Vladki on June 18, 2016, 01:58:17 PM
I'm trying to set up a testing server (thank to Isaac), where we could test various layouts. Do you have any sugesstions or hints how to compile (without SDL) or just any useful tips for running a experimental game server?

I am not sure that I fully understand the question - are you having any trouble compiling? If you are, it might be better to start a new thread about it.

QuoteAs I said earlier, Czech railways do not use token block too much. The transition went from time-interval to absolute block. The only reason to use token block is to save on infrastructure and operation costs (signals, signalmen). But you lose on throughput, so now something like token-block is used only on very low traffic branches.

In reality, token block was used as a safety system: to ensure that no two trains were ever simultaneously permitted to be on a stretch of single track at the same time, all trains entering the section needed to have a token, and the machines at either end of the section would only release one token at a time. This was, in effect, a more efficient and semi-automatic implementation of the earlier staff and ticket system.

What I am having trouble finding out is exactly how single line working actually worked in the days of telegraph based signalling before the invention of the token block machines.

Another problem is, as stated in the previous post, to give players an incentive to upgrade to token block when it becomes available. We cannot have a possibility of a head-on collision as an incentive, as that would result in a deadlock which could cause problems for an unattended player in an online game, and in any event, Simutrans has generally preferred to avoid simulating disasters of any sort.

The other theoretical alternative would be to simulate staff and ticket working, but, as discussed before, the possibility of a deadlock with such a system (and the degree of micromanagement required in players telling trains when to take a staff and when to take a ticket) is too great to be practical.

Do you have any idea how time interval or absolute block actually worked in practice on single track lines in Czeslovakia (or whatever it was called at the relevant time)? In particular, do you know where the signals would be placed, and where the trains would have to be relative to the signals for a section to clear? Would only one train be allowed in the section at once, or would multiple trains (in the same direction, separated by time intervals) be permitted?

A problem with the latter system would be that it would actually be preferable for the player than token block signalling, so there would be no incentive to upgrade.

QuoteFor implementing telegraph + time interval, I think that the directional reservation could be used for that - reserve as far as next junction, clear right after the train. Similar method cloud be used to enable sigle track operation with absolute block.

This raises quite a number of complexities. Firstly, reserving to "the next junction" is ambiguous. The code needs to determine at precisely what tile that it stops reserving further. What counts as a "junction" here: the first tile with tracks of more than one direction on it (which would include a line merging into the single track section one or two tiles after the signal at the start of the single track section), or some other tile, and, if so, which one? The normal thing is for a reservation to end at a signal, so that a train has a means of being signalled beyond the end of the point to which it has reserved. The signal is usually not on the same tile as the junction, so it is unclear what ought to (or sensibly could) happen if a train were to reserve to a junction rather than a signal. The difficulty is that there is no way of defining an area in Simutrans: a junction in a station area is treated identically by the code to a junction a long way from a station or one in the next station.

QuoteOr you could reconsider my earlier sugesstion on changing how longblock signals work: Do not make them an alias for token block, but make them as explicit markers for directional reservations in all working methods. (Or at least time interval, absolute, circuit block, cab signalling, movng block). E.g. for absolute block - normal signal would make "red" reservation up to next signal, long singal would make "blue" reservation up to the next long singal (in addition to normal "red" reservation to next signal). Choose signals pose a little problem so blue reservation could end on choose signal to make it simpler.

Is the idea here to have a signal that can be used to instigate a directional reservation that only affects trains travelling in one direction?

QuoteJunctions out of station: Most of railway junctions (I know about) that are not within a station, are usually not far from the station (a few km at most) - and were for long time operated in absolute block mode (even on single tracks). To avoid deadlock, the direction of traffic had to be agreed between stations on both sides of junction (just as if there was no junction at all). It certainly needed a smart signalmen (and timetable) to avoid deadlocks.

There are plenty of junctions in the UK that are some distance from stations - at least, far enough that they had to have their own signalbox in the days of mechanical/absolute block signalling; they would typically have the sort double track section described in my previous post.

QuoteCombination of token-block with other methods. In real life, the drivers and signalmen know whether a token is needed for particular stretch of track or not. But we do not have such information in simutrans. Neither the token itself is simulated (if I recall correctly what James said). I have played a bit with token block and find it quite unpractical and non-intuitive how to use at all. Consider a simple line with passing loops (two tracks with one-way sings on one side and token-block signal on the other. Trains arrive from both sides, stop, and wait forever because the track behind is still reserved for them. I can fix that by putting an entry signal in front of the station, but then next train can follow in the same direction, while the passing loop is occupied. Deadlock again. Unfortunately I have no good idea how to solve that.

I have just fixed a bug with token block reservation that caused unreservation incorrectly. See this (http://bridgewater-brunel.me.uk/saves/passing-point-test.sve) saved game file for a demonstration of how to set up a single track railway with a passing loop using token block signalling. Does this make things any clearer?

Edit: I have investigated the way in which junctions were designed from stations on double track lines with a branching single track line. From what I have found, these, too, like the junctions away from stations, had a length of double track line immediately beyond the station before reverting to single track. I suggest that the token block signal should go on this stretch of double track line.

Edit 2: I have rigged up a test and demonstration track for a mix of single and double track running using a mix of absolute and token block signalling: download it here (http://bridgewater-brunel.me.uk/saves/branch-demonstration-signalling.sve). This appears to work as intended. Does this answer any questions on how to signal this sort of arrangement?
Title: Re: Discussion of new signalling system
Post by: Vladki on June 18, 2016, 09:02:49 PM
Quote from: jamespetts on June 18, 2016, 03:38:13 PM
I am not sure that I fully understand the question - are you having any trouble compiling? If you are, it might be better to start a new thread about it.
Right now I have to sort out cross compiling (my PC is 32-bit linux, and server is 64-bit linux), but that is off-topic here. I'll google more...

Quote
In reality, token block was used as a safety system: to ensure that no two trains were ever simultaneously permitted to be on a stretch of single track at the same time, all trains entering the section needed to have a token, and the machines at either end of the section would only release one token at a time. This was, in effect, a more efficient and semi-automatic implementation of the earlier staff and ticket system.
Sure it was a safety system, but it is also a low-cost solution, with lower throughput, if compared to absolute block signalling.

Quote
Another problem is, as stated in the previous post, to give players an incentive to upgrade to token block when it becomes available. We cannot have a possibility of a head-on collision as an incentive, as that would result in a deadlock which could cause problems for an unattended player in an online game, and in any event, Simutrans has generally preferred to avoid simulating disasters of any sort.
Token block machine is the logical upgrade to one-staff method. It allows you to run more trains in the same direction. The logical upgrade from time-interval is absolute block. If you do not consider security, there's little to no reason to upgrade from time-interval to token block. (maybe to cut costs, if traffic has declined).

Quote
Do you have any idea how time interval or absolute block actually worked in practice on single track lines in Czeslovakia (or whatever it was called at the relevant time)? In particular, do you know where the signals would be placed, and where the trains would have to be relative to the signals for a section to clear? Would only one train be allowed in the section at once, or would multiple trains (in the same direction, separated by time intervals) be permitted?
I can describe quite exactly absolute block with telephone communication, as it is still in use. I suppose that telegraph communication was almost the same, it just took more time to negotiate. Let's have a track with stations A,B and signalbox X half-way between them. The communication is something like this.
...
Then the communication continues between AXB just as at dual track absolute block. Station A can dispatch next train after it passes X, until station B asks to change directions. Then they have to wait until the track is clear and can switch directions.

German and Swedish description (if it can help you): https://de.wikipedia.org/wiki/Zugmeldebetrieb  https://sv.wikipedia.org/wiki/T%C3%A5ganm%C3%A4lan

Signal placement: on approach to a station there is distant signal, then entry signal, then switches and platform. At the end of platform (or beyond) is departure signal and then switches, end of shut sign, and the line. Train arrival is acknowledged when it passes the entry signal. Train cannot pass departure signal if the line is not clear (except for shunting). When the train stops at station it must fit between the departure signals in opposite directions.

---Distant>---Entry>---<end-of-shunt---|switches|---<departure---|platforms|---departure>---|switches|---end-of-shunt>---<Entry---<distant---

(Maybe you can assume entry=home signal, and departure=start signal, but I'm not really sure it is so.)

For time interval I suppose the "direction switch" was very similar to absolute block. They had to acknowledge the arrival of the last train in sequence.

Without telegraph they had to use ticket+staff system, or something similar. I found in some articles, that trains had colored flags or lights telling if there are more trains following or not. But this has the same implementation problems as ticket+staff. Also I found a note about a departure signal that was electrically controlled from the next station, and was locked at danger if train(s) was coming in opposite direction. However it was not described in much detail, so I don't know when one could clear the signal in safe manner.

Quote
A problem with the latter system would be that it would actually be preferable for the player than token block signalling, so there would be no incentive to upgrade.
Sure, you could reduce the max_speed for time interval signals. But I would do the same for token block. You cannot catch a token at 100 km/h. (but you can accelerate afterwards). I know I repeat myself, but the upgrade path from time interval is to start using absolute block.

Quote
This raises quite a number of complexities. Firstly, reserving to "the next junction" is ambiguous. The code needs to determine at precisely what tile that it stops reserving further.
You can do it in the same way as for circuit block. I'm not really sure how far the driectional (blue) reservation goes in circuit block, but it should be the same for any method. At least you could share the code and it will behave consistently for players, but read further:

Quote
Is the idea here to have a signal that can be used to instigate a directional reservation that only affects trains travelling in one direction?
Yes, that is. In real life there is distincion between stations (passing loops), and signalboxes on the line. Directional reservation is always from one station to another, while absolute reservation is only up to the next signal. So I think it would be better if player had explicit control of the endpoints of the directional (blue) reservation. Actually I do not like the way the directional reservation is implemented for circuit block, because there are places where bidirectional signals are not desirable. This would remove the automatic directional reservations completely and will put the player in full control.

Quote
There are plenty of junctions in the UK that are some distance from stations - at least, far enough that they had to have their own signalbox in the days of mechanical/absolute block signalling; they would typically have the sort double track section described in my previous post.
The czech junctions are also far enough to have their own signalbox, but it was more like the signalboxes along the line, than the signalbox at station.

Quote
I have just fixed a bug with token block reservation that caused unreservation incorrectly. See this (http://bridgewater-brunel.me.uk/saves/passing-point-test.sve) saved game file for a demonstration of how to set up a single track railway with a passing loop using token block signalling. Does this make things any clearer?
I have a problem with that save - I cannot see the token block signals, but when I click at and of platforms/loop I get an info box about token signal being there. Have you made any changes to pak that are not in git yet?

Quote
Edit: I have investigated the way in which junctions were designed from stations on double track lines with a branching single track line. From what I have found, these, too, like the junctions away from stations, had a length of double track line immediately beyond the station before reverting to single track. I suggest that the token block signal should go on this stretch of double track line.

Edit 2: I have rigged up a test and demonstration track for a mix of single and double track running using a mix of absolute and token block signalling: download it here (http://bridgewater-brunel.me.uk/saves/branch-demonstration-signalling.sve). This appears to work as intended. Does this answer any questions on how to signal this sort of arrangement?
This example looks as useable workaround. Though I have not seen such layout in real world, I can deal with that in a game. And I have the same problem with disappeared token signals in this save. Debug output:
ERROR: roadsign_t::finish_rd:   roadsing: way/ground missing at 228,165 => ignore
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 18, 2016, 10:22:10 PM
Quote from: Vladki on June 18, 2016, 09:02:49 PM
Right now I have to sort out cross compiling (my PC is 32-bit linux, and server is 64-bit linux), but that is off-topic here. I'll google more...

If you have full terminal access, you can compile on your server, can you not? That is what I do.

QuoteSure it was a safety system, but it is also a low-cost solution, with lower throughput, if compared to absolute block signalling.
Token block machine is the logical upgrade to one-staff method. It allows you to run more trains in the same direction. The logical upgrade from time-interval is absolute block. If you do not consider security, there's little to no reason to upgrade from time-interval to token block. (maybe to cut costs, if traffic has declined).

That is not how it worked in the UK - absolute block was used for unidirectional track (i.e., double track or above), whereas token block was used for single line sections. It was used for single line sections to prevent head-on collisions. Time interval with telegraph was also used on single track sections (plain time interval could not be so used, but staff and ticket could be and was used on single track sections in conjunction with time interval signalling). Single track sections would thus have the following upgrade path:

Time interval/staff and ticket > Time interval with telegraph > Token block > Track circuit block (etc.),

whereas double (or more) track sections would have the following upgrade path:

Time interval > (at busy junctions only) Time interval with telegraph > Absolute block > Track circuit block (etc.).

The token system was the additional layer over the normal absolute block signalling necessary for single line working.

QuoteI can describe quite exactly absolute block with telephone communication, as it is still in use. I suppose that telegraph communication was almost the same, it just took more time to negotiate. Let's have a track with stations A,B and signalbox X half-way between them. The communication is something like this.

       
  • A->B: Train 1 has arrived to A. I have a train 2 for B, do you accept it? (X is listening to this)
  • B->A: Yes I accept (switching direction)
  • X->A: Acknowlege
...

       
  • X->A: Train 2 has passed X
  • A->X: Ack
Then the communication continues between AXB just as at dual track absolute block. Station A can dispatch next train after it passes X, until station B asks to change directions. Then they have to wait until the track is clear and can switch directions.

German and Swedish description (if it can help you): https://de.wikipedia.org/wiki/Zugmeldebetrieb (https://de.wikipedia.org/wiki/Zugmeldebetrieb)  https://sv.wikipedia.org/wiki/T%C3%A5ganm%C3%A4lan (https://sv.wikipedia.org/wiki/T%C3%A5ganm%C3%A4lan)

Signal placement: on approach to a station there is distant signal, then entry signal, then switches and platform. At the end of platform (or beyond) is departure signal and then switches, end of shut sign, and the line. Train arrival is acknowledged when it passes the entry signal. Train cannot pass departure signal if the line is not clear (except for shunting). When the train stops at station it must fit between the departure signals in opposite directions.

---Distant>---Entry>---<end-of-shunt---|switches|---<departure---|platforms|---departure>---|switches|---end-of-shunt>---<Entry---<distant---

(Maybe you can assume entry=home signal, and departure=start signal, but I'm not really sure it is so.)

For time interval I suppose the "direction switch" was very similar to absolute block. They had to acknowledge the arrival of the last train in sequence.

Without telegraph they had to use ticket+staff system, or something similar. I found in some articles, that trains had colored flags or lights telling if there are more trains following or not. But this has the same implementation problems as ticket+staff. Also I found a note about a departure signal that was electrically controlled from the next station, and was locked at danger if train(s) was coming in opposite direction. However it was not described in much detail, so I don't know when one could clear the signal in safe manner.

This is very interesting, thank you. I wonder how the directional telegraph system actually worked: did the signllers have to remember the direction (or write it on a piece of paper or something), or was there a solid state telegraph instrument showing the currently set direction (perhaps interlocked with the starting signals at the entrance to the section on either side so that neither could be pulled off unless the direction were set correctly)? Were two trains allowed in the same direction? If so, how would the signaller at the receiving end know how many trains to wait for before reversing the direction?

Quote
Sure, you could reduce the max_speed for time interval signals. But I would do the same for token block. You cannot catch a token at 100 km/h. (but you can accelerate afterwards). I know I repeat myself, but the upgrade path from time interval is to start using absolute block.

The time interval signals already have a lower maximum speed than absolute block signals (135km/h rather than 160km/h), but this is unlikely to make any practical difference on steam operated single track branch lines, and so unlikely in and of itself to be an incentive to upgrade. Token block signals need not have a lower maximum speed: remember, trains need to slow down and stop momentarily just before the token signal to collect the token, so there is no further need to restrict the maximum speed beyond the token signal.


You can do it in the same way as for circuit block. I'm not really sure how far the driectional (blue) reservation goes in circuit block, but it should be the same for any method. At least you could share the code and it will behave consistently for players, but read further:

The idea of having this working only in track circuit block (and later) is that this easier to use, more sophisticated and more flexible system is only available later when track circuit block becomes available: there would be little incentive to upgrade to this on single track lines if it were possible to do the same thing in absolute block (and no incentive to use token block at all).

Quote
Yes, that is. In real life there is distincion between stations (passing loops), and signalboxes on the line. Directional reservation is always from one station to another, while absolute reservation is only up to the next signal. So I think it would be better if player had explicit control of the endpoints of the directional (blue) reservation. Actually I do not like the way the directional reservation is implemented for circuit block, because there are places where bidirectional signals are not desirable. This would remove the automatic directional reservations completely and will put the player in full control.

The czech junctions are also far enough to have their own signalbox, but it was more like the signalboxes along the line, than the signalbox at station.

I will have to give this idea some further thought. However, it is very difficult to have a distinction between a station area and a signalbox off a station for the reason given in the previous post.

Quote
I have a problem with that save - I cannot see the token block signals, but when I click at and of platforms/loop I get an info box about token signal being there. Have you made any changes to pak that are not in git yet?
This example looks as useable workaround. Though I have not seen such layout in real world, I can deal with that in a game. And I have the same problem with disappeared token signals in this save. Debug output:
ERROR: roadsign_t::finish_rd:   roadsing: way/ground missing at 228,165 => ignore

That is odd - the pakset should be complete on Github. Are you sure that you are using the latest half-heights branch? I cannot reproduce the error that you report.
Title: Re: Discussion of new signalling system
Post by: Isaac Eiland-Hall on June 18, 2016, 10:41:39 PM
Quote from: jamespetts on June 18, 2016, 10:22:10 PM
If you have full terminal access, you can compile on your server, can you not? That is what I do.

The server in question is set up as a shared server, so it might not be possible right now, but I can perhaps figure out how to give permissions. Offhand, this is something I don't know how to do, but I can always google. heh

Not sure if I need to grant sudo or something else...
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 18, 2016, 10:44:39 PM
Quote from: Isaac.Eiland-Hall on June 18, 2016, 10:41:39 PM
The server in question is set up as a shared server, so it might not be possible right now, but I can perhaps figure out how to give permissions. Offhand, this is something I don't know how to do, but I can always google. heh

Not sure if I need to grant sudo or something else...

You shouldn't need to grant sudoer rights unless the executable or any of the files needs to be in a place where only the superuser can access. You do need to install Git on the server, however, as well as a number of libraries and developer tools (e.g. libpng, bzlib, gcc, etc.), and installing those requires sudoer access; but you can do this yourself.

Thank you, incidentally, for agreeing to host the test server- this is most helpful.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 18, 2016, 11:18:15 PM
Quote from: Isaac.Eiland-Hall on June 18, 2016, 10:41:39 PM
The server in question is set up as a shared server, so it might not be possible right now, but I can perhaps figure out how to give permissions. Offhand, this is something I don't know how to do, but I can always google. heh

Not sure if I need to grant sudo or something else...

Installing g++ and libstdc++6-dev should be enough. Thank you in advance.
Title: Re: Discussion of new signalling system
Post by: Ves on June 19, 2016, 12:13:05 AM
Guys, you are posting in a tempo I cant catch up :P

I got some more time to read and wrote a bit more detailed response:

QuoteI am having some trouble with the time interval with telegraph mode at this juncture: in particular, finding a way of making it usable for single line working whilst retaining a reason for the player to upgrade to token block working when that becomes available. The difficulty is made all the greater by a lack of material about the details of how time interval signalling actually worked when accompanied by the telegraph.
The main incentive to upgrade to token block signals from time interval signals could be the cheaper labour (in game maintenance) costs. Somehow, many things where better and easier in the past but have been changed to the worse due to it being cheaper for the ones paying the bill.
The choice the player make is wether to pay more for the more effective and "easy/intelligent" working method or pay less for the new and rather "square" system that removes some flexibility.
Rising labour costs should take care of that.

Regarding vladkis suggestion of having directional reservations up to the last junction being difficult to implement, could maybe get solved this way: The signal will check if there are any junctions between this and the next signal on the trains route, and then if true, create a directional reservation up until the next signal. If there is no junction after the signal, it behaves as a normal time interval signal. Otherwise, since it is actually equipped with telegraph, it could direction reserve the entire route until the first one way sign or another working method signal.


QuoteThe material that I have found so far is from rule books of the Eastern Counties Railway from 1848 and 1856, which do not go much further than stating that the signalman must send a telegraph message to the signalman at the other end of the single line section to check whether the line is clear, and, if it is, may send a train along it. I had thought that this might work in a similar way to token block, but without reserving beyond a station stop (as there would always have to be a signal at the end of the section), but this is problematic when used with double track running as it reserves rather too much rather too soon.
What you describe from the rule book sounds quite a lot as the practice done in Sweden at that time.
What do you mean with it is reserving too much too soon?

QuoteAs to the diagram drawn by Ves above, does anyone have any idea as to precisely how such a layout might have been signalled in the days of time interval signalling? I am trying to avoid if possible having to create any significant new abstractions or mechanisms, which would involve a very significant amount of work and may possibly have adverse performance implications.
Regarding my example, I think I have already somewhere in the depth if this thread tried to describe how to place the signals in Sweden, however in this specific example:
A signal/flag man on each platform end (6 signals) and a signal outside the station at all ends (3 signals) as well as an entry signal facing toward the station from all ends (also 3 signals),  (and then the famous T-signal in front of the station building, depending on the era).

QuoteFrom what I have read of UK practice concerning diverging single and double track other than at stations, there was generally a short stretch of double track (about a train's length) on what was otherwise the single track line just beyond the junction. If replicated in Simutrans, this would allow for a mix of token and absolute block signalling to work as currently implemented. In more modern times, this practice has largely been discontinued (and it is not necessary in the current implementation of track circuit block, cab signalling or moving block).

This is why I asked for detailed examples: I do not know whether there were any junctions signalled in this way without a short stretch of double track until modern times and, if so, how they were signalled. One thing that would be very difficult to achieve in the current implementation of signalling is having a signal behave differently depending on the route beyond the signal that the train takes. This is (in simple terms) because the code iterates over the route tile by tile, and triggers the signal's behaviour when it gets to the tile with the signal on it, without yet having checked what tiles are ahead. It is also conceptually very difficult for the code to determine which tiles belong to a stretch of double track and which tiles belong to a stretch of single track.
I can see that if laying the tracks like in the savegame, many problems would actually get solved, however I dont think that is something that is widely used in Sweden. Obviously I can't say for sure, but the plans I have found with single tracked lines branching out of a station is that there is no double track going along with the single tracks. The signal that physically allows the train to enter a single tracked line is also used to send trains onto the other tracks in that general direction. Outside the station, there is the exitsignal but there are no passing possibilities there.

QuoteI'm trying to set up a testing server
Sweet! :)

QuoteI have played a bit with token block and find it quite unpractical and non-intuitive how to use at all. Consider a simple line with passing loops (two tracks with one-way sings on one side and token-block signal on the other. Trains arrive from both sides, stop, and wait forever because the track behind is still reserved for them. I can fix that by putting an entry signal in front of the station, but then next train can follow in the same direction, while the passing loop is occupied. Deadlock again. Unfortunately I have no good idea how to solve that.
I think that if you put an absolute block signal close in front, so any train length will be longer than the distance between token block signal and the absolute, the previous reservation will be terminated upon approach of the absolute block signal. Maybe not the best solution, but it might work!

QuoteA->B: Train 1 has arrived to A. I have a train 2 for B, do you accept it? (X is listening to this)
B->A: Yes I accept (switching direction)
X->A: Acknowlege
...
X->A: Train 2 has passed X
A->X: Ack
Sounds like swedish practice as well, save for that there might not be anything like "X".

QuoteSignal placement: on approach to a station
Also almost the same, with this minor adjustment:

---Distant>---Entry>---<Exit---|switches|---<departure---|platforms|---departure>---|switches|---Exit>---<Entry---<distant---

where the departure signals only will show clear when the exit signal shows clear. The Exit signal is by default the "end of shunt".


QuoteWithout telegraph they had to use ticket+staff system, or something similar. I found in some articles, that trains had colored flags or lights telling if there are more trains following or not
This is true also for swedish signalling, but that was still used along with the telegraph: If there was an extra train outside schedule, extra flags where mounted on the first train (which is in the schedule) then all the posts along the tracks which dont have the telegraph equipment will know that there is an extra train coming outside the schedule. The stations at either ends would know about, and approve, the extra trains departure.
However, this is not feasable to implement, as there are no such thing as a schedule in this context.


QuoteYes, that is. In real life there is distincion between stations (passing loops), and signalboxes on the line. Directional reservation is always from one station to another, while absolute reservation is only up to the next signal. So I think it would be better if player had explicit control of the endpoints of the directional (blue) reservation. Actually I do not like the way the directional reservation is implemented for circuit block, because there are places where bidirectional signals are not desirable. This would remove the automatic directional reservations completely and will put the player in full control.
QuoteHowever, it is very difficult to have a distinction between a station area and a signalbox off a station for the reason given in the previous post.
I support this! Maybe not necesarily to unchain directional reservation from bidirectional signals completely, merely adding the option to create a directional reservation from a single faced signal.
One can say that you already have created a distinction between "station area" and "line stretch", due to the different working methods. Frankly, the only working method that really works inside a station is the absolute block and also the track circuit (and cab signal. The moving block behaves as cabsignal after a choose signal). All other working methods are not really practical inside a station with more than one track and I think one should aim to keep them outside the "station area". Please read my suggestion further down with regards to a 2 block signal which could keep absolute block (or track circuit or cab signal) inside the station and let the other working methods work from outside the station.


QuoteThis is very interesting, thank you. I wonder how the directional telegraph system actually worked: did the signllers have to remember the direction (or write it on a piece of paper or something), or was there a solid state telegraph instrument showing the currently set direction (perhaps interlocked with the starting signals at the entrance to the section on either side so that neither could be pulled off unless the direction were set correctly)? Were two trains allowed in the same direction? If so, how would the signaller at the receiving end know how many trains to wait for before reversing the direction?
For Sweden, I think there was an interlocking machine inside the signalbox to choose the direction, otherwise it was done by pen and paper. No troubble with counting trains, the two stations would communicate and at all times agree on how many trains there should be on the line. Upon arrival, the recieving station would telegraph back again to the previous station and tell everything is ok. Of corse there are emergency protocolls if one station is not answering, but that is not needed in simutrans!


QuoteThe time interval signals already have a lower maximum speed than absolute block signals (135km/h rather than 160km/h), but this is unlikely to make any practical difference on steam operated single track branch lines, and so unlikely in and of itself to be an incentive to upgrade. Token block signals need not have a lower maximum speed: remember, trains need to slow down and stop momentarily just before the token signal to collect the token, so there is no further need to restrict the maximum speed beyond the token signal.
I remember we have talked about a "spoken token block" signal, I dont know how far you are in those thoughts? If there was the possibility to remove that the train must stop next to the signal the paksetauthor could treat the working method as a set of "logics" and use it as a modern signal system. The original token block signals (the one intended to actually have a token cabinet) should then have maxspeed=0 (zero) to force the train to stop as it currently does.

My impression from reading about real world signalling in general is that it rely heavily on logic (if this signal is green, then that must be red etc). In Simutrans, the working methods decides the overall logic rules and then much of it is simulated automatically behind the scene like tracks only can be reserved by one train at any time and junctions are automatically interlocked and directional reservation etc.
However, the player cant really create more specific interlocking, such as a signal that only can be green if the next signal also is green. I mentioned it briefly earlier, but what about implementing the 2 block signal from Standard?
It would solve, I think, many of the issues that Vladki and I are talking about. Also due to the fact that the Experimental signals are unidirectional, the "two block signal" will not be as clumpsy as it might be with Standards bidirectional signals.


Sorry for the long post :)
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 19, 2016, 11:18:58 AM
Quote from: Ves on June 19, 2016, 12:13:05 AM
The main incentive to upgrade to token block signals from time interval signals could be the cheaper labour (in game maintenance) costs. Somehow, many things where better and easier in the past but have been changed to the worse due to it being cheaper for the ones paying the bill.
The choice the player make is wether to pay more for the more effective and "easy/intelligent" working method or pay less for the new and rather "square" system that removes some flexibility.
Rising labour costs should take care of that.

I am afraid that this is unlikely to work economically, and also has no historical precedent: it does not take more people to work a time interval with telegraph system than it takes to work a token block system: it is just that the token block system is safer and more reliable. After 1889, all passenger railways in the UK were not allowed to use time interval signalling. Many had already upgraded to absolute/token block decades earlier. There really needs to be a line capacity difference.

QuoteRegarding vladkis suggestion of having directional reservations up to the last junction being difficult to implement, could maybe get solved this way: The signal will check if there are any junctions between this and the next signal on the trains route, and then if true, create a directional reservation up until the next signal. If there is no junction after the signal, it behaves as a normal time interval signal. Otherwise, since it is actually equipped with telegraph, it could direction reserve the entire route until the first one way sign or another working method signal.

I had attempted to implement something similar to this, but using the block rather than the directional reservation, as what I read indicated that this was closer to the actual practice. However, I have now discarded that code because it did not work well in practice, and, in particular, could not be made to work effectively for single track working. I shall have to think of whether a modified/simplified version of this might work (and I have just had an idea for a simpler implementation that might be workable for time interval with telegraph).

Quote
I support this! Maybe not necesarily to unchain directional reservation from bidirectional signals completely, merely adding the option to create a directional reservation from a single faced signal.

Can either of you think whether there are any situations in which you would want a bidirectional signal that is not one that creates a directional reservation in the track circuit block method, or will having either bidirectional signals or "longblock" signals creating directional reservations suffice?

QuoteOne can say that you already have created a distinction between "station area" and "line stretch", due to the different working methods. Frankly, the only working method that really works inside a station is the absolute block and also the track circuit (and cab signal. The moving block behaves as cabsignal after a choose signal). All other working methods are not really practical inside a station with more than one track and I think one should aim to keep them outside the "station area". Please read my suggestion further down with regards to a 2 block signal which could keep absolute block (or track circuit or cab signal) inside the station and let the other working methods work from outside the station.

I am not sure that I entirely follow this. Not all stations use choose signals, so what is "within the station area" is not the same as the area behind a choose signal. Also, because the starting signals are on the platforms, whether the station throat is "part of the station area" on the basis of the placement of signals will depend for each train on the direction in which it is arriving, with the station throat before the station being part of the "station area" in this definition, but the throat the other side not being so part.

As to the working methods that work in stations, it is helpful to look at them one by one.

Drive by sight: this should work in stations as well as anywhere else.
One train staff: currently not working at all, so not applicable.
Time interval: this should now work in stations after the recent improvements - if this is not working in stations, can you elaborate?
Time interval with telegraph: currently incomplete, so not applicable.
Absolute block: confirmed to be working
Token block: this is intended to be used in conjunction with absolute block such that all passing places (including stations with more than one track) are signalled in the absolute block method, although token block should work for stations without passing places (and has been specifically designed to do so).
Track circuit block: confirmed to be working
Cab signalling: confirmed to be working
Moving block: this should work in stations even if the behaviour resembles cab signalling when a choose signal is used

As to the "2 block signal", do you mean one that reserves two blocks ahead? I am not clear on how you imagine this interacting with working in stations; can you elaborate?

QuoteFor Sweden, I think there was an interlocking machine inside the signalbox to choose the direction, otherwise it was done by pen and paper. No troubble with counting trains, the two stations would communicate and at all times agree on how many trains there should be on the line. Upon arrival, the recieving station would telegraph back again to the previous station and tell everything is ok. Of corse there are emergency protocolls if one station is not answering, but that is not needed in simutrans!

I remember we have talked about a "spoken token block" signal, I dont know how far you are in those thoughts? If there was the possibility to remove that the train must stop next to the signal the paksetauthor could treat the working method as a set of "logics" and use it as a modern signal system. The original token block signals (the one intended to actually have a token cabinet) should then have maxspeed=0 (zero) to force the train to stop as it currently does.

My impression from reading about real world signalling in general is that it rely heavily on logic (if this signal is green, then that must be red etc). In Simutrans, the working methods decides the overall logic rules and then much of it is simulated automatically behind the scene like tracks only can be reserved by one train at any time and junctions are automatically interlocked and directional reservation etc.
However, the player cant really create more specific interlocking, such as a signal that only can be green if the next signal also is green. I mentioned it briefly earlier, but what about implementing the 2 block signal from Standard?
It would solve, I think, many of the issues that Vladki and I are talking about. Also due to the fact that the Experimental signals are unidirectional, the "two block signal" will not be as clumpsy as it might be with Standards bidirectional signals.

The way in which signalling logic works in Simutrans is that a train will try to reserve a route ahead whenever it first moves off. Whether it succeeds in reserving that route ahead will determine whether it is allowed to move off. It will iterate through each tile on its route until its next stop, and decide whether to reserve the whole way to its next stop, part of the way, or not at all. If it reserves the whole of or part of the way, it will start moving, and note the tile at which the reservation ends as a tile at which it will have to stop. It will prepare to start braking in time for that tile. As it approaches that end tile, it will check whether it can reserve further on, and the process is repeated until it gets to its next stop. The signals along the way, as well as reservations by any other train, just influence in various ways the logic used by the train in determining where it can reserve.

What I described is the way that signalling works in both Standard and Experimental. The only differences between Standard and Experimental are, in general terms, that there is more variety and realism of the signal based logic in Experimental than Standard.

However, this basic way of working does constrain the sorts of things that can be done without a very major rewrite of a large and fundamental part of the code that would probably take years to finish. The signals do not communicate with one another: the signals remember no more than their position, what sort of signal that they are and their current state. All the logic is in the trains (specifically, the leading vehicle) and the signals are entirely passive. The signalboxes are also entirely passive and do no more than remember where they are, what type that they are and what signals are connected to them, the only logic being to allow connected signals to be built, transferred into or out of them, and to delete all connected signals when the box is deleted.

This means that it is not really possible to have custom logic at pakset level except by implementing all the logic into the code itself and having signal parameters of various sorts influence the logic that a train passing a signal with those parameters will adopt.

What you describe as the "2 block signal" is, I believe, the same as the pre-signal from Standard (which, of course, is not a pre-signal at all in real world terms). Does this method of signalling actually reflect any real life use case, or is it intended as a workaround for some Simutrans specific issues? I am still a little unclear on how this type of signal would help in stations.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 19, 2016, 02:10:15 PM
Oh, this discussion is getting more complicated, to answer to you both :)

I think many of the issues stem from different history in our countries. It seems that Czech (or Austro-Hungarian) and Swedish practices were in fact quite similar, while UK was in a bit different situation. The most important is, that all Austro-Hungarian railways were first built as single-track. The funding and revenues were not so big as in UK. Lines were upgraded to double track, only when the traffic was too high.

The first continental (horse-drawn) railway Budweis (CZ) - Linz (AT), was built in  1827–1832, long before Morse's Telegraph (patented 1847). The first operation was on strict adherence to timetable at passing loops, and drive by sight on the line. In case there were two trains in opposite direction too far to get back to passing loop, one of them had to be derailed... Well this is not possible to simulate in simutrans....

Later they used optical telegraph http://www.laenderbahn-forum.de/journal/heldenzuege_1859/heldenzuege_1859.html, these baloon signals, are sometimes described as signals for the driver, sometimes as a means of communication between signalboxes. In either case, they informed about the current direction in which the traffic is allowed. Some sources say that these were used also as time-interval signals (clear, slowly, danger).

In 1855, electric bell signals were introduced to replace optical telegraph. They were clearly a means of communication between signalboxes. Optical telegraph was abondoned in 1877. To remember the agreed direction, perhaps pen & paper were used, later some sort of needle telegraph. Somewhere I read about some sort of departure signal that was interlocked with the agreed direction, but it was not very detailed, and now I cannot find it. I suppose that multiple trains in the same direction were allowed in time-interval, otherwise there would be no difference between time-interval with telegraph and token block (or absolute block with signalboxes only at stations/loops). Unfortunately, there is not much info I could find on the details how time-interval signalling worked. In essence the dialog between stations was probably close to absolute block signalling. The stations had to count or somehow identify the trains and get confirmation that it arrived, in order to be sure that the line is clear. But the exact method would be just a speculation.

To the incentive to upgrade from time-interval to token block. Safety is not simulated. If multiple trains are allowed between stations, then you need a few signalboxes on the line. These will be removed in token block - as a result you cut costs, but reduce throughput. Maybe that's why this transition did not happen in Austria-Hungary, and absolute block was used instead - safety improved, while costs and throughput remained roghly the same. However, there was a big cost saving with the transition from optical telegraph to electric bells (and other electric devices). Signalboxes for optical telegraph had to be in sighting distance to each other. Introducing electric communications allowed big reduction in signalboxes. But this change was independent of time-interval vs. absolute block.

When absolute block was introduced in 1880's, the electromechanical devices that were used, had a provision for setting the direction of traffic - so they were a bit more complex than their british counterparts. In absolute block, the departure signal was locked at danger, if the traffic was agreed in opposite direction, but I have no evidence if that was so in time-interval as well. If only telephone/telegraph communication was used, the direction probably had to be put on paper, and doublechecked by the other side when negotiating next train.

As to the described dialog, and Ves's comment. Most of the sigle tracked lines have signalboxes only at stations (passing loops), with a few stops in between, but busier lines (or where the stations are too far) have an intermediate signalbox. Perhaps even more intermediate signalboxes were possible, but according to this map, the current practice is to have only one (on single track line): http://provoz.szdc.cz/PORTAL/Show.aspx?path=/Data/Mapy/TZZ.pdf
If there are no intermediate signalboxes, then the whole dialog is much simpler, especially in regard to direction of traffic - there can be only one train between stations, and it does not matter in which direction.

I have not encountered any notice about using token machines in Austria-Hungary or Czechosolvakia. Perhaps staff and ticket+staff were in use somewhere, either to cut costs (no signals at all), or as a fallback if the communication between signalboxes is broken (that's even the current practice). However if you imagine a token machine as an upgrade for one-train staff - where the token can "magically" reappear at the other end of line, then you can think about the needle telegraph (or improved absolute block machine) as an extension to ticket and staff, where the staff (permission to dispatch trains) can be handed over to the other signalbox instantly. I acknowledge that UK practice is different, but the game should be country independent. You can then limit the available signals at pakset level.

On czechoslovak railways, there is almost no difference between absolute block a and circuit block. It is just improved safety, faster negotiation, reduced manpower - fully automatic signalboxes on the line, remotely controlled stations, and the integration with cab-signalling. But the procedures, e.g. to switch direction on single tracked line is the same as with electro-mechanical absolute block:

Back to the idea of special signals for directional reservations: Even in circuit block, you can think of the line as being split into small blocks - signal to signal, where only one train is permitted, and longer blocks - station to station, where multiple trains in the same direction are permitted. Making these blocks explicit (e.g. by redefining the use of long-signals), could help to solve also the problem of junctions without passing loops. No need to have two levels of signalboxes, just two levels of signals: block, and long-block. Is that description clear?

Quote
Can either of you think whether there are any situations in which you would want a bidirectional signal that is not one that creates a directional reservation in the track circuit block method, or will having either bidirectional signals or "longblock" signals creating directional reservations suffice?
I have no problem with bidirectional signal creating directional reservation. It is the other way around - I need a one-directional signal (usually ahead of platform - departure signal) to create a directional rerservation up to the next passing loop. As the passing loop is also not easily detected by code, the end could be marked by the same signal (and aditionally by choose signal to aviod the choose platform logic in directional reservation). Moreover I find too little use for bidirectional signals anyway. Even in places where they could be used I would like them spaced further apart (so that a stop with platform fits in between), or to put them around road crossing so that they are back to back, rather than face to face as they are now.  So if you implement the proposed "new long block" in addition to keeping directional reservations from bidirectional signals, it is ok for me. Just that the bidirectional signals would not be necessary for me any more.

Ves: as to the spoken token block (D3 in CZ) - I think there is no need for different behavior to physical token block. I remember that at one such line, the driver had to get out of the engine, go to the station building and get the permission to continue by phone. Nowadays they can get it over radio or mobile phone, or a special radio device (RETB in UK, D4 in CZ), but that usually happens on places where those trains stop anyway. At least it would be an incentive to upgrade to proper signalling.

Quote
What you describe as the "2 block signal" is, I believe, the same as the pre-signal from Standard (which, of course, is not a pre-signal at all in real world terms). Does this method of signalling actually reflect any real life use case, or is it intended as a workaround for some Simutrans specific issues? I am still a little unclear on how this type of signal would help in stations.

As I undertand Ves, yes 2-block signal is the pre-signal from standard. Read further on real use:

2-block signals (hand signals). We have those in CZ as well. Some smaller stations have one departure (exit) signal common for all tracks, and the signalman has to give the departure signal to particular train. Perhaps this was even more common before WWII. German occupation introduced the 2-block signal - visually similar to UK banner signal - that could be put at every track and allow shunting as well as departure (then it had to be in sync with the main signal). There was also a color light version, but they were not very widespread and later replaced by full-featured main signals at every track. Nowadays there are only a few stations in CZ/SK with those signals. I do not consider them as essential (but I dont know how common they are in Sweden). If directional reservations would be resolved by explicit (long) signals, then these may not be needed (but nice for extra reality). Otherwise these 2-block signals may be useful to get single tracked lines working.

In real use - if the "banner" signal was pulled off it allowed either shunting or departure from the particular track, but for departure you had to obey the main signal as well. The color light version has 3-aspects: danger, shunting allowed, departure allowed. In simutrans it would solve the need for bidirectional signals. Look at the graph I posted yesterday. To get directional reservations in current circuit block, I would have to make the entry signal bidirectional. But then a train could depart and get stuck in switches. So a 2-block signal at the platform would be handy. But I think that a long-signal with explicit directional reservation would be a better solution to that.

Uff sorry if it is not consistent, It took me too long to write this (lots of interruptions like family lunch, etc...)
I hope to get the server working tonight - will be back at 64-bit machine...

And for the test game, it does not work. Here is what I did:

git clone --branch devel-new git@github.com:jamespetts/simutrans-experimental.git     
git clone --branch half-heights git@github.com:jamespetts/simutrans-pak128.britain.git 
cd simutrans-experimental; make;
cd makeobj; make;
cp build/...../makeobj-experimental ~/simutrans.pak128-britain
cd ~/simutrans.pak128-britain; make
etc, etc...
In the pak directory I have:
roadsign.lq-semaphore-token-narrow.pak
roadsign.lq-semaphore-token.pak
roadsign.lq-semaphore-token-white.pak
roadsign.two-aspect-colour-light-token-narrow.pak
roadsign.two-aspect-colour-light-token.pak
roadsign.uq-semaphore-token.pak
In game I cannot build any token signal, only plain signal, permissive (with disc), distant, combined, choose signal and one-staff cabinet.


Title: Re: Discussion of new signalling system
Post by: Isaac Eiland-Hall on June 19, 2016, 02:17:04 PM
Quote from: Vladki on June 18, 2016, 11:18:15 PM
Installing g++ and libstdc++6-dev should be enough. Thank you in advance.

g++ installed, but couldn't find libstdc++6-dev. Will one of these do? http://addled.us/libstdc.txt If so, which? :)
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 19, 2016, 05:00:49 PM
I have been working on the time interval with telegraph working method to-day. I think that I now have something workable committed to Github. In short, it has the following properties:

(1) signals that have no junction of any sort between them and the next signal on a train's route behave exactly like ordinary time interval signals;
(2) signals that do have a junction between them and the next signal reserve a path to the next signal (no matter how far away that it is, unlike plain time interval signalling, where this is limited by line of sight) and will not allow a train to pass unless that route is free;
(3) tiles unreserve behind trains as with absolute block, track circuit block, etc.; and
(4) signals that have a junction between them and the next signal will never show a clear aspect, only a caution or danger aspect, and will restrict the working speed to half line speed (which is better than restricting working speed to the drive by sight maximum speed of (by default) 35km/h for junction signals in ordinary time interval working; this feature of junction signals, requiring slowing, is based on historical research).

Thus, to get full line speed on straight sections, players will need to place a signal a train's length beyond a junction. This requirement to slow at junctions should be a major reason to upgrade to absolute block/token block, which has no such requirement and can support full line speed at junctions (subject to any curvature based restriction).

As to single line working, this should be possible provided that all intermediate stations and the terminus station have signals and a passing loop. Unlike token block, this working method will not allow unsignalled stations or termini on single track sections. This, coupled with the speed restrictions, should be enough to give players an incentive to upgrade from time interval with telegraph to token block when it becomes available.

For players wishing to have a blind end to a single track section in the early days, one train staff would be the appropriate way of signalling this, and making that working method work properly is the next job (after fixing any bugs in this that anyone finds, at least).

I think that I will have to increase the signalbox radius limits as well as the number of signals that can be accommodated, however, to take account of the need to have these extra signals outside junctions not necessary in the absolute block working method and also the fact that trains are much longer (relative to the world scale) in Simutrans than they are in reality; I shall probably have to make this modification to other signals in the pakset, too.

As to the idea of allowing unidirectional signals to create a directional reservation, can I get an idea of which problems that this would solve if I were to implement this and which problems would therefore remain? How much more of Czech/Swedish practice could be simulated by this expedient than is currently possible?

Also, I should be very grateful for any testing that anyone is able to do of the time interval with telegraph working method for both single and double track running.

In respect of the compilation problems, these mystify me: I do not understand why things are not consistent on different computers. Can you make sure that you have the latest pakset sources from the half-heights branch on Github compiled with a version of makeobj-experimental compiled from the latest sources on devel-new in Github, and that it is a totally clean installation of the pakset (i.e., all old sources deleted)?
Title: Re: Discussion of new signalling system
Post by: Octavius on June 19, 2016, 07:45:25 PM
Quote from: Vladki on June 19, 2016, 02:10:15 PM
I think many of the issues stem from different history in our countries. It seems that Czech (or Austro-Hungarian) and Swedish practices were in fact quite similar, while UK was in a bit different situation. The most important is, that all Austro-Hungarian railways were first built as single-track. The funding and revenues were not so big as in UK. Lines were upgraded to double track, only when the traffic was too high.
Yes, and mostly a matter of Britain and areas heavily influence by that country versus continental Europe. As far as I can tell, on most of the European continent (Germany, Switzerland, Benelux, Italy) railway practices have always been more similar to Austria and Sweden than to Britain. Or maybe one should say those countries were all influenced by Germany.

QuoteBack to the idea of special signals for directional reservations: Even in circuit block, you can think of the line as being split into small blocks - signal to signal, where only one train is permitted, and longer blocks - station to station, where multiple trains in the same direction are permitted. Making these blocks explicit (e.g. by redefining the use of long-signals), could help to solve also the problem of junctions without passing loops. No need to have two levels of signalboxes, just two levels of signals: block, and long-block. Is that description clear?
That's exactly the difference between automatic block signals (fully automatic, decentral, often permissive) and centrally controlled signals (human controller in a control centre, or a computer with manual override). That would be very intuitive to use for those somewhat familiar with real world signalling practices.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 19, 2016, 07:48:09 PM
Quote from: Isaac.Eiland-Hall on June 19, 2016, 02:17:04 PM
g++ installed, but couldn't find libstdc++6-dev. Will one of these do? http://addled.us/libstdc.txt If so, which? :)
Thanks Isaac. Some libstdc++*-dev is already installed, and it seems to be sufficient. But compilation fails on missing zlib-dev (or libz-dev) and libbz2-dev.

Quote from: Jamespetts
In respect of the compilation problems, these mystify me: I do not understand why things are not consistent on different computers. Can you make sure that you have the latest pakset sources from the half-heights branch on Github compiled with a version of makeobj-experimental compiled from the latest sources on devel-new in Github, and that it is a totally clean installation of the pakset (i.e., all old sources deleted)?
I was trying that on clean install (as noted above):
git clone --branch devel-new git@github.com:jamespetts/simutrans-experimental.git     
git clone --branch half-heights git@github.com:jamespetts/simutrans-pak128.britain.git 

Now I'm trying with previously cloned tree and it is the same. But at first try I got all signal replaced by 4-aspect permissive signal. Though I could not replicate that. Now only the token block signal is missing.


Found the bug... Narrow gauge token signal had the same name... here is the patch:


$ git diff
diff --git a/makeobj-experimental b/makeobj-experimental
index fdde4c9..bfa2e4b 100755
Binary files a/makeobj-experimental and b/makeobj-experimental differ
diff --git a/ways/signals-narrow.dat b/ways/signals-narrow.dat
index 833c29d..318c2b1 100644
--- a/ways/signals-narrow.dat
+++ b/ways/signals-narrow.dat
@@ -871,7 +871,7 @@ Cursor=images/signal-icons-ex.5.5
---------------------------------------
obj=roadsign
copyright=JamesPetts-narrow
-name=lq-semaphore-token-white
+name=lq-semaphore-token-white-narrow
waytype=narrowgauge_track
cost=10000
signal_upgrade_cost=5000


So now I have tested the token block example a little. I must say that the token block signals behave differently than I would expect. Reservations go ahead to the next token signal or end of line, if the passing loop is clear. In case the loop is occupied the reservation goes only to the loop entry signal. What I do not like about this setup is that it allows next train to start in the same direction, while there is a train in opposite direction waiting in the loop - this has a potential for deadlock, or at least long delay for one direction and bunching of trains.


Well I have managed to compile 64-bit version of server, but It fails. I try to run it with the following command:
./simutrans-experimental -load signalplacering -lang en -freeplay -noaddons -nomidi -nosound -objects pak128.Britain-Ex/ -server_admin_pw **** -server  -debug
And the last lines of output say:
Reading speedbonus configuration ...
Reading private car ownership configuration ...
Reading electricity consumption configuration ...
Reading menu configuration ...
Warning: create_simple_tool():  deprecated tool [27] requested
Reading object data from pak128.Britain-Ex/...
Segmentation fault (core dumped)

I have tried to comment out all menuconf items numbered 27, but it did not help.
Title: Re: Discussion of new signalling system
Post by: Ves on June 19, 2016, 09:45:49 PM
Yeah it tends to get complicated when we are talking about three different systems, all very similar, yet very different!
I too apologize if im repeating myself or are unclear or contradicting myself, as this is a big subject and I tend to get blind by all the text :)


QuoteI am afraid that this is unlikely to work economically, and also has no historical precedent: it does not take more people to work a time interval with telegraph system than it takes to work a token block system: it is just that the token block system is safer and more reliable. After 1889, all passenger railways in the UK were not allowed to use time interval signalling. Many had already upgraded to absolute/token block decades earlier. There really needs to be a line capacity difference.
Ok, however (if we fail to find another reason) the lesser safety using time interval signals could be repressented with it being a higher monthly cost due more manual control is needed?


I have been trying out the time interval signals, and I think there are some issues:
Look at this savegame: https://www.dropbox.com/s/tj6eqm6gpsa5253/Time%20interval%20test.sve?dl=0 (https://www.dropbox.com/s/tj6eqm6gpsa5253/Time%20interval%20test.sve?dl=0)
Let it run in fast forward for a minute and deadlocks will soon occur. Save for that I have understood and placed the signals correctly :)

Look at the station called "Sackfield Red Lane Railway Station" (sorry, forgot to rename the stations to something simpler before uploading..).
At the west side, when a train exits the station towards "Meningport Portley Park Railway Station", it will make a red reservation to the next signal after all the junctions, and at the same time, reserve a path from the choose signal onto an empty track at "Meningport Portley Park Railway Station"

However, the second train following the first one, will not make that reservation from the choose signal, allowing the first train to reserve the exit junctions on its returntrip. The train will depart and crash.
One could fix it by remembering how many trains are attempting to go out in one direction and always keep a reservation at the arrival station.
Another way could be to always make directional reservations between some or all slotted signals. That would actually be my favorite, as this would also make a clear distinction between slotted signals and non slotted signals.

QuoteCan either of you think whether there are any situations in which you would want a bidirectional signal that is not one that creates a directional reservation in the track circuit block method, or will having either bidirectional signals or "longblock" signals creating directional reservations suffice?
No, it is perfectly fine for me too to have bidirectional signals creating directional reservations! As Vladki writes, it is the possibility to create a directional reservation without bidirectional signals that is requested.


Regarding the working method at stations, I dont think I really cleared my thoughts before writing. Apologies, it was late in the evening over here :)

However, what I mean:

Drive by sight: Works fine on very small stations, where there is no risk of encounter head traffic, eg tramstop along a road. It doesnt work on big stations.
One train staff: Even if it is not currently working, this workingmethod will only work at end pieces of tracks, not associated with other traffic. If put at a bigger station, it will keep its reservations blocking other traffic.
Time interval: The choose signal of this working method behaves a bit similar to the absolute block. If no track is free, train will wait at the choose signal. Works for all stations
Time interval with telegraph: Same as Time interval
Absolute block: confirmed to be working
Token block: This working method works as intended through stations and on lines. However, it is very clumpsy to use at platformends at (bigger) stations, and as a choose signal (if there where any choose signal tokenblock) as the reservations will block other traffic. Therefore it is useless at bigger stations.
Track circuit block: confirmed to be working
Cab signalling: confirmed to be working
Moving block: The choose signals of moving block signals works as normal track circuit block choose signal.

The conclusion is that most working methods apply an "absolute block" mentality to their choose signals.

I did not ask for the program to define an area which is considered "station area", I merely concluded that with the available working methods and their choose signals, it might be possible to define a "station area" by your self. The challenge is to signal out from the station, as it is not always possible to use absolute block signals (or other station friendly signals) due to the station layout (for example my example diagram in an earlier post).
Hence the argue about a 2 block signal.

How I imagine 2 block signals to work:
2 block signals should only be possible to code as "absolute block", "track circuit block" and "cab signalling".

When a train approaches the signal, the signal will find the next signal of any working method in the trains path.
The 2 block signal will attempt to set the next signal to CLEAR by whatever rules the other signal follows. If the other signal cannot be set to clear, eg due to unable to create a directional reservation or not enough time has passed since its last train, the 2 block signal would remain at DANGER.
If the next signal is another 2 block signal, I suppose the logic has to stack, that would effectively become a 3 block signal.
If there is no signal before the next stop in the trains schedule the 2 block signal would act as a normal signal.
The "end of choose" sign could also terminate the 2 block functionallity, making the signal act as a normal signal.

2 block signals are to my knowledge commonly used in Sweden. The signals themself looks like any other signal, but they are wired to only show green if the following signal is also green. The "2 block signal" it self are used as end of platform signals, and are connected to the "exit" signal outside the station.


QuoteVes: as to the spoken token block (D3 in CZ) - I think there is no need for different behavior to physical token block. I remember that at one such line, the driver had to get out of the engine, go to the station building and get the permission to continue by phone. Nowadays they can get it over radio or mobile phone, or a special radio device (RETB in UK, D4 in CZ), but that usually happens on places where those trains stop anyway. At least it would be an incentive to upgrade to proper signalling.
Yes, the spoken token was probably delivered like that. However, I am speaking of token block signalling as a concept rather than a practical use. In modern days, it is not difficult to program a signal imitate the "rules" of token block signalling and even one train staff. However in Experimental, the only way to simulate that is to use the said working methods but then your trains will stop at the signal.

QuoteAs to the idea of allowing unidirectional signals to create a directional reservation, can I get an idea of which problems that this would solve if I were to implement this and which problems would therefore remain? How much more of Czech/Swedish practice could be simulated by this expedient than is currently possible?

It would feel more consistent and it would make it possible to create proper Swedish signalling from stations when using track circuit block signals. It would not completely solve the issues that the 2 block signal would solve, eg together with token block.

Now, my eyes ar blinded by all the texts  :o
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 19, 2016, 09:55:44 PM
Vladki - thank you very much for the bug fix: that is much appreciated. The fix is now pushed to the Github repository.

In relation to the token signals, this was designed to reflect real signalling practice at stations, where, on single lines, there was always a signal on the single track section outside a station facing into the station so that a train could start from the previous station even if there was a train in the next station. I do not know (and it is hard to find out) whether the same practice was used on passing loops without stations, but this would not seem unlikely given that they were functionally very similar, and, in any event, Simutrans cannot easily tell a station and a passing loop apart for signalling purposes, and any differential in treatment would probably be difficult to make clear to players.

As to your segmentation fault, this is difficult to diagnose without a debug output. Are you able to run this with GDB attached? (Also, may I ask that you post this crash bug report to another thread)?

Quote from: Octavius on June 19, 2016, 07:45:25 PM
Yes, and mostly a matter of Britain and areas heavily influence by that country versus continental Europe. As far as I can tell, on most of the European continent (Germany, Switzerland, Benelux, Italy) railway practices have always been more similar to Austria and Sweden than to Britain. Or maybe one should say those countries were all influenced by Germany.
That's exactly the difference between automatic block signals (fully automatic, decentral, often permissive) and centrally controlled signals (human controller in a control centre, or a computer with manual override). That would be very intuitive to use for those somewhat familiar with real world signalling practices.

This idea of a new form of long-block signal that would assist with simulating continental signalling practice: can anyone give a brief summary of how, in Simutrans terms (remembering how Simutrans works with signalling, as explained above)?

Actually, it would be very helpful to have a summary of problems and missing functionality necessary for at least the basics of German/Czech/Swedish/Austrian signalling practice, as this thread is very long and has a lot of long discursive posts that, whilst entirely appropriate in the context of the discussion as it has progressed, has made it very time consuming for me to distil the current wish-list so that I can give consideration to the suggestions at intervals when I have time.

It would be especially helpful if it were set out in the format:

Description of the problem: explain here why none of the existing working methods can accurately simulate a relevant part of  German/Czech/Swedish/Austrian signalling practice or why the system causes significant gameplay problems (such as unavoidable deadlocks in certain reasonable situations);

Description of the relevant real-world signalling practice: where this is relevant, explain here in summary (if appropriate, with links to outside material and diagrams, or to previous posts on this thread where this was explained more fully) how the relevant German/Czech/Swedish/Austrian signalling system worked;

Illustration of the problem: a detailed description of a specific set of circumstances in which the problem in question arises, preferably with diagrams, screen-shots and/or one or more saved games; and

Suggested solution: describe here what you think is an efficient solution (if you can think of one; this can be omitted if you cannot) working within the confines of the way that signalling works in Simutrans (do feel free to copy and paste descriptions of such things from posts above).

If I am able to spend less time searching through this thread and more time thinking of and implementing solutions to the issues that we have discussed, that will be preferable for everyone, I think. Thank you all for your feedback on this: it is much appreciated.
Title: Re: Discussion of new signalling system
Post by: Isaac Eiland-Hall on June 20, 2016, 01:43:19 AM
Quote from: Vladki on June 19, 2016, 07:48:09 PM
Thanks Isaac. Some libstdc++*-dev is already installed, and it seems to be sufficient. But compilation fails on missing zlib-dev (or libz-dev) and libbz2-dev.

Installed: zlib1g-dev and libbz2-dev

Please do let me know if anything else is needed; of course I'm glad to do this as soon as I see. :)
Title: Re: Discussion of new signalling system
Post by: Vladki on June 20, 2016, 08:55:37 PM
Quote from: Isaac.Eiland-Hall on June 20, 2016, 01:43:19 AM
Installed: zlib1g-dev and libbz2-dev

Please do let me know if anything else is needed; of course I'm glad to do this as soon as I see. :)

Compiled sucessfully. Thank you very much.
Edit: one more install please libpng-dev is needed to compile makeobj. Thanks.

About the "new" long-block signals:
Quote
The way in which signalling logic works in Simutrans is that a train will try to reserve a route ahead whenever it first moves off. Whether it succeeds in reserving that route ahead will determine whether it is allowed to move off. It will iterate through each tile on its route until its next stop, and decide whether to reserve the whole way to its next stop, part of the way, or not at all. If it reserves the whole of or part of the way, it will start moving, and note the tile at which the reservation ends as a tile at which it will have to stop. It will prepare to start braking in time for that tile. As it approaches that end tile, it will check whether it can reserve further on, and the process is repeated until it gets to its next stop. The signals along the way, as well as reservations by any other train, just influence in various ways the logic used by the train in determining where it can reserve.
The long signal will do all of the above but before that it will try to make a directional (blue) reservation along the route (ignoring stops, junctions and ordinary signals) up to the next long signal, end of track or reversal point. If a reserved block for opposite direction is encountered, search fails and train has to wait. Reservation in the same direction is OK, search ends successfully, even if only a part of the route is reserved. It is questionable, what to do when the reservation reaches a choose signal. For simplicity I would end the reservation there as if it would be a long signal.

This may require a small change in the unreserving tiles behind the train. If the tile right behind the train is directionally reserved (i.e. another train is following in the same direction), then the recently freed tile should copy the directional reservation, so that there is no gap of completely free tiles. The following train would not have another chance to make another directional reservation. However tiles should become completely free behind the last train in sequence.

To the qouted algorithm, I have already proposed a change, that the regular reservation should reach to the next signal on the route, or reversal point, ignoring stops. Yes it would be somewhat similar to token block, but that is the way how reservations work (at least in Czechoslovakia). In contrast to token block, the track shall be freed immediately, although in reality, the track remains reserved behind the train up to the previous signal in either direction.

One more interesting observation from real world tram signaling: Normally trams run in drive by sight on double track, each track for one direction. However when the track is repaired, they have to pass a long stretch of single track. A simple solution would be to use one-train staff, but the traffic is so high that it is necessary to allow two or even three trams in one direction at once. So there are signals on the entry to the single track part. If the track is occupied by tram in opposite direction, it show danger. When the last tram leaves the single track, the signal goes off (clear), and trams can pass in the other direction. The still have to drive by sight, the signal is only about allowed direction of travel. If the above long-signal is implemented, this could be the long-signal for drive by sight. Or a hybrid signaling of track circuit and drive by sight.

I'll describe more, when I get the server up and running, together with a save game.
Title: Re: Discussion of new signalling system
Post by: Isaac Eiland-Hall on June 20, 2016, 10:16:50 PM
Quote from: Vladki on June 20, 2016, 08:55:37 PM
Compiled sucessfully. Thank you very much.
Edit: one more install please libpng-dev is needed to compile makeobj. Thanks.

Got it! :)
Title: Re: Discussion of new signalling system
Post by: Ves on June 22, 2016, 11:37:18 PM
Huh, this has taken days to summary up and write!
I apologize on beforehand if I tell the same things more times than one, but as said, this was written over a long range of days with many interruptions.

However, here it is:


Description of the problem:
If you take a map of an existing station, you might not be able to put the signals according to the plans. This, obviously, does not take into account the earlier mentioned dvarfsignals or other shunting signals, but only the signals used for 'real' traffic. Also the T-signals are a subject of its own and also outside the scope of this report.

Description of the relevant real-world signalling practice:
You can make two different ways of placing the signals dependant on the era. I will just here refer to them as "Modern" and "Old". Also there is the "T-semaphore" way, but that is another discussion.

Modern way of placing signals:
Normally a signal is put at the platform end (the platform signal), and then another signal after the last point at the station (the exit signal). The former cannot be CLEAR if the later are locked at DANGER.
This is to ensure that the train does not leave the platform while the exit signal is at DANGER, blocking the passage for other trains. The train may not leave the platform if it has not been given clearance by the dispatcher, which in turn has made sure that the rute is ready to handle the train.
When Dispatcher is ready, (s)he will attempt to set the platform signal to CLEAR, and if the exit signal approves, both signals will go to CLEAR. If the exit signal for some reason cannot be set to CLEAR, the platform signal can also not be set to CLEAR.

Here is a bunch of diagrams (in swedish, unfortunately) that illustrates where the signals are positioned. However, you dont need to read swedish to read the diagrams.
https://web.archive.org/web/20070417163015/http://home.swipnet.se/~w-54462/signalteori/hsifsi1.htm (https://web.archive.org/web/20070417163015/http://home.swipnet.se/~w-54462/signalteori/hsifsi1.htm)
Translate the number of lights on top of each other on the signals like this:
1 light  = repeater of the next signal. Im not 100% sure, but if light is lit, train may not pass behind the signal
2 lights = 2 state signal
3 lights = 2 state signal (with posibility to show restricted speed)
4 lights = 3 state/choose signal
5 lights = 3 state/choose signal (with posibility to permissive travel)

The signal that is a big circle with multiple lights inside are presignals (two different variations, doesnt matter for now)

Looking at a real chart for a station:
http://www.ekeving.se/r/siEJ/RB/1452-001_1960-1983.jpg (http://www.ekeving.se/r/siEJ/RB/1452-001_1960-1983.jpg)
Åkersberga
You will find similar symbols as in the diagrams previously linked. If following the track away from the station to the left, you first encounter a road crossing and after that you will find a 4 lamp signal facing one way and a two lamp signal facing the other. Those two signals are the entry signal and the exit signal. Following the tracks to the right of the station and you will find a similar setup.


The "Old" way of putting signals:
Looking at many earlier drawings from the semaphore time, there are not so many permanent signals. Often you find only the entry signal and no signals what so ever at the platforms and only in some occations an exit signal. Obviously there would be a flagman ready at the platform to send the train away and in that regards, (s)he would substitude as a "signal" in simutrans concept.
The flagmans job would be to keep the train at the platform until it was clear to go, following the same principe with the dispatcher. Whenever the train has gone outside the station area (usually at the entry signal) the tracks are free to use for other trains.


An example of a bigger station Ängelholm in the old days:
http://www.ekeving.se/r/bgd/TKP/T-1943_angelholm.jpg (http://www.ekeving.se/r/bgd/TKP/T-1943_angelholm.jpg)
This is quite messy with a lot of lines, however, it consist of two single tracked lines going in from left and upper left and a three tracks going out to the right. Now I think that two of the three tracks actually is not a part of the main line, but rather dead end tracks.
Note that semaphores are used as entry signals and color light signal as exit signals. Although on the track going out to the lower left, I cant find any signals...
Also note that the two exit signals protecting the line to the right probably is a combination of exit signal and platform signal, as the signals would be visible from the platform. However, Im not sure that there would be no flagman anyway.

Semaphores looks like a very small line with a thick bulk like a semaphore wing to the thin line. If the semaphore has more wings, the printed semaphore would have them in the upright position. You can find one with three wings at the very right of the drawing.



Illustration of the problem:
I will go through the working methods, one by one, and illustrate what challenges, problems and possibilities there are to achieve this:

To ENTER a station of any size, old or modern:
Usually no problem with any working method, as there should always be placed a choose signal at the entry of the station. To my knowledge, all choose signals possible to create in Experimental using different working methods, all will adapt to some kind of absolute block when reserving a platform. I do not consider "drive by sight", "one train staff" and "token block" here, as there doesnt really exist any choose signal for them and they shouldnt anyway be used to enter a station with.

The absolute block'ish reservation all choose signals will make, means that the trains will wait at the choose signal for an empty platform. When it gets one, it will book the entire rute. When the train leaves a tile, it will unreserve it.

To EXIT a station the modern way:
A big station usually have several lenghts of tracks and may even contain waiting positions for trains waiting to enter the line. If one can design the station to have a passing loop for each single track line branching out from the station, the desired working method could be applied to the specific tracks and you would not have any issues. If your lines are only doubble tracked, you would likely also not run into any troubbles, but more of that below.

However, if you are using single tracked lines and cannot design the station to have a passing loop per line, you risk running into troubbles:

I will use the example station diagram I made earlier and we are only talking about the right side of the station:

                                            / /
              __________________P_______E__/ /
West   ______/__________________P__/_\__C___/             East
       _____/___________________P_/___\_EC_____________________
                [station house]
P = Platform end signal or flag man
E = Exit signal
C = Choose signal (entry signal)


(1) East branching line shall use token block:
That means:
P = Absolute block
E = Token block
Results: Train will get released from its track, approaching the token block signal. If the token block signal is at danger, the train will get stuck there, blocking other trains.
Suggestion: Either a 2 block signal that will hold the train at the P signal until the E signal can show clear, alternatively a direction reservation made from the P signal which could then only be made if there are no head on traffic (as that would be in the wrong direction. However, a directional reservation that would not prohibit the train from waiting at the E signal, blocking the junctions.

(2) East branching line shall use one train staff:
That means:
P = Absolute block
E = One train staff cabinet
Results: This will result in the same behaviour as with token block.
Suggestion: Here, a 2 block signal would definetively be the best, since direction doesnt matter in one train staff working method.


(3) East branching line shall use absolute block:
That means:
P = Absolute block
E = Absolute block
Results: This will result in the same behaviour as with token block.
Suggestion: Either a 2 block signal that will hold the train at the P signal until the E signal can show clear, alternatively a direction reservation made from the P signal which could then only be made if there are no head on traffic (as that would be in the wrong direction. However, a directional reservation that would not prohibit the train from waiting at the E signal, blocking the junctions.

(4) East branching line shall use track circuit block/cab signal
That means:
P = Track circuit block
E = Track circuit block
Results: Trains will get released from the platform, approaching the E signal. At the E signal, it will attempt to reserve until the following signal and at the same time, try to create a directional reservation behind that signal (as that will be a doubble faced signal). However, if the next block is occupied, or it fails to reserve a directional reservation, the train will stuck at the E signal.
Suggestion: In this circumstance, it would feel more intuitive that there would be made a directional reservation directly from signal "P". However, a 2 block signal would also solve the problem, just as in normal absolute block.

(5) East branching line shall use moving block signals
This is different than all the other working methods, and to my knowledge, there are no specific swedish way of placing the beacons. However, it would be nice if the placement where consistent with the other types of signals.

(6) East branching line shall use time interval (with telegraph, as it is a single tracked line)
I am sorry that I still dont completely understand the time interval with telegraph. I guess there still are some bugs in it, I will open a second thread about that.
However, my tests shows that it might work. It depends on what I see in my tests are bugs or intended :)

I mentioned earlier that I am currently focusing on the single tracked line, but for the doubble tracked line, a train will also drive out and wait at the Exit signal. If the signal is put far enough away it would not get the big consequenses, but if one are placing the signal according to a map or limited by space or other restriction, it might be closer to the station than a train length, and you would get a train stuck at the points.


Here is the example station again, but in an earlier variant:

                                            / /
              __________________P__________/ /
West   ______/__________________P__/_\__C___/             East
       _____/___________________P_/___\_C______________________
                [station house]
P = flag man
C = Choose signal (entry signal)

Again, it is only the right side we are interested in.
Now, the big difference is that there are no exit signal outside the station. To ease up on things, the pakset could have some "dummy exit signals" that would in simutrans eyes be a token block signal, a one train staff or a time interval signal. The player should place the "signal" on the line as an exit signal and the "signal" could have the form of a sign or a man or something similar.
By doing this way pakset wise, It is much easier to find a common solution and I dont need to write down again which working methods work and doesnt. Obviously, something like absolute block would work flawless without an exit signal.


Suggested solution:

What I then would like to suggest is:

* 2 block signal

I quote from myself my thougths on how I think a 2 block signal should work:

2 block signals should only be possible to code as "absolute block", "track circuit block" and "cab signalling".

When a train approaches the 2 block signal, the signal will find the next signal of any working method in the trains path.
The 2 block signal will attempt to set the next signal to CLEAR by whatever rules the other signal follows. If the other signal cannot be set to clear, eg due to unable to create a directional reservation or not enough time has passed since its last train, the 2 block signal would remain at DANGER.
If the next signal is another 2 block signal, I suppose the logic has to stack, that would effectively become a 3 block signal.
If there is no signal before the next stop in the trains schedule the 2 block signal would act as a normal signal.
The "end of choose" sign could also terminate the 2 block functionallity, making the signal act as a normal signal.

The argument that it would be physically impossible for a signal to detect whether there is a token slot free or to know whether long enough time has gone, I think is not valid. Remember that I very much would like to simulate the logic of the techniques rather than the techniques them self. Say token block: I will not simulate that there are actual tokens inside the slot machine. In my world, a train entering such a signal is written down on paper inside the signal box, and the guy operating the 2 block signal would get his orders from the same people in the signalbox. Therefore, upon requesting "if there are any tokens left" from a distance, I find very realistic. If you dont want it in the british pakset, maybe I could suggest a proposal, that in the dat-file of the 2 block signal, specify which working methods the 2 block signal DOES work with.

Bringing back the diagram again:


                                            / /
              __________________P_______E__/ /
West   ______/__________________P__/_\__C___/             East
       _____/___________________P_/___\_EC_____________________
                [station house]
P = Platform end signal or flag man
E = Exit signal
C = Choose signal (entry signal)


Some examples of what could be made:
P = 2 block absolute block
E = One train staff cabinet
Results: The train will attempt to leave the platform. The signal checks wether the track behind the one train staff is free (E), if it is not, the train will be held back at the platform.

P = 2 block track circuit block
E = Track circuit block
Results: The train will attempt to leave the platform. The signal checks wether the track behind signal E is free. If it is free, it will be checked wether the following signal is bidirectional and wether a directional reservation can be made. If that is also true, signal E will go to CLEAR and so will the P signal. If it is not possible to crete a directional reservation or if it is occupied, both signals will remain at DANGER.



If you would consider adding more flexibility in regards to directional reservation, that would also be most welcome, as especially the track circuit block and possibly also the time interval with telegraph could benefit alot from that. However, I cannot think of a good way to implement it, so I will leave that to Vladki to suggest if he wants :)
Title: Re: Discussion of new signalling system
Post by: Octavius on June 23, 2016, 12:13:09 PM
What is the exact purpose of the exit signal? The platform signal already guarantees that no train will approach the exit signal when it's not showing PROCEED. To control shunting movements or for redundancy? Neither of those are required in Simutrans. So that leaves stations with different working methods on different exits as its only purpose.

I reality, the platform signal would be some sort of hybrid. Depending on the working method of the used branch, the station master (acting as signal) would either show a green flag of hand over a token, depending on whether the used exit uses absolute block or token signalling. In simutrans that doesn't work, as there is no way to know which working method applies to which exit. What may work is a signal/sign/cabinet on the exit that can change the working method of the train leaving, but does not act as the end of a block. It would only work for some combinations of working method. A change to time interval signalling would probably not work.

Your platform signal could be of the absolute block type. It will create a directional reservation on the single track branch until the first signal on the branch (which would be at the next passing loop) and clear the platform signal. When the train passes the sign after the last points of the station, it changes working method. The reserved track would remain the same (although it may loose its directionality), but, after the rear of the train has passed the sign, the track is no longer unreserved behind the train until it reaches the next passing loop to hand in its token.

Or is that exactly what you mean by a "dummy exit signal"?
Title: Re: Discussion of new signalling system
Post by: Ves on June 23, 2016, 01:55:07 PM
Quote from: Octavius on June 23, 2016, 12:13:09 PM
What is the exact purpose of the exit signal? The platform signal already guarantees that no train will approach the exit signal when it's not showing PROCEED. To control shunting movements or for redundancy? Neither of those are required in Simutrans. So that leaves stations with different working methods on different exits as its only purpose.
They are protecting the line. I cannot say why they exist this way and why it has been designed like this. Maybe it was considered easier or safer to have a separate signal there?

Quote
I reality, the platform signal would be some sort of hybrid. Depending on the working method of the used branch, the station master (acting as signal) would either show a green flag of hand over a token, depending on whether the used exit uses absolute block or token signalling. In simutrans that doesn't work, as there is no way to know which working method applies to which exit. What may work is a signal/sign/cabinet on the exit that can change the working method of the train leaving, but does not act as the end of a block. It would only work for some combinations of working method. A change to time interval signalling would probably not work.

Your platform signal could be of the absolute block type. It will create a directional reservation on the single track branch until the first signal on the branch (which would be at the next passing loop) and clear the platform signal. When the train passes the sign after the last points of the station, it changes working method. The reserved track would remain the same (although it may loose its directionality), but, after the rear of the train has passed the sign, the track is no longer unreserved behind the train until it reaches the next passing loop to hand in its token.

Or is that exactly what you mean by a "dummy exit signal"?
Making something like this work would really enhance the experience of signalling old railways. However I guess this is very difficult to code and calibrate, and that is why I was talking about a "dummy exit signal" that would be placed outside the station. The two ones I can think of needed are token block and one train staff, but might need more. But this method would require a 2 block signal.
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 23, 2016, 11:35:36 PM
Thank you all very much for your contributions so far: this is much appreciated. I have not time to consider this in detail now, but will look at it in due course.

In the meantime, I have implemented (but not yet tested) the suggestion made to have signals defined as "longblock" signals behave in the same way as bidirectional signals at present. I have not tested this because I am not sure how to implement this in the pakset (i.e., how to communicate to players with meaningful and realistic graphics and text what these new "longblock" signals do).

I should be very grateful if those working on the Swedish pakset could have a go at testing it there and see whether it works as had been hoped.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 24, 2016, 06:39:48 AM
I'll try with czech signals. What should be in the dat file for those signals?
Title: Discussion of new signalling system
Post by: Ves on June 24, 2016, 07:18:20 AM
From the commit on github, it looks like only is_longblocksignal=1  is needed in the datfile.
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 25, 2016, 08:22:55 PM
Ves is correct - just define the signals as long block signals. Make sure that any token block signals, meanwhile, have the is_longblocksignal definition removed. Please let me know when you have tested these.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 26, 2016, 10:20:15 PM
Testing server is up and running at server.exp.simutrans.com. At the moment it is running latest simutrans-experimental an pak128.britain-ex. No addons.

Look at the game and the track layout around the city of Trnava. I tried to replicate the real czechoslowak signal layout, with the british track circuit signals.
The differences are:

- double track in reality does not have strictly defined direction for each track. Both tracks can be used in both directions, although there is one "preferred" direction. This is useful in case of failures, delays, repairs, etc. It is not practical to do it in simutrans, so I made the double track strictly defined. No problem with that.
- end of choose signs. Their design replicate (at least in some paksets) end-of-shunt signs, but in real world they would be closer to the station, then the entry signal, and apply only to traffic leaving the station. Such placement would cancel the effect of choose signal on entry, so I put them further outside. No problem with that.
- real departure signals act as 2 or 3 aspect according to the signaling used further on the line towards which the train is heading. For now I just put 2-aspect signals on the beginning of branch lines. It is not optimal, but works.
- crossing - some crossings are interlocked with nearby signals (like in the game at cemetery), but if the blocks are too long (or the line is not split in blocks at all), then the crossings are closed by independent track circuits and have special signals to inform the approaching train that the crossing is closed (or not).
- departure signals for single tracked line should be the new long signals. I did not test them yet. When I do I'll upload an addon pak with czechoslovak signals and modify the game to use them.
- trains should not turn to drive by sight after stopping at an unsignaled stop (trnava predmestie), but continue according to the last signal seen. If a train has to reverse at such stop, token-block or one-train staff should be used.

Please have a look on the game and comment here. There are also some swedish layouts done by Ves.
I'll update the game when I test the long-block signals locally.
Title: Re: Discussion of new signalling system
Post by: Vladki on July 06, 2016, 11:41:36 PM
A comparison of czech and swedish signalling.

System that Ves describes as modern signalling (separate platform and exit signals), was in use in Czechoslovakia on some places, but was never wide-spread. It was imported by Germans during WWII (mechanic signals) and improved (added color light signals) by Czechoslovak railways in 50's, but abandoned in 70's. Now only a few stations use it. The main difference is that the platform signal looks different from exit signal (while in Swedish practice they seem to look the same). I think the main reason for this kind of setup is to keep separated the function of line signaling and station safety system. The exit signal is simple 2-aspect signal (just as any block signal on the line), and is telling only whether the line outside of station is clear. The platform signal is interlocked with switches and tells, whether the path from the specific platform is set - either for shunting or departure.

Before the introduction of these platform signals, the stationmaster (signalman) had to give the departure signal by hand. Arriving train had to stop at the platform before any switches. Switches were secured by key/lock dependencies, but the responsibility was on the signalman. Usually there was one exit signal for each line going out of the station, or a signal with multiple arms (lights) was used - number of arms was telling to which line the path was set. Shunting was signaled by separate signal placed next to exit signal. Only some stations had exit signals for each station track.

However, during 50's and 60's new signals (and safety systems) were developed, which combined the line signaling and station safety system all in one. The new signals had aspects for shunting as well as for departure (including speed signaling). As a result, the special platform signals were abandoned, and each station track got its own exit signal (in place of the former platform signal). These signals allowed departure without the need for hand signal. This setup is much simpler and also more suitable for simutrans. I would use this setup also for earlier eras in pak.cz, even if it would not be historically exact.

Just one idea for T signals - it would make sense for me to have two T signals at station - one on each end. Then one arm would be the entry signal, and the other exit signal. Then also the "stop before points" would make much more sense - it would be valid only for trains inside the station. Approaching trains would have a good chance to see the signal from safe distance. Take into account the fact, that there were no distant signals in the early years, so signaling station entry by signal in the middle of station seems impossible (or dangerous) to me. IMHO T-signal in the middle of station could have been used only as exit signal for both directions in combination with hand signal by signalman. Entry signal could have been the plate signal. See http://www.ekeving.se/si/mek/index.html - the first picture on left is "Skivsignalen stod vid Nybodatunneln", and a few pictures further, you can find almost the same photo, but with distant signal (forsignal). This corresponds with the practice in Austria-Hungary. The early entry signals were called "distanz signal in German" - as they were built on long distance from station, and later repainted and changed to true distant signals (vorsignal in German).
Probably the same development happened in Sweden.

Title: Re: Discussion of new signalling system
Post by: Ves on July 09, 2016, 03:10:00 PM
I finally found a source telling that an exit signal was put up if the line speed exceeded 90kmh! If line speed was lower, I understand that there would be no exit signals.

Vladki, would that actually not be a two faced signal with only one set of graphics and with different function for each direction (choose in one direction and normal in the other)?
That would actually work also for "my" entry and exit signals, especially if one could choose which working methods it should use (I would in that case paint two signals). That could in fact be interesting! :-)

But yes, the original T signals in Sweden where placed at the middle of the station in front if the station house. The stations with the T signal where not the biggest ones (they used plate signals at the entry). Trains approaching a station with a T signal, just had to drive slow enough to actually spot it and possibly stop. And yes it was a safety risk and eventually got replaced with real entry signals.
Title: Re: Discussion of new signalling system
Post by: jamespetts on July 10, 2016, 01:13:34 AM
I have been looking in some more detail at Ves's long post just now. One point of clarification, if I may: in the case of trains not stopping at the station, how do the signals marked "P" behave in both the old and new layouts?

Edit: Looking at this in somewhat more detail - in actually playing Simutrans with the Swedish pakset, what incentive would players actually have to place separate platform and exit signals, rather than just placing the exit signals on the platforms as in later practice (and as was the standard in UK practice)? The only reason that I can see is if one of the exit signals is of the token block type and there is, unusually, no double track lead into the single track section on which a token block signal can be mounted. I am reluctant to implement signalling features that a rational player seeking to maximise the efficiency of the operation within the parameters of the simulation would have no incentive to use.

If, as I understand to be the case, token block working was not used in Sweden in any event, would it not be better simply to use track circuit block signals with normal danger to simulate this sort of signalling, using the new type of longblock signals as the platform signals here? Thus, in Swedish practice, where there were no double track leads, there was also no token block working, and in UK practice, where there was token block working, there were also double track leads, so no situation is likely to arise in which there is a practical need for a double blocking signal.

As to the T-signals (station signals in UK parlance), changing the code to allow for these would be a very large amount of work, as this would require some very significant changes to some quite fundamental assumptions that the signalling code makes at present (e.g. that trains will always stop on the same tile as that on which the signal is located, and will seek to reserve a path from that tile), and this work would not result in any significant economic or operational difference (save for a reduction in the number of signal heads that a player would have to place). Given the large number of tasks that need to be done, it does not seem worthwhile to invest such a large amount of effort in producing double-arm T/station signals for such limited economic/operational reward.
Title: Discussion of new signalling system
Post by: Ves on July 11, 2016, 09:43:58 AM
In the old days i think that trains did not pass a station without stopping in some way, but I'm not sure. It could just as well be. Today, if train have a route through a station without stopping, to my knowledge, the signals would just be clear.

Edit:
I have trouble with my internet an did not see you edited your post! A more detailed reply:

I can understand your reluctance to implement this. The only scenario that in simutrans practically would need this, is when using token block or one train staff. I am thinking of a way to make an incentive (within the tools you have already created) for a player to place an exit signal for the working methods existing.

As earlier talked about, having a real staff or token where quite unusual, enough to consider them not being implemented in pak.Sweden.

However, you can find the effects of token block signaling in Sweden:
Many lines has small stops along the way for a small passenger rail carriage to stop on the way between two stations. Clearance has been given to the train to travel the entire stretch between the two stations, and the train will stop and go as it will. This heavily represent the token block working method, just without physical tokens, and to my understanding, the longblock signal doesn't resemble that(?). The token is spoken, as earlier mentioned.
Therefore, I want to have token block working method in paksweden.

Now I understand you if you anyway don't want to implement it. I guess it involves quite a bit of work and bug reporting taking away time and in that case, creating token block stretches will just have to be designed like you write they are designed in England :-)
Title: Re: Discussion of new signalling system
Post by: Vladki on July 11, 2016, 08:50:02 PM
Quote from: Ves on July 11, 2016, 09:43:58 AM
In the old days i think that trains did not pass a station without stopping in some way, but I'm not sure. It could just as well be. Today, if train have a route through a station without stopping, to my knowledge, the signals would just be clear.

I have seen that in some cases, the hand departure signal was given to the approaching train. It sure had slowed down, but accelerated again without stopping.

Quote
However, you can find the effects of token block signaling in Sweden:
Many lines has small stops along the way for a small passenger rail carriage to stop on the way between two stations. Clearance has been given to the train to travel the entire stretch between the two stations, and the train will stop and go as it will. This heavily represent the token block working method, just without physical tokens, and to my understanding, the longblock signal doesn't resemble that(?). The token is spoken, as earlier mentioned.
Therefore, I want to have token block working method in paksweden.

I think this is the same as I have suggested earlier. I think that for all signaling methods (absolute, circuit or even time interval), the clearance was given for the entire stretch of line up to the next signal. Simply - if the train stops in the middle of nowhere, it does not turn to drive by sight. Instead it continues according to the last signal seen. From that point of view, you can think that even absolute or circuit block is a kind of token block, with somewhat virtualised tokens.

What I really do not like about the current implementation of token block is that the track stays reserved behind the train, thus blocking the exit points of the station, until the train arrives to the next station. In reality, the reservation should extend backwards only to the next signal (in whatever direction). If implemented like this, there would be almost no difference between token and absolute block. I still feel that there is no difference in the logic behind both methods, it is just the real world implementation, that uses tokens as an extra safety measure. It is just about the proof of track clearance: absolute block - end of train sign was seen, the signalman pushed the appropriate button, and turned his signal to danger. token block - token was handed from train driver to signalman, circuit block - the track circuit is open, and (optionally) the next circuit is closed. But from the simutrans point of view, all these proofs are equal.
Title: Re: Discussion of new signalling system
Post by: jamespetts on July 11, 2016, 10:39:07 PM
Thank you all for your feedback. I have been working most recently on the one train staff mode, which I think that I have fixed now. Would you mind awfully testing this to see whether it does indeed work properly?
Title: Re: Discussion of new signalling system
Post by: Vladki on July 27, 2016, 09:34:27 PM
I have added one-train staff to the network game - see the goods sidings at Nemcanka station. It looks good at first glance. Please check if the layout is how you intended it would be used.

Well, at second glance it is not that good - the reservations for second train entering the on-staff area are not correct... And the more I watch the game the worse it gets. Sometimes the train, upon leaving the on-staff area turns to drive-by sight (ok), sometimes it says track circuit, but ignores any signals and causes deadlock
Title: Re: Discussion of new signalling system
Post by: jamespetts on August 01, 2016, 11:58:08 PM
I think that I have at least partly fixed these one train staff issues; would you be able to re-test? I should be most grateful.
Title: Re: Discussion of new signalling system
Post by: Vladki on August 08, 2016, 10:14:43 PM
Train staff seems to be OK. Even if I put the staff cabinets a bit further from each other. Please see the server game if the layout corresponds with your original intention how it should be used.
Title: Re: Discussion of new signalling system
Post by: jamespetts on August 21, 2016, 05:38:56 PM
I have just added a feature in devel-new that I believe has been requested a few times on this thread: trains in the absolute block, track circuit block and cab signalling working methods will not revert to drive by sight signalling at a non-reversing station, but will continue to reserve to the next signal in their current working method.

I should be very grateful if people could test this and report whether it works properly. Thank you for all of your feedback so far.
Title: Re: Discussion of new signalling system
Post by: Vladki on August 21, 2016, 09:38:13 PM
Wow, thats good news. I'll test ASAP.
Title: Re: Discussion of new signalling system
Post by: jamespetts on August 21, 2016, 10:53:52 PM
Please note that I have just uploaded several fixes, so please test with the latest version.
Title: Re: Discussion of new signalling system
Post by: Ves on August 21, 2016, 11:07:23 PM
This sounds very intresting! I will try it out when I get a chamce!
Title: Re: Discussion of new signalling system
Post by: wlindley on August 22, 2016, 12:32:47 PM
Numerous unrecoverable compile errors from vehicle/simvehicle.cc beginning with

    vehicle/simvehicle.cc:5074:30: error: expected unqualified-id before 'or' token
         onward_reservation_type or;

when compiling with gcc version 4.8.4.  Apparently 'or' is reserved?
Title: Re: Discussion of new signalling system
Post by: jamespetts on August 22, 2016, 10:20:03 PM
Thank you for that: I have changed the variable name in question. Are you able to re-test?
Title: Re: Discussion of new signalling system
Post by: wlindley on August 24, 2016, 12:00:32 AM
Compile successful
Title: Re: Discussion of new signalling system
Post by: jamespetts on August 24, 2016, 08:05:22 PM
Excellent, thank you.
Title: Re: Discussion of new signalling system
Post by: Ves on September 09, 2016, 01:15:54 PM
So, it feels like the signals are in general implemented in the game and it's mostly bug fixing left, what subject do you intend to look at after signaling?
Or do you have some more plans for the signals?
Title: Re: Discussion of new signalling system
Post by: jamespetts on September 10, 2016, 12:56:51 AM
There is one more thing that I want to do with time interval signalling, to do with improving the signalling of stations, which I am hoping to do this week-end. After that, I will have to give some consideration as to how best to proceed next. I will need to spend some time working on more signalling tutorial videos, however, as these are of some importance given the complexity of the new signalling.
Title: Re: Discussion of new signalling system
Post by: Ves on September 17, 2016, 08:36:38 PM
There is one issue with drive through stations and choose signals that might need addressing in some way:

Look at the brittish servergame at coordinate (146,111), there you will find a small station on a single track (my old example station in fact), featuring two choose signals and a T-signal.
At the choose signals at either end, there is a train holding, waiting to find a free way through the station to the other end.
The trains try to reserve a route through the station to the end of choose sign, located on the outside of the choose signals.
But since the other train is already waiting there, a deadlock is occured.


What should ideally happen is that one train should be taken onto the platform so the other one can pass.
Would it be possible for the trains in this situation to recognize that there is a passing loop? Ie, automatically take the southermost/westernmost track?
The normal way of doing passing loops is to have only two tracks and put one way signs on them, but in this situation with three or more tracks, the station should ideally not have any one way signs.

Would it be possible to make the choose signals interact with the signals (in this case, the T-signal) on the station, so it could release one train one block and then see if the deadlock resolves?
Title: Re: Discussion of new signalling system
Post by: jamespetts on September 18, 2016, 12:23:49 AM
Resolving this specific sort of deadlock automatically would require some really rather complex additional logic (I am not immediately sure even how in theory it might be done), the time involved in which does not seem entirely worth it given that it can be resolved simply by setting a waypoint so that the non-stopping trains will always take the leftmost path.
Title: Re: Discussion of new signalling system
Post by: Ves on November 08, 2016, 05:29:14 AM
I came to realize the other day a difference in the terminology that caused confusion (at least for me) in the beginning. Now it pops up again as I am thinking of the future translation of the game to Swedish. I'm aware that the implemented terminology in Simutrans might be simplified compared to real life, but it is the simutrans way of doing things that I've to relate to:

The term CLEAR, I understand, means
This signal shows the least restricted aspect, ie is it a 2 aspect stop signal, it means that one block is free, if it is a 5 aspect signal, it means that there are 4 blocks free. There is no way of telling how many blocks are free by just looking at the message (CLEAR), you must know which kind of signal it is showing it.
Now the terms for signals at CAUTION (with all their variations) holds the information about how many blocks is free ahead (caution means one block is free and the second is not, preliminary caution means two blocks are free and the third is not etc.).


In Sweden, there is no good way of translating CLEAR. Most articles I've read use the term "kör", which just mean drive. Most aspects, which is not STOP, includes the word kör as an instruction, followed by possible restricting messages. The term CAUTION is not used, because this signal is in fact clear, and that must be presented.

For ease of reading, I translate in the text below kör to CLEAR
The term CLEAR means
This signal allows you to proced to the next signal. Even if this would be a multiple aspect signal, the message CLEAR holds no information about the fortcomming signal. If this signal was to show that also the next signal is clear, the term would be "CLEAR, expect CLEAR". A four aspect signal would therefore show "CLEAR, expect CLEAR, expect CLEAR" etc. If the last signal would show stop, the message would have been "CLEAR, expect STOP".
A standalone presignal would have these aspects: "Excpect CLEAR" and "Expect STOP"


Now, why am I writing this? Simutrans handles it just fine with the english terminology. I just remember it from when we where discussing it a while back (and I could not understand it) and I found that it might be interresting to know how other countries presents their signal messages.

Also, I'm writing this because I want to make a change in the signal infowindow: Make the CLEAR aspect be different, depending on which signal is showing it (Eg, "CLEAR", "CLEAR2" or something similar). For the english translation, all variations of CLEAR would be just "Clear", however, the swedish pakset could then write "Kör, vänta kör" ("Clear, expect clear") accordingly.
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 08, 2016, 07:12:42 AM
Interesting; do feel free to make the change so long as you provide the translations.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 08, 2016, 08:05:54 AM
I think the difference comes from the fact that sweden uses blinking distant signals. Thus a 3-aspect signal shows two lights at the same time - one steady and one blinking.  Czech terminology is similar to british, although it does not translate exactly. Best fit would be with austrian or german terms. Stůj - stop - danger, výstraha - caution, volno - clear. However, we have different approach to 4-aspect signalling. Caution (one yellow light) is shown in braking distance (for speeds up to 120 km). In case the block is shorter, a "repeated caution" is shown (yellow + white) on the signal between caution and danger. For higher speeds cab signalling is mandatory, so the driver can start breaking well in advance (one block earlier).

4-aspect line signalling was in place from cca 1960's to 2000. (now abandoned) However repeated caution is used within complex stations or where the main signal is behind a corner.

This would make the czech translation a bit tricky
Title: Re: Discussion of new signalling system
Post by: Ves on November 08, 2016, 10:40:08 AM
Quote from: Vladki on November 08, 2016, 08:05:54 AMThis would make the czech translation a bit tricky
Do you have any wishes in respect to translatable texts?
Title: Re: Discussion of new signalling system
Post by: Vladki on November 08, 2016, 05:17:49 PM
Just to distinguish somehow which caution is on 4. and more aspect signals. English order is: clear, (preliminary caution,) caution, danger. While czech order is clear, caution, (repeated caution,) danger. The aspect in () is only on 4 aspect signals.

So to make proper translation one would need to distinguish caution on 3-aspect signal (or simple distant signal) from caution on 4 and 5 aspect signals.
Title: Re: Discussion of new signalling system
Post by: Ves on November 08, 2016, 06:03:24 PM
Ok, would this work?

Pre signal:
CLEAR0, CAUTION0

Normal stop signal:
CLEAR1, DANGER1

Three aspect signal would be:
CLEAR2, CAUTION2, DANGER2

Four aspect signal would be:
CLEAR3, CAUTION3, DANGER3

  ....

With all variations as to "no_choose" etc.
Think the number as the number of blocks the signal can represent.
Title: Re: Discussion of new signalling system
Post by: Vladki on November 08, 2016, 08:46:11 PM
Better would be:
clear2, danger2 on 2-aspect,
clear3, caution3-1, danger3 on 3-aspect
clear4, caution4-2, caution4-1, danger4 on 4-aspect
clear5, caution5-3, caution5-2, caution5-1, danger5 on 5-aspect

cautionX-Y ... X = how many aspects on the signal, Y = how many blocks ahead of danger signal

distant signal could be X=1 or 0
for time interval - "caution" could be replaced with "slow" or something like that. Although it fits the 3-aspect signalling, the meaning - and thus translation is different.
Choose signals: branch/straight
call_on - another translatable string
Title: Re: Discussion of new signalling system
Post by: Ves on November 08, 2016, 08:59:22 PM
Ok, however, is the "Y" parameter in your naming convention not already covered by the existing names (caution, preliminary caution, auxilary caution)?

The names of the 5 aspects would be with my version:

clear5, auxilary caution5, preliminary caution5, caution5, danger5

Is that not what you meant?

I have already thought that time interval needs another translation. The ingame name will be something recognizable, and you will have to translate it into something usefull on your end.
The choose signals already show main route or alternate route, however I will implement the X parameter from the above equation to them as well.
Call_on will also have the X parameter
Title: Re: Discussion of new signalling system
Post by: Vladki on November 08, 2016, 09:23:31 PM
Quote from: Ves on November 08, 2016, 08:59:22 PM
Ok, however, is the "Y" parameter in your naming convention not already covered by the existing names (caution, preliminary caution, auxilary caution)?
oh yes, whatever can be used to distinguish them. In your previous post there was only caution 3, caution4, but no preliminary caution... I thought the number would be more "neutral".

Quote
clear5, auxilary caution5, preliminary caution5, caution5, danger5
OK

Quote
The choose signals already show main route or alternate route, however I will implement the X parameter from the above equation to them as well.
Call_on will also have the X parameter

I think the number of aspects is not necessary in choose and callon aspects, but it should not be a problem (only more texts that will have the same translation). Probably danger may be also without X
Title: Re: Discussion of new signalling system
Post by: Ves on November 08, 2016, 10:18:36 PM
Yeah, was a bit unclear there, sorry!

You are right, maybe danger5 is overkill. That will just be known as "danger" if no one else complains. I dont think there are any in game mechanisms that allows a train to pass a signal at danger (except call_on, and some of the current bugs..)?

Call_on, I can only think of the difference of shunting and following behind another train on the track. I think I will keep it, you never know what ideas might arrise :)

edit Vladki, Try have a look at my newest version on github: https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/28cd6334df5aef21cff44163f776d02118e0c7ea (https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/28cd6334df5aef21cff44163f776d02118e0c7ea).
It is currently not translated, so the internal names are visible. However, that makes it easier to check it out!

edit2: Now the translation files should also be correct to be included in devel-new-2: https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2 (https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2)
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 12, 2016, 12:15:00 AM
Thank you for this work, and apologies for not having had a chance to look into this yet: I am currently busy at work and spending all of my Simutrans time working on multi-threading (which early testing shows greatly improves performance on larger maps, but is hard to get right).
Title: Re: Discussion of new signalling system
Post by: Vladki on November 20, 2016, 01:12:45 PM
Quote from: Vladki on February 07, 2016, 12:31:04 PM
With the help of Leartin, I got some nice source of information: https://archive.org/stream/geschichtedereis03aust#page/56/mode/2up
Now I have to refresh my knowledge of German and pick up the relevant info from there. However at quick blick, it seems that many of the incomplete sources I came upon earlier were referring to this book.

Hi I went back to this book, and refreshed my knowledge of german. Just a few interesting picks:
- absolute block was introduced in austria-hungary in 1877 (line Wien - Stadlau)
- time interval began with interval of 30 minutes. It was later reduced, with different intervals for summer/winter and day/night. Further reductions were done with final interval of 10 minutes in 1877.  Not too many details. (page 50-51) I could not find any info about letting the train earlier, though at reduced speed, neither if the interval was enforced along the whole line (at each waechterhaus) or only at stations.
- double tracked lines were really an exception. Traffic on single tracked lines (in absence of telegraph) was organised by strict adherence to timetable. If an expected train was delayed by more than 1 hour (or half hour in later years), a rescue engine was to be send to help (driving carefully - i.e. by sight). Also the train drivers had to run carefully, when they were too late, as they could expect a rescue train in the opposite direction. (page 50)
- there were no platforms in the beginning. Portable steps were brought by station staff if necessary. (nice picture on page 17).
- early flag signals were - black = danger, red = caution.
- maximum allowed speeds described at page 46-47.
Title: Re: Discussion of new signalling system
Post by: jamespetts on November 20, 2016, 01:26:40 PM
Interesting!
Title: Re: Discussion of new signalling system
Post by: Vladki on November 20, 2016, 03:13:05 PM
reading further i found info about "quittirungssignale" from 1872, which fit as time interval singals on the line (beween stations). page 68-69.
They were a sort of T-signal, perhaps modification of those on page 61. With following aspects: both arms down - nothing (no train announced)
Trains were announced by bell signal (telling the direction). If track was in good condifion, road crossing closed, one arm (according to expected direction) was raised to upper quadrant "clear". After passing the train the arm was put horizontal "danger", after 5 minutes to lower quadrant "caution=slowly". However, i found no info if after further 5 (or more) minutes the arm could be raised to clear, or went down and next train had to be announced by bell signal.
However, it seems that many railway companies were reluctant to build these signals and wanted to stay at hand flag/lamp signals.

For single track lines, there was a departure signal (wendescheibe, page 69), that was interlocked with bell signalling, and turned to danger upon train announcement from neighbouring station. This signal was only one for each direction (not for each station track).

Entry to station was protected (since 1863, page 71-77) by "distanzsignal" - inspired in France. This had two aspects: danger/clear, but orginally was not absolute. If a train arrived and stopped at danger, it was allowed to move forward, so that the whole train was ahead of the signal, but it did not enter the station yet. My speculation is that it was to protect the train from the possible following train (in time interval). As these were quite far (a few hunderd meters) from the station (therefore the name distant signal), they were operated electrically. Later (with introduction of absolute block), they were converted (repainted) to vorsignals (equivalent to UK's distant/advance signals), and new entry/home signals were built much closer to the outermost switch. Interesting is also that they were converted from electric operation to mechanic (wire) operation. Distant signals did not have any advance counterpart, but they wer equipped with electric bell that was constantly ringing if danger was shown. The wires continued to the next waechterhaus and another bell was installed there, so the watchman could signal "caution" by hand (flag/lamp).


Title: Re: Discussion of new signalling system
Post by: jamespetts on December 03, 2016, 08:56:33 AM
Quote from: Ves on November 08, 2016, 10:18:36 PM
Yeah, was a bit unclear there, sorry!

You are right, maybe danger5 is overkill. That will just be known as "danger" if no one else complains. I dont think there are any in game mechanisms that allows a train to pass a signal at danger (except call_on, and some of the current bugs..)?

Call_on, I can only think of the difference of shunting and following behind another train on the track. I think I will keep it, you never know what ideas might arrise :)

edit Vladki, Try have a look at my newest version on github: https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/28cd6334df5aef21cff44163f776d02118e0c7ea (https://github.com/VictorErik/Simutrans-Experimental-Ves/commit/28cd6334df5aef21cff44163f776d02118e0c7ea).
It is currently not translated, so the internal names are visible. However, that makes it easier to check it out!

edit2: Now the translation files should also be correct to be included in devel-new-2: https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2 (https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2)

My apologies for not having got to this until now: having spent some time with other matters, this had slipped my mind. I have now incorporated it - this is most helpful: thank you.
Title: Re: Discussion of new signalling system
Post by: Vladki on December 03, 2016, 12:56:12 PM
When I was reading about https://en.wikipedia.org/wiki/Abbots_Ripton_rail_accident I noticed that at that time there was an early block system (although simpler than THE absolute block system), which could be implemented with normal_danger=0. Semaphores were lower quadrant, with arm vertically down for clear - and that was the cause of accident, it was frozen and stuck at clear.
Title: Re: Discussion of new signalling system
Post by: Vladki on December 26, 2016, 01:16:43 PM
Further reading discovered one very interesting piece of signalling. The picture #50 on page https://archive.org/stream/geschichtedereis03aust#page/86/mode/2up and text on page 85 describes and early absolute block system (1864) used on double track line (Přerov - Ostrava / Prerau - Ostrau)

It used optical telegraph with balloons. They had to be close enough that the signalman clould see the next signal in both directions. When the train has passed the signal, signal man put it to danger (balloon half-way down). When the previous signalman saw that the next signal is at danger, he could put his own signal to caution (balloon down), and when the next signal was at caution, he could rise the ballon up again to signal clear line.

Unfortunately I did not find if and how was this optical telegraph used on single tracked lines. There is a mention of "signal-less" absolute block, where blocks were delimited by stations (passing loops), and arrival / departure of trains was acknowldged by telegraph.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 26, 2016, 01:26:52 PM
Balloons - intriguing! One wondered how this system worked in high winds.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 26, 2016, 06:05:39 PM
Quote from: fam621 on December 26, 2016, 05:53:25 PM
Is this forum good for future signals that could be added in the future for example LU signals?

I am afraid that I do not follow - what do you mean "is this forum good for" in this context? Also, as I have already stated, we already have London Underground signals.

Incidentally, please do not reply to this post by private message.
Title: Re: Discussion of new signalling system
Post by: Vladki on December 27, 2016, 07:57:25 AM
Balloons: Have a look at the linked picture. They were not hot-air balloons, but rather a sort of balls puled up on a mast in similar way to flags. I think that on some of my previous post a better picture was linked. Now I'm writing from my phone so I can't find the link easily.
Title: Re: Discussion of new signalling system
Post by: jamespetts on December 27, 2016, 11:45:24 AM
Ahh - perhaps "balloon" was not quite the right word. This makes more sense. Interesting!
Title: Re: Discussion of new signalling system
Post by: laos on January 06, 2017, 01:51:06 AM
regarding the new signaling system. I noticed the video series is not yet near electronic signaling, and I was wondering if someone can suggest a good place to read or view a diagram of proper signal placement. I'm having an especially hard time with getting absolute choose signals to say anything other than danger. I did read the instructions in the help section of the simturans experimental, but it doesn't seem to be helping me.

Here's a quick screenshot for reference as to what i'm screwing up: http://i.imgur.com/44WZIgD.png. I've got nothing at the end of the station platform, but earlier tried end of choose signals, stop signals, and combined signals to no avail. The choose signal remains in danger and the entire station is being considered as one giant block that the train doesn't want to move in.
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 06, 2017, 11:48:15 AM
Hello - sorry that you are having problems. I am afraid that, for some reason, I can never see images posted to Imagur. Are you able to upload your screenshot elsewhere?
Title: Re: Discussion of new signalling system
Post by: Ves on January 06, 2017, 03:35:56 PM
It looks weird that it says "No route". Are you sure it can reach its next destination (all tracks connected, no oneway signs at the wrong places)?
Asuming the locomotive should reverse (and not continue to the right out from the picture) I think this is a more correct positioning of signals:

You need normal stop signals at the platform ends facing the trains leaving the station.
You need to place "one way" signs at the passing loops, facing the directions the train is NOT allowed to take. The line connecting to one of the passing loops, you could consider connecting it at the junction right before the station for more efficiency, however if you prefer not, take care that you put the "one way" sign between the line branch and the station to avoid strange behavior.

Hope this is of help! :)
Title: Re: Discussion of new signalling system
Post by: laos on January 07, 2017, 06:26:58 AM
Very strange! I must have done something wrong, as I started over, added the stop signals and one-way signs, and everything is peachy now :) - I thought I had (mostly) the right idea, but looks like it might have been the one way signs causing routing issues, as I might have at some point put them backwards and a stubborn one was still screwing with things.

Thank you both!

Ves that info is very helpful. For anyone else who ends up building a similar design, make sure one-way signs are also placed in the station to encourage trains to route through to the exit route and keep things flowing smoothly.
Title: Re: Discussion of new signalling system
Post by: Ves on January 07, 2017, 10:35:28 PM
I had been thinking of a principle thing about the speed restrictions of the signals for a while, not being able to wrap my head properly around my thoughts. However, I try to have a go at explaining:

The current speed-limit of a signal determines what speed the signal may be passed at. When a train approach the signal it will adjust the speed accordingly. That is everything as you would expect it to be.
When the train has passed the signal, the speed limit of the signal is also enforced to the entire route behind the signal up to another signal with a higher speed limit. This is where my head starts to warp:
Is the most logical thing that the route between the two signals are speed limited by the departed signal, the arriving signal, or whichever has the highest speed limit?

Rephrased: The speed limit is ultimately existing to simulate the safe speed that a signal might be passed at. But we assume that the traindriver has route knowledge, therefore knowing that the upcoming signal in our case has a much higher speed restriction. Therefore, he could drive faster immediately.

In the other direction (when upcomming signal has a lower speed restriction), I think the driver does the sensible thing and drive fast only to brake upon the arrival of the following (slower) signal.
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 07, 2017, 10:48:53 PM
The purpose of this was to simulate the fact that trains are not permitted to travel over 125mph (200km/h) without cab signalling because, at higher speeds, the drivers simply cannot see the signals. One might extrapolate from that that drivers cannot see older types of signals (i.e. those without modern very bright lamps) at faster than around 100mph (160km/h), and so forth. This restriction has had a substantial effect on the development of high speed rail in the UK, so it is worth simulating, I think.
Title: Re: Discussion of new signalling system
Post by: Ves on January 07, 2017, 11:18:16 PM
I'm sorry I didn't understand which you found worth simulating, the current behavior or my proposal?

I see the point with the cab signals though. However, we only see and place the signals, not all other equipment along the track. One could assume that there is equipment already behind the previous signal, preparing the vehicle? Only that the vehicle working method would not show "cab signal".

A bit more work could be to hardcode the cab signal and moving block working method to behave as they do currently.

A more flexible way could be to introduce a new variable in the dat file, "departure speed", which, if specified, would be a speed restriction behind the signal until the next (like the current behavior).
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 07, 2017, 11:30:28 PM
I was referring to the current system: the idea that the overall maximum speed is determined by the type of signalling is something that needs to be simulated. Are you aware of any real life examples in which the speed of passing the signal specifically (but not the speed of actually travelling along the line thereafter) is limited by something specific to the signal?
Title: Re: Discussion of new signalling system
Post by: Vladki on January 08, 2017, 04:40:06 PM
I'd like to add my few cents. A short excerpt from Czech rules:

Signal must be visible from distance of 100m (from standing train), or at least for 12 seconds from a train at full speed. It can be reduced to 7 seconds if there was a repeater signal before, special signs telling that the train is approaching a signal, or if cab signaling is used.

If cab signaling is NOT available (either permanently or temporarily), speed is limited to 120 km/h. The reason is not only the visibility, but also the distance between distant and main signal (or between signals in 3-aspect automatic track-circuit block). If signal at caution would be passed at higher speed, the train might not brake before the next signal. Therefore trains running faster, need cab-signaling and start braking as soon as caution is signaled on board.

The availability of cab signaling for next signal is obvious to the driver immediately (or very soon) after passing a signal. So I think in simutrans, train should adjust its speed according to the max_speed defined for the signal ahead. Not by the signal just passed as it is now.

There is also the case of dwarf signals, which also have somewhat worse visibility than normal signals on mast. These are forbidden to be built on the main track (straight through the station), which can be passed at full speed. Dwarf signals are allowed only in sidings where speed is reduced due to the speed limits of switches being passed in non-straight way - usually 40 or 50 km/h. Also the train can accelerate to full speed once it is out of the station (switches). So for these it would also be more reasonable to limit the speed of the train as it approaches and passes the signal, but no more when the train has passed the signal.
Title: Re: Discussion of new signalling system
Post by: Octavius on January 08, 2017, 07:42:47 PM
Quote from: jamespetts on January 07, 2017, 11:30:28 PM
Are you aware of any real life examples in which the speed of passing the signal specifically (but not the speed of actually travelling along the line thereafter) is limited by something specific to the signal?
Yes, in the Netherlands a green blinking signal (sometimes with a number) indicates a speed limit for passing that signal. After the train has passed the points directly behind the signal, it's allowed to accelerate to line speed. It's mostly used for diverging points.

In fact, along with yellow blinking (drive-by-sight/call-on) and red (don't drive at all), this is the only aspect that tells how fast you can pass the signal. All other signals can be passed at any speed and only tell the speed at which the next signal can be approached.

The question is to what extend this is relevant to simutrans.

Quote from: Vladki on January 08, 2017, 04:40:06 PM
The availability of cab signaling for next signal is obvious to the driver immediately (or very soon) after passing a signal. So I think in simutrans, train should adjust its speed according to the max_speed defined for the signal ahead. Not by the signal just passed as it is now.

The standard safety system here includes a crude form of cab signalling, without which trains aren't allowed to go faster than 40km/h. If a train has passed a signal at caution (yellow), this safety system can tell the driver when the next signal is no longer at danger (red). But even when that happens, he has to act as if he's still expecting a signal at danger until he can actually see the signal. It has something to do with not relying on a single system for changes that allow an increase in speed. The safety system may allow an increase in speed after passing a signal at danger, as it may then receive information meant for another train.
Title: Re: Discussion of new signalling system
Post by: Vladki on January 08, 2017, 07:54:13 PM
Quote from: Octavius on January 08, 2017, 07:42:47 PM
Yes, in the Netherlands a green blinking signal (sometimes with a number) indicates a speed limit for passing that signal. After the train has passed the points directly behind the signal, it's allowed to accelerate to line speed. It's mostly used for diverging points.
Yup, that is similar to Czech signaling. Just the color/blinking combinations are different, than in Netherlands. But the principle is the same.
Title: Re: Discussion of new signalling system
Post by: Ves on January 08, 2017, 10:02:31 PM
QuoteAre you aware of any real life examples in which the speed of passing the signal specifically (but not the speed of actually travelling along the line thereafter) is limited by something specific to the signal?
Not really. The speeds are mostly shown on signs along the route, with the exception of speed signalling (which we discussed in length earlier, but I would still find it interesting to implement ;) ) Octavius and Vladki says there are some real life examples in their countries though.

However, there is one aspect of that suggestion that would need resolvement: the time interval signal. Its potential speed restriction, I think should always be in effect and override any upcomming speed restrictions.
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 08, 2017, 10:28:22 PM
Octavius' example from the Netherlands refers, in effect, to junction signals. This is a system for communicating to the driver the speed at which the train may pass over a diverging junction involving a potentially sharp corner for the train. This is already simulated to an extent by the feature requiring trains to slow for corners. How the upcoming corner is communicated to the driver I do not think that we need to simulate.

One difficulty with defining the signal's speed by the type of the signal ahead is that there may not be a signal ahead (e.g. at a station, as the train does not check the line beyond the station). I should note, however, that, once a train comes within the sighting distance of the next signal, that signal's speed limit will apply from that point onwards (in the existing code), rather than the train having to wait until the signal has been passed.
Title: Re: Discussion of new signalling system
Post by: Ves on January 08, 2017, 10:41:46 PM
QuoteOne difficulty with defining the signal's speed by the type of the signal ahead is that there may not be a signal ahead (e.g. at a station, as the train does not check the line beyond the station). I should note, however, that, once a train comes within the sighting distance of the next signal, that signal's speed limit will apply from that point onwards (in the existing code), rather than the train having to wait until the signal has been passed.
If there is no signal in front of a station (ie, no choose signal) the max speed of the departed signal would be the most sensible thing I think. Likewise, also in those working methods that the train has to stop (token block, one train staff), whose max speed practically would be zero due to the train anyway needs to stop at the signal/post.
Title: Re: Discussion of new signalling system
Post by: Vladki on January 08, 2017, 11:17:12 PM
Quote from: jamespetts on January 08, 2017, 10:28:22 PM
Octavius' example from the Netherlands refers, in effect, to junction signals. This is a system for communicating to the driver the speed at which the train may pass over a diverging junction involving a potentially sharp corner for the train. This is already simulated to an extent by the feature requiring trains to slow for corners. How the upcoming corner is communicated to the driver I do not think that we need to simulate.
I agree with that. Trains slow down for sharp corners by themselves, and the "slow speed" aspects can be (and are) used on chose signals to show that alternate route is chosen.

Quote
One difficulty with defining the signal's speed by the type of the signal ahead is that there may not be a signal ahead (e.g. at a station, as the train does not check the line beyond the station). I should note, however, that, once a train comes within the sighting distance of the next signal, that signal's speed limit will apply from that point onwards (in the existing code), rather than the train having to wait until the signal has been passed.
In case there is no signal ahead, then the limit of last signal could apply. Anyway, the train will probably slow down soon to stop in the station. Applying the speed limit in sighting distance may be too late if the speed is to be reduced significantly.
Title: Re: Discussion of new signalling system
Post by: jamespetts on January 08, 2017, 11:20:53 PM
I should note that it would take a significant amount of work to change the behaviour to use the speed of the next signal ahead unless there is no signal ahead or unless the current signalling method is time interval. I must say that I am doubtful that it is likely to be worthwhile to do that in the short term at least given the other things competing for my time.
Title: Re: Discussion of new signalling system
Post by: Ves on March 07, 2017, 12:03:01 AM
I know I might be buggying with this question which has been discussed before so please forgive me!
I can not help as I can see many possibilities with this feature, and I never felt that the previous discussion where absolute conclusive.

Is there, in any way, a possibility that you would consider adding a two block signal?

Let me back up my question with why I think it is an important feature of signalling. I wrote the long post a page or two ago, which held some arguments, but this should outcome shorter!
The two block signal would be redundant on simple signal layouts, as the existing signals would cover that perfectly fine. It is in more complex layouts and where you start to mix different working methods when directional reservations would not suffice, and the two block signal would come in really handy.
As an answer to the fact that you can build your way around it, I admit that nothing, including the scenarios below, is impossible in the existing state of signalling. It just demands more trackwork, which in turn means that more land is occupied, more track is bought and potentially more signals are used, ie more 'clumpsy' and it takes more time to build (adding second track lead, setting up one way signs etc).
Regarding how a player intuitively would build a signal layout, I think that higly depends on what tools the player is offered. If there is no such signal, the player would probably just build as you suggest (every token block stretch has a doubble tracked lead), but if the player is presented a way to avoid doing that, I think the feature would be used.

Uses of a two block signal:
* If a station serves different lines with different working methods, or even two or more token block lines.
Imagine a big goods hub with lots of industries around. Only one single track is needed to each industry, but each one would require the doubble track lead the length of a train out from the hub which might doubble the size of the station. With some smart track work you could combine some of the returning leads or make some platforms specific to certain lines, but it might easily become messy. Alternatively, you could just use absolute block directly from the station (asuming there are no intermediate stations on the single tracked lines), but that would require another signal in the other end, potentially including a signalbox. If you just put one train staffs directly on the platform ends, you might be blocking tracks for other trains and if you put it on the single track line with no doubble track leads, the track is not secured properly and deadlocks may occur if you operate more than one engine.
Also, one train staff is in fact the most intuitive to use in this situation, since this is exactly what one train staffs exists for: Signalling dead ends.

* When creating signal gates with multiple branches and line crossings, you sometimes dont want trains from a certain direction to hold at a specific stop signal, blocking other traffic either because it is lesser important or it creates hinder for other trains. This one is difficult to explain, as the need would be very subjective to the actual situation. There might be a number of reasons for such a situation to arize, be it many entrances close to a station, or signals in general in tight space.

* If station signal is "two block signal", pakset author can balance in signal speed. The station signal only allowing slow speed for safety reasons and the (expensive) exit signal allows for higher speed. This is a pakset decission, I admit, and could be completely omitted with no other impact than it being less realistic for swedish purposes. But if two block signals become a reality, I will do this with them.

* When going single track to a termini (with token block and no doubble track leads) you dont want more trains than there are tracks available at the termini to be sent. Therefore, a two block station signal and a two block exit signal (token block) from the previous station and then the choose signal in front of the termini would create the desired effect (this example would require that two block signals are 'stackable', ie two "two block signals" in a row would effectively make the first one a "three block signal"). Admitted, if you make the doubble track lead at the termini it would at least add a buffer (but not fail proof, since the train waiting at the lead would have to pass a signal in order to resolve the reservation behind it, allowing a train onto the line, even so if it is in the wrong direction). If the line has no intermediate stations, you can use choose signals directly on the previous station, thus completely eliminate the problem, but in this case, token block is needed.
Again, forcing the player to make the doubble track lead (in the token block case), creates some less slim designs.
Also, this could be resolved by the player creating proper schedules, however misstakes and misshaps happen and it is easy that something goes wrong. Even with this possibility, player would have to administrate proper schedules!

* Some bonus side effect would be that instead of waiting at the token block signal on the double track lead, the train can be held at the station platform for a longer period of time, allowing for longer boarding. That might even be more time efficient since the train dont have to stop twice (one time at the station, one time at the token block signal).


I think I already described it, but I imagine a setting in the dat file is_two_block_signal=1 or something similar, which would allow the paksetauthor to use it on any type of signal.
The two block "search" for next signal would stop at next signal or end of choose sign, alternatively another special sign.

What do you think?
Title: Re: Discussion of new signalling system
Post by: jamespetts on March 07, 2017, 10:59:59 PM
One thing that I was thinking of doing at some point was adding, not a double blocking signal, but to have double blocking as an option in trains' schedules (which would suit faster trains travelling on lines with closely spaced signals, for example; this was actually done for the Blue Pullman to allow it to travel at its maximum speed on the Midland Region in the 1960s). This would potentially give more flexibility.

The difficulty with this and various other ideas is that they are all competing with a very large list of very high priority things for my time. I am increasingly of the view that one of the highest priorities at present, beyond fixing critical bugs, is completing the translation of the code from German to English (by incorporating patches from Standard which do this), as there has been enormous number of people who express an interest in working on the code but never actually do any work on the code in the last year or so, at least two of whom have expressly cited the German in the code as a problem (and others have simply become silent and do not respond to requests).

Even one or two people semi-regularly contributing to the code would make an enormous difference in how much can be achieved in any given time.
Title: Re: Discussion of new signalling system
Post by: Ves on March 08, 2017, 04:50:25 PM
Interesting with the Pullman that always reserved two blocks ahead! How did the signalmen actually know that two blocks where free?
And how would you incorporate it in the game, because I could see it being quite problematic if the train always reserve two blocks ahead around stations for instance.

I would love contributing code to the game, my only limitation is my programming skill (and time, abviously, but mostly the skills!). I tried for fun to start on a patch to create two block signals this morning, and looked in roadsign_besch.h to see if I could create something there. Where do you specify the signaling logic?
Title: Re: Discussion of new signalling system
Post by: jamespetts on March 08, 2017, 10:57:19 PM
I think that the signalman would just telegraph to the next section a code asking it to be cleared, and, if it could not be cleared, would set his own section's distant to caution.

As to how it would work in the game, the plan is for there to be an option in each schedule entry for double blocking, so that the train would use double blocking when that schedule entry is the next destination.

If you would like to work on the code yourself, that would be splendid, although the signalling code is somewhat challenging to work on because of its complexity. The main logic can be found in the block_reserver method in simvehicle.cc, although there is also some of the logic in rail_vehicle::can_enter_tile(). Specifying a new type of signal will need to be done in roadsign_desc_t, but you would also need to modify roadsign_reader.cc and roadsign_writer.cc to read and write the new data.
Title: Re: Discussion of new signalling system
Post by: Ves on March 08, 2017, 11:33:21 PM
Interesting with the Pullman method. And why would it need double block? Did it have a relative long braking distance or was it very fast?
But still, will it not be to great assumptions on behalf of double block/single block reservations if, say, the Pullman exits at the same route as ordinary scheduled trains does, but due to the pullmans need for two blocks to be free, the other trains having a higher block resolution (only need one empty block) could keep the 'second' block occupied, blocking the pullman?

I will mess around with the files and see if I can end up with something useful!
Title: Re: Discussion of new signalling system
Post by: jamespetts on March 08, 2017, 11:44:49 PM
The reason that the Blue Pullman on the Midland Region was double blocked was that it was faster than the other trains using the line at the time, and it would not have been able to stop in time from a distant signal to the home signal. (The line was later re-signalled with four aspect colour light signals so that much faster (200km/h) trains were able to use it without any special arrangements).

I do not entirely understand the question about blocking the Pullman, however; can you elaborate?
Title: Re: Discussion of new signalling system
Post by: Ves on March 09, 2017, 12:04:22 AM
Ah ok I see the reason to use double block for it!
I might have misunderstood, will the Simutrans double block setting only reserve two blocks when it cannot stop within one block?
If it will indeed reserve two blocks (no matter the speed) then the effect could become that it gets lower "priority" out of a station than single block reserving trains.
Title: Re: Discussion of new signalling system
Post by: jamespetts on March 09, 2017, 01:18:56 AM
I have to say, I had not thought in detail precisely how it would operate.
Title: Re: Discussion of new signalling system
Post by: Vladki on March 25, 2017, 05:04:07 PM
I think that double block in james' and ves' ideas are something totally different.

What James shows as an example for blue pullman, is just an early attempt to transition from 2-aspect signalling to 3-4 aspect signalling. With the first distant signal meaning "preliminary caution" although it was not distinguishable from normal caution.

What Ves attempts to do is a special signal used in the following scenario: on czech/austrian/german and probably also swedish railways in earlier times, with absolute block signaling (or its bidirectional equivalent), stations had only one start (departure) signal for each direction (or branching line). This signal was usually standing beyond of all switches, in place where all the tracks were already joined together. Trains were supposed to stop before the switches. The start signal showed clear only if the appropriate line is clear, but did not show from which track was the departure path set up.

So the signalman had to personally show which train is allowed to leave. Later a special (cheaper) signal was designed for it. It was pulled off to allow shunting (start signal at danger) or departure (start signal clear). Later color light version had different aspects for shunting and departure: https://cs.wikipedia.org/wiki/Vlo%C5%BEen%C3%A9_n%C3%A1v%C4%9Bstidlo_a_uz%C3%A1v%C4%9Bra_koleje The departure signal - whether mechanical, color light or hand signal, could not be given if the main start signal was at danger. Thus they make two block signal of sort.

Later the signaling logic was combined in one and each station track got its own start signal, in similar way as it can be used in simutrans now. However, I think this method of signaling could be useful in the game for stations, where lines with different signaling methods meet. You could put the new double signals at all tracks, and standard signals at the lines beyond the switches. One line could be token signaling, another track circuit, and so on. There would be no need for passing loop outside of station as show in some previous examples.

I think this could be partly achieved by extending the current behavior of signals at the end of platform to distant signals. Now if there is a signal exactly at the end of platform, the train is waiting for clearance on its stopping place, continues to load - it does not move to the end of platform until the signal clears. Would it be a big change to make this apply also to distant signals at end of platform? A train that has stopped in the station would wait for clearance on the platform, until the start signal further ahead clears. I know that this would not work for train that is driving through the station, but it would be nice as a partial workaround.


Title: Re: Discussion of new signalling system
Post by: Ves on March 25, 2017, 10:35:37 PM
Vladki, I think you are right in your description about the difference off James and my version and also in the way the two block signal would be useful.

I have not yet started, only looked in the code at the places James mentioned and tried to get an overview!
Title: Re: Discussion of new signalling system
Post by: Vladki on March 26, 2017, 11:25:13 AM
I have found a very nice information about signalling at ffestiniog railway:
https://www.festipedia.org.uk/wiki/Signals_Contents (more links)
https://www.festipedia.org.uk/wiki/Category:1872_Rule_Book

It seems that they used the same signals as sweden in early times - T signal and disc (plate) signal. They were used in combination with staff & ticket, and later with ETS (electric train staff - i.e. token_block in simutrans). Staff & ticket is in essence a sort of time-interval working on one track lines - tickets are given in time intervals, staff governs the direction. So the t-signals should be used with time-interval-with-telegraoph (as an aproximation of staff& ticket), as well as token-block (ETS).

They do not use the term T-singal, but this is what applies: https://www.festipedia.org.uk/wiki/FR_Signals
QuoteEach intermediate staff stage station had a centrally located, double-armed, semaphore signal that served as a 'block' Signal. The semaphores acted as a combined Stop and Starter signal, although they did not denote the actual stopping position, they denoted 'Stop and Wait for Train Staff or Train Staff Ticket'; this also applied to the pair of double arm semaphores at Old Dinas Junction at Glan y Pwll. The two arms served up or down trains according to the side of the post.
So I think the T-signal was really used only to signal departure (starter signal). The Ffestiniog railway is a narrow gauge railway - very twisty, deep in forests. In some stations it might be impossible to see the central T-signal from the farthest points, let alone some safe braking distance ahead. (see https://www.festipedia.org.uk/wiki/Tan_y_Bwlch) For protection of stations, level crossings, tunnels, etc, the disc/plate signal was used. It could be operated remotely (mechanical wire), so it could be put in greater distance from the station building, see https://www.festipedia.org.uk/wiki/Disc_Signals

Also, what I descibed in previous post - a single start signal for the whole line placed ahead of all points - is the case not only for CS/SWE, but also for FR. See the photo at https://www.festipedia.org.uk/wiki/Signals_controlling_section_entry. There is a normal semaphore at the exit path form station. It was apparently interlocked with ETS - it could be pulled off only if the matching token was put in a drawer slot, and later handed over to the driver of train that was about to depart.

In both arrangements (T-signal, or start signals at both ends), the trains obviously had to stop before Fouling point, in order to keep the switches (and movements on other tracks) clear.

The arrangement with double-block signal, would also solve the problem when a train in token/one-staff mode keeps the reservation backwards up to the signal. If the signal is at each track, the junction is kept blocked, which is a problem if there are multiple lines joining. It would also help with time interval signals where trains are not allowed to go full speed over junctions. Start signal beyond junction would solve that.

A possible (but still partial) coding solution might be what I suggested before - that trains wait for clearance on the platform even if there is a distant signal at platform end, or that they wait for clearance at nearest signal ahead of platform. Even if it is further out than sighting distance, or beyond some switches. However neither of these would work for trains that are not scheduled to stop in the station. That would need the double block signal or T-signal.
Title: Re: Discussion of new signalling system
Post by: jamespetts on April 02, 2017, 11:40:32 PM
Thank you for that - I visited the Ffestiniog Railway back in 2012: a fascinating line, the oldest working railway in the world still run by the company that built it. When I went, I got to ride in some of the earliest bogie carriages ever built in the UK, built in around the mid 1870s when most standard gauge railways in the UK were still building four or six wheel rigid carriages.

In any event, on the subject of signalling, I spent some time yesterday fixing signalling bugs, and one of the things that I did in that respect involved more strictly separating the function of the station signal so that it now indeed does only clear for departing, not arriving, trains as you describe. This makes more sense than a station signal that is clear for either, which could be very ambiguous.

I will have to give some consideration to the suggested double block concept - but I should note that the original concept is more robust than the idea of using distant signals for this purpose, which is likely to cause problems and confusion.
Title: Re: Discussion of new signalling system
Post by: Ves on April 02, 2017, 11:54:38 PM
QuoteIn any event, on the subject of signalling, I spent some time yesterday fixing signalling bugs, and one of the things that I did in that respect involved more strictly separating the function of the station signal so that it now indeed does only clear for departing, not arriving, trains as you describe. This makes more sense than a station signal that is clear for either, which could be very ambiguous.
Nooooo!!!  ::-\
The T-signals where indeed used as entry signals in Sweden, and would be set to clear when a train entered the station, as well as departed from the station.
Suggestions for a new parameter: stationsignal_clear_on_entry=1?
Title: Re: Discussion of new signalling system
Post by: jamespetts on April 03, 2017, 12:41:31 AM
The change came about through a need to modify the signalling logic to fix a bug - however, I have added additional logic to revert to the older behaviour as far as the display of the signal is concerned (the change to the logic fixing the bug hopefully being retained), save that trains scheduled to stop at a station should get a caution indication from the station signal rather than a clear indication.
Title: Re: Discussion of new signalling system
Post by: Vladki on April 03, 2017, 06:52:48 AM
Ves, do you have some references stating that the T-signal was used for both arrival and departure?

The parctice at Ffestiniog was that arrival (entry, home signal) was signaled by plate (disc) signal. Which has its equivalent in Sweden too.

Another logical option would be to have two T-signals. One at each end of the station, one arm for entry, and the other for departure. One of the Swedish picture of T-signal looks like that.

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: Discussion of new signalling system
Post by: Ves on April 03, 2017, 09:27:53 AM
From the ekeving website http://www.ekeving.se/hi/sj-regl-1858.html (http://www.ekeving.se/hi/sj-regl-1858.html):

About the stop message from the 1877 "tjänstereglemente"

QuoteVinge till vänster om masten gällde.

Tåg skulle stanna vid antingen:
minst 100 meter utanför stationens yttersta växel om signalen var placerad innanför denna växel
minst 100 meter före signalen om signalen var placerad på annan plats
EN:
Wing to the left of the mast is considered.

Train must stop either:
100 meter outside the stations furthest point if the signal is placed inside that point
100 meter in front of the signal if the signal was placed at another location

--

Other places it is stated that a signal may under no circumstances pass a signal at danger. Entering a station with a T-semaphore at danger, I cannot interpret differently than it must be set to clear in order to allow trains to enter.
Title: Re: Discussion of new signalling system
Post by: Vladki on April 03, 2017, 05:27:29 PM
But then there is nothing about signaling departure, as well as placing the T-signal in the centre of station.

I have seen a picture of austro-hungarian T-signal used as bidirectional block signal (no switches around).

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: Discussion of new signalling system
Post by: Ves on April 03, 2017, 07:59:45 PM
On this site: http://www.ekeving.se/si/mek/T-sem/T-sem.html (http://www.ekeving.se/si/mek/T-sem/T-sem.html) and
http://www.jvmv2.se/forum/index.php?mode=thread&id=153610 (http://www.jvmv2.se/forum/index.php?mode=thread&id=153610)
There is alot of pictures of the T-semaphores.
The topmost text of the ekeving link says this:
QuoteEn vanlig signaltyp i Sverige var T-semaforerna. Namnet kommer av att signalen såg ut som bokstaven T när den visade stopp i båda riktningar. Dessa signaler var lokalställda, och manövrerades med vevar eller - undantagsvis - hävstänger på signalmasten.  Vanligen satt T-semaforen mittför stationshuset.
EN: A normal signal type in Sweden was the T-semaphores. The name heritages because it looks like the letter T when it shows stop in both directions. Those signals where localy set and where manouvered with handles or - exceptionally - levers on the signal mast. Usually the T-semaphores where located directly in front of the station house.

---

On the links with the pictures, there are alot of pictures with the T-sem in front of the station houses. I have searched for maps featuring the T-semaphore on the Ekeving site, but there are almost no maps before 1900 making it more difficult to get an overview of a 1870 railway station.

---------------

On the subject of departure, I must admit that I appear to have been wrong. I thought that the T-semaphore would be set to clear when a train departs from the station, but my latest source of information (which is this rather resent forum discussion: http://www.jvmv2.se/forum/index.php?mode=thread&id=153610 (http://www.jvmv2.se/forum/index.php?mode=thread&id=153610)) consist of a bunch of people, sharing stories and experiences about old signalling. I must say that I find it very hard to find solid evidence of the subject. The rule books are not really talking about which kind of message is given when, but only what they mean to you as a driver.
The forum thread linked tells that the T-semaphore was solely used as entry signal, and departure signal where exclusively given by the hand. Im sorry if this causes any confusion

Thank you Vladki for sorting this out!


I realize the the Simutrans T-signal cannot work like that, both due to its workload of programming and due to its specialisation (features that only could be used on the swedish pak currently). I would be happy if the signal behavior stay as it is at present (Clear both on arrival and on departure), but would be sad if it shows danger on arrival.
One thing that maybe more kinds of paksets could benefit from, however, is if it could show different aspects for arrival and departure. That means the graphic couldl be different depending on if the train is arriving or departing (clear_arrvival and clear_departure).
Title: Re: Discussion of new signalling system
Post by: Vladki on April 03, 2017, 10:42:31 PM
Ok, you have beaten me with evidence. I used google translate on http://www.ekeving.se/hi/sj-regl-1858.html a few points that I had missed before:
1858 - T signal is clearly a time interval signal, with caution displayed 5 minutes after a train has passed. Nothing about points, so it may have been used as start signal in time interval method. Disc signal was described only in text.
1877 - T signal shows only danger and caution, stop 100m before the signal or points. Signal all well (clear) was replaced with hand given flag signals. This may be the split when T-signal became solely home signal, and start signal was given by hand.
1888 - First stellverk (signalbox) - operating points and disc signals
1890 - two arm semaphore exists, but rules updated in 1905, 3-wing 1907
And here it goes: Semaphores occurred mainly as entrance signals. When they were not designed as T-semaphores they were placed about 50 meters outside the outer gear.
Utfartssemafor (departure / start signal) was used mainly on branch stations, where multiple arms indicated which branch is clear (similar to early czechoslovak start signals).
Start signals were used also in the few lines with block systems, moving bridges and remote sidings. Last t-signal was abolished at siding in Skahus in 1980
1905 - T-signals still in rules, but also one-sided signals and two-armed one-sided signals, lower quadrant
Already in 1906 it was decided that the movement authority would appear with wings upward instead, this was carried out in 1915 by SJ.
Since the Royal. Railway Board, as December 1, 1906 established new signal sequence (upper quadrant) to effect from October 1, 1907
Disc signals disappeared from SJ in 1923. From 1915 onwards introduced försignaler more generally, and the entrance gate signals shifted to about 200 meters outside the outer gear.


It seems that we have several distinct working methods for T-signals.
Title: Re: Discussion of new signalling system
Post by: jamespetts on April 04, 2017, 09:45:36 AM
Signalling is a complex subject indeed! I do not think that we can sensibly simulate all of these various permutations in detail; hopefully, whet we have is a close enough approximation of the station signal to suffice for present purposes; after all, if it is very difficult to research the historical position for a particular place and time, few people are likely to notice if it is slightly inaccurate.
Title: Re: Discussion of new signalling system
Post by: jamespetts on April 25, 2017, 12:27:21 AM
I have added a basic implementation of the requested double block signal: documentation for this is available in the latest Github commit. I have only tested this very briefly, as I do not intend to use it with the British pakset, but please let me know if it does not work correctly. I should be very grateful if somebody could update the .dat file reference.
Title: Re: Discussion of new signalling system
Post by: Ves on April 25, 2017, 03:56:15 AM
Aaaaahhhh!!!! ?  :o aaaarrghhaaaa!!!!!!! ;D
That is fantastic James! Thank you so much!
I can't wait til I get back home and try the signal out!!
Title: Re: Discussion of new signalling system
Post by: Vladki on April 25, 2017, 06:21:37 AM
Wooooow, looking forward to that.

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: Discussion of new signalling system
Post by: Ves on April 25, 2017, 03:53:04 PM
Ok, so I have made some initial tests and it is looking promising!
First of all, I have added some texts to the info window of the signal to easier recognize a double block signal (and to check so one have coded and packed the signal pakfiles correctly!). It says "double block signal", and below there is a text, in similar fasion to signals that creates directional reservations: "This signal will not clear until next signal is clear". Hopefully, this would help people understand what this signal do. https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2 (https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/signal-in-infowindow-2)

Secondly, I have compiled some double block signals to test the new feature, but since I dont know yet which kinds of double block signals there should be in Pak.sweden I dont want to upload them to github. I will upload a special pakset and some savegames so you also can debug and follow the bugreports, but this should happen in separate bugthreads :)

And for the third: This is so EXCITING  ;D
Title: Re: Discussion of new signalling system
Post by: Vladki on May 25, 2017, 06:26:05 PM
Hi, I have played a bit with the double block signals, but they do not seem to play well if they are of different working method than the next signal. Is that intentional?
I thought that they would be "agnostic" like distant signals are. If not, then the main advantage of double block signals would be lost, as I planned to use them on junction stations, where lines with different signalling methods meet. E.g. main line with absolute block, and branch line with token block.
Title: Re: Discussion of new signalling system
Post by: jamespetts on May 25, 2017, 06:35:47 PM
May I ask that you post a separate bug report if the double block signals are not working correctly? I am in the process of trying to narrow down the desync issue at present, so will not have time to consider this for a while, but it would be helpful to have the full report.

I cannot remember now precisely the intention with double block signals, but I expect that the logic is very complex indeed to get right when mixing types. It would be helpful if you could show how the problem can be recreated in the most important use case scenarios.
Title: Re: Discussion of new signalling system
Post by: Vladki on June 29, 2017, 09:07:51 PM
I have finally visited Museum of railway signalling in Hradec Kralove (CZ). There was a lot of info about 20th century signalling - different implementations of absolute and track circuit block, cab signalling, station safety (interlocking between points and signals), crossing safety, real examples of all types of signals used in czechoslovakia. But unfortunately there was only very little about older systems - time interval, basket signals. Even the guy in the museum did not know much, so I did not learn much of new stuff. At least they confirmed that train staffs were in use - as they had one on display. Probably used on branch lines in staff+ticket mode. Absolutely no mention about electric token machines, they seem to be special for GB.

But from what I have seen there, and read before, the evolution was probably like this. All railroads were first built single tracked. Second track was added only after few decades when the line proved to be busy or important enough to justify the expense. The earliest (horse-drawn) railroads had no signalling at all, trains were running in drive by sight, and waited at passing loops according to timetable.

Next improvement was time-interval with optical telegraph. This required quite many signalboxes along the track, so that every signalman could see the signal of the next signalbox. The signals (korbsignal) were kind of mixed, as they could convey information not only from one signalman to another, but also from signalman to train driver. With the advent of absolute block, the busiest line (KFNB) was converted to "unplugged" absolute block. As the train passed a signalbox, signalman turned his signal to danger. The signalman in rear could see the signal ahead and changed his signal to caution. The signalman further in rear then put his signal to clear.

As the electrical engineering evolved, various electric communication methods were employed (bell codes, telegraphs, telephones, absolute block devices) to enable signalboxes to communicate on longer distance, and armed semaphores began to be used. So a time interval with telegraph was used. Line signals were often T-signals, where arm in upper quad meant clear, lower quad caution, horizontal danger, and vertically down danger as well - train was expected from opposite direction.

Absolute block was a little bit more complex than in GB, as it was used also on single tracked lines. So it had extra provisions to agree on direction of travel. However not all places were equipped with electromechanical devices. Many places relied only on telegraphic or telephonic confirmation that the train has arrived and that the track is clear.

Crossings are generally not interlocked with signals. Some tracks are equipped with special crossing distant signals, that show if the crossing is closed or not (i.e. broken). Contrary to swedish practice, in CZ/SK there is only the distant signal. Crossings are interlocked with main signals only in the proximity of stations, where trains can stop for long time (or even reverse) close to the crossing. Then the crossing is protected by start/home signals, and signals can be cleared only if the crossing is closed. On lines with automatic circuit block, if a failure on crossing is detected it can turn the nearest signals to danger.

So a question is - just theoretically - for the early optical telegraph, would there be a chance to enforce maximum distance between signalboxes?
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 29, 2017, 09:15:33 PM
An interesting piece of research!

As to enforcing a maximum distance between signalboxes - at present, I am prioritising balancing, which is likely to be a substantial project, so further changes to signalling are likely to have to wait. There are also real conceptual complexities about this, especially in deciding what counts as the next and previous signalbox; do we test this when placing signalboxes (in which case, how do we know that we are checking for a signalbox controlling signals on the same line?) or when the trains try to use them (in which case players will be confounded when an arrangement that a player is allowed to build with no warnings refuses to work)?
Title: Re: Discussion of new signalling system
Post by: Vladki on June 29, 2017, 10:17:11 PM
I know your priority is balancing. That's just OK. I'm just checking the theoretical chances
I thought it would not be easy... Signalboxes at the moment are quite dumb anyway. I think they would deserve a redesign in general.
1. signalling method is IMHO more a feature of signalbox, then of the signal. You can use the same semaphore for time interval and absolute block, or the same color light signal for absolute block, track circuit and cab signalling. You can even quite easily connect modern light signals to old mechanical signalbox, with just a few modifications. What makes the difference is the communication equipment that allows signalboxes to communicate with each other. There are many implementations of absolute block (telegraph, telephone, electromechanical, relay), which differ in the equipment of signalbox, and the ability to communicate with each other. Of course you can change the equipment and keep the building...
2. older methods - before track circuit, require the signalman to have a good view on the track. So putting the signalbox further away from track is non-sense. Extreme case could be seen in the bridgewter-brunel game  with a long tunnel and signalboxes on top of the hill.
3. signalboxes were often part of the station building. One room for signalman, another for passengers,...
4. signalboxes were hierarchical. Main signalbox was in the station, where communication with other stations took place. Station master then decided which train departs/arrives from/to which track. But the mechanical operation required a subordinate signalboxes at both ends of station to operate points and signals.

Partial solution would be to make the signalbox just an option of station buildings and stops. A big signalbox would then be a station extension, which would force it to be near the tracks. A small signalbox could be coded as a "platform", so it will not occupy extra tile. Thus the connection with line would be clear.

Distance could be checked when the signalbox is built. If there would be no other signalbox in range, a warning would be displayed. Of course it would have to be ignored for the first signalbox on the line.
Title: Re: Discussion of new signalling system
Post by: jamespetts on June 29, 2017, 10:36:52 PM
All of this would require really a very large amount of additional complexity. As to the distance question, how do we know that another signalbox within range is on the same line and therefore to be taken into account? That is the real conceptual problem with determining range when signalboxes are being built.