NXWarrants

An NXWarrant is a computer generated warrant. Rather than recording speed changes and other locomotive commands from a throttle where the recording notes the elapsed time between commands, an algorithm generates the speed changes and elapsed times for a smooth start up and slow down to a stop. To review information about warrants see About Warrants. In order to determine correct elapsed times and the blocks where the speed changes should occur, the block lengths must be known. Additionally, the proper scale must be known. Nevertheless, even if OBlock lengths are not specified, the algorithm makes a best effort to generate a usable warrant.

Launching an NXWarrant

After selecting the menu item Create NX Warrant from the Warrants menu of the Control Panel Editor, or by clicking on the Create NX Warrant button in the Warrant List window, the Create eNtry/eXit Warrant window is displayed.

Set the Route

First establish the route for the train by entering OBlocks in the following fields. Blocks are chosen either by typing in the block name or dragging it from a displayed OBlock table. The origin and destination 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.

To specify a warrant route by mouse clicks, simply click on a track icon. The mouse clicks move successively through the Block Name fields of the Create eNtry/eXit Warrant window. If you mis-clicked on an icon and/or want to change the block in one of the fields, just double-click the field and click on another icon. Note, the icons must be Indicator Track Icons.

A computer algorithm determines all the intermediate blocks 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, the Via and Avoid location fields may be used to restrict the list.

Another parameter to use in specifying a warrant route is the Max Number of Blocks in Route field at the bottom of the window. This number puts an upper limit on the length of the route the algorithm computes. If your layout contains loops, then an infinite number of routes can be be counted. To minimize computation time, you need not use a number that is much larger than the number of blocks in the longest route. However, using too small a number can terminate the search prematurely before the route is found.

The Script Algorithm

The NX warrant script sets the direction, turns the light on, blows two horn/whistle blasts and starts to ramp up speed. It is highly desirable to have a reasonable estimate for block length entered for each OBlock, but not absolutely necessary. If the length of the route is known, the algorithm will ramp up to the last speed that allows enough room to ramp down to a stop in the last block. After stopping in the last block the script blows one horn/whistle blast and turns off the light.

The algorithm calculates the speed changes assuming the train starts at the middle of the Origin block and stops at the middle of the Destination block. If the starting block or ending block has length 0, it will assume literally that its length is zero and will only do one speed setting in the block, i.e. at the start set the minimum speed or at the end set the speed to 0. If any of the intermediate blocks have length 0, the algorithm assumes the length is long enough to complete a full ramp up or ramp down. So while not necessary, it is advisable to enter block lengths on the OBlock Table at Add Item->Occupancy Blocks.

A further parameter the algorithm needs to know is the scale. Choose the correct scale of your layout by selecting it from the Preferences Warrants panel. The warrants panel at Edit->Preferences->Warrants is where this and other warrant parameters can be edited.

Set the Algorithm Parameters

At the bottom of the NXWarrant window are the following items.
The above labels for the throttle settings depend upon the Speed Name interpretation at Edit->Preferences->Warrants and could be, for example, Max Scale speed Mph and Ramp Speed Increment Mph.
Note, when editing a Indicator Track Icon (Edit Indicator Track popup.)there is a Display Train Name when occupied check box in the edit dialog.
It is important to set this correctly.
A Via Location must be specified before running the warrant. See the section below for details.

Running the Warrant

Pressing the Run NX Warrant button computes the route and runs the addressed train at the specified speeds and direction. If more than one route meets the criterion, you are presented with a list to review and select the route you want. The Via and Avoid location fields may be used to restrict the list.

Calculate a Speed Profile Throttle Factor

When the Compute Throttle Factor checkbox is selected running the warrant will compute Speed Profile throttle factor. The "Via" block is used as a speed trap to determine the track speed and compare it to the throttle setting. When the Via block is crossed the warrant will report the speed and Throttle Factor. The Factor can then be saved into the Speed Profile to be used in any warrant where this engine address is used.

Choose a Via block of accurate length, reasonably long, where the train can fully reach the maximum speed set and exit the block before ramping down. Generally the factors calculated for the mid and high ranges of speed are relatively constant. Typically, the factors diverge at slow speeds. For a given throttle setting, Speed Profile factors can vary due to temperature changes, consist load and other conditions. Getting reproducible factors from day to day within 10 to 15 percent is satisfactory.

Saving NXWarrants to make them Permanently Saved

If you press the Edit button on the Warrant List Table of the NXwarrant while it is still executing, the Create/Edit Warrant Window for the NXWarrant will open. Use the Copy button to make a permanent warrant that can be edited later.

Some Tips for Smooth Start Up and Slow Down

It is good practice to have a length specified for each block. A rough estimate is better than letting it be 0. If the second block has length 0 any remaining speed steps not done in the starting block will be put in that block. Lengths can be set for individual paths within a block in the CircuitBuilder should that be desirable.

If the next to last block has length 0 you should input its length, so the algorithm can start the ramp down in the previous block (block before the next-to-last). Although a zero length last block will set speed to 0 immediately, momentum could cause the train to overrun if the next-to-last block hasn't completed the ramp down. Or in this case, use the E-stop option, but that could be rather abrupt.

For a series of short blocks with length specified the ramp up and ramp down is distributed over the blocks as needed. Also, for short routes, the algorithm calculates only enough ramp up so the ramp down can finish without overrunning the last block.

The script's block synchronization will adjust the the elapsed times. Note! if the route includes a Dark block, i.e. no occupancy detection, it is very important it's block length is known since in this case, synchronization cannot be done.

For locos with no momentum, short times make smoother ramps. For locos with lots of momentum, longer periods should be used. The defaults are set for a modest amount of momentum, i.e. perhaps less than prototype but visually OK. Observe how the train behaves and adjust accordingly.