PBS

From #openttdcoop wiki

Revision as of 09:51, 17 December 2013 by Benny (Talk | contribs) (Marked for deletion)

Jump to: navigation, search


Description

PBS stand for Path Based Signaling, which is a different way of signaling trains when they can enter a certain track segment. Although primarily intended in OpenTDD (and in the real world) to provide bi-directional track, without the deadlocks that will occur with regular signaling. Besides that it can also be used to increase performance in certain situations.

At the time of writing, a new implementation of PBS has made its way into the development branch of OpenTTD and might thus be encountered on the #OpenTTDCoop server. The implementation, named YAPP, adds two additional signals. Because PBS takes some getting used to we've collected some examples and hints to work with.

How it works

For an explanation on the basics of YAPP and some examples, please check the YAPP page on the OpenTTD site.

In short: PBS introduces a new type of signal, which comes in two flavors. The first type is a regular (or: two-way) PBS signal, the second a one-way PBS signal. When a train encounters a PBS signal it will attempt to reserve a path. This means that it will look ahead at the path it wants to go and determines whether there are any obstacles in the way, such as another train. It will only look as far as the next signal it encounters (any signal, no specific type). When a reservation can be made, the train will go past the signal along the reserved path, otherwise it'll wait until it can do so.

The advantage of PBS is that it allows multiple trains to enter a PBS guarded area, as long as their reserved paths do not cross each other. While a regular signal would stop the second train until the entire section of track is clear, using PBS signaling trains can overcome this limitation. An example can be shown below. Here, both trains will attempt to enter the crossing, both trains go straight ahead on their path. When the first train encounters PBS signal A, it will reserve a path up to signal C. Since there are no obstacles, the reservation is allowed and the train passes. Moments later, the second train encounters signal B and attempts to reserve a path to signal D. Since train 1 is not in the way, the reservation will be made as well and train 2 will continue as well. At that time, both trains are in the same PBS signaled section. If regular signals would be used in this case, one train would always have to wait.

Pbs demo1 2trains.png Pbs demo2 2trains.png

As said, there are two types of the PBS signal (regular and one-way). The regular signal is basically two way, but passing the signal from the back comes with a penalty in the pathfinder which will thus attempt to avoid it. This signal can be useful for situations where you want to allow trains to pass the signal from the back, but only when there's no other way. Applications include two way stations and two-way track, all of which can be found in the OpenTTD wiki. The one-way signal does not allow trains from the back is is used in situations where it's combined with regular one-way track, such as the examples below. It could be said that one should avoid regular PBS in one-way track, because trains that reverse might collide with the train behind them.

Examples from #OpenTTDCoop games

Terminus station

This is a normal terminus station, except that PBS is used to allow more than one train to be in the signaling block in front of the station. The entry has a one-way PBS signal, each station track has a normal PBS signal facing the station. The exit has a regular one-way exit signal. The advantage of the station shown in the screenshot is that it allows a train to leave the station while another train enter it. This could improve throughput, depending on how large your station is. Please note that the exit signal has a gap, to avoid that a train waiting in front of that signal will block the track.

Below is and example of PBS signaling used at a terminus station. As you can see, one train leaves the station taking the left most track to the exit. At the same time a train is entering the station on the middle track. The is actually only 1 PBS signal, directly in front of the station one could place more PBS signals but these are not really needed. Also, in the example below there's a single tile track section in front of the station. Although not really needed, it provides trains with some breaking space so the train will spend less time on the switches. This may sometimes clear a path for the next train sooner, increasing performance.

Pbs terminus.jpg

PBS bridges

The bridges shown here have only one signal placed in front of them, with regular signals after them. As you can see from the screenshot, there is very little track in front of the bridge, because there are no signals needed in front of the bridge.


Second train is using the second bridge, with only a single signal.

PBS depot

This depot setup slightly improves the amount of trains that can be serviced. It basically allows for two trains to be on the same tile, for example to have one train exit the depot while the other enters it.

PBS depot. Notice that one train enters the depot while the other leaves, sharing the same tile.

Avoid PBS after junctions

You have read about 'do not place signals after junctions'. This means that after a PBS signaled junction the exit pad should have its signals placed a little while after the junction, to avoid a train blocking the junction. The reason for this can be observed below. Again, two trains are approaching the same block. Train one goes from A to C, train two from B to D. Because train one is first, it'll enter the junction, choose its path and will have to wait for train number 3, which is currently waiting for something. In this situation, train two is blocked bij train one and has to wait.

todo: image

If we place the signal at C further down the line, train one will not be able to reserve a clear path when it reaches the junction and has to stop at signal A. Train two will reach the junction and is now able to go to D without a problem. Train one and three are still waiting, but train two can move on.

todo: image

As you can see, it's good to leave a signal gap in this situation as it will increase performance. The same gap can be observed in the terminus station example shown above, where it is equal to the size of the train length.

Note however that it may sometimes be better not to leave a signal gap, depending on the traffic and the direction it is going to. When there's a lot of traffic in the example above and there is very little traffic that has to switch lanes, a signal gap might negatively affect performance since trains have to wait for the gap to be clear.

Hints for using PBS

  • Enable 'Show reserved tracks' in the OpenTTD patches to show ingame which tracks are being taken by trains entering sections. In the screenshots above you can see this, the track is a little darker.
  • Avoid PBS after junctions, as shown above.
  • Build one-way PBS signals if possible. #OpenTTDCoop games will rarely need the use of two-way PBS.

See also

Powered by MediaWiki