Path-based signalling preview and test version

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Uwe
Transport Coordinator
Transport Coordinator
Posts: 353
Joined: 09 Jul 2004 14:05
Location: Germany

Post 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)...
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post 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.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post 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.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Mek
TTDPatch Developer
TTDPatch Developer
Posts: 417
Joined: 13 Apr 2004 13:35
Location: Eindhoven, Netherlands
Contact:

Post 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...
Attachments
TRP00.SV1.gz
(120.44 KiB) Downloaded 182 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post 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.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Siema
Traffic Manager
Traffic Manager
Posts: 176
Joined: 24 Oct 2004 23:36
Location: Warsaw, Poland
Contact:

Post 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: )
Uwe
Transport Coordinator
Transport Coordinator
Posts: 353
Joined: 09 Jul 2004 14:05
Location: Germany

Post 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.
Attachments
Two trains going for the same platform
Two trains going for the same platform
station.png (21.4 KiB) Viewed 5496 times
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post 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.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Siema
Traffic Manager
Traffic Manager
Posts: 176
Joined: 24 Oct 2004 23:36
Location: Warsaw, Poland
Contact:

Post 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).
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post 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.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Siema
Traffic Manager
Traffic Manager
Posts: 176
Joined: 24 Oct 2004 23:36
Location: Warsaw, Poland
Contact:

Post 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 :)
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

Yes, we call it the depot pseudosignal.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
kvtb
Engineer
Engineer
Posts: 70
Joined: 13 Mar 2005 11:42

Post 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.
Last edited by kvtb on 03 Mar 2007 15:49, edited 1 time in total.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post 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.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

Is there a theoretical possibility of PBS liking bridges better, or is that a structural impossibility?
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Well, with a lot of work it might be possible, yes.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
kvtb
Engineer
Engineer
Posts: 70
Joined: 13 Mar 2005 11:42

Post 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.
Attachments
crash.png
crash.png (99.42 KiB) Viewed 5049 times
newgrfw.cfg
(339 Bytes) Downloaded 198 times
ttdpatch.cfg
(31.12 KiB) Downloaded 206 times
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post 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.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Greno Zee
Engineer
Engineer
Posts: 45
Joined: 07 Jun 2005 09:35
Skype: Grenozee
Location: Belgium
Contact:

Post 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
Attachments
Savegame.zip
Savegame with both configs
(132.6 KiB) Downloaded 153 times
TrainStopedAtGreen.png
TrainStopedAtGreen.png (98.14 KiB) Viewed 4927 times
Greno Zee
Engineer
Engineer
Posts: 45
Joined: 07 Jun 2005 09:35
Skype: Grenozee
Location: Belgium
Contact:

Post 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...
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: Amazon [Bot] and 10 guests