Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Inputs

NameTypeRangeShort description
TrackSpeedsint[48][ -255 , 255 ]The speed per track. Track names can be used as indices. (e.g. KH_ST_0)
Pointsint[30]{BRANCH, STRAIGHT}The numbered values of the switchable intersection points. (e.g. 23)
TrackSignalsbool[40][2]{true, false}The signals on each track. If the track contains signals it's always two. Track names can be used as indices. (e.g. KH_ST_1)

Outputs

NameTypeRangeShort description
TrainPositionsint[15][ 0 , 47 ]The position, that a given train currently occupies. (e.g. Train TRAIN_KH_ST_0 occupies KH_ST_0 on startup)
TrainSpeedsint[15][  -255 ,  255 ]The speed, that a given train currently occupies (e.g. Train TRAIN_KH_ST_0 has speed 100)
TrackConnectionsbool[48][48][ 0, 1 ]TrackConnections[ i ][ j ] → whether or not track i is directly connected to track j in the travel direction allowed by track i
Errorstring
Error messages. (e.g. If a required track signal did not trigger)

Requirements

For two directly connected Tracks the IDs of the Points that need to be passed (if any) including their direction (branch, straight).

Idea: A big matrix in the form of PointPositions[48][48][2][2]. So for each set of tracks the points (if any) and as value either branch or straight.

PointPositions[KH_LN_5][KH_LN_7][0] = {14, BRANCH}
PointPositions[KH_LN_5][KH_LN_7][1] = {null, null}

PointPositions[KH_ST_4][KH_ST_0][0] = {1, BRANCH}
PointPositions[KH_ST_4][KH_ST_0][1] = {2, BRANCH}

PointPositions[KH_LN_5][KH_LN_6][0] = {null, null}

...
  • No labels