Page 50 of 51

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

Posted: 25 Sep 2008 10:45
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!

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

Posted: 18 Oct 2008 07:13
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

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

Posted: 18 Oct 2008 07:15
by a.locritani
fourth screenshot (max 3 attachement for post...) and savegame

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

Posted: 18 Oct 2008 07:33
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.

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

Posted: 18 Oct 2008 11:12
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:

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

Posted: 18 Oct 2008 11:45
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

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

Posted: 18 Oct 2008 13:03
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

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

Posted: 19 Oct 2008 11:03
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

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

Posted: 19 Oct 2008 13:39
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.

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

Posted: 19 Oct 2008 14:18
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

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

Posted: 28 Oct 2008 15:16
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))

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

Posted: 28 Oct 2008 15:26
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.

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

Posted: 28 Oct 2008 15:30
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.

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

Posted: 31 Oct 2008 10:52
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

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

Posted: 31 Oct 2008 11:01
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.

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

Posted: 31 Oct 2008 14:05
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.

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

Posted: 31 Oct 2008 14:26
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 4659 times

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

Posted: 01 Nov 2008 17:46
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.

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

Posted: 02 Nov 2008 01:37
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.

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

Posted: 02 Nov 2008 01:56
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!