Signalling

Archived discussions related to Transport Empire. Read-only access only.

Moderator: Transport Empire Moderators

Locked
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Signalling

Post by ChrisCF »

[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.
User avatar
Lilman424
Tycoon
Tycoon
Posts: 2743
Joined: 20 Oct 2002 14:55
Location: Georgia
Contact:

Post by Lilman424 »

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
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os »

As additon, TTD calculates the signals only if a train passes them,
not every tick ...
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

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.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

So, nobody's going to privde some feedback in helping fill any gaps I might have left?
Chris 'Awkward' McKenna
Tycoon
Tycoon
Posts: 1050
Joined: 26 Oct 2003 18:32
Location: Somerset, UK
Contact:

Post by Chris 'Awkward' McKenna »

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
chochmah
Engineer
Engineer
Posts: 60
Joined: 21 Nov 2003 15:03
Contact:

Post by chochmah »

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?
User avatar
Petae
Tycoon
Tycoon
Posts: 1076
Joined: 15 Jun 2003 15:26

Post by Petae »

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 33975 times
Everything is relative
broodje
Director
Director
Posts: 615
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

Post by broodje »

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?
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

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 :)
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

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.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

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. :)
Colonel Sheperd
Tycoon
Tycoon
Posts: 1098
Joined: 30 May 2003 15:20
Location: Somewhere

Post by Colonel Sheperd »

well my idea is:
Attachments
naamloos.gif
naamloos.gif (16.82 KiB) Viewed 9794 times
Image
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Hmm... that part was ideally to be left out of the "signalling" part and saved for the "customsation" :)
Talroth
Engineer
Engineer
Posts: 44
Joined: 01 Jun 2003 01:54

Post by Talroth »

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.)
User avatar
uzurpator
Transport Empire Moderator
Transport Empire Moderator
Posts: 2178
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

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.
User avatar
jfs
Tycoon
Tycoon
Posts: 1743
Joined: 08 Jan 2003 23:09
Location: Denmark

Post by jfs »

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.
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

Post by nilsi »

@G4S:
Very good idea indeed! (signals remembering the last speed)
Chris 'Awkward' McKenna
Tycoon
Tycoon
Posts: 1050
Joined: 26 Oct 2003 18:32
Location: Somerset, UK
Contact:

Post by Chris 'Awkward' McKenna »

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
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

This topic ended inconclusive. Please continu the discussion here.
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 5 guests