How to keep the main line (trains) rolling?
Moderator: OpenTTD Developers
How to keep the main line (trains) rolling?
Suppose I have a mainline either express or fast freight or slow freight (mutually exclusive).
The mainline connects to side stations, and the mainline itself is two tracks running up and down.
The problem is how to keep rail traffic on the mainline rolling?
I already know that junctions should not cross tracks, but should be over/under implementations.
I already know that if you don't disable breakdowns or use a mod that breakdowns pose a severe risk of stalling the mainline.
Suppose a station has N trains which visit via the mainline. I only see two absolute ways to guarantee that those N trains do not stall the main line.
Option #1: Make sure there are enough track and signals on the siding to the station to buffer N trains. Thus, the entire complement can come off the mainline if they must for any reason.
Option #2: The mainline is more than parallel tracks, but rather a race track pattern. When any of those N trains encounters a RED to exit for its station (programmable routing) sends the train past its exit for another lap around the race track. Thus, trains are like planes put into a holding pattern. All the trains behind the given train, can reach their assigned destinations. Hopefully, the "go around" train will be able to make its siding on the next pass. THE PRIMARY RULE IS DON'T STOP MOVING ON THE MAIN LINE.
BTW, I don't have the knowledge I need to implement Option #2, and Option #1, is cumbersome, but trivial to implement.
---
Comment, thoughts, expertise, help?
Thanks!
The mainline connects to side stations, and the mainline itself is two tracks running up and down.
The problem is how to keep rail traffic on the mainline rolling?
I already know that junctions should not cross tracks, but should be over/under implementations.
I already know that if you don't disable breakdowns or use a mod that breakdowns pose a severe risk of stalling the mainline.
Suppose a station has N trains which visit via the mainline. I only see two absolute ways to guarantee that those N trains do not stall the main line.
Option #1: Make sure there are enough track and signals on the siding to the station to buffer N trains. Thus, the entire complement can come off the mainline if they must for any reason.
Option #2: The mainline is more than parallel tracks, but rather a race track pattern. When any of those N trains encounters a RED to exit for its station (programmable routing) sends the train past its exit for another lap around the race track. Thus, trains are like planes put into a holding pattern. All the trains behind the given train, can reach their assigned destinations. Hopefully, the "go around" train will be able to make its siding on the next pass. THE PRIMARY RULE IS DON'T STOP MOVING ON THE MAIN LINE.
BTW, I don't have the knowledge I need to implement Option #2, and Option #1, is cumbersome, but trivial to implement.
---
Comment, thoughts, expertise, help?
Thanks!
Re: How to keep the main line (trains) rolling?
Check out https://wiki.openttdcoop.org/Main_Page for advanced concepts on building and managing train networks.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: How to keep the main line (trains) rolling?
Or use an escape depot, then you have basically unlimited buffer capacity, although you might need to make some minor modifications if you really have high traffic at the station or have very long trains, as depots have a reduced entry/exit speed.MarkShot wrote: Option #1: Make sure there are enough track and signals on the siding to the station to buffer N trains. Thus, the entire complement can come off the mainline if they must for any reason.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: How to keep the main line (trains) rolling?
One solution is to use feeders. You have sideline trains and mainline trains, cargo gets transported through feeder stations onto and from the mainline.
That is: producer -> sideline train -> feeder station -> mainline train -> feeder station -> sideline train -> consumer.
Since there is a fixed number of trains on the mainline, (and they don't wait for full load,) main line will continue to roll.
I tried this while aiming to move all industrial cargo to/from all industries, and it's interesting
I usually build a network of lines (I don't really have main lines and side lines, just a network of connected stations), and in my experience trains are pretty good at finding their way in the network. They avoid busy areas, unless you force everything to the same spot of course.
For example These networks are created organically, so they are always different.
That is: producer -> sideline train -> feeder station -> mainline train -> feeder station -> sideline train -> consumer.
Since there is a fixed number of trains on the mainline, (and they don't wait for full load,) main line will continue to roll.
I tried this while aiming to move all industrial cargo to/from all industries, and it's interesting
I usually build a network of lines (I don't really have main lines and side lines, just a network of connected stations), and in my experience trains are pretty good at finding their way in the network. They avoid busy areas, unless you force everything to the same spot of course.
For example These networks are created organically, so they are always different.
Being a retired OpenTTD developer does not mean I know what I am doing.
Re: How to keep the main line (trains) rolling?
What an interesting and profound resource. I didn't even know that site existed.kamnet wrote:Check out https://wiki.openttdcoop.org/Main_Page for advanced concepts on building and managing train networks.
I was only aware of:
https://wiki.openttd.org/Main_Page
I have been relying on YouTube videos.
I am a little confused as to the distinction between these three sites:
https://wiki.openttd.org/Main_Page
https://wiki.openttdcoop.org/Main_Page
https://github.com
Can someone clarify?
Thanks.
Re: How to keep the main line (trains) rolling?
If I wanted to try my approach of using a race track pattern with no waiting to pull off the mainline, but to go around ...
Where would I find material on programmable routes such that if a train encountering a Y with two options:
(a) Sideline
(b) Bypass
finds the Sideline blocked, it bypasses and begins a circuit?
Thanks.
Where would I find material on programmable routes such that if a train encountering a Y with two options:
(a) Sideline
(b) Bypass
finds the Sideline blocked, it bypasses and begins a circuit?
Thanks.
Re: How to keep the main line (trains) rolling?
1. Is the official OpenTTD wiki, which is contributed to by anybody who wishes to contributeMarkShot wrote:I am a little confused as to the distinction between these three sites:
1. https://wiki.openttd.org/Main_Page
2. https://wiki.openttdcoop.org/Main_Page
3. https://github.com
2. Is the wiki for OpenTTD Co-op, a dedicated group of players (many of them devs) who work on advanced gaming techniques
3. Is the open source code repository where OpenTTD now stores its code.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: How to keep the main line (trains) rolling?
You might want to look at this page. It is a bit of complex material, but in your case, it would be reduced to the following:MarkShot wrote:If I wanted to try my approach of using a race track pattern with no waiting to pull off the mainline, but to go around ...
Where would I find material on programmable routes such that if a train encountering a Y with two options:
(a) Sideline
(b) Bypass
finds the Sideline blocked, it bypasses and begins a circuit?
Thanks.
- Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
- Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
- Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: How to keep the main line (trains) rolling?
I believe that your "race track" is what is commonly referred to as a cyclotron.
https://wiki.openttd.org/Cyclotron
https://wiki.openttd.org/Cyclotron
Re: How to keep the main line (trains) rolling?
Yes, I believe this is the key to doing what I had intended.Transportman wrote:You might want to look at this page. It is a bit of complex material, but in your case, it would be reduced to the following:MarkShot wrote:If I wanted to try my approach of using a race track pattern with no waiting to pull off the mainline, but to go around ...
Where would I find material on programmable routes such that if a train encountering a Y with two options:
(a) Sideline
(b) Bypass
finds the Sideline blocked, it bypasses and begins a circuit?
Thanks.What this does, is when your sideline-entry is blocked by a train, all other trains do not consider the sideline because the two-way signal is red and because of the yapf.rail_firstred_twoway_eol-setting, it is considered the end of the line and has an infinite penalty for the pathfinder. Because your mainline has a one-way signal, it is not considered the end of the line, and has a lower penalty, and trains always take the path with the lowest penalty.
- Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
- Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
- Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline
Thanks.
Re: How to keep the main line (trains) rolling?
Before I retired, I was in management and systems design.
Has anyone tried to reduce these problems to queuing theory and mathematical analysis?
Has anyone tried to reduce these problems to queuing theory and mathematical analysis?
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: How to keep the main line (trains) rolling?
What MarkShot wants is basically the inverted cyclotron. The idea behind the cyclotron is to only allow trains onto the mainline if there is a suitable gap and keep their speed while waiting to keep all trains running at full speed, but in this case, the mainline is the cyclotron and only if the sideline is free trains are allowed to leave.rowdog wrote:I believe that your "race track" is what is commonly referred to as a cyclotron.
https://wiki.openttd.org/Cyclotron
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: How to keep the main line (trains) rolling?
By the way, you should have quadruple track and 1-tile signal density on your busy lines. If you don't have JGRPP, avoid tunnels and bridges at all costs. Also, your curves shouldn't slow down your trains. Make them the length of your trains (I use 5-tile trains generally so it turns out to be easy for me, but it may be difficult with longer trains).
Re: How to keep the main line (trains) rolling?
Yes, Transportman has got it.
It is the mainline which must NOT slow or backup. The sidelines are to be viewed as independent subsystems connected to the mainline. So, the mainline traffic should be architected to have traffic of a consistent speed.
I am running OTTD-JGR 0.30.3. So, my bridges and tunnels have signals.
My one concern about the changes proposed below. Will these have a broad impact on many other aspects of the game?
It is the mainline which must NOT slow or backup. The sidelines are to be viewed as independent subsystems connected to the mainline. So, the mainline traffic should be architected to have traffic of a consistent speed.
I am running OTTD-JGR 0.30.3. So, my bridges and tunnels have signals.
My one concern about the changes proposed below. Will these have a broad impact on many other aspects of the game?
Transportman wrote: You might want to look at this page. It is a bit of complex material, but in your case, it would be reduced to the following:What this does, is when your sideline-entry is blocked by a train, all other trains do not consider the sideline because the two-way signal is red and because of the yapf.rail_firstred_twoway_eol-setting, it is considered the end of the line and has an infinite penalty for the pathfinder. Because your mainline has a one-way signal, it is not considered the end of the line, and has a lower penalty, and trains always take the path with the lowest penalty.
- Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
- Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
- Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: How to keep the main line (trains) rolling?
It will not have a broad impact, unless you use two-way signals everywhere. But it is very unlikely that you have that as there are very few instances where two-way signals make sense (as they are all block signals, any train in the block will block the entire block) so the only impact on your games is that you need to change all signals where you want to say DON'T GO HERE IF IT IS RED to two-way.MarkShot wrote:Yes, Transportman has got it.
It is the mainline which must NOT slow or backup. The sidelines are to be viewed as independent subsystems connected to the mainline. So, the mainline traffic should be architected to have traffic of a consistent speed.
I am running OTTD-JGR 0.30.3. So, my bridges and tunnels have signals.
My one concern about the changes proposed below. Will these have a broad impact on many other aspects of the game?
Transportman wrote: You might want to look at this page. It is a bit of complex material, but in your case, it would be reduced to the following:What this does, is when your sideline-entry is blocked by a train, all other trains do not consider the sideline because the two-way signal is red and because of the yapf.rail_firstred_twoway_eol-setting, it is considered the end of the line and has an infinite penalty for the pathfinder. Because your mainline has a one-way signal, it is not considered the end of the line, and has a lower penalty, and trains always take the path with the lowest penalty.
- Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
- Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
- Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: How to keep the main line (trains) rolling?
a less impactful approach would be to use exit signals instead of setting "firstred_twoway_eol", because there is a quite large "firstred_exit_penalty". you might have to do some adjustments to the crossings for this to work, as it is not an infinite penalty, but tweaking that value has a lower chance of destroying the flow elsewehere in your network.
the idea here is that the firstred_exit_penalty would get larger than the combined penalty of one roundtrip to get back to that signal, or through another overflow line, or whatever.
the idea here is that the firstred_exit_penalty would get larger than the combined penalty of one roundtrip to get back to that signal, or through another overflow line, or whatever.
Who is online
Users browsing this forum: No registered users and 8 guests