Difference between revisions of "PBS"
From #openttdcoop wiki
Brainstorm (Talk | contribs) |
|||
(16 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | See also http://wiki.openttd.org/PBS | ||
+ | |||
==Description== | ==Description== | ||
− | |||
− | + | PBS stands for Path Based Signaling, which is a signal type that allows multiple trains to enter one signal block. Although primarily intended in OpenTTD (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. | |
==How it works== | ==How it works== | ||
− | For an explanation on the basics of YAPP and some examples, please check [http://wiki.openttd.org | + | For an explanation on the basics of YAPP and some examples, please check [http://wiki.openttd.org/Yet_Another_PBS_Patch 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. | ||
+ | |||
+ | [[Image:pbs_demo1_2trains.png]] [[Image: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== | ==Examples from #OpenTTDCoop games== | ||
===Terminus station=== | ===Terminus station=== | ||
− | This is a normal [http://wiki.openttd.org | + | This is a normal [http://wiki.openttd.org/Railway_station#Terminus 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. | |
+ | |||
+ | [[Image:Pbs_terminus.jpg]] | ||
===PBS bridges=== | ===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 | + | 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. |
− | [[Image:Pbs_bridge.jpg | + | [[Image:Pbs_bridge.jpg]] |
===PBS depot=== | ===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. | 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. | ||
− | [[Image:Pbs_depot.jpg | + | [[Image:Pbs_depot.jpg|PBS depot. Notice that one train enters the depot while the other leaves, sharing the same tile.]] |
===Hints for using PBS=== | ===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. | * 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. | ||
− | * | + | * Build one-way PBS signals if possible. #OpenTTDCoop games will rarely need the use of two-way PBS, except for penalties |
+ | |||
+ | === See also === | ||
+ | |||
+ | * [[Signals]] | ||
+ | * [[Presignals]] | ||
+ | |||
+ | |||
+ | [[Category:Guides]] | ||
+ | [[Category:Basic networking]] |
Latest revision as of 02:36, 22 January 2024
See also http://wiki.openttd.org/PBS
Contents
Description
PBS stands for Path Based Signaling, which is a signal type that allows multiple trains to enter one signal block. Although primarily intended in OpenTTD (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.
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.
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 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.
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.
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.
- Build one-way PBS signals if possible. #OpenTTDCoop games will rarely need the use of two-way PBS, except for penalties