Load Balancer/Shift Mainline

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
bencookman
Engineer
Engineer
Posts: 12
Joined: 07 Oct 2004 07:46

Load Balancer/Shift Mainline

Post by bencookman »

Hi all

I have been studying the networks constructed by the openttdcoop group, which are simply amazing in many cases!

However, I have a question about the shift mainline/load balancing system. In the screenshot attached the empty wood train has taken the junction to move to a track further out in the mainline. Why has it done this? What is the logic that tells it to shift to the right, even if its route straightahead is still free?

Think it's a great method to gain efficiency, but I'm puzzled how it works!

Thanks, Ben.
Attachments
More Sand in Your Ear, 29th Jun 2344.png
More Sand in Your Ear, 29th Jun 2344.png (73.09 KiB) Viewed 1256 times
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

The point was to let mainline trains switch mainlines so one lane gets rather empty for trains joining the mainline so they don't have to wait for that long. It is all explained on the SML page (R&D section of the wiki) too.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
bencookman
Engineer
Engineer
Posts: 12
Joined: 07 Oct 2004 07:46

Post by bencookman »

Hi - thanks for the pointer towards the wiki. I already realised that the purpose of the shift mainline design is to move trains away from the merge line, to make room for the joining train, but my question was more specific: the train in the screenshot has chosen to shift to the next mainline outwards, but I want to know WHY it has chosen to do that, because its route straight ahead is clear, so I would have thought it would have continued straight ahead rather than switching to the next mainline. Can anyone tell me what is within the game's programming which tells it to shift lines, even though its route straight ahead is clear?

Thanks again.
SoLo
Engineer
Engineer
Posts: 54
Joined: 05 Jun 2007 17:54

Post by SoLo »

I found that when making cross overs like that between the two lines. If there is a train up ahead, even if there are a few green signals between the lead train and the cross point, the train will switch lines because the other side is clearer. Might just be something with the path finding. The train sees more green on one line then the other so it takes it assuming that it is the better choice.
bencookman
Engineer
Engineer
Posts: 12
Joined: 07 Oct 2004 07:46

Post by bencookman »

Just a thought - perhaps it is because of the "fake" cross-overs on the straight ahead route which act as "barriers" and make the train think that the option of switching to the other main line is "clearer". Is that the case?
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

There are single tile stations which add a penalty to the route straight ahead, so trains will try to avoid that route and take the other lane.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
bencookman
Engineer
Engineer
Posts: 12
Joined: 07 Oct 2004 07:46

Post by bencookman »

Perfect - thanks for clarifying. I can now see that the station contains the "void" grf from your new graphics set. I hadn't spotted that the station was there when I posted my question. Explains everything!

Cheers.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 6 guests