Its All A Matter of Planning and Timing
Using schedules to automate train movements around the layout is one of the main benefits of Rocrail. However, it can be very hard to understand all the configuration that goes into running trains automatically. Schedules Test Case 2 documents the development of a Rocrail plan that will run the trains on a layout using the different Objects in Rocrail.
Hopefully, it will also allow improvement of Rocrail as goals are set, plans are built, and then problems are worked out.
This layout is inspired by the first Test Schedules Layout, but expands the track plan to 2 complete ovals, adds a passing siding to the inner oval, and expands the yard to include a programming spur, which is not used in the scheduling of trains.
The layout is still a simple plan, and is typical of many layouts suggested by Manufacturers as an expansion of the basic oval that you get with a starter set. It still has many surprisingly complex scheduling problems that can only be solved by Blocks, Routes, Schedules, and Critical Sections (Block Groups).
The blocks have their names displayed inside them. The sensors are indicated in blue text. The turnouts are indicated in green text. Click on the image to zoom in.
In August of 2008 Mark worked out how a traditional two-oval layout would work as a Digital Layout with sensors. The diagram on the right is an early working copy of the electrical design.
Each differently colored section of track is a sensor. The green section is the programming track. The basic diagram was done with Raily 4.0, a track planning program. It was then colored in a graphics program and printed, and all those notes were added as the wiring installation was being worked out.
Current detection through a pair of Digitrax BDL168s is used for detection. Each sensor is an isolated section of track connected to one of the BDL168s. All the turnouts and a few other pieces of track are undetected, using a straight connection to the command station for power.
The sensors are labeled in Blue on the main track plan.
The layout was built in Z Gauge and started test runs in early February 2009. Note that Z Gauge is 2 rail, not 3 rail like traditional Marklin. It was built with Marklin track, Marklin k83s for turnout control, Digitrax BDL168s for current sensing, and a side panel to hook it up to a Digitrax DCS100.
All sections are isolated on the inside rail, and the outer rail is a single circuit.
Two MTL Locomotives run on the layout, the Santa Fe GP9 and the Chessie (C & O, or Chesapeake And Ohio) GP35. They both have Digitrax DZ123M0 drop in decoders installed.
Because this layout is a big circle, the idea of a "clockwise" direction has been used in designing all the Blocks, Routes and Schedules. Forward on the layout means a locomotive moving clockwise from the bottom ("South") of the layout to the top ("North") of the layout through the West end. Reverse means moving from the bottom to the top through the East end.
Note that Rocrail does not have any idea of the direction of a layout. It only knows the direction of a Locomotive, and a Route. Setting up a "Layout Direction" is a matter of planning the layout and then configuring Rocrail to implement it.
The blocks are indicated on the Rocview layout diagram at the top of this page. The blocks are named using a "North-South-East-West" convention, and start from the very bottom-most (southern-most) part of the layout.
Each block is defined by two sensors, one to the left and one to the right. The "Y Ent" sensor is not used by any of the Blocks.
A Location is two or more Blocks that are a single destination. Because Rocrail can choose which Block in a Location to move a train into, Locations will allow multiple trains to move to the same destination at the same time. The classic example is a small passing track, where one train can move into the siding and wait while another train passes it.
The North Station Location was created to combine North and North Siding so that two trains could share the Inner Oval.
All routes are set to "Both Directions". No other settings have been changed. Again, since the direction of the layout is "clockwise", each locomotive should be facing left in the South, towards the top in the West, right in the North, and towards the bottom in the East. The name of the Route defines the "From" and "To" blocks, i.e. "South Outer to North West" means From is set to South Outer, and To is set to North West.
The original list of routes:
|South Outer to North West||East to South Outer|
|North West to North East||East to South Inner|
|North East to South Outer||South Inner to West|
|South Outer to West||Yard North to West|
|West to North||Yard South to West|
|West to North Siding||Yard North to PTrack|
|North to East||Yard South to PTrack|
|North Siding to East|
3 basic Critical Sections were setup using the knowledge gained from Test Case 1. The original idea was to make sure only one train at a time would use the Outer Oval, and that two trains on the Inner Oval would use the North Station Location to "share" the Inner Oval.
|Outer Oval||South Outer|
|Inner West||South Inner|
The logic for this is:
After the layout was built, the plan was created step by step, using Rocview to configure the connection and add elements. Here are the basic steps that were performed:
1 – Rocrail was configured to connect to the DCS100 and run the layout. The two locomotives were configured, and run back and forth with the Locomotive control panel to test the basic connection.
2 – The layout diagram was built by adding track, sensors, turnouts, blocks and buffers.
3 – Routes were created to connect each block to the next. (Note: the next block is the block clockwise from the current block.) To test the Routes, a locomotive was placed on the track in a block, Automatic mode was turned on, and then the block was clicked on to start the locomotive. Routes were adjusted until Rocrail could run a locomotive to each block by itself.
Once this was done, the plan was ready for the creation of Schedules to automate the movement of the two locomotives.
The goals are still to allow trains to share the layout while moving in different directions. The operation should be fully automatic, as with the first Schedules Test Case layout. Additions include using the passing siding in the Inner Oval to allow two trains to share it, and having the two trains switch between running on the Inner and Outer Ovals.
The problems are how to configure Rocrail's Objects to make all this work. This simple layout has 2 Locomotives, 11 Blocks, 1 Location, and 22 Sensors. It also has many places where the two locomotives traveling in the opposite direction can lock each other in a potential Head On Collision. Consider one loc in North West trying to move East, and one loc in North East trying to move West.
Three initial goals were planned for this layout:
Additional goals are:
There are also some Artistic goals. The layout should look good running trains. It should keep as many trains moving as possible, making them "flow" around the layout and providing a show for people watching it. Rocrail should entertain Viewers and demonstrate the art of digital layouts.
For example, both trains should be moving at the same time. This provides beautiful action where one Locomotive is passing another, or both are heading towards each other but then move off into different sidings. Also, trains should not pause or stop for no reason, the movements should look realistic like a real person is driving the train.
Repeated actions should be complex, and avoid a simple "1-2" pattern. The Viewer should be captured by the movement on the Layout, and want to keep watching it to see what else may happen next.
These goals can only be achieved by carefully scripting the Schedules used, and making sure the layout is configured to take advantage of all of Rocrail's Automation features.
The first Schedules that were created duplicated the results from Test Case 1.
This would let a train in Yard North run out to South Inner, then run to Yard South, run out to South Inner again, and then run back to Yard North. It would repeat endlessly. It is actually 4 schedules that call the next schedule when done, forming a loop:
This would let a train in South Outer, facing in Reverse (i.e. to the East), to run once around the Outer Oval, once around the Inner Oval, and return to South Outer. It would repeat endlessly.
|SO-SO-SI-SO (R)||South Outer|
|South Outer||SO-SO-SI-SO (R)|
Using these two schedules, the results from Test Case 1 were duplicated. A train could run the Yard while another train running in the opposite direction shared the Inner Oval.
See here for an early YouTube video:
This step proved harder to create. First, the Yard schedules were expanded to let the Yard train run to the Outer Oval and back again when it was in South Inner. This expanded the number of Schedules from 4 to 10, requiring that the 4 schedules be duplicated with different Next Schedule settings, and that two Schedules be added to run the train around the outside.
The Schedule chain became: