[RFD] Signaling

Development discussion about Transport Empire. Other discussion to General forum please.

Moderator: Transport Empire Moderators

User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

[RFD] Signaling

Post by Zuu »

Well, I know it is litle late to start a discussion 8-9 hours before the meeting, but as this hasn't been brought up, and is not adressed in the FRD, I'll bring it up here.

Signaling
The FRD says nothing about how they will work, and they are only losely mentioned in the safety section and oneway signals are mentioned as an invention.

Signaling has been discussed before in this topic:
http://www.tt-forums.net/viewtopic.php?t=5772

The main issue that was discussed was to let svereal trains pass a single block, as long as their paths does not overlap.

Another questions is, how shall we adress things like dynamic track selection.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Hellfire
Transport Empire Developer
Transport Empire Developer
Posts: 699
Joined: 03 Feb 2003 09:30
Location: Back at the office

Re: [RFD] Signaling

Post by Hellfire »

zuu wrote:The main issue that was discussed was to let svereal trains pass a single block, as long as their paths does not overlap.
That was one of my suggestions. The main reason I suggested it was because I wanted to let two (or more) trains pass a junction like the one attached to this post without stopping for the other trains.
Another questions is, how shall we adress things like dynamic track selection.
Good question. I'll think about a proper answer.
Attachments
junction.png
junction.png (14.04 KiB) Viewed 11537 times
Feel free to contact me over Email! My current timezone: Europe/Amsterdam (GMT+1 or GMT+2)

Code: Select all

+------------Oo.------+
| Transport Empire -> |
+---------------------+
[ General TE Discussion ] [ TE Development ] [ TE Coding ]
Under construction...
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

Another question related to signaling, how to construct a two line in each direction line that works like a highway, so that trains will take over on one of the tracks. But maybe that is more a pathfinding question. But there still have to be a way to tell the game that trains should take over each other here or not.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
PJayTycy
Route Supervisor
Route Supervisor
Posts: 429
Joined: 09 Mar 2004 20:30

Post by PJayTycy »

zuu wrote:Another question related to signaling, how to construct a two line in each direction line that works like a highway, so that trains will take over on one of the tracks. But maybe that is more a pathfinding question. But there still have to be a way to tell the game that trains should take over each other here or not.
I have often thought of this, but while this seems a good idea, it often isn't. The main problem is : train speeds vary not enough and trains are too long. In order to take over an other train, a train needs to travel (his length + the other's length) further in the same time.

An example : Imagine 2 trains that have the same length and one travels at double speed. He will need +/- 6 times the train length to overtake the other. In most cases the speed difference won't be that high, so the length needed to overtake would be even longer.
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

To make a 2 track system with a possibility for trains switching lanes, needs a few things. Firstly, it needs to differentiate between a straight route and a turnoff. If you have a look at Hellfire's screenshot, trains can go forward or change track. In TTD, that central section would be one block, so only one train could pass it at once (not a good solution). If the system knows that the swap track bit is just for switching lanes, it could ignore the other track as long as it knows noone will be switching lanes at that time. -> No need for extra signals between them.
Secondly, reversable signals would be nice in case of breakdowns. Some system to allow trains to share the free track, allowing some movement. Exactly how many trains you let through at once can be similar to how cars get down a road which only one car can fit down (If the otherside was parked cars for instance). You let some cars go, then another lets you go, while they wait at the other end.


In real life, long distance passenger trains can get slowed down by slower trains in front as there is no way to pass them on convential 2 track routes. Instead, the slower train may just wait in the station longer, to allow the faster train to get past.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

That is true(EDIT: comment to PJayTycy) , but in the later years 2000 or so, the cargo trains goes ~150-200 (I gues) and the speed record for a passenger train today is 515 km/h that is not MagLev. In sweden the fastest passenger train goes in ~200km/h, but Germany/France the max speed is 300 or 400 i think.

Eaven if they won't be able to take over each other as on a highway, there should be a way to specify a highspeed and a low speed lane.

Translated into signals:
If we use dynamic path signals as in TTDP[1], we can add conditions to the exit signals that has to do with parameters of the train as max speed.

[1]se attachment. A = entrance. B and C = Exits.
A is green when B or C are green else red.
Trains choose a B or C depending on wich is green. If both are green they pick one of them.
Attachments
selectTrack.png
selectTrack.png (13.91 KiB) Viewed 11515 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Post by jfs »

A solution for the "motorway" construction with a "fast lane" and a "slow lane| could be, to allow top-speed constraints on what trains, may pass a signal. So you could have a signal that says "only trains with top-speed less than 100 km/h may pass" and next to it a "min. top-speed 100 km/h" signal. With PBS (path-based signalling) it's no real problem joining in another line on such a track.

Instead of having just "signals" and "blocks", maybe also introduce the concept of a "junction". A junction would be a player-designated blocks, and all signals around those blocks. A junction has a number of entrances and exits. There should be precalculated "best paths" stored for every entrance-exit pair. It should be possible to make special rules per entrance, "if destination = X then goto exit Y". This would of course mostly be useful if the game has dynamic pathfinding like TTD (not pure static like Simutrans), in that you could avoid a lot of waypoints. (Note that the rules are merely overrides, anywhere a rule is missing a normal route calculation will be used.)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

jfs wrote:A solution for the "motorway" construction with a "fast lane" and a "slow lane| could be, to allow top-speed constraints on what trains, may pass a signal. So you could have a signal that says "only trains with top-speed less than 100 km/h may pass" and next to it a "min. top-speed 100 km/h" signal.
That was what I was thinking about
jfs wrote:With PBS (path-based signalling) it's no real problem joining in another line on such a track.
PBS? seen a topic about it in TTDP section, but I haven't read on how it works.
jfs wrote:Instead of having just "signals" and "blocks", maybe also introduce the concept of a "junction". A junction would be a player-designated blocks, and all signals around those blocks. A junction has a number of entrances and exits. There should be precalculated "best paths" stored for every entrance-exit pair. It should be possible to make special rules per entrance, "if destination = X then goto exit Y". This would of course mostly be useful if the game has dynamic pathfinding like TTD (not pure static like Simutrans), in that you could avoid a lot of waypoints. (Note that the rules are merely overrides, anywhere a rule is missing a normal route calculation will be used.)
Second idea you have stolen from my juctioneer. :D But in my idea the players wouldn't make the rules for how cars will go from an entrance to an exit. How will you do that in an easy way?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Post by jfs »

zuu wrote:
jfs wrote:With PBS (path-based signalling) it's no real problem joining in another line on such a track.
PBS? seen a topic about it in TTDP section, but I haven't read on how it works.
Basically, when a train enters a block, it selects the possible exits it can use, and attempts to reserve a way through the block to an exit. Several trains can be indisde the same block as long as their routes don't overlap.
zuu wrote:Second idea you have stolen from my juctioneer. :D But in my idea the players wouldn't make the rules for how cars will go from an entrance to an exit. How will you do that in an easy way?
I've never looked at junctioneer =)
The player does not set up the pre-calculated ways through a junction, that's why I used the word "calculated". When a junction is defined from a number of adjecent blocks, the game analyses the blocks, finds entrances and exits, and uses some all-shortest-paths algorithm to find the best path from every entrance to every exit. This is merely to save some computation later on, since in later route-calculation graphs, the junction can be represented as a single node, strongly simplifying the graph.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Something worth remembering is that in gbeneral, the idea of signalling in TTD is entirely screwed. In TTD, it is assumed that the clearing point for the signal is the tile containing the next signal. IRL, you can send two trains past a signal where you have branches where one train is heading off the branch and the other on the main line. In those instances, the clearing point is a point where the junction is safe for travel in the other possible branching direction once the back of the train has cleared it.

With modern signalling systems, you might find that you have multiple "blocks" between signals, e.g. one block for the junction, one each for the tracks beyond them, and perhaps another up to the next signal on each line. This way, once something has cleared the junction block, the next train can proceed if it isn't on a conflicting route.

Another problem is that of one-way signals. IRL, having signals in only one direction doesn't make a track available only in one direction. You only have signals at the entrance to a section, not at the exit. So, in the example shot above, there would only be signals at the bottom end of the junction, not at the top - traffic onto the top sections is controlled by the signals at the bottom.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

ChrisCF wrote:Something worth remembering is that in gbeneral, the idea of signalling in TTD is entirely screwed. In TTD, it is assumed that the clearing point for the signal is the tile containing the next signal. IRL, you can send two trains past a signal where you have branches where one train is heading off the branch and the other on the main line. In those instances, the clearing point is a point where the junction is safe for travel in the other possible branching direction once the back of the train has cleared it.

With modern signalling systems, you might find that you have multiple "blocks" between signals, e.g. one block for the junction, one each for the tracks beyond them, and perhaps another up to the next signal on each line. This way, once something has cleared the junction block, the next train can proceed if it isn't on a conflicting route.

Another problem is that of one-way signals. IRL, having signals in only one direction doesn't make a track available only in one direction. You only have signals at the entrance to a section, not at the exit. So, in the example shot above, there would only be signals at the bottom end of the junction, not at the top - traffic onto the top sections is controlled by the signals at the bottom.
DO you think that the IRL variant is easy to implement the game? not only to program, but also usable for the user.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Post by jfs »

zuu wrote:DO you think that the IRL variant is easy to implement the game? not only to program, but also usable for the user.
I haven't checked it in detail, but I think that with some kind of PBS, it should work quite well. It would then have to un-reserve a piece of track as soon as the last part of the train has left that part.
I'll try to fake some screenshots of what I mean.
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

Meeting Decisions:

- Pre-signals to prevent blockages.
- Allow signals to be reversed on a 2 way system, if one way is blocked.
- System to split routes into different speed groups etc, for making cargo, high speed passenger routes.
- Path based signalling.
- Signals can only be placed between track pieces. (possible)

Signalling - Roads
- Traffic lights not needed, let the game define right of way.
- Using a FIFO queue if vehicles need to wait.
- Road junctions can use a system that splits up the junction into 4, letting the vehicle go only if it's path is clear.

Status: Some points still to be decided. Open to discussion.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Steve wrote:- Pre-signals to prevent blockages.
I suppose a better way of saying this is "not-broken-in-the-first-place signals" ;)
- Allow signals to be reversed on a 2 way system, if one way is blocked.
We could just allow a track to be signalled in both ways and only worked as wrong-line running when needed - at extra cost to track signalled in one direction only. Remember that track signalled in one direction is not only usable in one direction. IRL, trains running the wrong way down track which isn't signalled in that direction run at a restricted speed - the proverbial "1km/h" (I think it should be more than this, but I refer to it as such so people know what I mean).
- Path based signalling.
Definitely - though I assume you mean route-based ("path" in rail jargon refers to the ability to run a given service on a given route at a given time - while there is a firm route between stations, at busy times there may be no paths).
- Road junctions can use a system that splits up the junction into 4, letting the vehicle go only if it's path is clear.
That's good - nothing worse than seeing two buses fly through each other at 70mph and survive. Thank the heavens for ghost passengers ;-)
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

firs of all I think we are thinking too narrow ....

why ? well PBS is not needed if TE will allows building multiple signals at 1 junction square, am I not right ?

pre-signals are good idea and should be added, we need a way to stop train entering junction if all signals (or even one, CERATIN signal but htis would require some linking multiple signals) later are red
whoever played an old game, A-Train, knows there was very nice feature that allowed you to set every switch junction for every train/line (it also forces train to take certain way)
what are you looking at? it's a signature!
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

I think PBS is still good, even if we could get round TTD signal problems. It saves money and it saves time in building.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

Let's help Shadow a bit ;). PBS in TTDPatch makes it possible that a train passes a red signal if that red signal isn't on the path that the train is taking. This isn't something you get only after adding a PBS-thingie to the signal options. With plain signals (and pre-signals) you can already achieve this without the need for a PBS code. 'All' you need to differently from TTDPatch is incorporate a signal passing logaritm in the pathfinding logaritm.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Post by Zuu »

I suggest that signals should also be able to deny trains from other companies. (not by default.)

So you can keep your oponents out from your highspeed lanes, and force them to leave your tracks at exit points.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

Hyronymus, I know ... but TTDPatch PBS signals are only workaround since you can't put signal between to junction squares (that signal would 'split' junction into 2 ways, and it would work exacly as now PBS) ...
so if TE will allow putting multuiple signals at 1 square (for example at all rail exits) then extra special PBS support will be not needed since it will work already
what are you looking at? it's a signature!
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

SHADOW-XIII wrote:Hyronymus, I know ... but TTDPatch PBS signals are only workaround since you can't put signal between to junction squares (that signal would 'split' junction into 2 ways, and it would work exacly as now PBS) ...
so if TE will allow putting multuiple signals at 1 square (for example at all rail exits) then extra special PBS support will be not needed since it will work already
I tried to say that too but your explanation is clearer :).

Zuu: why? In the share infrastructure thread a selection tool was suggested to clearly indicate what track is being shared. If you keep your eyes open and your brain online you can decide yourself if you want to allow the AI on your high speed line.
Locked

Return to “Transport Empire Development”

Who is online

Users browsing this forum: No registered users and 2 guests