YAPP - Yet Another PBS Patch (now in trunk!)
Moderator: OpenTTD Developers
Re: YAPP - Yet Another PBS Patch
If i know my PBS so far I think you want signals at the end of each platform. That should help.
Re: YAPP - Yet Another PBS Patch
@Noldo: Train #4 attempts to go to a depot but fails. After having failed, it doesn't reserve the next piece of track properly, which causes the next train to crash into it. Therefore, this is obviously a bug in the automatic depot servicing code.
@cal: I was unable to reproduce this problem with the savegame you provided.
@cal: I was unable to reproduce this problem with the savegame you provided.
Re: YAPP - Yet Another PBS Patch
@T-Unit: Well, there *are* exit signals.
Re: YAPP - Yet Another PBS Patch
Hmm... I can reproduce it, as you can see in the following screenshot: EDIT: thanks for the quick reply anyway.Tekky wrote:I was unable to reproduce this problem with the savegame you provided.
Re: YAPP - Yet Another PBS Patch
Thanks for a great patch!
In my game my busiest town station was built a bit to close to the main-track. Without PBS this situation would have caused deadlock for sure. However in my junction-area I've created a possibility for trains that exit the station to pass around a train that waits to get in the station. (see attached image) But it seams like the exiting train (train 8 in the image) have already decided to go though the blocking train and not around it. On theory I tested was that to take the blue-marked way around the blocking-train the two trains have to share the same tile, so I tested to add some extra track and re created the same situation with new trains.
I think by taking a train that will go to the left from the station and stop it a tile before it reserve it's path though the junction and then cause a deadlock and then restart the train, I've shown that the exiting train have not on before-hand decided on a specific path and therefore don't want to take the blue path around the blocking train.
Savegame attached: EDIT: If you want to recreate this situation with other trains it should be useful to know that all trains that arrives from the left will depart to the left too. Similar all trains that arrives from the right depart to the right. Also all trains are exactly 5 tiles long.
--------
One thing I would like to have is a way to mark one-way without marking safe-place to stop in the driving-direction.
Again, thanks for your hard work with the patch!
In my game my busiest town station was built a bit to close to the main-track. Without PBS this situation would have caused deadlock for sure. However in my junction-area I've created a possibility for trains that exit the station to pass around a train that waits to get in the station. (see attached image) But it seams like the exiting train (train 8 in the image) have already decided to go though the blocking train and not around it. On theory I tested was that to take the blue-marked way around the blocking-train the two trains have to share the same tile, so I tested to add some extra track and re created the same situation with new trains.
I think by taking a train that will go to the left from the station and stop it a tile before it reserve it's path though the junction and then cause a deadlock and then restart the train, I've shown that the exiting train have not on before-hand decided on a specific path and therefore don't want to take the blue path around the blocking train.
Savegame attached: EDIT: If you want to recreate this situation with other trains it should be useful to know that all trains that arrives from the left will depart to the left too. Similar all trains that arrives from the right depart to the right. Also all trains are exactly 5 tiles long.
--------
One thing I would like to have is a way to mark one-way without marking safe-place to stop in the driving-direction.
Again, thanks for your hard work with the patch!
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: YAPP - Yet Another PBS Patch
Sorry i thought that was catenary.cal wrote:@T-Unit: Well, there *are* exit signals.
Re: YAPP - Yet Another PBS Patch
Well, in fact I'm still in the fifties, so I can't even build electric railway yet (which is not very realistic, btw. In Switzerland, already in 1928 half of the railway network was electrified.)T-Unit wrote:Sorry i thought that was catenary.
Re: YAPP - Yet Another PBS Patch
Well it depends which trainset you are using. Now with the UKRS i am using some whilst im in the 50s
Re: YAPP - Yet Another PBS Patch
This is a bug. It happens when a train stops and loads/unloads at a station that is not in its orders. If you catch it you'll see it actually reserves the path ahead before it stops.cal wrote:Altough it is still loading, the passenger train in the middle of Bülach station has reserved the track up to the junction and blocks the iron train on the right:
But not at the entrance of Büluch Höhe.cal wrote:@T-Unit: Well, there *are* exit signals.
He's like, some kind of OpenTTD developer.
Re: YAPP - Yet Another PBS Patch
When a train is in PBS mode, it should not decide whether it should visit a depot for servicing at every junction tile. Instead, it should make this decision at every signal and then reserve its path accordingly.Michi_cc wrote:It's a side effect of how the system works. Without PBS, trains have the chance to find a depot at every junction tile. With PBS trains will unconditionally follow their reservation and in turn will only look for a depot if they have to reserve a further stretch. As only depots within a certain distance are considered, this makes finding a depot more difficult.Tekky wrote:I have already noticed that trains are having trouble finding a depot in PBS areas.
Re: YAPP - Yet Another PBS Patch
Well, that's exactly what I wrote. The problem is that it makes that decision only at every signal. The pathfinder won't consider depots that are more expensive (too far away) the get to than a certain limit. This means that a depot might be too far away at the first signal and too far away at the next signal, but could be near enough on a junction tile in between. A non-pbs train can now find the depot on the junction tile, whereas a pbs train is not able to. I'll take a look if I can tweak the pathfinder penalties for this case to yield better results.Tekky wrote:When a train is in PBS mode, it should not decide whether it should visit a depot for servicing at every junction tile. Instead, it should make this decision at every signal and then reserve its path accordingly.Michi_cc wrote: It's a side effect of how the system works. Without PBS, trains have the chance to find a depot at every junction tile. With PBS trains will unconditionally follow their reservation and in turn will only look for a depot if they have to reserve a further stretch. As only depots within a certain distance are considered, this makes finding a depot more difficult.
The inconsistency with some reservations stopping at stations and others not will be recitified in the next release.
-- Michael Lutz
-- Michael Lutz
Re: YAPP - Yet Another PBS Patch
This cannot be correct. Please take a look at Noldo's bug report. I found out that train #4 decides to visit the depot it passed by. It makes this decision at a junction tile and not at a signal, despite being in PBS mode. This is visible by looking at the train's status bar. However, the train first follows its previous reservation despite having decided to visit the depot. Therefore, it gives up to visit the depot on the next signal and goes wild. This behavior leads to train #4 not making a proper reservation and thereby another train crashing into it.Michi_cc wrote:Well, that's exactly what I wrote. The problem is that it makes that decision only at every signal. The pathfinder won't consider depots that are more expensive (too far away) the get to than a certain limit. This means that a depot might be too far away at the first signal and too far away at the next signal, but could be near enough on a junction tile in between. A non-pbs train can now find the depot on the junction tile, whereas a pbs train is not able to. I'll take a look if I can tweak the pathfinder penalties for this case to yield better results.
Re: YAPP - Yet Another PBS Patch
From what I have read, this patch is not directly compatible with Tekky's bi-directional double track philosophy (for lack of a better word). However, I had the thought of using three tracks and this PBS patch to provide some sort of path redundancy in the event of train breakdown, while minimising the amount of space that the track layouts take up. However, I've come across a problem. It could be to do with my signalling, but I thought that I'd post my layout here for feedback.
Essentially, the layout has three tracks - one is a dedicated "up" track, another is a dedicated "down" track and the middle is bi-directional. The idea is that trains will always use the uni-directional tracks if they are clear and will use the bi-directional track if the uni-directional one is blocked. However, it doesn't work and I can't figure out why...
In the picture above, assume that Train 1 is broken down (I've actually stopped it to generate the screenshot). Train 2 comes from behind but stays at the PBS signal - it doesn't want to use the middle track at all, even though there is a patch to the destination via that track.
I'm guessing that it has something to do with an earlier post in this thread - that trains will always prefer uni-directional track - but surely the train should be able to choose the bi-directional option in this case?
Can anyone shed some light as to what I'm doing wrong, if anything? It should work in theory, but it just doesn't...
Essentially, the layout has three tracks - one is a dedicated "up" track, another is a dedicated "down" track and the middle is bi-directional. The idea is that trains will always use the uni-directional tracks if they are clear and will use the bi-directional track if the uni-directional one is blocked. However, it doesn't work and I can't figure out why...
In the picture above, assume that Train 1 is broken down (I've actually stopped it to generate the screenshot). Train 2 comes from behind but stays at the PBS signal - it doesn't want to use the middle track at all, even though there is a patch to the destination via that track.
I'm guessing that it has something to do with an earlier post in this thread - that trains will always prefer uni-directional track - but surely the train should be able to choose the bi-directional option in this case?
Can anyone shed some light as to what I'm doing wrong, if anything? It should work in theory, but it just doesn't...
May your cheese be tasty!
Re: YAPP - Yet Another PBS Patch
yapf.rail_pbs_signal_back_penalty is currently set to 2500 by default in openttd.cfg. Try setting it to 300 or maybe even 0.
However, changing your openttd.cfg does not update this value in your existing savegames. In order to change this value in your already existing games, you must use the console command "patch yapf.rail_pbs_signal_back_penalty 300".
However, changing your openttd.cfg does not update this value in your existing savegames. In order to change this value in your already existing games, you must use the console command "patch yapf.rail_pbs_signal_back_penalty 300".
Re: YAPP - Yet Another PBS Patch
Yes and no - there are only exit signals in south-east direction, but since this is a unidirectional station, I think it should suffice. I don't see why a train should ever leave the station in north-west direction, there is no possibility to go any further there, because of the one-way signals.peter1138 wrote:But not at the entrance of Büluch Höhe.cal wrote:@T-Unit: Well, there *are* exit signals.
Re: YAPP - Yet Another PBS Patch
I think I've come across some inconsistency between (trunk) patch settings and this patch. With the "Enable Signal GUI" set to on, it appears the "Signal type to build by default" setting isn't honoured. It will always build normal signals in that case. With Signal GUI disabled, the select default gets built.
Re: YAPP - Yet Another PBS Patch
One thing I've noticed is that level crossings aren't closed when a path is reserved through them. Is this deliberate, or was it just missed?
No-one's more important than the earthworm.
Re: YAPP - Yet Another PBS Patch
@Spingo: I have just tried building 3 tracks with the middle track bi-directional, like you did. My suspicion was correct. If I set the patch setting yapf.rail_pbs_signal_back_penalty from 2500 (default setting) to under 1000, the middle track is also used. If you set it to 0, then trains use the middle track just as frequently as the outer tracks. Since this behavior is not desired, you should maybe set it between 400 and 700.
Please refer to my last post for instructions on how to set the patch setting yapf.rail_pbs_signal_back_penalty for existing savegames, as changing the setting in openttd.cfg will only change this patch setting for new games.
@anboni: Yes, I noticed this too and I agree with you that this should be changed.
@Maedhros: I'm not sure if this is a good idea to close road crossings whenever a train has reserved a path over it. Think of a long piece of single track connecting two stations with multiple platforms. In this case, the road crossing will be closed 90% of the time, even if the train will only actually reach the road crossing in a very long time, because the train will reserve the entire single track in advance.
Please refer to my last post for instructions on how to set the patch setting yapf.rail_pbs_signal_back_penalty for existing savegames, as changing the setting in openttd.cfg will only change this patch setting for new games.
@anboni: Yes, I noticed this too and I agree with you that this should be changed.
@Maedhros: I'm not sure if this is a good idea to close road crossings whenever a train has reserved a path over it. Think of a long piece of single track connecting two stations with multiple platforms. In this case, the road crossing will be closed 90% of the time, even if the train will only actually reach the road crossing in a very long time, because the train will reserve the entire single track in advance.
Re: YAPP - Yet Another PBS Patch
Not implemented, if there's sufficient support for this I will add it.Maedhros wrote:One thing I've noticed is that level crossings aren't closed when a path is reserved through them. Is this deliberate, or was it just missed?
Known. Will change.anboni wrote:I think I've come across some inconsistency between (trunk) patch settings and this patch. With the "Enable Signal GUI" set to on, it appears the "Signal type to build by default" setting isn't honoured. It will always build normal signals in that case. With Signal GUI disabled, the select default gets built.
Thank you, problem found and fixed.dihedral wrote:the save game will helpjust let it run
-- Michael Lutz
-- Michael Lutz
Re: YAPP - Yet Another PBS Patch
I have found another bug. In the attached screenshot, I have reversed a train on a piece of track. As you can see in the screenshot, it then reserves the route past the one-way PBS signal, despite it showing in the other direction. When I reverse the train again in its current position, it clears its reservation up to the one-way PBS signal, but it doesn't clear the reservation beyond that signal, although it had previously reserved it.
- Attachments
-
- bugreport.png (5.67 KiB) Viewed 1427 times
Who is online
Users browsing this forum: No registered users and 14 guests