Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Fri May 24, 2019 2:02 pm

All times are UTC




Post new topic  Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Sat Apr 27, 2019 3:30 pm 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
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!


Top
   
PostPosted: Sat Apr 27, 2019 4:56 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Sep 28, 2009 5:15 pm
Posts: 6577
Location: Eastern KY
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!
Image

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 | RoadTypes?


Top
   
PostPosted: Sat Apr 27, 2019 8:37 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2680
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.

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.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Sun Apr 28, 2019 5:48 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4713
Location: home
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 :mrgreen:



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
Attachment:
tarnington_map.png [45.38 KiB]
Not downloaded yet

These networks are created organically, so they are always different.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
PostPosted: Sun Apr 28, 2019 7:46 am 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
kamnet wrote:
Check out https://wiki.openttdcoop.org/Main_Page for advanced concepts on building and managing train networks.


What an interesting and profound resource. I didn't even know that site existed.

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.


Top
   
PostPosted: Sun Apr 28, 2019 7:52 am 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
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.


Top
   
PostPosted: Sun Apr 28, 2019 8:28 am 
Offline
Moderator
Moderator
User avatar

Joined: Mon Sep 28, 2009 5:15 pm
Posts: 6577
Location: Eastern KY
MarkShot 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


1. Is the official OpenTTD wiki, which is contributed to by anybody who wishes to contribute
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!
Image

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 | RoadTypes?


Top
   
PostPosted: Sun Apr 28, 2019 9:00 am 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2680
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.

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:
  1. Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
  2. Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
  3. Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline

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.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Sun Apr 28, 2019 2:22 pm 
Offline
Engineer
Engineer

Joined: Wed May 24, 2017 12:51 pm
Posts: 45
Location: East Texas
I believe that your "race track" is what is commonly referred to as a cyclotron.
https://wiki.openttd.org/Cyclotron


Top
   
PostPosted: Sun Apr 28, 2019 2:41 pm 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
Transportman wrote:
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.

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:
  1. Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
  2. Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
  3. Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline

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.


Yes, I believe this is the key to doing what I had intended.

Thanks.


Top
   
PostPosted: Sun Apr 28, 2019 2:44 pm 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
Before I retired, I was in management and systems design.

Has anyone tried to reduce these problems to queuing theory and mathematical analysis?


Top
   
PostPosted: Sun Apr 28, 2019 7:11 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2680
rowdog wrote:
I believe that your "race track" is what is commonly referred to as a cyclotron.
https://wiki.openttd.org/Cyclotron

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.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Sun Apr 28, 2019 8:03 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Nov 03, 2017 6:57 pm
Posts: 1887
Location: Courbevoie, near Paris, France
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).

_________________
NewGRFs by Tony Pixel :
North American Passenger Railroads
Not Enough Subways


My screenshots


Top
   
PostPosted: Mon Apr 29, 2019 7:28 am 
Offline
Engineer
Engineer

Joined: Wed Mar 27, 2019 11:30 am
Posts: 113
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:
  1. Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
  2. Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
  3. Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline

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.


Top
   
PostPosted: Mon Apr 29, 2019 5:27 pm 
Offline
Tycoon
Tycoon

Joined: Tue Feb 22, 2011 6:34 pm
Posts: 2680
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:
  1. Set the setting yapf.rail_firstred_twoway_eol in your openttd.cfg to true
  2. Place a two-way signal on your sideline and have the next signal on the sideline be at least one train length ahead
  3. Place a one-way signal on your bypass and continue with the usual signal distance you use on your mainline

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.

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.

_________________
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML


Top
   
PostPosted: Mon Apr 29, 2019 9:40 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7350
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.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 16 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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-2019 phpBB Limited

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