TrainExit


Removes the train from the railway network and passes the train agent on to the regular process flowchart where it can go through delays, queues, decisions, etc. Together with TrainEnter, this block is used to model part of the train movement on a higher abstraction level, namely without detailed physical level rail traffic modeling.

Here are just two use cases of the TrainEnter - TrainExit bundle of blocks:

Demo model: Train Exits One and Enters Another Rail Yard

Parameters

Exiting agents [dynamic]
Here you can choose what happens to the train's animation when the train agent leaves the TrainExit block.
There are two alternative options: Exiting agents:
are removed from space - This option is selected by default. In this case trains that exit this block as regular agents, forget their coordinates in the space.
stay where they are - When agent leaves the TrainExit block, its animation resides at the same place where it was before the train entered this block.
Value type: boolean
Default value: true (are removed from the space)
Local variable: train – the train
On enter [code]
Code executed when the train enters the object.
Local variable: train – the train

Functions

long count() - Returns the number of trains removed from the rail network by this TrainExit.

Ports

in

The input port.

out

The output port.