Comments (4)
n 個先の閉塞の開始位置が dn [m] 先であるとする。2.5 [km/h/s] の減速度で減速していって dn - 30 [m] の位置までに停止できれば良いとすると、現在位置を通過できる速度の上限 vn [km/h] は何か? 等加速度**の公式に従えば、
vn = 3.6 √(2 (2.5 / 3.6) (dn - 30)) = √(18 (dn - 30))
さて、信号インデックス i の制限速度を li [km/h] とする。最終的に求めたいのは、 li ≤ vn を満たす最大の i である。これを求めるには li ≤ vn を満たし 0 より大きい i がいくつあるか数えればよい。ここで、 li ≤ vn の時に 1 となりそれ以外の時に 0 となる式 D(i, n) があれば、それを全ての i について足し合わせることで、求めたかった信号インデックスが求められる。
その D(i, n) であるが、vn ≥ 0, li > 0であるから、 D(i, n) = min(1, floor(vn / li)) とすればよい。さらに、 v は高々数千 [km/h] だから、 D(i, n) = ceil(floor(vn / li) / 65536) とでもしておけば十分である。
from bve-random-map.
進行信号は二段階あって、見た目は同じだが次が進行か進行以外かで信号インデックスが違う。これに対応するには、ある閉塞を設置したときの信号インデックスを変数に覚えておいて、その一つ手前の閉塞を設置するときにそれを参照するとよい。(ただし、これは ATC では行わなくてよい)
先行列車が n 個先の閉塞にいるときの現在閉塞の信号インデックス (上の D(i, n) の和) を cn とする。そして先行列車の位置が同じ時での一つ先の閉塞の信号インデックスを fn とする。現在閉塞と一つ先の閉塞とで連続した進行信号となるときを考慮した現在閉塞の信号インデックスを hn とすると、これは以下のように求められる。
hn = cn + floor(fn / m)
ただし m は進行信号の信号インデックスである。ここでは m が 2 以上の整数であるという仮定を用いた。
from bve-random-map.
さらに、進行信号の次にいきなり警戒信号や停止信号が出てきたら面食らうので、隣り合う閉塞の信号インデックスの差は 2 以下に抑えることにする。そのために、ある閉塞を設置したときの信号インデックスを変数に覚えておいて、その一つ手前の閉塞を設置するときに差が大きくなり過ぎないように抑える。 (ただし、これは ATC では行わなくてよい)
信号インデックスの差が大きくなり過ぎないように抑えた信号インデックスを jn とすると、
jn = min(hn, fn + 2)
なお
min(x, y) = (x + y - abs(x - y)) / 2
from bve-random-map.
CS-ATC の場合は、信号インデックスが一閉塞づつずれる。
例えば、n 番目の閉塞に先行列車がいる場合、n - 1 番目の閉塞の信号インデックスは 10 (= ATC 01 信号) となる。自車が n - 1 番目の閉塞に進入したときに n 番目の閉塞より手前で止まれる上限の速度を v [km/h] とすると、n - 2 番目の閉塞の信号インデックスは対応する速度が v 以下の最も大きな信号インデックスとなる。それは、ATC でない路線において n - 1 番目の閉塞に設定される信号インデックスに等しい。
from bve-random-map.
Related Issues (7)
- CS-ATC 用車両
- 逆方向に路線を生成 HOT 2
- 先行列車の動きと自車のダイヤの合わせ方 HOT 4
- CS-ATC
- 制限速度 HOT 9
- CS-ATC: 地上子の配置を見直す HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bve-random-map.