Yield Line

From #openttdcoop wiki

Revision as of 20:15, 11 May 2010 by Scobos (Talk | contribs) (The Logic)

Jump to: navigation, search

by scobos

Overview

Yield Lines are temporary extra tracks than run parallel to a ML or SL. The idea is force slow(er) trains to move to the side and allow fast(er) trains to pass.

The Concept

The joiner concept

Often a ML or SL can become slightly jammed by the presence of slower trains. This can happen when trains are out of date and haven't replaced yet, or simply when they are carrying full loads back to a drop on the same line as empty trains. Ideally, we would be able to separate trains to different tracks based on speed. Since currently this is not possible, a theoretical work-around is to separate trains based on Gap Distance.

As a slower train continue down a ML or SL, traffic builds up behind them, but a Gap opens in front of them (as faster trains move ahead). Therefore, we can assume that if there is a large Gap in front of a train, and no Gap behind it, it is probably a slow train. Now the only question is how to sort it.


The Logic

The joiner concept

Q is the Entry Combo Signal that determines whether a train can continue on the ML or must go to the Yield Line (YL). Note the penalty on the YL.

Using Osai's definition of 0 for Green and 1 for Red:

1 0
Q Will Yield Will Not Yield
X Train Following No Train Following
B Train on ML Ahead No Train on ML Ahead
C Train on YL No Train on YL


Why These Inputs Matter

X: If there is a train behind us, we might be slow and should consider yielding. If there is no train behind us, we probably aren't slow and can continue.

B: If there is a train right in front of us (who didn't yield), we probably aren't slow. If there is no train right in front of us, we might be slow and should consider yielding.

C: If there is a train on the YL, he might be slow and we should try to pass! (Continue on ML) If there is no train on the YL... well, this by itself doesn't really tell us much!

So the logic, first in words, then formula, is that we want: (Train Will Yield) if (Train is Behind) and (No Train on ML) and (No Train on YL) Q = X NAND B NAND C

which is the same as saying: (Train Will Yield) if (Train is Behind) and [No Train on ML or YL] Q = X AND (B NOR C)

Truth Table: A = (No Train on ML or YL) = B NOR C

X A Q
0 0 0
0 1 0
1 0 0
1 1 1

Pros:


Cons:

Progress on joiners

R&D Overview
Idea Player Draft of idea Testing Completed Remarks
Yield Line scobos Currently Editing
Powered by MediaWiki