YAPP - Yet Another PBS Patch (now in trunk!)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

zombie
Traffic Manager
Traffic Manager
Posts: 153
Joined: 19 May 2005 22:19
Location: Germany

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by zombie »

Hi.
Tautrimas wrote:I used discussion page on YAPP wiki article, but it may seem interesting to other also. Its about leaving a gap after junctions.

To add more, maybe anyone has nice RoRo station solutions? I'm going to publish mine's a bit later.
I just read your wiki posting. I haven't noticed any problem with YAPP yet. Can you please explain what the "gap-after-junction" problem is? I never realized a train entering a junction too early and I never had a crash caused by YAPP. Only crashes I forced by reconfiguring junction at an in adequate moment.

Kind regards

Zombie
OpenTTD: OpenTTD-Wiki
OpenTTDCoop: Blog, Wiki
My favorite patches: cargo destinations, shared infrastructure
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

zombie wrote:I just read your wiki posting. I haven't noticed any problem with YAPP yet. Can you please explain what the "gap-after-junction" problem is? I never realized a train entering a junction too early and I never had a crash caused by YAPP. Only crashes I forced by reconfiguring junction at an in adequate moment.

Kind regards

Zombie
No problem with YAPP. Read http://wiki.openttd.org/index.php/Yet_Another_PBS_Patch The Signals section and note the image with explanation.
zombie
Traffic Manager
Traffic Manager
Posts: 153
Joined: 19 May 2005 22:19
Location: Germany

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by zombie »

Hi.

Thanks A LOT for clearing things up. That perfectly makes sense. I think your solution with the "inverted" signal does not look very nice but it really solves the problem. That problem did not appear in my games because I did not setup high load tracks with YAPP yet. In each of my YAPP games there was plenty of room beyond junctions without traffic jams.

Kind regards

Zombie
OpenTTD: OpenTTD-Wiki
OpenTTDCoop: Blog, Wiki
My favorite patches: cargo destinations, shared infrastructure
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

But I'm afraid a bit of the penality train aquires when it passes the back of a signal. It may then choose other route that is not optimal in reality. In that case, rebalancing of penality would help, but then other problems arouses on so on...
zombie
Traffic Manager
Traffic Manager
Posts: 153
Joined: 19 May 2005 22:19
Location: Germany

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by zombie »

Hi.

That's true for sure. I usually just place PBS signals at junctions and stations and stick to the standard signals on straight tracks. This way I can set that penalty to a very low value that it does not have any major influence on the path finder.

Kind regards

Zombie
OpenTTD: OpenTTD-Wiki
OpenTTDCoop: Blog, Wiki
My favorite patches: cargo destinations, shared infrastructure
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Michi_cc »

Tautrimas wrote:But I'm afraid a bit of the penality train aquires when it passes the back of a signal. It may then choose other route that is not optimal in reality. In that case, rebalancing of penality would help, but then other problems arouses on so on...
Just don't place any signals in these places, they are simply undeeded. If you think you need them, please tell us exactly why you need them and what your actual problem is.

-- Michael Lutz
-- Michael Lutz
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

After several nice tests, I managed to find out that aditionals signals are not needed. Junctions are operating at full potential with gaps. Nice to realize something by actually testing it (: Sorry about misleading proposals and thoughts.
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

Sorry for double-posting. It occationally happens that when a train comes to station and goes near the PBS signal to head for free platform it stops. Important part is that there are available platforms! The stop happens only for a sec or so, but it is evil because of the slow down. It seems that the train is thinking where to go, which path to reserve. Is it possible to make it not stop at junction?
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tekky »

I never had any such problems. Please post a screenshot and possibly also a savegame, then I will be able to help you.
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

Played for half an hour but could not reproduce bug again. I hope it'll never happen again (: Maybe it just seemed that there were empty platforms...
razielanarki
Engineer
Engineer
Posts: 20
Joined: 08 May 2002 05:01

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by razielanarki »

sometimes i noticed this stop'n'go behavior myself, but i have no way of reliably reproducing it
it may just be side effect of somekind, but not that common nor serious imho

also it would be nice to have some kind of "signal" which is not considered a safe waiting location, so trains can bypass them/reserve a path to the next safe waiting position through them in one way but not the other, without stopping there.
this would help in with traffic flow when there's not enough room (cities have grown, or i don't want to bulldoze a mountain, etc) to have a train length worth of waiting track between a junction and a terminus, and there may be other cases where this could come in handy. but this is a minor problem.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tekky »

razielanarki wrote:also it would be nice to have some kind of "signal" which is not considered a safe waiting location, so trains can bypass them/reserve a path to the next safe waiting position through them in one way but not the other, without stopping there.
this would help in with traffic flow when there's not enough room (cities have grown, or i don't want to bulldoze a mountain, etc) to have a train length worth of waiting track between a junction and a terminus, and there may be other cases where this could come in handy. but this is a minor problem.
I have already made a detailed concept of signals which are unsafe waiting locations in this wiki article. The great thing about these signals are that they would also allow things like realistic bi-directional double track, as described in my article. However, these signals require a different type of reservation, which I call a "weak" reservation.
User avatar
Dave
Moderator
Moderator
Posts: 17249
Joined: 26 Dec 2005 20:19
Location: North London

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Dave »

This is absolutely brilliant - I might actually be ready to offer to have your children for you.

YAPP is so realistic it's unbelievable - who needs PBS!?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

Tekky wrote:I never had any such problems. Please post a screenshot and possibly also a savegame, then I will be able to help you.
I think I've found one example. The game is not mine, but anyways. Here you see a train waiting at a PBS signal before a big station:
waiting.png
waiting.png (61.73 KiB) Viewed 3190 times
However, it is clearly seen, that a free path exists. It waits for a second or so and goes a different way. The only reason to wait is the distance to a platform. Taking a tunnel means twice as long to go, but it should take it, shouldn't it? I'm also attaching a savegame with exact moment paused.

P.S. combo signals and presignals in general are used only for the visual tracking purposes. I suppose, they shouldn't do any influence on PBS.
Attachments
waiting.sav
Exact moment in the sceenshot.
(165.76 KiB) Downloaded 114 times
Youri219
Traffic Manager
Traffic Manager
Posts: 191
Joined: 28 Apr 2007 11:53

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Youri219 »

Tautrimas wrote:
Tekky wrote:I never had any such problems. Please post a screenshot and possibly also a savegame, then I will be able to help you.
I think I've found one example. The game is not mine, but anyways. Here you see a train waiting at a PBS signal before a big station:

However, it is clearly seen, that a free path exists. It waits for a second or so and goes a different way. The only reason to wait is the distance to a platform. Taking a tunnel means twice as long to go, but it should take it, shouldn't it? I'm also attaching a savegame with exact moment paused.

P.S. combo signals and presignals in general are used only for the visual tracking purposes. I suppose, they shouldn't do any influence on PBS.
It's a shame that path reservations are not visible. What sometimes happens is that a train comes from the right lane, but then reserves a path to the left-lane-exit. All trains in the center will get blocked, because there is no free path to any other exit, and wait at a signal.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Roujin »

You can show path reservations with a patch option...
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Tautrimas
Engineer
Engineer
Posts: 54
Joined: 20 May 2008 17:29
Location: Lithuania (Europe)

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Tautrimas »

Youri219 wrote:It's a shame that path reservations are not visible. What sometimes happens is that a train comes from the right lane, but then reserves a path to the left-lane-exit. All trains in the center will get blocked, because there is no free path to any other exit, and wait at a signal.
In my example, all trains have reserved paths and they are visible. The most left one is half a tile away from the signal.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by Michi_cc »

Tautrimas wrote: However, it is clearly seen, that a free path exists. It waits for a second or so and goes a different way. The only reason to wait is the distance to a platform. Taking a tunnel means twice as long to go, but it should take it, shouldn't it? I'm also attaching a savegame with exact moment paused.

P.S. combo signals and presignals in general are used only for the visual tracking purposes. I suppose, they shouldn't do any influence on PBS.
YAPP itself has nothing to do with finding the path, that's the job of YAPF or NPF. YAPP is extending these two to also take reserved tracks into account when searching for the best path. But if the pathfinder decides the best path is through a reserved tile, the train waits. As moving trains constantly change the set of reserved tiles, the current best path also changes.

As one of YAPP's goals was to not change the exisiting game behavior, non-yapp signals certainly influence the pathfinder's decision.

-- Michael Lutz
-- Michael Lutz
razielanarki
Engineer
Engineer
Posts: 20
Joined: 08 May 2002 05:01

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by razielanarki »

Tekky wrote:
razielanarki wrote:also it would be nice to have some kind of "signal" which is not considered a safe waiting location, so trains can bypass them/reserve a path to the next safe waiting position through them in one way but not the other, without stopping there.
(...)
I have already made a detailed concept of signals which are unsafe waiting locations in this wiki article.
(...)
However, these signals require a different type of reservation, which I call a "weak" reservation.
I was thinking along the lines of how one way roads are handled, trains would never stop and wait at these "signals" (i dont know if that's possible code/signal logic-wise), they would always pass them, just never from the backside. But as i said this is a minor thing.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: YAPP - Yet Another PBS Patch (New version 7 out!)

Post by zypa »

Michi_cc wrote:[...]if the pathfinder decides the best path is through a reserved tile, the train waits. [...]
Is there a penalty in the pathfinder for crossing a reserved path?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests