JMRI is...

Common Tools

JMRI provides powerful tools for working with your layout.

System-specific Tools

Layout Automation

JMRI can be used to automate parts of your layout, from simply controlling a crossing gate to running trains in the background.

JMRI: Transits Documentation

What is a Transit?

A Transit is a group of two or more connected Sections that describes a route around the layout of a Train traveling in a given direction. A Section may be in multiple Transits, and may be in a given Transit multiple times. Sections are kept in order--the first Section is connected to the second, the second is connected to the third, etc. That means a Section in a Transit must be connected to the Section before it (if there is one) and to the Section after it (if there is one). The order of the Sections determines the direction of travel in the Transit. Trains travel from Sections with lower sequence numbers toward Sections with higher sequence numbers. Normally Transits would only be defined for mainline track, and sometimes staging yard track.

In user-specified areas of a Transit, alternate Sections may be designated. For example, to move between the "2nd" and "4th" Sections in a Transit, there may be multiple "3rd" Sections, any of which might be used to travel between the 2nd and 4th Sections. Alternate Sections provide for passing tracks and staging yards. Transits also provide for reverse loops. To provide for back-and-forth running, e.g. for trolley cars, an option is provided in Dispatcher to automatically reverse the direction of running through a Transit when the train reaches the end of its Transit, and have the train run in reverse to the beginning of its Transit.

Transits support both manual and automatic operation of trains. When a train is running in automatic mode, Transits provide for Actions to be activated when a train reaches a designated Section in the Transit. An Action may be initiated by a number of events, for example, when the train enters a Section, or when the train stops. A variety of actions are possible, such as pausing the train for a user-designated number of fast clock minutes (a station stop), reverting to manual mode for local manual operation, or sounding the horn on a sound decoder.

Transits and their associated Sections are designed to provide support for dispatching, either manual dispatching (by a dispatcher sitting at a panel), or automatic dispatching by the computer. Dispatching is the temporary allocation of Sections for the exclusive use of trains, either run by engineers with a throttle, and/or run automatically by the computer. Support for dispatching is provided by Dispatcher, which also provides for set up and running of trains automatically.


Transits may be used with a Panel Editor Panel, with a Layout Editor Panel, with a CTC machine, or directly without any Panel. Transits (and Sections) build on JMRI's Blocks and Paths structure. So before attempting to create any Transits, you should have Blocks, Paths and Sections fully initialized for your layout. (An easy way to automatically initialize your Blocks and Paths is to sketch out a Layout Editor panel of your layout, with Blocks assigned. By assigning Blocks to all track segments, Turnouts, etc., the paths will be created automatically for you by JMRI.)

How to setup Transits

Displaying and creating Transits

All the Transits that JMRI knows about can be viewed using the Transit Table. Select Transits in the Tables submenu of the Tools menu of the main JMRI program window.

Transit Table Controls

Below the Transit Table there's an Add... button.

Creating a new Transit

To Create a new Section, click the "Add..." button at the bottom of the Transit Table pane.

Saving Sections to disk

Use the Store item in the File menu of the Transit Table (or the Store Panels... item in the Panels menu of the main JMRI window) to save Transit information to disk. This information is saved with the configuration and panels in an XML file, along with control panel setup and similar stuff. To store your panels in the same file (recommended), select File>Store>Store Configuration and Panels To File... or select Panels>Store Panels... in the main JMRI window.