interlocking.tex 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. \batchmode
  2. \makeatletter
  3. \def\input@path{{/home/moritz/Home/Projekte/Minetest/minetest/mods/advtrains/assets/}}
  4. \makeatother
  5. \documentclass[english]{paper}
  6. \usepackage[T1]{fontenc}
  7. \usepackage[latin9]{inputenc}
  8. \usepackage{geometry}
  9. \geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
  10. \setlength{\parindent}{0bp}
  11. \usepackage{graphicx}
  12. \usepackage{babel}
  13. \begin{document}
  14. \title{Minetest Mod - Advanced Trains {[}advtrains{]}}
  15. \title{Interlocking System Guide}
  16. \maketitle
  17. \section{Introduction}
  18. In real-world railways, a so-called interlocking system is a set of
  19. railway signals and trackside equipment. Its purpose is to prevent
  20. conflicting train movements which otherwise could result in derailing
  21. or colliding trains. If you want more information, just search for
  22. ``railway interlocking'' on the internet.
  23. Real-world interlocking systems perform this task by setting routes.
  24. A route is a path along a track that a train can safely pass. To set
  25. a route for a train, the signalman (the operator of a signal box)
  26. has to set switches (turnouts) to the correct position and lock them
  27. in order to make a signal for a train show ``Proceed''. In newer
  28. systems, this is done automatically by the interlocking system. A
  29. route can not be set if switches are locked to a wrong position by
  30. another route or if any portion of the route is occupied by a train.
  31. The interlocking system in this Minetest mod tries to follow real-world
  32. interlocking systems as far as applicable. It divides tracks into
  33. track sections and implements a route setting mechanism following
  34. the same principle.
  35. However, for the sake of simplicity of implementation and usage, not
  36. all concepts of real-world interlocking have been taken over. Especially,
  37. there is no mechanism for overlap.
  38. If you are looking for a place to learn how real-world interlocking
  39. systems work, have a look at ``SimSig''. By looking at their simulations,
  40. you can obtain experience on how to set up your own interlocking systems
  41. in AdvTrains. The SimSig glossary is a good place to look up unknown
  42. terms in this document.
  43. \section{Setting up track sections}
  44. In the real world, a line of track is divided into so-called track
  45. sections, or track circuits. Those systems often can not tell where
  46. exactly a train is, but only which track sections it occupies. A route
  47. can never be set through an occupied track section.
  48. A track section often covers:
  49. \begin{itemize}
  50. \item A section on a main running line, between two signals
  51. \item A single turnout
  52. \item A rail crossing, or a set of turnouts acting as a double/single slip
  53. switch
  54. \item A siding
  55. \end{itemize}
  56. You will find some examples on how to interlock certain patterns later.
  57. \subsection{Track Circuit Breaks}
  58. In this mod, you will not directly configure the locations of track
  59. sections. Instead, you designate the borders of each track section
  60. using a special node, the Track Circuit Break, abbreviated TCB.
  61. For example, if you want to create a track section for a piece of
  62. a main running line, you set up two TCBs at the ends of this track
  63. circuit.
  64. Setting up a TCB works as follows:
  65. \begin{enumerate}
  66. \item Place a TCB node somewhere near the place where the circuit break
  67. is going to be located.
  68. \item Right-click the TCB node
  69. \item Punch the rail which should act as TCB
  70. \end{enumerate}
  71. The result should look like this:
  72. \includegraphics[width=10cm]{0_home_moritz_Home_Projekte_Minetest_minetest_m___s_assets_lyx_img_screenshot_20180830_142551.png}
  73. Now you have assigned the TCB node to a rail. Right-click the TCB
  74. node once again. This will bring up a form which looks as follows:
  75. \includegraphics[width=10cm]{1_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-26-35.png}
  76. You see that the form is divided in side A and side B. To designate
  77. where each side is, a marker is displayed on the rail. You can always
  78. make this marker show up by punching the TCB node, and remove it by
  79. punching the marker. Both sides are shown as ``End of interlocking''.
  80. This means that there is no track section set up at this place.
  81. You should repeat this procedure once again a few meters away from
  82. the first TCB to create a second TCB on the same track.
  83. \includegraphics[width=10cm]{2_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-32-48.png}
  84. Once you have both bordering TCBs set up, you can now create the actual
  85. track section. To do this:
  86. \begin{enumerate}
  87. \item Right-click one of the TCBs
  88. \item Locate the correct side (A or B) to create the track section
  89. \item Click ``Create interlocked Track Section'' in the formspec on the
  90. chosen side.
  91. \end{enumerate}
  92. Now, the text on the formspec has changed. It shows something like
  93. this:
  94. \includegraphics[width=5cm]{3_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-27-25.png}
  95. Clicking ``Show Track Section'' brings up another formspec:
  96. \includegraphics[width=5cm]{4_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-28-32.png}
  97. On the top, you see a list of all TCBs that border this track section.
  98. In your case, there should be two TCBs listed. If there's only one,
  99. head over to \ref{subsec:Long-track-sections,}. You should now select
  100. a name for the track section, to identify it later.
  101. The same procedure is applicable when you create a turnout track section,
  102. except that you have to set up three or more TCBs.
  103. The AdvTrains interlocking system allows you to add more TCBs after
  104. you have created a track section. This works without problems in most
  105. cases. For example, you can easily insert a turnout into an already
  106. set-up track section and create another TCB behind it, and AdvTrains
  107. will automatically detect the existing track section. Problems arise
  108. only if you try to insert a TCB in-between a section, in which case
  109. both sides of the TCB will end up assigned to the same section. The
  110. code currently does not handle this case properly, so try to avoid
  111. this situation by all means. As a last resort, you can always dissolve
  112. a faulty track section, as described in the next chapter.
  113. \subsection{Long track sections, crossings and other edge cases\label{subsec:Long-track-sections,}}
  114. \subsubsection{Very long track sections}
  115. If you try to set up a track section that is longer than 1000 nodes,
  116. advtrains won't recognize the TCB at the other end because of a safety
  117. limit in the traverser function, which is supposed to prevent deadlocks.
  118. This case has happened when the Track Section overview screen only
  119. shows one TCB in the list. The procedure for this is as follows:
  120. \begin{enumerate}
  121. \item Go to the second TCB (the one that wasn't recognized). It should show
  122. ``End of Interlocking'' on the relevant side.
  123. \item Click ``Create interlocked track section''. The section created
  124. will be different from the one that is already present.
  125. \item In the track section overview, click ``Join into other section''
  126. \item Go back to the first TCB, bring up the Track Section overview screen
  127. of the first track section and click ``Join with ???''
  128. \end{enumerate}
  129. The other, missing TCB should now appear in the list. If you accidentally
  130. started such a joining procedure, click the ``X'' button on the
  131. right.
  132. \subsubsection{Rail crosses}
  133. Since rail crosses are created by laying tracks across each other
  134. without logical connection, there's no way for advtrains to know whether
  135. rails cross each other.
  136. Rail crossings in interlocking systems are always one single track
  137. section, which in most cases has 4 TCBs adjacent.
  138. \includegraphics[width=5cm]{5_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-51-25.png}
  139. The procedure is quite similar to the one for long sections: First,
  140. create two track sections for the branches, and then use the ``Join''
  141. function to merge both sections into one.
  142. \subsubsection{Deleting and re-adding single TCBs to a section}
  143. In some occasions, for example when you remove a siding or a crossover,
  144. it can be necessary to unassign a TCB from a track section. There
  145. are multiple ways to do this:
  146. \begin{itemize}
  147. \item In the TCB form, click the ``Remove from section'' button
  148. \item In the track section form, first select the TCB in the list and then
  149. click ``Unlink selected TCB''
  150. \end{itemize}
  151. The result is that the TCB shows ``End of Interlocking'' and the
  152. section does not list the TCB as an endpoint anymore.
  153. The other case is adding a siding or a crossover, in which case one
  154. or more TCBs still show ``End of Interlocking'' although they should
  155. be part of a section:
  156. \begin{itemize}
  157. \item Go to another TCB that is registered in the track section and click
  158. ``Update near TCBs''
  159. \item If that did not work, follow the procedure of creating a long track
  160. section
  161. \end{itemize}
  162. \subsubsection{Dissolving sections}
  163. If you made a mistake setting up something and you don't see any other
  164. way to fix a misconfigured track section, you can always delete it
  165. using the ``Dissolve section'' button. This operation removes the
  166. track section and sets all TCBs that previously belonged to the section
  167. as ``End of Interlocking''. This will always work and lets you start
  168. over new with setting up track sections.
  169. \subsection{Interlocking patterns}
  170. Have a look at the following images. They show you how you can set
  171. up sections so that reasonable train moves are possible.
  172. You should settle on a naming scheme for your sections. This way,
  173. you can determine the source of an issue faster
  174. \section{Signals and routes}
  175. Signals are appliances that can give instructions to trains. That
  176. can be the permission to proceed, a speed restriction, or other information.
  177. There are 2 types of signals:
  178. \begin{itemize}
  179. \item Static signals always display the same information to the train. This
  180. can be a speed restriction (or the end of one), a disallowal to proceed
  181. as shunt move or similar things. In most cases, these are signs.
  182. \item Dynamic signals are what most people would call a ``signal''. Its
  183. function is to inform trains about whether and at which speed they
  184. can proceed into the next section safely.
  185. \end{itemize}
  186. \subsection{Signal Influence Point}
  187. Every signal is associated to a track on which the instruction should
  188. be followed. Signals are usually placed right next to the track on
  189. the right side. Human observers do know then that the signal belongs
  190. to the track left of it, however, train safety systems (like the one
  191. in advtrains) can not.
  192. This is the reason why a so-called ``influence point'' needs to
  193. be assigned to any signal that should actually give instructions to
  194. trains, should the driver (if even there is one) fail to recognize
  195. the instructions.
  196. Depending on the signal and the mod that adds the signal, there are
  197. different ways to configure this. Signals integrated into advtrains
  198. behave as follows:
  199. \begin{itemize}
  200. \item Static signals and all red-green light signals from core advtrains
  201. that are not assigned to a TCB can be configured by holding the ``Use''
  202. key and then right-clicking the signal
  203. \item All signals that are assigned to a TCB can be configured by first
  204. right-clicking them, then selecting ``Influence Point'' in the signalling
  205. formspec.
  206. \end{itemize}
  207. The small formspec that opens allows you to set and later view or
  208. clear the Influence Point. To set the influence point, click the ``Set''
  209. button, face towards the signal and punch a rail about 2m in front
  210. of the signal. A small marker will be shown, indicating success. To
  211. cancel setting an influence point, punch anything other. (note that
  212. then the influence point remains unset, regardless of its previous
  213. state)
  214. The advtrains-internal train safety system ensures that the train
  215. always obeys any restrictions imposed by signals, if (and only if)
  216. the influence point is set properly.
  217. \subsection{Signal Aspects}
  218. While static signals are mainly used for speed restrictions, the interesting
  219. ones are variable signals. Of course, you can always control any variable
  220. signal by traditional means (mesecons, digiline, right-click) if the
  221. signal allows it, but that misses the point of this interlocking system.
  222. A signal aspect is a piece of information that a signal shows to the
  223. train driver. It contains information about whether and at what speed
  224. the driver may proceed at the signal.
  225. Every signal, both static and dynamic ones, imposes a certain aspect
  226. to trains passing the signal. For static signals, this is always the
  227. same aspect, such as ``Proceed at speed of 8'' or ``Shunt moves
  228. may not pass''. Dynamic signals, however, can display multiple different
  229. aspects. The default for them is always as restrictive as possible,
  230. mostly ``Halt!''.
  231. You should know that both static and dynamic signals use exactly the
  232. same properties for signal aspects. There is no difference in the
  233. meaning of the aspect definitions.
  234. In the following sections, we will talk about main signals. By this,
  235. we mean a variable signal that can display both a ``Danger'' aspect
  236. (trains are not allowed to proceed) and at least one ``Proceed''
  237. aspect (train may proceed as train/shunt move, with optional speed
  238. restriction), which act as an ``entry signal'' for one or multiple
  239. routes.
  240. \subsection{Train moves and Shunt Moves}
  241. \begin{itemize}
  242. \item A ``Train move'' is a train that is running, going to run on or
  243. coming from a main line between stations, passing through or stopping
  244. at a station. Train moves can expect that there are no obstacles on
  245. the route and they can proceed at the maximum permitted speed of the
  246. line. This is the regular operation mode for trains. Shunt signals
  247. have no meaning for train moves.
  248. \item A ``Shunt move'' is a train that moves within a station and/or is
  249. coupling or decoupling wagons or engines. A shunt move may never leave
  250. a station except into a siding. Also, shunt moves may drive at a maximum
  251. speed of 6 speed units, because it is usually not ensured that the
  252. path is free of obstacles. (however, advtrains ensures that every
  253. route is free of railway vehicles, even shunt routes)
  254. \end{itemize}
  255. There are also 2 general types of signals: Main signals and Shunt
  256. signals. While main signals have a meaning for all types of trains,
  257. Shunt signals only have to be followed by shunt moves. Usually, Shunt
  258. signals that are on a train move route are set to a Proceed aspect
  259. as well.
  260. When a train reverses, its mode automatically changes to ``shunt
  261. move'' until it passes a main signal that shows ``Proceed as train
  262. move'', which is usually designated by a green light. From this point
  263. on, it can accelerate to maximum permitted speed.
  264. Some main signals, like the ones from the Ks signals mod included
  265. by default, can also display ``Proceed as shunt move'', which is
  266. designated by 2 white lights along with the red light. Once a train
  267. passes this signal, it becomes a shunt move.
  268. \subsection{The concept of routes}
  269. A so-called route is a locked path between two main signals, which
  270. locks all turnouts in the correct position. Its purpose is to offer
  271. a train a path on which it can safely proceed without interfering
  272. with any other train. A route always incorporates and locks one to
  273. multiple track sections, starting with the one that lies directly
  274. behind the ``entry'' signal.
  275. Example: Imagine a station with 2 platforms on a single track running
  276. line. We are looking at signal A. You probably want trains coming
  277. from the right to go into platform 1 or into platform 2, so you need
  278. to program 2 routes.
  279. \includegraphics[width=7cm]{6_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_route_ex1.png}
  280. This leads us to the most important aspect of route programming: Routes
  281. always start at a signal (A) and end at a signal facing in the \textbf{same
  282. direction} (D and E), not at an opposite-facing signal (B and C).
  283. There are only few exceptions, we'll cover this later.
  284. When you set a route to make a train proceed on it, the interlocking
  285. system ensures that:
  286. \begin{itemize}
  287. \item There are no rail vehicles on the route
  288. \item All turnouts are set to the correct position and it is impossible
  289. to move them
  290. \item No other routes can be set that would in any way conflict with this
  291. route
  292. \end{itemize}
  293. For this to work, you need to specify all track sections the train
  294. will pass along, as well as the positions of all turnouts that need
  295. to be locked. Those are not only the turnouts that lay directly on
  296. the train's route, but also some turnouts on adjacent tracks, the
  297. so-called flank protection.
  298. The purpose of flank protection is to prevent runaway trains and/or
  299. wagons to pass into a route. This is achieved by setting nearby turnouts
  300. to a position that points ``away'' from the route. Example:
  301. \includegraphics[width=7cm]{7_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_route_ex2.png}
  302. The upper turnout, of course, needs to be locked in straight (normal)
  303. position, while the lower one is not relevant for the route itself.
  304. But what if the lower turnout was set to the diverging (reverse) position
  305. and the driver of another train approaching signal B fails to see
  306. the red light? This train would crash into the first one. To minimise
  307. danger, that other train would need to be routed towards signal D.
  308. There are, of course, situations, where both positions of a turnout
  309. would conflict with a route equally. In those situations, there's
  310. nothing you can do and no flank lock needs to be set.
  311. \subsection{Assigning main signals to TCBs}
  312. Main signals in the advtrains interlocking system are positioned -
  313. like in real life - at the border of track sections, because routes
  314. also start and end there. For advtrains to know from which signal
  315. which routes can be set, you need to assign the signal to a TCB.
  316. To do this, perform the following steps:
  317. \begin{enumerate}
  318. \item If not already happened, set up a TCB (you don't need to, but are
  319. advised to, configure track sections there)
  320. \item Place the signal a few meters in front of the TCB, so that trains
  321. stopping at the signal do never pass the TCB
  322. \item Locate the side of the TCB which points in the direction that trains
  323. will proceed past the signal, as shown in the figure below.
  324. \item Right-click the TCB, and click ``Assign a signal'' on this side.
  325. \item Punch the signal.
  326. \end{enumerate}
  327. \includegraphics[width=8cm]{8_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_assign_signal.png}
  328. If you haven't set an influence point for the signal yet, the influence
  329. point formspec automatically opens.
  330. You can assign a signal to each side of a TCB. This is, for example,
  331. useful when creating block sections on a bi-directional main running
  332. line.
  333. Only main signals can ever be assigned to TCBs, because static ones
  334. can either not display ``Danger'' or do not permit to proceed at
  335. all.
  336. \subsection{Shunt routes}
  337. \textbf{The information in this section is subject to future change
  338. because of safety issues!}
  339. Operating railways is not all about driving trains around. Coupling,
  340. decoupling and moving single engines, wagons or groups of wagons across
  341. a station, called shunting, also plays an important role.
  342. Remember what we said about routes: There must be no rail vehicles
  343. on the route. So what if you have some goods wagons ready on a siding,
  344. and want to couple an engine to it? You can not set a regular route
  345. into the siding, because it is occupied.
  346. The solution is to program a second route into the siding, but with
  347. the difference that it already ends at the rear-facing signal of it,
  348. so it doesn't include the siding section itself:
  349. \includegraphics[width=7cm]{9_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_route_ex3.png}
  350. The Sht2 route then needs to show a shunt aspect, which instructs
  351. the driver to proceed slowly and watch out for vehicles on the route.
  352. See later on for how to set this up.
  353. Shunt routes like this are, so far, the only exception to the ``Routes
  354. should end at a signal facing the same direction'' rule.
  355. \subsection{Route Release}
  356. In early real-life interlocking systems, routes either had to be cancelled
  357. by the signalman after the train had passed the route, or there was
  358. a single release contact at the end of the route. However, as interlocking
  359. systems evolved and the position of trains is now roughly known by
  360. the track sections, portions of the route can be freed as soon as
  361. the train has left the corresponding section.
  362. AdvTrains has chosen a modern approach to route releasing. Each turnout
  363. lock is associated to a track section belonging to the route's path.
  364. Once the train leaves this section, all assigned locks are also freed.
  365. Please note that reversing a train outside of stations is not only
  366. discouraged, but also very dangerous, because even real-world interlocking
  367. system do not expect this. There is a clear, human-sense rule that
  368. you should never reverse the driving direction of a train while on
  369. a main line or on a turnout. Else, you can be considered a terrorist.
  370. (quote from professional!)
  371. \subsection{Programming a route}
  372. The route programming procedure is quite straightforward if you've
  373. read the previous sections and understood how routes should be set.
  374. Routes always start at a main signal. You must have assigned the signal
  375. to a TCB, as described earlier.
  376. When you right-click the main signal, it no longer changes its aspect.
  377. Instead, a formspec pops up, showing you an (empty) list of routes
  378. with the possibility to set them or to create new routes. Click the
  379. ``Create new route'' button to start programming a new route.
  380. The form closes, and an arrow is displayed on the TCB. You are now
  381. in ``Route Programming'' mode, programming the first track section
  382. of the route. Now:
  383. \begin{itemize}
  384. \item Put any turnouts you need to lock in the correct position (e.g. by
  385. right-clicking them). This includes flank protection.
  386. \item Punch them. This makes a marker with a blue lock symbol appear.
  387. \item If you punch a turnout again, or punch the marker, you can remove
  388. the lock again.
  389. \item When you've locked all turnouts in the current section, go to and
  390. punch the TCB that is the border to the next track section the train
  391. proceeds into.
  392. \end{itemize}
  393. Depending on the situation, you are now offered some possibilities
  394. to proceed:
  395. \begin{itemize}
  396. \item Click the ``Advance to next section'' button if your route consists
  397. of more sections with turnouts to lock, and you need to continue programming.
  398. Follow the above steps to set locks for the next section.
  399. \end{itemize}
  400. Once you've clicked the ``Advance'' button, the lock markers change
  401. to a red lock symbol, telling they can't be changed anymore. Repeat
  402. the above procedure until you are ready to complete the programming
  403. procedure:
  404. \begin{itemize}
  405. \item Click the ``Finish route HERE'' button when you've set up the locks
  406. for the last track section of the route and punched the final TCB
  407. (the one with the next signal). You will be asked for a route name
  408. and your route will be saved.
  409. \item The ``Finish route at end of NEXT section'' button (third button)
  410. is an useful quickhand to make the route proceed one more section.
  411. Using this button is equivalent to first clicking the ``Advance''
  412. button, then flying to the end of the next track section and finishing
  413. the route there. You can not (officially) set turnout locks in the
  414. final section using this method.
  415. \end{itemize}
  416. A few hints:
  417. \begin{itemize}
  418. \item If you accidentally advanced the route wrongly, you can use the ``Step
  419. back one section'' button to undo this.
  420. \item If you want to stop programming the entire route without saving it,
  421. use the ``Cancel route programming'' button.
  422. \item The third button is especially useful for programming simple block
  423. sections on a main running line, since you can stay at the starting
  424. signal (punch starting TCB and select third button).
  425. \item If a route should end in a dead end, you MUST use the ``Finish in
  426. NEXT section'' button, because there is no final TCB that you could
  427. punch.
  428. \item The third button does NOT work on sections with more than 2 exits,
  429. because the system won't be able to determine the final TCB of the
  430. route then.
  431. \end{itemize}
  432. \subsection{Route information screen}
  433. \includegraphics[width=10cm]{10_home_moritz_Home_Projekte_Minetest_minetest_____lyx_img_Bildschirmfoto_2019-01-15_19-28-09.png}
  434. This is the screen that appears when you click ``Edit Route''. It
  435. lets you change the route name and delete the route. Also, it shows
  436. a summary of the route and its elements.
  437. The route summary lists information per track section on the route,
  438. so the line starting with ``1'' is the first section of the route.
  439. The ARS rule list and its purpose is explained later.
  440. \subsection{Specifying signal aspects}
  441. By default, newly programmed routes show an aspect that comes closest
  442. to ``Proceed at maximum speed''. However, it can be desirable to
  443. change this behavior, like when the route passes a diverging turnout,
  444. the train should be signalled to drive slower, or the route is a shunt
  445. route and therefore only ``Shunting allowed'' should be shown.
  446. This is the purpose of the ``Change Aspect'' button in the route
  447. info screen.
  448. Signal aspects in advtrains consist of 4 sections: main (Information
  449. for train moves), dst (Distant signal information, not implemented
  450. yet), shunt (Information for shunt moves) and info (additional information,
  451. currently not in use).
  452. \begin{itemize}
  453. \item Train may proceed as train move at maximum speed: ``main: free, speed
  454. -1''
  455. \item Train may proceed as train move at speed of 8: ``main: free, speed
  456. 8''
  457. \item Train may proceed as shunt move: ``shunt: free''
  458. \end{itemize}
  459. There's a field in the ``shunt'' part of signal aspects that is
  460. not displayed in the GUI, but is of potential interest to developers
  461. of signal addons: shunt.proceed\_as\_main.
  462. \begin{itemize}
  463. \item A train move can always become a shunt move by passing a signal that
  464. shows ``Halt for train moves, shunting permitted''
  465. \item A shunt move can only pass a signal saying ``Proceed as train move,
  466. shunting not permitted'' when proceed\_as\_main is true.
  467. \end{itemize}
  468. The property is used by the Limit Of Shunt sign, where proceed\_as\_main
  469. is set to false. Shunt moves have to stop in front of it, while train
  470. moves are signalled ``Proceed''. Regular main signals that show
  471. ``green'' have the field set to true, so that all trains can pass
  472. it.
  473. \section{Interlocking system operation}
  474. Setting up the interlocking for a portion of a railway network requires
  475. some time, experience and planning, but once done, there's not much
  476. to do anymore to make trains run on your, now safer, railway. This
  477. section covers some useful practices to route trains across your network.
  478. At the moment, routes can either be set by clicking the signal or
  479. via LuaATC, or by using the ``Remote Routesetting'' button from
  480. the Onboard Computer. It is planned to control this via a ``signal
  481. box'' view based on the currently broken itrainmap.
  482. \subsection{Train Safety System}
  483. The Train Safety System, called ``LZB'' in the code (from the german
  484. term Linienzugbeeinflussung, although this is a completely different
  485. system), ensures that trains obey any restrictions imposed by signals
  486. when influence points are set. This way, it is not possible to pass
  487. signals at danger or to bypass speed restrictions.
  488. It is possible to overrun red signals, if a route is cancelled while
  489. a train is approaching. Real interlocking systems use a mechanism
  490. called Approach locking for this, however, as of now, there's no similar
  491. system in this mod. If a red signal is overrun, the train brakes using
  492. emergency brake (``BB'') and can not be moved any further. You should
  493. then examine the situation and drive the train backwards out of the
  494. section.
  495. \subsection{Simple route setting and cancelling}
  496. To set a route, simply right-click the signal, select a route and
  497. click ``set route''. If there are no conflicts, the signal turns
  498. green and the train is allowed to proceed.
  499. It may be possible that the route can not be set, because one or more
  500. other routes conflict with the current one, or a section is blocked.
  501. In this case, the signal stays red, and the conflicting item is shown
  502. in the formspec. As soon as the conflict is resolved (by cancellation
  503. or release of the conflicting route, or the section becoming free),
  504. the requested route will be set and the signal turns green.
  505. If a route is either requested or set, it can be cancelled from the
  506. signalling formspec. This means that all turnouts and sections are
  507. released, and the signal reverts back to red. This of course only
  508. works when the train has not passed the signal yet. There is no mechanism
  509. for Approach Locking.
  510. \subsection{Automatic Working}
  511. Block signals on main running lines usually only have a single route
  512. to set, the one proceeding along the main line. Their purpose is only
  513. to show whether there are trains in the next section. So, it would
  514. be convenient if this only route would set itself again after a train
  515. passed.
  516. This is what Automatic Working is for. Set a route, click ``Enable
  517. Automatic Working'', and as soon as a train passes, the route is
  518. automatically re-set.
  519. This function is nearly identical to SimSig automatic signals. It
  520. can also be useful on a line with high traffic, when there's a low-frequented
  521. access to a siding. You'd enable automatic working for the main route
  522. and cancel it only when you need a train to go into the siding.
  523. \subsection{Automatic Route Setting (ARS)}
  524. As interlocking systems evolved, the goal always was to offload work
  525. from the human to the system, automating things. Modern interlocking
  526. systems can automatically set routes based on a pre-programmed routing
  527. table for each particular train. Since one outstanding feature of
  528. Advtrains is it's high degree of automation, it has a similar system
  529. to automatically set routes for a train depending on certain parameters.
  530. Every train in Advtrains has 2 internal properties that can be set
  531. through the Onboard Computer of every engine in the train, the ``Line''
  532. and the ``Routing Code''
  533. \begin{itemize}
  534. \item The ``Line'' property is supposed to distinguish trains of multiple
  535. lines that share a track.
  536. \item The ``Routing Code'' property is supposed to tell the target of
  537. a train or which route it should take to reach the target
  538. \end{itemize}
  539. Examples:
  540. \includegraphics{11_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_arslin_ex1.png}
  541. Both lines share the section between Blackbirdshire and Parktown.
  542. To divert them again, they can save their line number in the ``Line''
  543. field.
  544. \includegraphics{12_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_arslin_ex2.png}
  545. Some trains should go to B, some to C, the direction can be set with
  546. a routing code.
  547. One single routing code should not contain spaces. You can set multiple
  548. routing codes by just separating them with spaces in the Routing Code
  549. field. So, ``Stn Ori'' would be matched by ARS rules either containing
  550. ``Stn'' or ``Ori''. This does not work for lines.
  551. \subsubsection{Writing ARS Rules}
  552. Every route of every signal can be given a set of ARS rules. A single
  553. ARS rule can either match a line or a routing code (combinations,
  554. e.g. and's, are not yet supported). The first rule in the first route
  555. that matches any of the properties of the train is selected, and that
  556. route is set for the train.
  557. \includegraphics{13_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_ars_ex1.png}
  558. You can add an asterisk (``{*}'') to the ARS rules of one route.
  559. That route then becomes the default route.
  560. If no explicit ARS rule matches the train, then the default route
  561. is chosen and set. If there is no default route, nothing happens and
  562. the signal remains red.
  563. \subsubsection{Using ARS}
  564. In contrast to Automatic working, where the route is re-set immediately
  565. after the train passed, ARS sets the route only when the train approaches
  566. the signal, e.g. is just about to start braking in front of it.
  567. At any place where one of the following things take place, you should
  568. use the ARS system in favor of Automatic Working:
  569. \begin{itemize}
  570. \item A main line diverts into 2 or more lines: Using ARS, you can direct
  571. the trains along the line where they should go
  572. \item Two or more main lines join into one: You cannot use automatic working
  573. here, because all routes are tried to be set at the same time and
  574. it is a matter of luck which one ``wins''. In a bad situation, you
  575. have a train coming from A, but it cannot proceed because Signal B
  576. has won the ``route race'' into the shared section, even if there's
  577. no train coming from B. Using ARS, by just specifying the ``default
  578. route'' by a {*}, the inward route is only set when a train approaches.
  579. \item Complex intersections, which are probably a combination of the above
  580. two
  581. \item sometimes-used branching tracks on which only certain trains (with
  582. certain routing code or line) should head off, like the entrance to
  583. a factory where only one specific goods train should drive in.
  584. \end{itemize}
  585. In the route overview, you can see some information on the ARS settings:
  586. All routes that have ARS rules are highlighted red, the ``default
  587. route'' is highlighted green.
  588. ARS does not affect signals which already have a route set, and signals
  589. which are operating under ``Automatic Working''.
  590. \section{Final notes}
  591. The interlocking system is mainly finished, though there are still
  592. some plans and ideas. They include:
  593. \begin{itemize}
  594. \item Signalbox panels, as revival of itrainmap
  595. \item Distant signals
  596. \item On-Train head-up display for oncoming signals (they have something
  597. like this in Czech Republic, I forgot how it's called.)
  598. \end{itemize}
  599. Apart from this, there's the large oncoming project of a new timetable-based
  600. train automation system, but this will take some time to evolve and
  601. is out of the scope of this document.
  602. If you have any suggestions, corrections, improvements, criticism
  603. or cute kittens and stuff, you can always contact me by various means
  604. (Forum PM, E-Mail (orwell@bleipb.de), Linuxworks server chat a.s.o.).
  605. Have fun!
  606. - orwell
  607. \end{document}