Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Scheduler is used to route between segments with contact. Each train is scheduled individually without looking at the other trains. Other trains may only influence the schedule through the inputs route and train_on_track. Following inputs are used to achieve this:

...



initial_positionSend by Controller as input, only used in first tick

...

and never after. determines the starting position of a train

...

and has to be a segment.
final_station

...

Send by

...

Controlleras input. This may be influenced by the deadlock avoidance if necessary (forces a destination on blocking trains that do not have a destination).
current_position

...

Send by hardware abstraction to determine the current segment.
reached

...

Send by hardware abstraction to signal, that the segment specified by next_segment was reached.
route

...

May be 0 or 1. From every station it is possible to take two different routes to

...

a different station. If route is 0 the normal "shortest" (the path that passes less stations) is used. 1 is used to signal that an alternative route should be used. It is set by the deadlock prevention
train_on_track

...

send by hardware abstraction to check if some tracks are blocked. Only relevant for driving to an alternative platform if current platform is in use.
lock

...

_

...

XX

...

Set by deadlock prevention to lock specific segment transition in KH and to KIO


Relevant

...

Scheduler Outputs

Describes the outputs that are relevant for other parts of the controller and not only for understand . This is a deeper explanation of why a train drives in a specific way):.

(pre_)next_segment

...

Used by hardware abstraction to determine what tracks need to be to

...

reservated and what tracks need to

...

be powered. Its is also used by deadlock prevention to set route or set final_station
moving

...

Boolean that signals whether a train

...

intends to move. May be true

...

for trains that are not moving physically

...

if

...

they are blocked in any way (either by hardware abstraction or one of lock_XX).


The Scheduler uses following internal variables to determine the location and state of each train:

...