Defining the rail yard topology

The rail yard topology is specified by specific space markup shapes designed for rail models: railway tracks, switches and elements defining offsets on the track (Position on track). Those shapes can either be drawn manually using AnyLogic graphical editor or created programmatically by e.g. reading the layout from a database or a file.

Railway network  is automatically created when you connect railway tracks in the middle. Please refer to Railway track for more information about drawing and connecting tracks.

Please note that the Rail Library will not automatically detect track crossings (i.e. places where two tracks cross each other without a switch) and it is the user’s responsibility to make sure there are no train collisions in such places, whereas collisions at switches are detected automatically and errors are signaled.



Name – The name of the railway network. The name is used to identify and access the network from code and flowchart blocks properties.

Ignore – If selected, the network is excluded from the model.

Visible on upper level – If selected, the network is also visible on the upper level where this agent lives.

Lock – If selected, the network is locked. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them. It is frequently needed when you use your shape as a background image for your animation and you want to prevent editing this shape while drawing other shapes over it.

Visible – If selected, the network is visible at runtime.

Scale – Scale factor for the network.


Show in – Here you can choose whether you want the shape to be shown both in 2D and 3D animation, or in 2D only, or in 3D only.