aboutsummaryrefslogtreecommitdiff
path: root/advtrains_line_automation
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-06-05 15:49:53 +0200
committerorwell96 <orwell@bleipb.de>2019-06-05 15:49:53 +0200
commitd6cfa7dbf62887ba4b408900946ade28f7ca12c3 (patch)
tree5a283c0cd6a08e56808a855f81f9ed0e86abdd1f /advtrains_line_automation
parentff9412976154f60982e3a2f32108e36a1fd61635 (diff)
downloadadvtrains-d6cfa7dbf62887ba4b408900946ade28f7ca12c3.tar.gz
advtrains-d6cfa7dbf62887ba4b408900946ade28f7ca12c3.tar.bz2
advtrains-d6cfa7dbf62887ba4b408900946ade28f7ca12c3.zip
Run entity overrun checking only in loaded areas
Diffstat (limited to 'advtrains_line_automation')
0 files changed, 0 insertions, 0 deletions
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
\batchmode
\makeatletter
\def\input@path{{/home/moritz/Home/Projekte/Minetest/minetest/mods/advtrains/assets/}}
\makeatother
\documentclass[english]{paper}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=1cm,bmargin=1cm,lmargin=1cm,rmargin=1cm}
\setlength{\parindent}{0bp}
\usepackage{graphicx}
\usepackage{babel}
\begin{document}

\title{Minetest Mod - Advanced Trains {[}advtrains{]}}

\title{Interlocking System Guide}
\maketitle

\section{Introduction}

In real-world railways, a so-called interlocking system is a set of
railway signals and trackside equipment. Its purpose is to prevent
conflicting train movements which otherwise could result in derailing
or colliding trains. If you want more information, just search for
``railway interlocking'' on the internet.

Real-world interlocking systems perform this task by setting routes.
A route is a path along a track that a train can safely pass. To set
a route for a train, the signalman (the operator of a signal box)
has to set switches (turnouts) to the correct position and lock them
in order to make a signal for a train show ``Proceed''. In newer
systems, this is done automatically by the interlocking system. A
route can not be set if switches are locked to a wrong position by
another route or if any portion of the route is occupied by a train.

The interlocking system in this Minetest mod tries to follow real-world
interlocking systems as far as applicable. It divides tracks into
track sections and implements a route setting mechanism following
the same principle.

However, for the sake of simplicity of implementation and usage, not
all concepts of real-world interlocking have been taken over. Especially,
there is no mechanism for overlap.

If you are looking for a place to learn how real-world interlocking
systems work, have a look at ``SimSig''. By looking at their simulations,
you can obtain experience on how to set up your own interlocking systems
in AdvTrains. The SimSig glossary is a good place to look up unknown
terms in this document.

\section{Setting up track sections}

In the real world, a line of track is divided into so-called track
sections, or track circuits. Those systems often can not tell where
exactly a train is, but only which track sections it occupies. A route
can never be set through an occupied track section.

A track section often covers:
\begin{itemize}
\item A section on a main running line, between two signals
\item A single turnout
\item A rail crossing, or a set of turnouts acting as a double/single slip
switch
\item A siding
\end{itemize}
You will find some examples on how to interlock certain patterns later.

\subsection{Track Circuit Breaks}

In this mod, you will not directly configure the locations of track
sections. Instead, you designate the borders of each track section
using a special node, the Track Circuit Break, abbreviated TCB.

For example, if you want to create a track section for a piece of
a main running line, you set up two TCBs at the ends of this track
circuit.

Setting up a TCB works as follows:
\begin{enumerate}
\item Place a TCB node somewhere near the place where the circuit break
is going to be located.
\item Right-click the TCB node
\item Punch the rail which should act as TCB
\end{enumerate}
The result should look like this:

\includegraphics[width=10cm]{0_home_moritz_Home_Projekte_Minetest_minetest_m___s_assets_lyx_img_screenshot_20180830_142551.png}

Now you have assigned the TCB node to a rail. Right-click the TCB
node once again. This will bring up a form which looks as follows:

\includegraphics[width=10cm]{1_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-26-35.png}

You see that the form is divided in side A and side B. To designate
where each side is, a marker is displayed on the rail. You can always
make this marker show up by punching the TCB node, and remove it by
punching the marker. Both sides are shown as ``End of interlocking''.
This means that there is no track section set up at this place.

You should repeat this procedure once again a few meters away from
the first TCB to create a second TCB on the same track.

\includegraphics[width=10cm]{2_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-32-48.png}

Once you have both bordering TCBs set up, you can now create the actual
track section. To do this:
\begin{enumerate}
\item Right-click one of the TCBs
\item Locate the correct side (A or B) to create the track section
\item Click ``Create interlocked Track Section'' in the formspec on the
chosen side.
\end{enumerate}
Now, the text on the formspec has changed. It shows something like
this:

\includegraphics[width=5cm]{3_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-27-25.png}

Clicking ``Show Track Section'' brings up another formspec:

\includegraphics[width=5cm]{4_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-28-32.png}

On the top, you see a list of all TCBs that border this track section.
In your case, there should be two TCBs listed. If there's only one,
head over to \ref{subsec:Long-track-sections,}. You should now select
a name for the track section, to identify it later.

The same procedure is applicable when you create a turnout track section,
except that you have to set up three or more TCBs.

The AdvTrains interlocking system allows you to add more TCBs after
you have created a track section. This works without problems in most
cases. For example, you can easily insert a turnout into an already
set-up track section and create another TCB behind it, and AdvTrains
will automatically detect the existing track section. Problems arise
only if you try to insert a TCB in-between a section, in which case
both sides of the TCB will end up assigned to the same section. The
code currently does not handle this case properly, so try to avoid
this situation by all means. As a last resort, you can always dissolve
a faulty track section, as described in the next chapter.

\subsection{Long track sections, crossings and other edge cases\label{subsec:Long-track-sections,}}

\subsubsection{Very long track sections}

If you try to set up a track section that is longer than 1000 nodes,
advtrains won't recognize the TCB at the other end because of a safety
limit in the traverser function, which is supposed to prevent deadlocks.
This case has happened when the Track Section overview screen only
shows one TCB in the list. The procedure for this is as follows:
\begin{enumerate}
\item Go to the second TCB (the one that wasn't recognized). It should show
``End of Interlocking'' on the relevant side.
\item Click ``Create interlocked track section''. The section created
will be different from the one that is already present.
\item In the track section overview, click ``Join into other section''
\item Go back to the first TCB, bring up the Track Section overview screen
of the first track section and click ``Join with ???''
\end{enumerate}
The other, missing TCB should now appear in the list. If you accidentally
started such a joining procedure, click the ``X'' button on the
right.

\subsubsection{Rail crosses}

Since rail crosses are created by laying tracks across each other
without logical connection, there's no way for advtrains to know whether
rails cross each other.

Rail crossings in interlocking systems are always one single track
section, which in most cases has 4 TCBs adjacent.

\includegraphics[width=5cm]{5_home_moritz_Home_Projekte_Minetest_minetest_m____lyx_img_Bildschirmfoto_2018-08-30_14-51-25.png}

The procedure is quite similar to the one for long sections: First,
create two track sections for the branches, and then use the ``Join''
function to merge both sections into one.

\subsubsection{Deleting and re-adding single TCBs to a section}

In some occasions, for example when you remove a siding or a crossover,
it can be necessary to unassign a TCB from a track section. There
are multiple ways to do this:
\begin{itemize}
\item In the TCB form, click the ``Remove from section'' button
\item In the track section form, first select the TCB in the list and then
click ``Unlink selected TCB''
\end{itemize}
The result is that the TCB shows ``End of Interlocking'' and the
section does not list the TCB as an endpoint anymore.

The other case is adding a siding or a crossover, in which case one
or more TCBs still show ``End of Interlocking'' although they should
be part of a section:
\begin{itemize}
\item Go to another TCB that is registered in the track section and click
``Update near TCBs''
\item If that did not work, follow the procedure of creating a long track
section
\end{itemize}

\subsubsection{Dissolving sections}

If you made a mistake setting up something and you don't see any other
way to fix a misconfigured track section, you can always delete it
using the ``Dissolve section'' button. This operation removes the
track section and sets all TCBs that previously belonged to the section
as ``End of Interlocking''. This will always work and lets you start
over new with setting up track sections.

\subsection{Interlocking patterns}

Have a look at the following images. They show you how you can set
up sections so that reasonable train moves are possible.

You should settle on a naming scheme for your sections. This way,
you can determine the source of an issue faster

\section{Signals and routes}

Signals are appliances that can give instructions to trains. That
can be the permission to proceed, a speed restriction, or other information.

There are 2 types of signals:
\begin{itemize}
\item Static signals always display the same information to the train. This
can be a speed restriction (or the end of one), a disallowal to proceed
as shunt move or similar things. In most cases, these are signs.
\item Dynamic signals are what most people would call a ``signal''. Its
function is to inform trains about whether and at which speed they
can proceed into the next section safely.
\end{itemize}

\subsection{Signal Influence Point}

Every signal is associated to a track on which the instruction should
be followed. Signals are usually placed right next to the track on
the right side. Human observers do know then that the signal belongs
to the track left of it, however, train safety systems (like the one
in advtrains) can not.

This is the reason why a so-called ``influence point'' needs to
be assigned to any signal that should actually give instructions to
trains, should the driver (if even there is one) fail to recognize
the instructions.

Depending on the signal and the mod that adds the signal, there are
different ways to configure this. Signals integrated into advtrains
behave as follows:
\begin{itemize}
\item Static signals and all red-green light signals from core advtrains
that are not assigned to a TCB can be configured by holding the ``Use''
key and then right-clicking the signal
\item All signals that are assigned to a TCB can be configured by first
right-clicking them, then selecting ``Influence Point'' in the signalling
formspec.
\end{itemize}
The small formspec that opens allows you to set and later view or
clear the Influence Point. To set the influence point, click the ``Set''
button, face towards the signal and punch a rail about 2m in front
of the signal. A small marker will be shown, indicating success. To
cancel setting an influence point, punch anything other. (note that
then the influence point remains unset, regardless of its previous
state)

The advtrains-internal train safety system ensures that the train
always obeys any restrictions imposed by signals, if (and only if)
the influence point is set properly.

\subsection{Signal Aspects}

While static signals are mainly used for speed restrictions, the interesting
ones are variable signals. Of course, you can always control any variable
signal by traditional means (mesecons, digiline, right-click) if the
signal allows it, but that misses the point of this interlocking system.

A signal aspect is a piece of information that a signal shows to the
train driver. It contains information about whether and at what speed
the driver may proceed at the signal.

Every signal, both static and dynamic ones, imposes a certain aspect
to trains passing the signal. For static signals, this is always the
same aspect, such as ``Proceed at speed of 8'' or ``Shunt moves
may not pass''. Dynamic signals, however, can display multiple different
aspects. The default for them is always as restrictive as possible,
mostly ``Halt!''.

You should know that both static and dynamic signals use exactly the
same properties for signal aspects. There is no difference in the
meaning of the aspect definitions.

In the following sections, we will talk about main signals. By this,
we mean a variable signal that can display both a ``Danger'' aspect
(trains are not allowed to proceed) and at least one ``Proceed''
aspect (train may proceed as train/shunt move, with optional speed
restriction), which act as an ``entry signal'' for one or multiple
routes.

\subsection{Train moves and Shunt Moves}
\begin{itemize}
\item A ``Train move'' is a train that is running, going to run on or
coming from a main line between stations, passing through or stopping
at a station. Train moves can expect that there are no obstacles on
the route and they can proceed at the maximum permitted speed of the
line. This is the regular operation mode for trains. Shunt signals
have no meaning for train moves.
\item A ``Shunt move'' is a train that moves within a station and/or is
coupling or decoupling wagons or engines. A shunt move may never leave
a station except into a siding. Also, shunt moves may drive at a maximum
speed of 6 speed units, because it is usually not ensured that the
path is free of obstacles. (however, advtrains ensures that every
route is free of railway vehicles, even shunt routes)
\end{itemize}
There are also 2 general types of signals: Main signals and Shunt
signals. While main signals have a meaning for all types of trains,
Shunt signals only have to be followed by shunt moves. Usually, Shunt
signals that are on a train move route are set to a Proceed aspect
as well.

When a train reverses, its mode automatically changes to ``shunt
move'' until it passes a main signal that shows ``Proceed as train
move'', which is usually designated by a green light. From this point
on, it can accelerate to maximum permitted speed.

Some main signals, like the ones from the Ks signals mod included
by default, can also display ``Proceed as shunt move'', which is
designated by 2 white lights along with the red light. Once a train
passes this signal, it becomes a shunt move.

\subsection{The concept of routes}

A so-called route is a locked path between two main signals, which
locks all turnouts in the correct position. Its purpose is to offer
a train a path on which it can safely proceed without interfering
with any other train. A route always incorporates and locks one to
multiple track sections, starting with the one that lies directly
behind the ``entry'' signal.

Example: Imagine a station with 2 platforms on a single track running
line. We are looking at signal A. You probably want trains coming
from the right to go into platform 1 or into platform 2, so you need
to program 2 routes.

\includegraphics[width=7cm]{6_home_moritz_Home_Projekte_Minetest_minetest_mods_advtrains_assets_lyx_img_route_ex1.png}

This leads us to the most important aspect of route programming: Routes
always start at a signal (A) and end at a signal facing in the \textbf{same
direction} (D and E), not at an opposite-facing signal (B and C).
There are only few exceptions, we'll cover this later.

When you set a route to make a train proceed on it, the interlocking
system ensures that:
\begin{itemize}
\item There are no rail vehicles on the route
\item All turnouts are set to the correct position and it is impossible
to move them
\item No other routes can be set that would in any way conflict with this
route
\end{itemize}
For this to work, you need to specify all track sections the train
will pass along, as well as the positions of all turnouts that need
to be locked. Those are not only the turnouts that lay directly on
the train's route, but also some turnouts on adjacent tracks, the
so-called flank protection.

The purpose of flank protection is to prevent runaway trains and/or
wagons to pass into a route. This is achieved by setting nearby turnouts