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

Post Reply
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: YAPP - Yet Another PBS Patch

Post by T-Unit »

Thanks. I will remove the code from my previous message as it is rather untidy, but keep it somewhere in case it is important. How long does that usually take?
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Mchl »

Took approx 10min on my computer but it depends on your hardware configuration.
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: YAPP - Yet Another PBS Patch

Post by T-Unit »

Well its been going about 20 mins so far. Hopefully it wont take much longer.
User avatar
Rainer
Traffic Manager
Traffic Manager
Posts: 240
Joined: 14 Nov 2007 10:01
Location: Wiesbaden, Germany

Re: YAPP - Yet Another PBS Patch

Post by Rainer »

Hi,
Michi_cc wrote:Together this means that the entry signals into a block should only be of one kind, either normal or pbs, but not both at the same time. Secondly, only use one-way pbs signals as block exit signals for a block which has normal entry signals so no train can enter the block without being seen by the normal signals.
so as a dumb user I very strongly wish that the GUI checks that rule already and doesn't allow me to place an illegal signal - at least in "Beginner" mode.

cu
Rainer
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Michi_cc »

Rainer wrote: so as a dumb user I very strongly wish that the GUI checks that rule already and doesn't allow me to place an illegal signal - at least in "Beginner" mode.
Development isn't finished, so changes in this area are still possible.

As a beginner the most sensible way is just not mix signal types. The only place where mixing is needed from a functional point of view is when upgrade a network piece by piece and not a once. All other things shouldn't need mixing of signals. But anyway, suggestions for a good way to handle mixed signal situations which don't cause performance problems are welcome.

-- Michael Lutz
-- Michael Lutz
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: YAPP - Yet Another PBS Patch

Post by planetmaker »

Michi_cc wrote: As a beginner the most sensible way is just not mix signal types. The only place where mixing is needed from a functional point of view is when upgrade a network piece by piece and not a once. All other things shouldn't need mixing of signals. But anyway, suggestions for a good way to handle mixed signal situations which don't cause performance problems are welcome.
Looks like a nice and good piece of work so far :).
As pointed out earlier, IMO a good position to take is to treat either
-only pieces of tracks which are entirely surrounded by the PBS algorithm and consider entry signals on those pieces with mixed signaling consistantly as normal signals
- consider for mixed track sections the normal signals as additional PBS entry signals and thus treat the trains accordingly.

I have to agree with peter that even the most weired signaling should in worst case only lead to stop all trains - but it shouldn't have trains crash. Excempt are of course those situations where the user actively messes around with the signaling (e.g. changes, adds or removes signals while trains use the track).
broodje
Director
Director
Posts: 615
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

Re: YAPP - Yet Another PBS Patch

Post by broodje »

At the moment a certain way to crash trains into each other is to include waypoint stations in a PBS block. The route is only reversed till the end of the station tile, but not past the station. The result are a lot of crashes.
I don't think waypoint tiles should be 'safepoints' since they don't have any way to hold trains. I haven't tried stations yet, but in my opinion a station is never a 'safe point' at the end of a reserved block, unless there is a signal at the tile behind the platform.
User avatar
Rainer
Traffic Manager
Traffic Manager
Posts: 240
Joined: 14 Nov 2007 10:01
Location: Wiesbaden, Germany

Re: YAPP - Yet Another PBS Patch

Post by Rainer »

Hi,
broodje wrote:I don't think waypoint tiles should be 'safepoints' since they don't have any way to hold trains.
This leads me to the conclusion that the only safepoints are signals and depots.

cu
Rainer
Buhmann
Engineer
Engineer
Posts: 20
Joined: 20 Dec 2007 18:20

Re: YAPP - Yet Another PBS Patch

Post by Buhmann »

Wow - great patch!

But there is a bug when using a waypoint:
1.JPG
1.JPG (43.18 KiB) Viewed 4822 times
The red train has an order to go to the waypoint and only reserves the tiles before the waypoint in the block, therefore crashing with the blue train.
(this only works if the train has got an order to go to the waypoint)

And i really like the idea of stations with built-in signals on all ends that lead to a pbs-block. That would save much space.

Oh, and all signals are only green for a very short period ... couldn't they stay green until the whole train passed them? It doesn't look very nice this way ...
nautre125
Engineer
Engineer
Posts: 74
Joined: 04 Feb 2008 10:58
Location: Strasbourg, France

Re: YAPP - Yet Another PBS Patch

Post by nautre125 »

Buhmann wrote: Oh, and all signals are only green for a very short period ... couldn't they stay green until the whole train passed them? It doesn't look very nice this way ...
In real life, they turn to red a few seconds afeter the loc. is passed, so it seems more realistic that way.

about graphics: I tought that you could use de one way pbs signal for one way only track and the pass-trough pbs from the patch for the two way tracks.

Great patch, hope to see it soon in trunk.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: YAPP - Yet Another PBS Patch

Post by Tekky »

Rainer wrote:This leads me to the conclusion that the only safepoints are signals and depots.
Station platforms will also be "real" safepoints if train's aren't allowed to start moving again without clearance. The patch author has already announced that he may introduce this.
AndiK
Engineer
Engineer
Posts: 53
Joined: 07 Dec 2004 18:34
Location: Grafing bei München (Munich)
Contact:

Re: YAPP - Yet Another PBS Patch

Post by AndiK »

If this feature will be introduced, please make it optional.
Personally, I'd prefer routes set only from signal to signal (or depot).
First, because it's unrealistic. Every station exit needs its own signal - From where else would trains know whether their path was free?
Second, because if every station had its own built-in signals, deadlocks could occur:
(Edit: englis = wery hard languag)
Attachments
Without signals on the single track, a train *should* reserve a complete path from one terminus to the other.<br />Because it doesn't (Think of the signals as being integrated into the station), the two trains starting at the same time create a deadlock.
Without signals on the single track, a train *should* reserve a complete path from one terminus to the other.
Because it doesn't (Think of the signals as being integrated into the station), the two trains starting at the same time create a deadlock.
deadlock_demo.png (40.46 KiB) Viewed 4724 times
Scay
Engineer
Engineer
Posts: 39
Joined: 30 May 2004 20:48

Re: YAPP - Yet Another PBS Patch

Post by Scay »

Someone, please post some builds with the patch for the unlucky users with Vista...
User avatar
YukonRob
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 31 Jul 2007 00:58
Location: North of 63

Re: YAPP - Yet Another PBS Patch

Post by YukonRob »

Scay wrote:Someone, please post some builds with the patch for the unlucky users with Vista...
Don't forget that you can still compile with Vista - http://wiki.openttd.org/index.php/Micro ... s_Editions
satosphere
Engineer
Engineer
Posts: 40
Joined: 29 Apr 2005 06:09
Location: Santa Clara, USA
Contact:

Re: YAPP - Yet Another PBS Patch

Post by satosphere »

Lovely patch.
Long have I been waiting for a PBS for OTTD (to along with diagonal bridges to create compact networks).
While it is not the old PBS, I love the new implementation of the signalling system. It is simple and elegant.

While it seems counter intuitive in the beginning, it is slowly starting to make sense.

I am going to have to rework certain types of stations I am so used to. That should probably help in debugging.

Hopefully this patch makes it to the trunk.
Talent does what it can.
Genius What it must
pshemko
Engineer
Engineer
Posts: 104
Joined: 24 Sep 2004 02:43
Location: Aotearoa (New Zealand)

Re: YAPP - Yet Another PBS Patch

Post by pshemko »

I've noticed a small problem. If you set your signals to 'advanced by default' and allow the cycle through advanced signals only but don't turn off the signal toolbar you always get the simple signal and control-click doesn't cycle the signal at all.
User avatar
Timitry
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 01 Oct 2004 15:28
Contact:

Re: YAPP - Yet Another PBS Patch

Post by Timitry »

Here comes a compiled version, compiled and working under win xp... Install over a nightly around the patch version, e.g. 12069...
Hope that works...
Last edited by peter1138 on 07 Feb 2008 08:09, edited 2 times in total.
Reason: Do NOT post archives containing copyrighted material without authorisation from the copyright holder
Scay
Engineer
Engineer
Posts: 39
Joined: 30 May 2004 20:48

Re: YAPP - Yet Another PBS Patch

Post by Scay »

YukonRob wrote:
Scay wrote:Someone, please post some builds with the patch for the unlucky users with Vista...
Don't forget that you can still compile with Vista - http://wiki.openttd.org/index.php/Micro ... s_Editions
Sure, but this means a lot of installing and making sure it works. The benefit of BuildOTTD is not available, so if someone does make a build using it, please post a copy of the necessary files here so it's possible to try it out. I actually tried installing everything necessary to compile it on Vista once, but was to much work to get going. Tried BuildOTTD on my previous XP install and it was much nicer! Just asking for some help to try out this patch, thanks anyway though, appreciated!
Scay
Engineer
Engineer
Posts: 39
Joined: 30 May 2004 20:48

Re: YAPP - Yet Another PBS Patch

Post by Scay »

Timitry wrote:Here comes a compiled version, compiled and working under win xp... Install over a nightly around the patch version, e.g. 12069...
Hope that works...

Thanks, gonna try it right away!
Last edited by peter1138 on 07 Feb 2008 08:07, edited 1 time in total.
Reason: Removal of copyright infringing link
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: YAPP - Yet Another PBS Patch

Post by T-Unit »

Hi guys. I tried to compile this patch using BuildOTTD but it has been running for about 100mins and hasnt finished yet. Any chance someone could post a .zip for it? I cannot open .rars. Thanks in advance.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 20 guests