A Warrant is a collection of information sufficient to run an automated train. It will set the turnouts for a specified route and drive the train over the route. When running, using block occupancy detection and signal configuration, it will make a best effort to control speed according to signal aspects or by occupancy of other trains or other track conditions ahead. A JMRI Warrant is suggestive of what a warrant does on a prototype railroad, but there is no intention to replicate any particular railroad's mode of operation. It is simply the idea of giving an automated train the trackage rights to move from point A to point B.

Warrants depend on having an accurate description of the layout in terms of OBlocks, Portals and OPaths. These elements are created by entering data into the Occupancy Block Tables or by using the graphical interface of the Circuit Builder. Initially neither of these subsystems are visible in Control Panel Editor.

It is important that the scale of your layout is known so that the warrant can compute the distances required when encountering signals. Go the Warrants panel of Preferences to set the layout scale. There are other parameters related to warrants there, that you may wish to change later, but the defaults are generally sufficient without change. See Warrant Preferences for information about configuration of warrant parameters.

How To Get Started

Definitions of OBlocks, Portals and OPaths are found at The Occupancy Block Tables.

What is Circuit Builder

Circuit Builder is an interactive tool that creates OBlocks, Portals and Paths graphically. It is necessary to have a track diagram of your layout expressed with track icons (track segments and turnout icons) in a Control Panel Editor panel. OBlocks and OPaths are created by clicking on the track icons. The Circuit Builder can convert the track segments and turnout icons of your layout into Indicator Track and Indicator Turnout icons. These icons display the status of the OBlock they represent by color, i.e. whether the track circuit of the OBlock is occupied or unoccupied, whether a warrant has allocated it or whether a train under warrant currently is proceeding over the circuit. Details are found at The Circuit Builder,

Compatibility With Layout Editor

OBlocks, Portals and OPaths can be used with Layout Editor. Compatibility is achieved by using the same occupancy detection sensors for LayoutBlocks as for OBlocks. If there is no corresponding Control Panel layout diagram, Circuit Builder cannot be used. The Occupancy Block Tables will have to be used to define the OBlocks, Portals and Paths.

More About Getting Started

In order to create a Warrant you must first have created two or more OBlocks. These blocks don't have to be fully defined, but their existence indicates that you are interested in using Warrants, that is, you have a block to start a train and a block to stop it. When two or more OBlocks exist Control Panel Editor will change the items under the Warrants menu to be the following menu items. The Warrant menu items are:

Warrants without Occupancy Detection

It is possible to create and run warrants without block detection. OBlocks can be defined when they do not necessarily have to have detection sensors. Such blocks are called "Dark Blocks". Dark blocks, the portals and paths within the block can be defined for a layout diagram without detection sensors. A Warrant can be recorded and can be played back, including having its route set. However, be advised for such trains without detection sensors there is no protection for having it collide with other trains or throwing switches under other trains. It will proceed only according to the elapsed times and throttle settings that were recorded.

Warrants without Turnout Control

It is possible to create and run warrants without having turnouts thrown by JMRI. JMRI internal turnout devices will show the route on the layout panel, but you will need to manually set and verify that the route is properly set on the layout itself. Again, the train will proceed according to the elapsed times and throttle settings that were recorded.

The Importance of Block Path Lengths

A Warrant detects a position of its train when it enters a block having occupancy detection. All other positional information must be calculated. For this, the track speed of the train and the length of the path it is on must be known.

To properly respond to a slower speed change required by a signal aspect, the train should prototypically slow down and complete the speed change before entering the block the signal protects. This requires the warrant to calculate the time and position for the slowdown to occur.

See When Warrant Speeds Are Modified for what track conditions require speed changes, they are detected and how warrants make gradual changes of speed.

Warrant Types

There are three types of warrants:

Creating a Warrant

A warrant consists of two parts; The route over which a train will run and the commands it will receive when running over the route. For a Warrant, you drive the train over the route you selected and the commands you used are recorded for playback later. For an NXWarrant, commands are generated automatically for the route you have selected.

Creating the Route

A warrant route is a series of block paths linked together so a train may travel over it. A warrant route is created by first choosing an origin block, a starting path and a portal to exit the originating block. Then, a destination block is chosen and a path on which to end the route. Optionally, you may also chose a Via block, that is, a block that route must include and a Avoid block, that is, a block the the route must not include. Blocks are chosen by typing in the block name or dragging it from a displayed OBlock table. Blocks can also be chosen by clicking on track icons that represent these OBlocks. To use this feature your panel must have your layout depicted by Indicator Track Icons placed there by Circuit builder or by you manually. Successive clicks cycle the choices through the four block fields.

A computer algorithm determines all the intermediate blocks, portals and paths to make the route. If more than one route meets the criterion, you are presented with a list to review and select the route you want. Note that the Portal and Paths need to be chosen for the route also. If no route is found, a dialog is offered where you can examine the routes that were attempted with the current Block, Portal and Path selections. Creating and Editing Warrants has more information about creating routes.

Scripting the Train Action

The second part of a Warrant are the throttle commands to control the train as it traverses the route. These commands are recorded automatically by running a train over the route in "Learn Mode" or are generated automatically as an "NXWarrant". The script commands contain the elapsed time between commands. Playback will duplicate this timing. However when a warrant is run with a different engine or a different consist, or even the same train depending whether the motor is hot or cold, this timing may not be replicated exactly. Because of this the command script is synchronized upon entering each detection OBlock. So, if the train is slow in reaching the next block, the commands for the next block will be delayed until the train enters the block. Conversely, if the train reaches the next block ahead of time, any remaining commands in the block just left will issued with no elapsed time so that the train can catch up to the script.

Warrant scripts are recorded or generated with a "Clear", aspect throughout the route even through blocks with restricted speeds. These speeds in the script are the "Normal" speeds. However, after creation when running, track conditions may not be "Clear", due to a signal's speed restriction, a block's speed restriction, occupancy by a rouge train or even intervention by you to halt the train. Warrants are able to deal with these restrictions and will modify their Normal" speeds as needed to comply with the restrictions. When Warrant Speeds Are Modified explains this relationship.

Recording Scripts

This is done by putting a screen throttle into Learn Mode that records all the throttle commands you make when driving the train over the route. This script can then be replayed to drive the train automatically. All possible throttle functions can be recorded and played back. Creating and Editing Warrants details how to do this.

With LocoNet you may steal the address and manual LocoNet throttle. For other command systems, a WiFi throttle may take the same address as the screen throttle and be used to record a walk around script.

Generated Scripts

For NXWarrants the script is generated by the warrant itself. It ramps the train up to a specified speed and ramps it down at the destination. It obeys all the traffic occupancy and signals as do the recorded warrants. See About NXWarrants for how to run them.

"Normal" Track Speeds

When recording a warrant throttle command script, the train should be run with all track conditions set to "Clear". NXwarrant script are generated using "Clear" track conditions also. This is reported in status messages as the "Normal" speed. However, when running the warrant, the train may be confronted with occupation ahead by another train or a signal required a reduction of speed. Warrants respond to these and other track conditions by automatically modifying the scripted throttle settings. When Warrant Speeds Are Modified has details about how warrants modify recorded speeds.

Customizing the Script

A warrant script can be edited to modify the recorded commands. Additional non-throttle events can be added to the script such as triggering or responding to external sensors. Creating and Editing Warrants. has more information about creating and customizing scripts.

Using the Warrant List

The Warrant List menu item opens the Warrant Table. Each row is a warrant that has been created and saved or is a running NXWarrant. The Warrant Table reports the current status of each warrant in the list and can issue commands to Halt, Resume or Abort. Warrant routes can be allocated, i.e. reserved for that warrant, the turnouts for route can be set and when the warrant is run, its status is shown and controlled using the columns in the table. See The Warrant List for information about the table.

Tracking Trains

Any train running on the layout can be tracked. The layout must be represented with Indicator Track Icons to track trains. The fourth Warrants menu item opens the Tracker Table. Pressing the New Tracker button in this window opens a dialog to enter a train name and the OBlock it occupies. Pressing the done button creates a row in the Tracking Table. The row shows the train name and the block it currently occupies and the length of time it has occupied the block. As the train moves from block to block, this status is updated. The Indicator Track Icons can display the train name.
Note: The Edit Icon popup menu item opens a dialog for Indicator Track Icons have a Display Train Name when occupied checkbox to select to display text for train tracking or warrant running.
The window also has a Refresh Tracker Info button to poll the trackers listed in the Tracker table and a OBlock Pick List button to display a picklist.

The location of the train can be set by typing, by dragging block name from the picklist, or by clicking on a Indicator Track Icon in the panel.

Tracking can also be done for a train by dragging and dropping a Loco Icon onto the OBlock the train occupies. This is the most simple way of tracking in that both the names and location are done with a single drag and drop.

Using Warrants in Logix

Several of the operations that can be done from the Warrant List and Warrant Editing frame can be done with Logix Conditionals. You may design and implement a dispatcher's panel using the Warrant state variables and actions found in Logix.

Warrant State Variables

When a warrant has been allocated or is in effect, the following state variables can be tested in a Logix conditional.

Warrant Actions