Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Nov 21, 2018 5:13 pm

All times are UTC




Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 20 posts ] 
Author Message
 Post subject: Signalling
PostPosted: Fri Dec 19, 2003 10:44 pm 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
[There will probably be more, but only when I have the time to add it]

I've done some thinking, and have at least some of the mathematical basis to support this idea, however actually implementing it (and modifying as necessary) is left as an exercise to any readers.

The signalling within TT is 2-aspect, and is based simply on the basis of "is there a train behind me?" If there is a train there, the signal is on. If no train, the signal is off.

Now, here is an idea for an N-aspect system (where N can be 2, 3, 4, or even 200 if you find that many degrees useful). Consider some tracks, which in thie case run from left to right.

Image

For this, we require the concept of a route. A route is a path set from one point on a line to another. On a single straight line, there is only one possible route covering its entire length in one direction.

We introduce signals here, where the signals are red where there is more than one possible route in the block following. This counts equally for convergence and divergence. Assigning the value 0 to signals at danger, the rest of the signals are at aspect x+1, where x is the aspect value of the next signal down the line. In the following example, yellow represents aspect 1, and green is anything with an aspect >= 2.

Image

As a train approaches, a route is set across the junction for the train in accordance with where it needs to go. Routes on the following diagram are represented by the blue lines. Remember that the track runs from left to right in each case.

Image

Now, this is where the clever bit comes in. In TT, the maximum number of trains on a junction was always 1. If there was 1 train on a junction, all protecting sginals were on. If you sent more trains across to ignore the signals, the signal stayed on until the last of the trains left.

In a situation such as this, it is possible that the maximum number of concurrent routes is greater than 1, and such a system should allow for this. Example:

Image

Here, there are two possible routes from each approach: stay on the same track, or change to the adjacent track. In each case, the signals are then off when a route is set, and on where none is set. However, when a route is set on one track for staying on that track, it is possible to set parallel route on the adjacent track. This is safe, assuming the drivers do as they're told. Of course, if you want to build in the option of random SPADs, then that might change things slightly ;) So, this method as illustrated is safe. Anyone care to demonstrate otherwise? Who knows, I might issue Knuthian cheques for genuine bugs :)

In all of this, remember that these do not have to be 2- or 3-aspect signals. If someone wants to try 4- or 6- aspect signals similar to those in the UK, those would be easily possible under this system (though the 6-aspect style requires approach control, which requires Rather More Work). So it is submitted for your pleasure, the joys of multiple-aspect signals.

_________________
Bugzilla available for use - PM for details.


Top
   
 
 Post subject:
PostPosted: Sat Dec 20, 2003 12:04 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 20, 2002 2:55 pm
Posts: 2743
Location: Georgia
hmm, I wonder what simulator of signals you got that idea from? ;)

_________________
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstein


Top
   
 
 Post subject:
PostPosted: Sat Dec 20, 2003 9:12 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Fri Mar 07, 2003 1:10 pm
Posts: 3602
Location: Germany
As additon, TTD calculates the signals only if a train passes them,
not every tick ...


Top
   
 
 Post subject:
PostPosted: Sat Dec 20, 2003 12:21 pm 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
Lilman424 wrote:
hmm, I wonder what simulator of signals you got that idea from? ;)


I don't know what you're talking about ;-)

Though, admittedly, it did have an indirect influence over the appearance of the lines (bear in mind that said simulator is designed to look exactly like real displays).

The idea came first and foremost from real life and common sense. That, and having seen trains regularly pass each other at junctions.

As far as recalculating signal state goes, remember that each signal at a junction is on by default, whereas others are off. With more than two aspects, it just means setting states for two or three signals in the wake of a passing train. Of course, how a train behaves at a caution aspect is left to the imagination of someone actually programming this, or to those extending it (as appropriate). Other things that might be required for safe train running include the locking of track or signals being approached by a train, such that you can't remove a signal at danger with an approaching train (since there's usually a reason why the signal is on) or add track which would compromise the safety of a signal installation.

_________________
Bugzilla available for use - PM for details.


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 2:30 am 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
So, nobody's going to privde some feedback in helping fill any gaps I might have left?


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 3:29 am 
Offline
Tycoon
Tycoon

Joined: Sun Oct 26, 2003 6:32 pm
Posts: 1050
Location: Somerset, UK
I don't know enough about signalling to expand on what you've already posted, sorry.

Chris

_________________
Anything can be achieved if you don't care who gets the credit
--Author Unknown


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 5:55 am 
Offline
Engineer
Engineer

Joined: Fri Nov 21, 2003 3:03 pm
Posts: 60
I'm still thinking about it... those things take time... (you have not even mentioned roughly what happens it trains get redirectet (user, goto depot), tracks are build/removed and how the data structure of the rails and the junction would have to be look like.

(in your example, the last picture with the two blue parallel lines: what happens if a trains gets a: goto depot call that would require him to change the track (go left at the next junction) while he's in between the two junctions?
->If he sees that the "tracks" are locked how should the train react? go on, on the now false path? stop the train on the tracks?

_________________
http://www.ph2.net/zugspiel


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 11:07 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 15, 2003 3:26 pm
Posts: 1076
I can't help the coding itself, but I have a bit of an idea.
Give every part of the junction (it's called "wissel" in dutch, dunno the english name} a bolean var. (the one that can only go true or false) if the train sees that it's aproaching a junction let it calculate a path over the junction(duh), and turn every bool to 'false' until the train has passed the junction. If another train comes it calculates a path, and checks if there isn't a piece it can't use (a "wissel" where the bool is 'false')

pics:
green = bool is true = a train could use this piece, no train has reserved it
red = bool is false = a train is on his way to use this, so don't use it...


Attachments:
signal-05.PNG
signal-05.PNG [ 90.26 KiB | Viewed 14185 times ]

_________________
Everything is relative
Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 11:52 am 
Offline
Director
Director
User avatar

Joined: Sun Jul 13, 2003 12:47 pm
Posts: 615
Location: Alphen aan den Rijn
hmm chris you need to set a minimum distance between signals with orange lights, becouse it would be useless if someone places signals on every square. and how do you prevent two trains running together over the signal setting square, wich train may pass a signal first?


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 1:20 pm 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
As I said, you can create as many signal aspects as you like, as I've mentioned that signal state might be represented by an integer, with 0 for danger, and incrementing at each signal before that. Thus, you might use signals at every part of the tracks and implement a system with more than 3 aspects, e.g. here we have 4-aspect signals with a second yellow bulb, with the sequence R Y YY G. Remembering that TE at least was to be extensible, so maybe allowing people to define their own signalling systems within the parameters already laid down. Examples might include:

For safety. keep a safety margin of one signal:
Danger: 0, 1 - stop
Caution: 2 - 40% speed
Caution 2: 3 - 70% speed
Clear: 4+ - full speed

Alternatively, for very dense signalling:
Danger: 0, 1 - stop
Caution: 2, 3 - 40%
Caution 2: 4, 5 - 70%
Clear: 6+ - full

Remembering that if a signal has an aspect value of 20 due to so much clear track, it would fall into the "Clear" category, being as it's greater than 4 or 6 respectively.

An interesting idea that might be getting a little too close to dreams is to use multiple signalling systems. For example, someone might want to build dense signalling in tight urban areas, where trains constantly run on caution aspects, and then a single-step 2-aspect system (where "Clear" occurs at a value of 1) for lines with only a few trains.

As for changing directions, a sudden change in the destination of a train should never happen (automatic servicing only serves to lose trains, and one would hope that given a train heading A-B-C-D-E, when asked to skip D, E leaves it heading in the same direction). Once a route is set, it is set, and changing signals on that stretch should not be allowed. Ideally, a route should only be set as far as necessary. A train travelling halfway across the map should typically have only the next 4 or 5 signal blocks set as their coming route. Removing tracks should most definitely not be allowed when a route is set over them, however adding tracks does not present the same problem, due to there being no route on the newly added spur to allow a train across.

Nice to see some discussion going on here at least, and gaps being filled :)


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 5:30 pm 
Offline
Transport Empire Moderator
Transport Empire Moderator
User avatar

Joined: Fri Jan 10, 2003 12:21 pm
Posts: 2131
Location: Wroclaw, Poland / Katowice, Poland
Hmm - this requires some thinking.

Ideally TE should not only use realistic acceleration, but also realistic braking. This will require more sophisticated signalling.

What I can think of is making everything based on the length of the braking path. For example 2000 ton train would naturally run slower than 500 ton one to keep the same length of the braking path.

Aspect signalling would have a merit if we were to increase the braking path above certain value (since for example driver could not see the danger signal soon enough).

This requires some thinking.

BTW - to allow two trains on a junction:
1 - if junction is clear then allow train x
2 - if junction is not clear and train x does not interfere with other train then allow
3 - if junction is not clear and train x interferes with other train then stop.

_________________
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.


Top
   
 
 Post subject:
PostPosted: Mon Dec 22, 2003 7:29 pm 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
uzurpator wrote:
BTW - to allow two trains on a junction:
1 - if junction is clear then allow train x
2 - if junction is not clear and train x does not interfere with other train then allow
3 - if junction is not clear and train x interferes with other train then stop.


That pretty much sums it up. :)


Top
   
 
 Post subject:
PostPosted: Wed Dec 24, 2003 7:10 pm 
Offline
Tycoon
Tycoon

Joined: Fri May 30, 2003 3:20 pm
Posts: 1098
Location: Somewhere
well my idea is:


Attachments:
naamloos.gif [16.82 KiB]
Downloaded 393 times

_________________
Image
Top
   
 
 Post subject:
PostPosted: Tue Jan 06, 2004 8:32 pm 
Offline
Transport Empire Developer
Transport Empire Developer

Joined: Thu Dec 26, 2002 4:39 pm
Posts: 3610
Location: Over there --->
Hmm... that part was ideally to be left out of the "signalling" part and saved for the "customsation" :)


Top
   
 
 Post subject:
PostPosted: Sun Jan 25, 2004 7:30 pm 
Offline
Engineer
Engineer

Joined: Sun Jun 01, 2003 1:54 am
Posts: 45
One thing some people forget about how trains stop; Acceleration is the only part dependant on the mass of the whole train, larger mass, the longer it takes to fully accelerate it. (Small train gets top speed before long one,) however, each car on a train provides most of its breaking force itself, so a train pulling one car of 100t at 100km/h will stop in about the same time as another train pulling 100 cars of 100ts each moving at 100km/h. *However, the locomotive does provide a fair bit of stopping power, so yes, I guess a shorter train should stop a bit shorter, but the more cars compared to engines, the less difference there is.)


Top
   
 
 Post subject:
PostPosted: Sun Jan 25, 2004 8:41 pm 
Offline
Transport Empire Moderator
Transport Empire Moderator
User avatar

Joined: Fri Jan 10, 2003 12:21 pm
Posts: 2131
Location: Wroclaw, Poland / Katowice, Poland
Talroth - well, the problem is that the braking "propagates" through the train. Also locomotive's ability to create pressure is limited and takes some time to make all cars brake with the constant force.

_________________
All art and vehicle stats I authored for TT and derivatives are as of now PUBLIC DOMAIN! Use as you see fit
Just say NO to the TT fan-art sprite licensing madness. Public domain your art as well.


Top
   
 
 Post subject:
PostPosted: Tue Jan 27, 2004 1:47 am 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Wed Jan 08, 2003 11:09 pm
Posts: 381
Location: Denmark
Something else that maybe should be consedered, is the case where you have a fast train behind a slower one. (And the top speed of the slower train is less than the max. speed of the track section.)
In TTD this creates a very ugly effect, of the faster train continually accelerating and braking. And it doesn't become any more pretty if you have several faster trains behind. (Now imagine yourself being a passenger in one of those trains!)

A solution could be to make signals remember max speed of the last train that passed it, and how long ago that was, such that a faster train can adjust it's top speed if a slower train is short ahead, but not if it's a long time since the slower train passed.
Note that whis would create problems if the slower train short after the signal branched off a line the faster train will not be taking, making the train slow unnessescarily down.


Top
   
 
 Post subject:
PostPosted: Tue Jan 27, 2004 9:32 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Nov 20, 2002 4:20 pm
Posts: 268
Location: Dresden, Germany
@G4S:
Very good idea indeed! (signals remembering the last speed)


Top
   
 
 Post subject:
PostPosted: Tue Jan 27, 2004 10:40 pm 
Offline
Tycoon
Tycoon

Joined: Sun Oct 26, 2003 6:32 pm
Posts: 1050
Location: Somerset, UK
you could set it so that any train is limited to the max speed of the train in teh signal block (or two signal blocks) ahead on the line that train needs, as we should have inteligent routing in TE/TM (or whatever its currently called).

e.g. where = is empty track, T is a train, : a singal, 1-3 are train numbers and a-g are signal blocks.

1 2 3
==:=TTT:=TTT:====:====:=TTT:===
a b c d e f g
train 1 has a max speed of 125mph, train 2 100mph and train 3 75mph

train 1 is limited to run at 100mph because that is the max speed of train 2.
trains 2 and 3 are not limited below their max speed as the next signal block is clear.

however, train 2 will quickly catch up with train 3, when it will become limited to 75mph until it can overtake train 3.
train 1 should also be limited to 75mph as that is the current maximum permited speed of the train in the signal block ahead of it.

Chris

_________________
Anything can be achieved if you don't care who gets the credit

--Author Unknown


Top
   
 
 Post subject:
PostPosted: Tue Nov 07, 2006 3:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
This topic ended inconclusive. Please continu the discussion here.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 
Display posts from previous:  Sort by  
Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 20 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.