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

arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

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

Post by arikover »

MJS wrote:I think he has the nightly, and that is why he has now discovered PBS, and is grateful for it :).
That's it. (r14300) It's f***ing excellent!
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

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

Post by a.locritani »

Sorry for reviving this topic, but I think it's better to ask question about YAPP here instead of ask them in general, to avoid confusion to people that don't use trunk version but only releases.
anyway, my question:
I've made a simple test scenario: 3 station, 2 trains, a single line between with overtaking track. (savegame attached was saved using this build)

strange things happen

1) trains don't find a free path, even if one exists (screenshot 1 and 2) - in screenshot 2 I removed second platform on station in order to "force" a situation where one train have to leave otherwise deadlock (and they lock, doh...)

2) train pass a PBS signal from the back (it's ok) when a slightly longer path with no signal to pass from the back exists (screenshot 3)

but...

3) this behavior it's not used to overtake (train should pass signal from back to overtake the stopped train) (screenshot 4 - on following post)

by the way, without changing parameters in openttd.cfg I wasn't able to make a train overtake another train using double track. and what exactly the following parameters do?

yapf.rail_pbs_cross_penalty = 300 -- penalty for level crossing?
yapf.rail_pbs_station_penalty = 800 -- penalty for entering a (not in order list) station
yapf.rail_pbs_signal_back_penalty = 1500 -- penalty for passing a pbs signal from back
yapf.rail_doubleslip_penalty = 100 -- ?

if these questions were previously asked, please excuse me and please tell me where I can find answer: I was not able to find them

thanks
Attachments
screenshot1: trains don't find a free path, even if one exists
screenshot1: trains don't find a free path, even if one exists
Trenhill Transport, 30th Aug 2000.png (45.31 KiB) Viewed 1925 times
screenshot2: trains don't find a free path, even if one exists
screenshot2: trains don't find a free path, even if one exists
Trenhill Transport, 7th Oct 2000.png (44.36 KiB) Viewed 1855 times
screenshot3:  train pass a PBS signal from the back (it's ok) when a slightly longer path with no signal to pass from the back exists
screenshot3: train pass a PBS signal from the back (it's ok) when a slightly longer path with no signal to pass from the back exists
Trenhill Transport, 12th Nov 2000.png (46.93 KiB) Viewed 1852 times
Last edited by a.locritani on 18 Oct 2008 07:15, edited 1 time in total.
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

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

Post by a.locritani »

fourth screenshot (max 3 attachement for post...) and savegame
Attachments
screenshot 4: this behavior it's not used to overtake (train should pass signal from back to overtake the stopped train)
screenshot 4: this behavior it's not used to overtake (train should pass signal from back to overtake the stopped train)
Trenhill Transport, 23rd Nov 2000.png (46.56 KiB) Viewed 1861 times
Trenhill Transport, 3rd Nov 2000.sav
(10.49 KiB) Downloaded 170 times
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

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

Post by Tekky »

This is indeed strange. Please provide a savegame so that I can analyze your patch/advanced settings, specifically your pathfinder penalties. EDIT: Ah, it seems you did provide one. It wasn't there 10 minutes ago, was it? Anyway, I'm taking a look at the savegame now.
a.locritani wrote:yapf.rail_pbs_cross_penalty = 300 -- penalty for level crossing?
No, as far as I know, it is the penalty for finding a path over a track piece which is reserved by another train. This penalty causes trains to try to find routes around occupied/reserved track, as long as the detour is not too far.

a.locritani wrote:yapf.rail_pbs_station_penalty = 800 -- penalty for entering a (not in order list) station
It's the penalty for reserving a piece of track which belongs to a station platform, including those of stations in the order list. This penalty doesn't matter to the pathfinder, because all possible platforms cause an equal penalty, so the pathfinder effectively ignores the penalty. I'm not sure if this means that trains will have a tendency to prefer shorter platforms in non-uniform stations, i.e. whether they generate a smaller penalty.

a.locritani wrote:yapf.rail_pbs_signal_back_penalty = 1500 -- penalty for passing a pbs signal from back
That is correct.

a.locritani wrote:yapf.rail_doubleslip_penalty = 100 -- ?
For an explanation of what a double slip is, please click here.

a.locritani wrote:if these questions were previously asked, please excuse me and please tell me where I can find answer: I was not able to find them
The best place to find such stuff should be the YAPP wiki article. However, it does not contain the above information. I guess I should expand the article to explain these patch settings.
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

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

Post by a.locritani »

Tekky wrote:EDIT: Ah, it seems you did provide one. It wasn't there 10 minutes ago, was it? Anyway, I'm taking a look at the savegame now.
Yeah, I've added it later... I don't know if the savegame will load, because I've not made it with a nigthly or a release version, but with a custom build (you can find link to this version in my first post)
Tekky wrote: For an explanation of what a double slip is, please click here.
oh, thanks! just what I needed.
Tekky wrote: The best place to find such stuff should be the YAPP wiki article. However, it does not contain the above information. I guess I should expand the article to explain these patch settings.
I searched the wiki before asking, obviously :wink:
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

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

Post by Michi_cc »

a.locritani wrote: 1) trains don't find a free path, even if one exists (screenshot 1 and 2)
If I rebuild your screenshot 1 in plain trunk, the trains drive just like you expect. Please check the penalties using the in-game console as the values in openttd.cfg don't affect savegames. If the penalties are correct it is possible that the custom build is broken.
a.locritani wrote: yapf.rail_pbs_cross_penalty = 300 -- penalty for level crossing?
yapf.rail_pbs_station_penalty = 800 -- penalty for entering a (not in order list) station
rail_pbs_cross_penalty -> penalty for crossing (using) an already reserved tile.
rail_pbsstation_penalty -> the same but specific for station tiles.

-- Michael Lutz
-- Michael Lutz
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

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

Post by a.locritani »

Michi_cc wrote:If I rebuild your screenshot 1 in plain trunk, the trains drive just like you expect. Please check the penalties using the in-game console as the values in openttd.cfg don't affect savegames. If the penalties are correct it is possible that the custom build is broken.
You're right, it works in trunk! in custom build penalties are the same that in openttd.cfg. I'll put a question on topic where I took the custom build.

Problem 2 and problem 3 still happen in trunk, anyway
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

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

Post by a.locritani »

I did some test and I think the problem is the length of track before the signal: if I create a line

|----6----| |----6----|
====== ======
SS==========SS==========SS
|-------10-------| |--------10------|

where S is a station tile and = is the track (junction are not shown)

it works, but If I reduce the length of overtaking track to 3 then lock happens, also in trunk

it's strange and I don't know if this is a penalty-related problem
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

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

Post by Thief^ »

a.locritani wrote:I did some test and I think the problem is the length of track before the signal: if I create a line

Code: Select all

    |--6-|      |--6-|
    ======      ======
SS==========SS==========SS
  |---10---|  |---10---|

where S is a station tile and = is the track (junction are not shown)

it works, but If I reduce the length of overtaking track to 3 then lock happens, also in trunk

it's strange and I don't know if this is a penalty-related problem
Code tags should help here.
Melt with the Shadows,
Embrace your destiny...
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post by PhilSophus »

I managed to backport a.locritani's savegame from ITiM to clean cargodest. Maybe it helps to find the problem.

Please note that the last merged trunk revision of cargodest was 14417
Attachments
Trenhill Transport, 4. Nov 2000.sav
Savegame for cargodest h527e0a444916
(172.51 KiB) Downloaded 172 times
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
chickenbc
Engineer
Engineer
Posts: 29
Joined: 20 Jan 2008 05:30
Location: Seoul, Korea

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

Post by chickenbc »

Hello, I love YAPP but I think this has a bug. Look at my screenshot.

I want to make Semi-directional station. that is: train can come into both side, but i has to go out in one direction. Of coarse I don`t want to use depots or loops.(In practical passenger service rarely uses loops.)

         |Station|--------<In<--
--->In>------------└-------┘------->Out>---
Gesburgh Transport, 16th Jan 1999.png
(232.04 KiB) Downloaded 156 times
So i made an design, but it has a bug. Train goes to reserved space. Although in the second screnshot, tain 12 is waiting, but suddenly it starts to moving and it crashes.

I`m currently using Yet another PBS patch (v8.2) (in the Russian OpenTTD Community patchpack (1.3.0))
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

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

Post by Thief^ »

Don't combine PBS and pre-signals. (Though it probably is still a bug)

Put a one-way pbs where your pre-signal entrance is, put normal pbs signals facing away from the station where your pre-exits are, and kill the one-way combo pre-signals. That should sort it.
Melt with the Shadows,
Embrace your destiny...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

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

Post by Yexo »

This is not a bug but just a small timing issue that can happen when you use a two-way station (trains can enter from both ways) with presignals. As Thief^ said use pbs-signals only. You can replace you leftmost pre-signal with a one-way pbs signal, that way trains won't leave in that direction. Replace all exit-signals with normal pbs signals.
dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 344
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

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

Post by dasy2k1 »

4 Road 2 way station issues

i have a 4 road by-directional station
with the signals set as in the first example (all PBS) trains will only go to the shortest road avalable to them the next train will wait for a path untill the first has gone,
this means that a maximum of of the 4 roads are used and when a train reverses at the station only one

in the second example 2 way normal signals have been placed inside the PBS ones,
this allows trains to use all roads avalable but results in deadlocks and infrequent crashes! :shock:

The third method i tried was using presignal blocks around the PBS exits similar to method 2 (in this case the entry signals are one way presignal enntries not PBS one ways)
this seems to work most of the time but can sometimes deadlock due to bad timing


there must be a way to impliment such a station with YAPP can anyone tell me how
Attachments
Meningworth Transport, 15th Jul 1930.png
PBS signals only
(45.19 KiB) Downloaded 117 times
Meningworth Transport, 30th Jul 1930.png
PBS with 2 way non PBS inside
(55.83 KiB) Downloaded 87 times
Meningworth Transport, 20th Nov 1931.png
PBS with Presignals inside
(58.32 KiB) Downloaded 94 times
User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

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

Post by Thief^ »

Clear out your openttd.ini's yapp/pbs sections (or delete it entirely). That layout should work, but the old pbs/yapp pathfinder penalties from the older pbs can cause trouble.
Melt with the Shadows,
Embrace your destiny...
chickenbc
Engineer
Engineer
Posts: 29
Joined: 20 Jan 2008 05:30
Location: Seoul, Korea

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

Post by chickenbc »

Yexo wrote:This is not a bug but just a small timing issue that can happen when you use a two-way station (trains can enter from both ways) with presignals. As Thief^ said use pbs-signals only. You can replace you leftmost pre-signal with a one-way pbs signal, that way trains won't leave in that direction. Replace all exit-signals with normal pbs signals.
No, it won`t work. The train comes from the reverse direction can`t go to the station, because they can`t find the safe position.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

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

Post by Yexo »

This is the layout I was trying to describe:
Station layout with pbs
Station layout with pbs
test.png (143.6 KiB) Viewed 4657 times
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

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

Post by Tekky »

Yexo: I don't like the third signal from the top in your layout, as trains waiting in front of that signal will be blocking the junction. I suggest you remove that signal.

By the way, what NewGRF are you using? I really like the graphics of the track.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

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

Post by Yexo »

Tekky wrote:Yexo: I don't like the third signal from the top in your layout, as trains waiting in front of that signal will be blocking the junction. I suggest you remove that signal.

By the way, what NewGRF are you using? I really like the graphics of the track.
That signals is indeed questionable. I usually build it there as it improved throughput of the station and I design the exit track so trains should never have to wait in front of that signal. However, if there is a chance trains could stop in front of that station it should indeed be removed.

The tracks are from YARRS.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

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

Post by Tekky »

Yexo wrote:
Tekky wrote:Yexo: I don't like the third signal from the top in your layout, as trains waiting in front of that signal will be blocking the junction. I suggest you remove that signal.
That signals is indeed questionable. I usually build it there as it improved throughput of the station and I design the exit track so trains should never have to wait in front of that signal. However, if there is a chance trains could stop in front of that station it should indeed be removed.
If you want to improve throughput on the exit line, I suggest that you create a second exit line for at least one train length and merge the two exit lines afterwards. This creates a lot more throughput than an additional signal.

Yexo wrote:The tracks are from YARRS.
Thanks for the information!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests