Page 21 of 22

Posted: 12 May 2005 14:12
by Uwe
One other thing I came across during testing different station layouts is that essentially stations with platforms that can be accessed from both directions tend to become unusable once traffic increases.

The problem is that trains might try to get to the same platform from both sides simultaneously, which of course is impossible. So, the big question is:

Is it possible to change signal behaviour at stations in such a way that as soon as a path towards a platform is reserved AND the platform has two-way signals at the other end (i.e. it can be entered from the other side as well) that the signal at the other end is set to red? This would solve the problem IMHO, but I do not know whether that is possible at all or if it would break anything else.

It's nothing major, just a little thing that would be nice to have (if it's possible, that is)...

Posted: 12 May 2005 14:30
by krtaylor
These discussions are good, I think we are moving in the right direction. Here's a few more ideas.

1. It's true that my style of bidirectional separated stations doesn't seem to be copied much. I don't know why, it allows for much higher traffic in a smaller space than any other style I've found, and until the recent PBS alphas, it worked great. It still works OK even as it is, it's just frustrating.

2. Uwe has come up with another fairly significant idea - not changing the train's movement scheme per se, but manipulating it through control of signals. His idea is excellent of "reserving" the station stall by making a red signal at the far end of it when a train has reserved a path into the near end. (This innovation might actually make my bidirectional separated station designs obsolete entirely, thus avoiding my whole problem.)

3. So, I wonder if it would be possible to do much the same thing in my situation. While the train is stopped at the station and loading/unloading, and if reversing at stations is turned on, run a check so as to consider which direction it ought to leave. Then, turn the signal red (stop-lock it) that's facing into the station, of the direction it ought not to leave in. That will cause the train, when it starts up, to reverse itself (or not) and go the other way. The only tricky bit here would be releasing the stop-lock on the signal after the train leaves the station in the opposite direction from the stop-locked signal.

Posted: 12 May 2005 15:00
by krtaylor
On thinking about it, I've come up with another idea that might be quite simple, and would also solve the problem. I've been attacking it wrong. I've been trying to ask for ways to improve the intelligence of the train handling code so that it can more accurately figure out whether or not to reverse a train. That's very hard.

But actually, I already know whether I want the train to reverse, because when I'm setting up its orders I know in which direction the stations lie from each other.

So, would it be possible to add a "Reverse" command to the Orders window, that you can tack on to a station-stop order? That way, the train will arrive at that station and reverse there. It doesn't matter whether it does that before or after it loads/unloads. Then it will be facing in the right direction to go to its next stop. Easy enough to use, and it avoids all these issues of making the code smarter.

Posted: 12 May 2005 15:09
by Mek
i've encountered another traincrash with pbs and tunnels... in the attached savegame, after a while train 1 will reverse, wich causes train 2 to crash into it...

Posted: 12 May 2005 16:53
by DaleStan
Uwe wrote:Is it possible to change signal behaviour at stations in such a way that as soon as a path towards a platform is reserved AND the platform has two-way signals at the other end (i.e. it can be entered from the other side as well) that the signal at the other end is set to red?
It seems like you ought to be able to change them both to combo signals, but that would probably require that the station block->mainline signals be exit signals, which will Break Things.

Posted: 12 May 2005 17:46
by Siema
krtaylor wrote:It's true that my style of bidirectional separated stations doesn't seem to be copied much.
To suport the idea of solving this problem I can say that I am also 'fan' of bidirectional stations because they are realistic (there are many of them in polish cities, AFAIK also in US, less in west Europe big cities) and problem with reversing trains makes them totally unrealistic (for me).
And this:
So, would it be possible to add a "Reverse" command to the Orders window, that you can tack on to a station-stop order?
Taylor's idea looks very promising (even if I don't know how difficult it will be :roll: )

Posted: 13 May 2005 16:24
by Uwe
DaleStan wrote:It seems like you ought to be able to change them both to combo signals, but that would probably require that the station block->mainline signals be exit signals, which will Break Things.
I fiddled around a bit with various signal settings, but combo signals were not a solution to the problem I tried to describe. For the sake of clarity I have included a screenshot. As you can see, both trains try to go to the middle platform and have reserved paths to it.

So what I'm asking for is this: At a station with a layout like shown in the picture, a train reserving a path to a platform should also trigger the two-way signal on the other end of the platform to show red. Since a train does not look for paths leading to a red two-way signal, no train would try to go to the platform the first train is heading for.

Posted: 13 May 2005 17:46
by Patchman
The problem with this kind of request is that it's very hard to detect such a situation algorithmically. One needs to devise an algorithm that is both reliable but at the same time flexible enough to work for more than one or two prototypical cases.

Another approach would be to redefine combo-signals if they are also PBS signals. Since PBS is basically doing what combo-signals were designed to do (yet didn't do very well), namely to let multiple trains enter a station simultaneously.

However, that's definitely something I won't work on until PBS is completely stable.

Posted: 14 May 2005 22:39
by Siema
However, that's definitely something I won't work on until PBS is completely stable.
I understand. I only have two more questions:

1. Situation dercribed by Uwe is main problem with those types of stations, but I wanted to know if krtaylor's reversing option is something difficult?

2. About depots. I wanted to know if making depot pseudo-signal entrance pre-signal will mess things up much? Because I think that depots are used mainly in pre- or pbs- signal blocks near stations and that is annoying when train leaving depot is not waiting for free platform (this situation can occur even with go-to-depot order).

Posted: 15 May 2005 03:03
by Patchman
1. Of course it's difficult...

2. Well, since the signal doesn't exist, it doesn't have a red or green state. All that happens is that the train asks "can I leave now or is anyone on the tracks?" But I'm very reluctant to change anything about the signalling code, because it's such a mess already.

Posted: 15 May 2005 17:55
by Siema
Hmm, I didn't know that depots doesn't have signal. I'm not very familiar, its harm, with development part of Patch, so I tried to ask my questions not too pushy :roll: Thanks for your reply :)

Posted: 16 May 2005 00:32
by krtaylor
Yes, we call it the depot pseudosignal.

Posted: 05 Jun 2005 13:27
by kvtb
Here's a train crash: two trains enter the same platform from opposite sides at the same time.

I apologise if this crash has already been reported.

Posted: 05 Jun 2005 22:18
by Patchman
Some very late replies...
Rob wrote:It seems the Alpha 49 PBS doesn't look underneath breidges anymore. :cry:
Are you sure that this has worked before? I can't see how it could have, at the moment bridges are only safe if there's a tile without signals on both sides of it.
kvtb wrote:Here's a train crash: two trains enter the same platform from opposite sides at the same time.

I apologise if this crash has already been reported.
I can't reproduce it, there's no crash when I load that game. Please post your newgrfw.cfg and ttdpatch.cfg too.

Posted: 06 Jun 2005 02:01
by krtaylor
Is there a theoretical possibility of PBS liking bridges better, or is that a structural impossibility?

Posted: 06 Jun 2005 02:37
by Patchman
Well, with a lot of work it might be possible, yes.

Posted: 06 Jun 2005 10:10
by kvtb
Patchman wrote:Some very late replies...
kvtb wrote:Here's a train crash: two trains enter the same platform from opposite sides at the same time.

I apologise if this crash has already been reported.
I can't reproduce it, there's no crash when I load that game. Please post your newgrfw.cfg and ttdpatch.cfg too.

Posted: 07 Jun 2005 01:59
by Patchman
Ah, I see now. This is actually rather hard to fix, so it won't make it into a52, but probably the next one after that.

Posted: 08 Jun 2005 09:23
by Greno Zee
Again I've spend several hour trying to find an answer to this. Also, I realize PBS is still in development, so consider this rather a study material.

The most obvious problem with this is that train 9 stopped at clearly green signal.

I've had many other problems with this junction, including a train crash at the entrance to the Depot and the onther Goods train (just heading away in the correct dirrection) trying to leave it's platform SW even though Train 9 was waiting just on the other other side of the signal. I was able to fix most of them by changing the design but still - if you are interested in savegames with these issues, I've got them.

Back to Train 9 stopped. It won't stop if the signal is not PBS. But thanks to the automatic conversion, this signal becomes PBS no matter what (because there is PBS at the other end of the line).
Several times already I missed one feature and here it would solve my problem as well. It would be one of these:
- having one-way signals that would allow trains pass freely from the other side (but not act as 2 way signal with green always on from one side)
- having two-way signals with separately configurable sides.

Now, I can't imagine this wouldn't be suggested but I really couldn't find it. So sorry if I bring up anything that has been rejected already.

Also, if I don't see any flames on this idea, I'll post it in the suggestions section, ok?

My confix:
Win XP Prof
TTD for Windows
TTDPatch A52

Posted: 08 Jun 2005 09:39
by Greno Zee
Ok, I think I know why the train stopped - the next signal was farther than 64 tiles.

Damn, why do I always find the solution just asfter spamming the forum? :oops:

Sorry...