Craig Thomasson BNML2

This blog post will cover a JMRI OperationsPro worked example with emphasis on the features mentioned in this post. It builds on the fine example done by David Haynes and adds some additional more complex features that one is likely to find on a smaller layout (or a local area on a larger layout).

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
Craig Thomasson BNML2

Setting up Cars and Locations

The Layout

For this worked example, I'm using the track plan for the shelf layout I'm currently building in my office. It's a small industrial switching area with 6 spurs, a removable cassette used as the staging area, and a roll-around shelving unit for off-layout storage.

layout.PNG 

There are 6 spurs serving 5 industries. A couple of spurs have multi-car spots. Most have multiple spots. On the right (not completely shown) is the staging cassette.

ocations.PNG 

There are three different operating locations that we will setup in OperationsPro.  There is the modeled portion (the layout), staging which represents the yard/interchange where the switcher job originates, and the storage drawers which represent the offline industries and yard.

Configuring OperationsPro

Since Settings are covered in detail in the previous worked example and JMRI demo, I won't spend much time here. I set the railroad name, travel direction to only East/West, 2 locos per train, and Descriptive Car Types (these are for my custom codes that we will see later).

settings.PNG 

Cars

Rather than setup locations first and then cars, I chose to setup cars first.  I have my existing roster in another database, so I can setup a csv file and import all the cars easily.  I also have developed my own car typecodes similar to UMLER. I wanted car types that are more detailed than the AAR codes but don't require a secret decoder ring for visiting crews like UMLER. By importing cars first, the typecodes are already available when the locations are being added.

cars.PNG 

All the cars are imported with the load state as 'E' and no current location.  Since my car lengths are total length between coupler pulling faces, but JMRI automatically adds 4 feet for couplers, I had to adjust my import file to reduce lengths by 4 feet.  Alas, I don't think I'll have room for all 414 cars on my layout at the same time...

Locations

ut_spots.PNG Most railroads use some form location code to identify each customer spot (SPINS, CLIC, etc.).  I'm going to use something similar here to identify each siding and spot location.  In my case I've arbitrarily chosen 35xx as my 'zone' identifier.  Different customers on each spur have a unique identifier.  For a customer with multiple spots on a spur, I use a further sub-identifier (3520.1 and 3520.2 are two separate spots for customer 3520).

This may be more detailed than many modelers want do deal with, but it will allow us to do things like define preferred spots for specific loads (e.g. Lumber Dist. prefers Extruded Styrofoam loads at 3520.1, but can use 3520.2 if the former is full).

ation_OP.PNG 

Here I've added all the spurs for the layout, and named that location "Zone 'OP'" (For Office Park). For now I've just added the spur names and lengths. I have not setup any off-spots or track pools yet. All spurs are set to be serviced by both East and West trains. Car types assigned so far are as follows:

Location IDCar Types
3510.1BP150
3510.2CP410, CP510
3520.1, 3520.2BC250, BP250, BP260, BS250, BS260
3521FB58, FC75
3540.2CPG308, CPG410
3550TGP23

Other spurs not listed do not have any car types assigned yet.

_Storage.PNG 

In David's worked example, he determined that the preferred track type for the "storage" tracks is a spur.  I decided to do the same thing with my storage.  This allows the car loads to be automatically flipped when cars come off the layout and back to the storage drawers. I want to keep all similar type cars in the same drawer, so Storage 1 is configured to accept all the boxcars (Bxxx), Storage 2 is for all flatcars (Fxxx), Storage 3 is for all covered hoppers (Cxxx), and Storage 4 is for all tank cars (Txxx).

_Staging.PNG 

I was unsure of the staging location type.  It could be either Staging or Classification/Interchange. From David's example, I suspect C/I is the best choice, but want to see if JMRI's concept of staging will work. I also setup two tracks for the location.  Even though there may only be one physical track, I setup one logical track for East and one for West trains. David's example discusses this and it will become important later.

Locomotives

Locos.PNG 

JMRI allows you to load all of your locomotives from DecoderPro.  I only want one locomotive for this layout, so I manually added it. The location is set to the westbound staging track (staging-1)

Routes

We need three routes for this layout - one to move cars from storage to the staging track, one to switch the layout, and one to move cars from staging back to storage.

oStaging.PNG 

oStorage.PNG 

The routes between storage and staging are similar. Trains from storage to the layout travel West. I explicitly set Pick Ups and Set Outs so that the origin only picks up and destination only sets out.  Since I want to have a maximum of 6 cars at at time, Moves is set to 6.

Route_OP.PNG 

The route for the switching job on the layout starts in staging, works the OP zone, then returns back to staging. The two staging entries have Pick Ups and Set Outs configured to only pick up when starting, and only set out when done.  It does both when working Zone 'OP'. I set moves to 6 since I want a maximum of 6 cars per session.

Trains

We now need to create trains to run on the routes created above.

Trains.PNG 

The From Storage and To Storage trains are similar.  Since I am using them to move cars between staging and storage by hand, no locomotive is required.

oStaging.PNG 

For now, they handle all car types, but have no locomotives selected and locomotive count is 0.

The OP Turn train is similar, except it requires one locomotive of either Diesel or Switcher.

We now have all the basics setup. In the next posting, we'll build and run a few trains so we can see what happens!

 

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
shortliner

I have the track layout built

I have the track layout built in HO ( not yet wired), though I doubt I shall ever get as far as a JMRI Ops, but so far it looks good and is 2 inches short of 13 feet long  (including the removable staging) x 12" wide - thanks for the plan. I shall watch this as you progress

Best

Jack

Reply 0
dkramer

What happens if...

Hi, thanks for the worked example. I have a question that I am not sure if it will ever happen, but is nagging on my mind:

You've set up a transfer from storage to staging and (I suppose) the staging can receive any kind of cars in any quantity. Suppose you only have 2 spots for tank cars on the layout but the transfer has 4 tank cars assigned to it. The OP turn will only deliver 2 of those, the remaining will stay in the staging (yard). These remaining cars can be set out on another session, but there is no limit for the transfers, so there may be a excess of such cars to the point of choking the yard?

Regards,

 

Daniel Kramer

Currently wondering what my next layout should be...

 

Reply 0
HN1951

Staging to Storage

Interesting info..In many respects much like my own RR with the need to run from staging to storage and vice versa.  I ran into a problem and could not get the staging track type to work out well for the staging tracks and found the C/I track type worked better to allow things to easily move on and off the RR. 

I'm still working out the storage location 'management' - actually a set of two 6-draw carts that collectively hold around 140 HO cars - and how that might work best.  The process your working through should help me find some good ideas.

Thanks!

Rick G.

Rick G.
​C&O Hawks Nest Sub-division c. 1951

Reply 0
Craig Thomasson BNML2

Jack, you've been motoring along!

It looks like you may be running trains before I get my first piece of track put down!  I have been doing a number of things in parallel though.  The upper shelf arrangement is finalized and ready to be secured together. I have foamcore sheets in place for the backdrop base.  I've been reworking older Shinohara turnouts needed for this layout with new frogs and points. I've mocked up a few pieces of black foamcore to get an idea of how the valence and trim is going to look.  I had to modify the track plan slightly, shifting the track toward the front on the right side so the staging cassette will clear the door.  And I've been working through OperationsPro to get an idea of how it will run.

0_113614.jpg 

Daniel, your nagging question is indeed a big concern.  In my next post where we start to build trains, you'll see that the issue will raise its ugly head when we build the very first train using the basic setup. At the end of this worked example, we'll see how we can resolve this issue by using schedules and tweaking the settings for several tracks. However, I do want to see if I can get the desired results without schedules and using the basic 'L' and 'E' loads (something I never tried when hacking away at this initially).

Rick, I came to the same conclusion as you, and I do eventually change to the C/I tracks. However, I did want to work through the steps with trying to use staging just in case there was something I missed initially.  The JMRI pages have a small section talking about having a train that leaves staging to "visit" your storage drawers and then returns to staging. I thought this might be hinting at something I missed earlier.  I figure that since this is a worked example, if I work through my steps using staging and conclude it doesn't work, someone else might come back and point out what to change so it does work.

Craig

 

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
Dinoi

I'm following this with great

I'm following this with great interest. I, too, have a small switching layout with two rolling plastic six drawer carts for storage. The layout is divided into two locations to increase traffic.

I ended up defining my storage as a yard and identified each row of each drawer in each cart as a separate yard track. 

My routes originate and terminate in the yard. The "staging" track is not a destination. Trains from the yard are just four cars long. 

It works pretty well, generally yielding a one hour job per train. However, I frequently get 'ping-pong' moves where the same car bounces between two spurs over several sessions. I added a sweeper route that originates in the farthest town and terminates in staging that seems to run these cars off the layout and back into the storage yard. 

I'm looking forward to seeing how you configure this and learning from your examples. 

Thanks, 

Dean

Reply 0
Craig Thomasson BNML2

Part 2 - Let's start moving some cars around!

Now that we have the basic setup complete, we can start building and running some trains. The JMRI pages suggest starting with a single spur and a single car (or a few cars), and fiddle with that until it works. That would be the common-sense methodical approach, but that wouldn't be fun. So let's throw caution to the wind and have fun!

Cars Setup

Before we can build some trains, we need to add cars to the storage drawers.

_storage.PNG 

I've made the selection such that there are more of a certain car type than available spots. This lets me test that cars are being moved as expected, I can see where they are being held if not deliverable, and that they are not being held where I don't want them.  Since there are 8 flatcars and only 2 available spots, those will be good cars to watch.

Setting Multiple Cars

_setBulk.PNG 

JMRI has the ability to set values in bulk.  Select multiple car entries from the Cars table and then select Tools -> Set Cars. This brings up the Set Cars dialog.  For best results, select cars that will have the same location in storage (in this case, I've selected all the cars that will go in Storage 2).  Uncheck the Ignore box for Location, Return When Empty (RWE), and Load.  The Auto checkbox is a handy feature.  If each car type is only assigned to one of the storage tracks, and the car type for all of the selected cars are found on the same track, JMRI will auto-fill the track when you select the location.  In this case, since the selected cars are all FB58 or FC75, and all the FB58 and FC75 cars are handled on Storage 2, JMRI automatically sets the track to Storage 2 when I select the Storage location.

Set all of the loads in Storage to 'L'. For now we assume that all cars coming onto the layout are loads. JMRI toggles load state on a spur when a car is delivered. Setting all of the cars in storage to 'L' means they are ready and available for selection when the next train is built.  Later on we'll make some tweaks so some customer spots accept an empty car and ship out a load.

Return When Empty (RWE)

The RWE setting is an important feature for proper operation. This ensures that when a car becomes empty, it is always returned back to this location.  It is not sent to some other yard or staging track, or left floating around the layout. This is key to getting empties from the layout back through the staging cassette to the appropriate storage drawer.

We now have all the cars we want to use setup in storage. They are loaded and ready for the next train build, and are configured to be returned back to the appropriate drawer when empty. When they return back to the drawer, JMRI will toggle the load state back to 'L' making it ready for the next build.

Build the First Train

Now that we have the cars setup, let's build our first train. My trains are conveniently named alphabetically so that they are built in order from top to bottom. Click on the Build button for the "From Storage" train so we can get some cars from storage onto the cassette and ready to go. Also check the Build Reports and Preview checkboxes so we can preview the report and switch list after the train is built.

Trains.PNG 

The build failed (but I didn't do a screen capture of the error)!  Let's check the build report.

ldReport.PNG 

As I suspected, setting the staging tracks as 'Staging' type probably isn't going to work.  JMRI's view of staging is not necessarily the same as our view of staging in this case.  Here we think of staging as more of an easily accessible fiddle track where we can setup and rearrange cars.  JMRI thinks of staging as more of an inaccessible yard hidden under the layout, where complete trains enter and exit each track. JMRI can't pick cars from different staging tracks to make up a train. Since our loco is currently sitting on staging-1 ready to receive cars and depart, and staging-2 is reserved for Eastbound movements, there's nowhere for JMRI to bring our complete "train" from storage into staging. We could move the loco to staging-2, but then we will have problems when we try to build the OP Turn (there is no loco available on staging-1 to make the full train).

The solution is to convert our staging location to Classification/Interchange tracks.

aging_CI.PNG 

From the Tools menu, select Change Track Type and select 'Classification/Interchange'.  This will change all the tracks for this location from Staging only to C/I. Even though I changed the track types to C/I, I will continue to name and refer to them as 'staging' tracks.

Next, we need to add some restrictions to our staging tracks.  Again, even though we only have one physical track, we want two logical tracks in JMRI - one for East and one for West trains. Let's add restrictions to each track.

_CI_edit.PNG 

For staging-1, ensure it is setup to service only Westbound trains. For car set outs, add a route restriction for the 'Storage to Staging' route.  For car pick ups, add a route restriction for the 'Zone OP'.

For staging-2, add similar set out (Zone OP) and pick up (Staging to Storage) restrictions so it is setup only for Eastbound trains.

These restrictions are also important for proper operation.  They ensure that the To Storage train won't grab any loaded cars delivered by the From Storage train and return them back to storage.  They also ensure that only cars that an be handled by the OP Turn are selected from storage. Otherwise the From Storage train may select undeliverable cars just to fill out the train to a full six cars, and those cars will be stranded on the staging cassette.

Build the First Train Again...

Build the From Staging train again.  This time it's successful and selects 6 cars to move to staging.

Now, we can finally build our first OP Turn train.

_buildOP.PNG 

Here we see that the OP turn only selected five of the six available cars.  The remaining bulkhead (highlighted) wasn't selected because spur 3521 is already full. That car is now left on the staging cassette, exactly one of the features I want to avoid. This also shows another way to view the result of the build in addition to the build report and switch list. Use the Cars window and sort by Location or Destination.  We can easily see which cars have been assigned to the train, where they are going, and which cars are left behind.

Now, don't move or terminate that train yet! Since we have three cars destined for a two car spot, we can reset the train, make some changes, and build it again to see what happens. Reset, change, build, repeat...

JMRI Off-Spots

I setup spur 3500 (West Tail) to serve as both a working track and an off-spot for holding cars which can't be delivered due to the final destination spot being full. Let's change 3500 to be an off-spot for 3521. There are other spurs or spots which can be used for off-spots, but I won't deal with them here just yet.

P_altTrk.PNG 

JMRI calls the off-spot an Alternate Track.  To set an Alternate Track, select the spur, then Tools -> Alternate Track, and select the track to use as the Alternate Track.  Here we see 3500 has been set at the Alternate for 3521.  A track can serve as an Alternate for multiple spurs. Also make sure all available car types are selected for the Alternate Track.

Now, let's build again.

uildOP_2.PNG 

All 6 cars are selected from staging for the layout.  Now let's either move the train (if you want to see each step), or terminate the train (if you want it to do all the work in one step).

uildOP_3.PNG 

All the cars were spotted on the layout, but wait a minute....

All the loads were changed to 'E', and the next destination for all the cars is back to Storage. This also includes the car sent to the Alternate/Off spot.

JMRI considers an Alternate Spot to be another location where a car can be sent to be loaded or unloaded. Think of it as a secondary spot.  It's not useful for just holding a car until the final spot is available.  We need to find another way to handle off-spots.

Let's build one more train to send some new cars on the layout and collect the empty cars.

uildOP_4.PNG 

We pulled 6 more cars to Staging from Storage, but the OP Turn failed!  It couldn't find the loco.

Locos_2.PNG 

It's still on the staging-2 track, headed Eastbound.  We need it on staging-1 ready to go Westbound. To fix this, we add one more step to the Zone OP route.

ute_OP_2.PNG 

Add a new step at the end of the route.  Direction is West, Moves is 0, and there are no pick ups or set outs. This step will move the loco from the OP Turn arrival staging track (staging-2) back to the OP Turn departure staging track (staging-1). The Moves and pick ups/set outs values ensure the train leaves all set outs on staging-2, and the loco doesn't bring any cars with it back to the staging-1 track.

We also need to edit the locomotive to manually set it back to the staging-1 track.

uildOP_5.PNG 

5_swList.PNG 

There's a whole lot of stuff going on here.  Four of the six cars in staging are being spotted, but two are being left on the staging cassette. Only 2 are being brought back to staging. The incoming lumber cars are being sent to the alternate track, but the empty cars aren't being picked up.

Progress So Far

So far, we have setup the basic locations and spurs, got cars loaded into the storage drawers and configured to return back to storage when empty, changed the staging track types to C/I, and run a couple of trains. We've setup an Alternate Track for off-spots but it didn't work as expected.

In the next post, we'll fix the Alternate Track issue and run some more trains. We'll also tweak some settings to see if we can get more cars processed by the OP Turn.  Once that is fixed, we can start setting up schedules for cars and loads.  We'll also see if we can get everything working correctly with just the default 'L' and 'E' load types for those folks not interested in setting up schedules.

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
fkoegler

Very interesting blog

Craig, I learn a lot of things with your example. Thank you and keep on !

François

Reply 0
Craig Thomasson BNML2

Part 3 - The Tweaks

We left off last post with trains being built, but cars not quite going where we want them. Let's dive right in and make the tweaks to get everything working the way we want.

Add Some "Yard" Tracks

One of the areas that I had trouble with was making the shift from "conventional" track concepts to JMRI track concepts. Conventional thinking is that yard tracks are only in a yard.  JMRI defines yard tracks as a track that can hold cars or locos.

OP_yards.PNG 

Remove the Alternate Track setting for 3521, and then change the track type for 3500 and 3520.3 to Yards. This gives us the tail track as well as one spot on 3520 to tuck away a car being held.  The OP zone now has both spur and yard tracks.

This step is the key to getting cars off of the staging cassette.  JMRI will keep moving cars towards yards or C/I tracks. As long as there is room on one of these "yard" tracks, JMRI will move all of the cars brought onto staging from storage onto the layout.

Adjust the Moves

Since I want to limit the number of cars on a train to six, I've been setting the Moves field for every route entry to six. This works fine when we want the train to pick up six cars from staging or take six cars back to staging.  However, when we look at the switch list from the last part, we see that the turn only picked up two of the six available cars on the layout. I didn't fully understand the impact of the Moves value until I had a closer look at that switch list.

Since Moves for the OP zone is six, and the train already has four cars to set out that only leaves two moves left to pick up.  We need to crank up the Moves value for the OP zone so it's large enough to permit up to six set outs, six pick ups, plus any cars that need to be moved from an off-spot location to a customer spot.

ute_OP_3.PNG 

A value of 20 should provide enough moves to handle all the cars that would need to be moved around.  Leave the first and third lines at six so the inbound and outbound trains still have a maximum of six cars.

 

Let's clean up the layout and get all the cars back to storage by building and terminating trains.

6_swList.PNG 

The first build picks up the cars left on the staging cassette for spotting, and picks up all available empties. Build and terminate the To Storage train to clean up the cars now in staging, then build and terminate the OP Turn again to grab the remaining empties.  One more To Storage train and all the cars are back in storage. Finally, reset the Move Count on all the cars (Cars window, Tools -> Car Roster -> Reset move count all cars).

Setup Pool Tracks

This is an optional step, but will add some flexibility to a couple of the industries.  Pool tracks combine multiple spots into a single "pool".  For example, Rudy's Tortillas has one boxcar loading spot and space for up to two hoppers, but the actual track is only two cars long. The pool lets us use the boxcar spot for one of the hoppers if there is no boxcar there. I want to have pools for the Rudy's spots, the Alamo Packaging spots, and the two lumber distributor door spots.

_OP_pool.PNG 

For both Rudy's and Alamo, there is room for only one boxcar, but up to 2 or 3 hoppers.  We can force this limitation by setting a reservation for the hoppers - 80 feet for Rudy's and 130 feet for Alamo. That way there's only room for one boxcar because the rest of the pool length is reserved for hoppers.

Normal vs. Aggressive Builds

There's one more area that I haven't discussed yet, but know it will be an issue later.  Up to now, we've been doing Normal builds.  However, normal builds will not swap cars on a spur during a single session.  That is, there must be room for both the set outs and pick ups on the spur at the same time. Normal mode doesn't know that the train will be both setting out and picking up from the same spur, so if a spur is full the train will only pick up on this session.  The next session will handle the set out. In David's example, he managed to set out and pick up in the same session while building normal.  I had to look at it for a while before I realized that he hadn't sliced up the spur into separate spots, and still had his spur length set to 10 cars.

By changing to aggressive builds, JMRI will make multiple passes. The first pass will find the pick ups and the second pass will find the spur is now empty, so it will now allow the set outs.  Setting the aggressive pass count to two should be fine for now.

options.PNG 

Build Some More Trains

Now that we've made all these changes, let's build some more trains.

After building the second train, we see that using the default 'L' and 'E' loads isn't going to work like we want.

n_build1.PNG 

First build: all cars are picked up from staging, but JMRI seems to want to prefer using the off-spot track even though there is capacity on a spur.

n_build2.PNG 

Second build: We have more problems...  JMRI still prefers the off-spot tracks to spurs. The cars that were previously placed at the off-spot are being picked up and returned back to staging even though they are still loaded.

We're going to need to setup schedules for each spur at both Storage and OP Zone locations. From my observations, the default load behaves like "I'm a sender and I have a loaded car available, run the car around until we find a destination for it".  The Scheduled load behaves like "I'm a destination and I want a load, find a load and send it directly to me". The Schedule will set the Final Destination value for a car as soon as it's picked up.  This will help us route the car through the different yard and C/I tracks properly so it will actually get to the final destination spot. The default load doesn't set the final destination until the last train to handle it is built, so while the car is still at staging, there's a chance it will get routed to the off-spot yard track instead of the expected final destination.

Progress So Far

We've added yard tracks to the layout so cars shouldn't (normally) be held at storage, tweaked some other settings, and built some more trains. We've verified that the default 'L' and 'E' loads aren't going to work for what we're doing and we need to create schedules.

In the next post, we'll create the schedules and make whatever final tweaks are necessary. Then we should have JMRI working with properly with all the features requested in the original post.

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
HN1951

Load Option vs Schedules

Some of the concepts within JMRI are confusing and seem to run counter to our ops expectations or understanding.  That being said, I've used Load Options on a spur effectively to control incoming cars.  As an example, for a warehouse spur only two cars types are permitted (say box and gondola) and they are limited to being regular loads only (L) for setout.  JMRI turns these into regular empties (E) for pickup by the next train in the cycle. Seems to work ok.  I haven't looked at Schedules yet to see what impact this would have, so the next installment will be interesting.

thanks again for this!

Rick G.

Rick G.
​C&O Hawks Nest Sub-division c. 1951

Reply 0
Craig Thomasson BNML2

Part 4a - Playing with Default Loads and Empties

I didn't tinker around with the default Loads and Empties when doing my initial investigation, so I thought I would play with them now at this point in the worked examples.

From the previous post, one of the things we saw was that cars with default Loads in storage don't have a final destination.  When a train is built, the final destination is set to the destination of the train.  As the car movements progress, the final destination is updated to either the destination of the train or a spur serviced by that train.

If a car has a custom load or a final destination pre-defined, JMRI will move that car on all trains and through all yards/interchanges as necessary to get it to that destination.  What we need to do is find a way to set a final destination.

rs_setFD.PNG 

We can bulk set the Final Destination for all of the cars in storage.  I went through and set a Final Destination for each of the cars, selecting either a group of all cars on a storage spur, or a group I wanted to send to the same destination. With the Auto checkbox selected, JMRI will automatically select a matching track in the OP zone.

All is well initially, but after running several trains, we find that as cars are returned back to storage, the Final Destination remains empty.  It's only good for one cycle of each car.  Unless we manually reset the final destination after each car has been returned to storage, we will run into the same problems as before. We also see that any of these cars sent out again and routed to one of the yard tracks, on the layout, we find that the cars end up in limbo.  They are never moved from the yard track to the desired customer spur.

Unless I want to keep manually setting the Final Destination every time a car is returned to storage, Schedules are going to be the way to go. It may seem like more work than necessary, but for our needs, we only need some of the basic features of schedules. And they allow us to do some powerful stuff like adjust how long a load stays at the destination, how often the load is sent to the destination, and so on.

Next time, we'll setup the schedules and finish the example.

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
pierre52

Great Info

Craig thank you for your extremely informative posts. You have described a number of functions that don't seem to rate a mention in the JMRI documentation. 

Peter

The Redwood Sub

Reply 0
Craig Thomasson BNML2

I'm glad others are finding this useful

JMRI Operations has a lot of functionality, so it has a steep learning curve.  I'm still learning things, and along the way I'm making assumptions on how I think things work based on my observations - the "Move" field in the route entries being one of them.

I also liked the way David structured his worked example, and I'm trying to do the same thing here.  Quite often, the "how" and "why" of doing something is more important or useful than the "what".  If I only presented what I ultimately came up with, this would have been a short one-part series.

I've often thought that setting up computer-based operations for a small switching layout is actually harder than setting up for a larger layout.  On a larger layout, you have clearly defined Shippers, Receivers, yards, and trains that connect them.  The complete car cycle is fully visible on the layout and easy to follow.  On a small layout you're only representing a fraction of that cycle, with the majority being wrapped up into one big "somewhere else" ball. It's like the operations equivalent of the Math Professor's "SMO" (Small Miracle Occurs) to represent the complex part of a worked equation.

My hope is that since this example works with a number of features that can be found on most smaller layouts, it will lower the barrier and make it easier for others to get JMRI working on their layouts.  Maybe you're already using CC&WB and have wanted to quickly try out computer operations, but didn't want to invest the time required to figure it out from scratch. Maybe you've got something running but there's a small nagging issue (the "ping-pong" of cars like Rich has, always using the same cars, cars stacked up in a yard, staging acting funny...)

So thanks to everyone for reading along!  Feel free to chime in with thoughts or comments. If I've made an incorrect assumption, let me know.  That will help others following along in future.

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
Craig Thomasson BNML2

Part 4b - Setting up Schedules

Since starting this worked example, I knew that I would eventually want to setup schedules.  From the last part, we saw that the default Load and Empty states aren't really going to work for what we want to do.

Creating the schedules and custom loads for them is actually fairly easy. We're only using a small portion of the schedule functionality, so it's mostly just repetitive work.  It's a three-step process. First the custom loads are created.  Then schedules are created for each spur, containing an entry for each custom load handled by the spur.  Finally the cars are updated with correct RWE and Load settings.

Create Custom Loads

Before we create schedules, we need to create custom loads for our cars. An easy way to do this is from the Cars window, select a group of cars and use the Tools -> Set Cars dialog.

_setLoad.PNG 

I created the following Custom Loads for each car type in storage:

LocationCar TypeCustom Load
Storage 4TGP23Latex, MTY
Storage 3CPG410, CPG308Plastics, MTY
Storage 2FB58, FC75Lumber, Plywood, MTY
Storage 1BC250, BP250, BS250Plywood, MDF, MTY
Storage 1BP260, BS260XPS, MTY

Notes:

  • For each car type, I created a custom empty load called MTY.  We will need this to get the empties properly routed back to storage.
  • For now, the plastics cars just have a single custom load called "Plastics".  Eventually I can create different plastics types (HDPE,LDPE, LLDPE, PP, etc.) once I have cars being routed the way I want.  The same goes for Latex.
  • The bulkhead and centerbeam cars carry dimensional lumber and exterior sheeting plywood.
  • The double-door boxcars carry finished plywood and MDF sheets, products which need to be protected from the elements.
  • The 60' boxcars carry Extruded Polystyrene sheets (XPS, the rigid foam insulation stuff)
  • For the flatcars and boxcars, I randomly selected about half the cars for each custom load (half the FB58 cars are Lumber, half are Plywood, etc).

You can try setting the RWE value at this point, but JMRI may complain that the setting may not work because the selected spur doesn't handle custom loads yet.  In that case, we will verify the settings are still correct once we've created the schedules.

Create Schedules

Next, we create schedules for each spur in storage as well as for each spur on the layout.  The storage spurs all receive MTY loads and ships the loaded loads.  Each spur needs a schedule entry for each car type and load. To add a schedule to a spur, edit the spur track for a location.

Storage1.PNG 

Here is the schedule for Storage 1.  Note that we're using Match mode for all of the schedules. For each car type that can ship multiple loads, I set the Random value to 50. This means that when JMRI is filling cars using this schedule, there's a 50 percent chance that it will set the car to that load.  The Random setting is not strictly necessary at this point, and you can leave it unset for now until you get a better feel for how cars are being selected when trains are built.  The Hits field maintains a count of the number of times that specific schedule entry was used to fill a car load.

Storage2.PNG 

Here is the schedule for Storage 2. The same notes for Storage 1 apply here.

Storage3.PNG 

Here is the schedule for Storage 3. I decided that CP510 cars will only ship flour.  The CP410 cars will ship both flour and masaca (milled corn used to make corn tortillas).

Storage4.PNG 

Storage 4 is simple, as I only have a single tank car type handling the Latex for now.

On the layout, I only created schedules for selected spurs that I have cars servicing right now.  The list of spurs currently active include both lumber spurs, the hoppers for Rudy's Tortillas, hoppers for Alamo Packaging, and Latex tank cars.  The boxcars for the warehouse, Rudy's, and Alamo are not handled yet.

For each of the spurs, there is an entry for each car type and load received.  Each entry ships the MTY empty load.

ule_3510.PNG 

ule_3520.PNG 

For now, both 3520.1 and 3520.2 use the same schedules.  Eventually I want to create slightly different schedules so that XPS loads prefer the 3520.1 spot as the primary. The lumber distributor can unload the foam from either spot, but prefers 3520.1 as it's closest to where the foam is stored.

You will notice the wait value is non-zero for the 60' cars in this screenshot.  You can leave them all as zero for now. I took this screenshot after doing some other tweaking.

ule_3521.PNG 

ule_3540.PNG 

ule_3550.PNG 

Adjusting the Staging Tracks

We need to make a couple of adjustments to the staging tracks to make sure cars are routed properly from storage to the layout and back.  We never want a car to be left at the staging location.

ng_Dest1.PNG 

ng_Dest2.PNG 

For each staging track, make sure the set outs and pick ups trains are set accordingly.  Staging-1 should only handle Westbound movements and staging-2 should only handle Eastbound movements. For each track from the Tools menu, select Track Destinations. Make sure the option to only accept cars with a final destination is checked.  Optionally, set the accepted destinations as shown - staging-1 only accepts cars for Zone 'OP' and staging-2 only accepts cars for Storage.

Final Adjustments

Now that we have the custom loads created and schedules setup for each spur, we need to go back and make sure all the cars are set properly.  Go back to the Cars window and edit each car (or group of cars) to make sure the RWE and Load settings are correct.

Let's Build Some Trains!

Now that we have created the custom loads, set schedules for all the spurs, and tweaked the staging tracks, we can run some trains. I like to have the Cars window open and sorted by Location while building trains.  JMRI updates the car locations and destinations in real-time as the train is built and moved.

After building several trains, we see that everything appears to be working almost as expected.  However, I noticed on my builds that no cars were ever being routed to the "yard" tracks as off-spots on the layout.  Why is that happening?  I had that working on my original example.  What's different?

After doing several backups and restores, switching between this example and my original example, I found what appears to the the reason.

ditTrack.PNG 

For each spur, I had both "Use car type and load" and "Hold cars with custom loads when spurs are full" selected.  The second one was causing my issue.  If the spur is full, JMRI won't route any cars for that spur onto the layout.  If it is deselected, JMRI can move cars towards the spur, holding at the nearest yard (our off-spot tracks in this case).  I went back and deselected the second option for each spur.  I also deselected the first option, but it doesn't appear to have any effect in this case.

Now we can run some more trains.  It's looking better now, as cars are being routed to the West tail track when the spur is full.  However, now they get stranded there.  They have the correct final destination but the train isn't moving the cars from the tail track to the customer spot.  Now what? Since it appears to be something with the train itself, let's have a look at the build options.

tions_OP.PNG 

I originally had "Send all car pick-ups to terminal" selected, thinking this was correct since all cars should go back to staging and storage.  It appears that JMRI considers a move to be a pick up and then a set out. Since cars on the off-spot need to be picked up, but they don't have a final destination that matches the staging track, the train ignores them.  Make sure this is deselected for the OP Turn train so that the train can make local pick ups and set outs between the yard track and destination spur.  This setting can be left selected for the trains between storage and staging since they are "through trains" between storage and staging.

With that issue fixed, let's build some more trains.

Success!

After building a whole bunch of trains, we see that it's finally doing what we want.  Cars are being moved between storage and the layout through staging.  No cars are being left in staging at all.  Some cars are being left at the off-spot locations when the spur is full, and they are being moved to the spur when space is available.  Looking at the Hits fields in the schedules, we see that the moves distribution is roughly evenly distributed between the different loads for each type.

Further Enhancements

At this point, we have all of the desired basic functionality for car movements.  From here we can run more trains to get a better picture of how cars are being moved.  We can tinker with the schedules and routes to alter the number of cars moved during each session. We can change how long cars are left before being picked up. We can change how often certain loads show up.

taging_2.PNG 

Use the random setting for the Storage to Staging route to alter how many cars will come onto the layout each session.  The Random value is a percentage that specifies how many cars the train can be reduced.  In this case, 50 means up to 50 percent reduction, so my trains may have 3, 4, 5, or 6 cars leaving storage.  To allow more than 6 cars occasionally, bump up the Moves values and use in conjunction with the Random value.

Cautions: Ensure your arrival moves is at least as big as your departure moves, the train size is only as big as the smallest Moves value.  I recommend only setting the Random value for the entry coming out of storage.  If a random value is set anywhere else, you may end up with cars left at Staging. Ensure the Moves value for subsequent routes is at least as big as the last Moves value on the current route.  (If this train brings up to 6 cars onto staging, ensure the OP Turn starts with at least 6 cars from staging, etc.)

e_3540_2.PNG 

Use the Wait field in the Schedules to control how many sessions a car remains at an industry before it changes to empty and can be picked up. Each time JMRI builds a train that can service that spur, the Wait count is decremented and when it becomes 0, the car is available for pick up.  In this case, I have set the schedule so that 4-bay hoppers require two sessions to unload, and 3-bay hoppers require 1 session to unload.

Another option is to create multiple entries for the same car type and load, but specify different Wait times and set a Random value.

e_3550_2.PNG 

Here we have three different entries for the Latex tank cars.  For each car that arrives on the siding, JMRI will try to match against the row containing the current pointer, and will continue to move the pointer to the next one until a match is made.  In this case, when the pointer is on the first row, there's a 50 percent chance that the car will wait for 1 session.  If no match, the pointer is moved to the second row where there's a 25 percent chance that the car will wait for 2 sessions.  If no match, the pointer is moved to the last row where the car will be picked up at the next session.

Conclusion

Thanks for following along with this JMRI learning experience.  I hope you find some useful tips from this and other examples.  If you haven't considered exploring computer-based operations, I hope this provides some inspiration to jump in and start playing with it.

As I continue building my layout, I'll be playing with this example further.  There are new aspects to explore that I haven't discovered yet. In particular, I'd like to explore using a tablet and the built-in web server for electronic switch lists (the Conductor feature of the operation).

As always, comments or suggestions are always welcome!

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
pierre52

Thanks Craig

Your explanation of using schedules was excellent. I will now need to spend some time figuring out how to apply this to my layout. 

The northern and southern extremities of my point to point layout both sit in hidden staging tracks.  I then have a classification yard and several Spurs on the layout so I am hoping that your tutorial will be a relatively good fit.

Peter

The Redwood Sub

Reply 0
David Husman dave1905

Yards

Full disclosure:  I use what are essentially CC&WB now.  I fired up JMRI for my previous layout and have gotten it to the point that it did about 75% of what I normally do.   Since I wasn't really intending to actually use it (for various reasons), I never tried to accomplish the remaining 25%.

I agree that it generates good "work orders" for locals and industry jobs.  What I have never gotten to work "right" or understand (and is one of the reasons I don't use JMRI) is how JMRI works in a classification yard.

Dave Husman

Visit my website :  https://wnbranch.com/

Blog index:  Dave Husman Blog Index

Reply 0
joef

Nice thread, but here's the devil's advocate view

Nice thread, but let me play devil's advocate for a moment. 1. What does the layout look like when I'm doing all this? Screen grabs and printouts are nice, but can this be anchored in the real world with some photos of the layout along the way? 2. This looks like a LOT of work. How would I do this same thing if I wasn't using JMRI? Show me what it does for me by comparing JMRI to some alternatives.

Joe Fugate​
Publisher, Model Railroad Hobbyist magazine

[siskiyouBtn]

Read my blog

Reply 0
David Husman dave1905

Subject

 I considered describing how the same thing could be done with car cards but I did not because its a "how to" thread on a specific product on a personal blog and I felt it wouldn't be appropriate or useful to the people reading it to divert it to an exploration of alternatives.

Dave Husman

Visit my website :  https://wnbranch.com/

Blog index:  Dave Husman Blog Index

Reply 0
pierre52

New Thread

Dave

I for one would be most appreciative if you could start a new thread on how you would use car cards.  That way we can see the alternatives and widen the depth of this discussion.

I have been using JMRI ops to produce switch lists.  While I l(and my operating crew) like its relative simplicity, it does have its limitations.

In particular, I would like a system that can receive a train from an off layout origin (staging yard) into an on layout classification yard and then forward specific cars to specific industry spurs around the layout.  The layout is end to end so there is an off layout destination (staging yard) to factor in as well.

Your knowledge and experience from the real world would be a most valued input.

 

 

Peter

The Redwood Sub

Reply 0
Craig Thomasson BNML2

More on Yards

Unfortunately, since this layout I'm building doesn't have a formal yard, I didn't dive into how that would be setup and run.  From what I can tell, it requires a mixture of Yard tracks and Classification/Interchange tracks.  You would assign your arrival and departure trains to the classification tracks, and JMRI uses those tracks to tear down arriving trains and build departing trains.  The Yard tracks simply hold cars waiting to be placed in trains.  What I don't quite understand is how JMRI handles moving cars from C/I to Yard tracks and back at the appropriate times, and how is uses the yard tracks (e.g. use yard tracks 1 and 2 for EB cars, 3 and 4 for WB cars, 5 for empties, etc.).

Joe, you raise a couple of good points. I would have added some pictures of the layout, but I still don't have any track down yet. I'm still at the stage of full-size printouts on the benchwork. I hope to start getting track down in the next week or so.

Also, one of the problems of a worked example is that it does end up looking longer and more complex than it really is. This is partly because I'm also including some steps that didn't end up working as desired so I can show what was happening and why (Let's try this.  Well, that didn't work.  Why not?  Okay, let's try the next idea...).  In reality, this entire layout example could be setup in an evening.

Dave, I would also be interested in seeing a small CC&WB example.  I have used them on other layouts in the past but it's been a long time, so some aspects are a little unclear. How do you select car/spur cards when building the train? 2-phase or 4-phase (or X-phase) car cards? How do you introduce randomness and variety so you aren't simply pushing the same car back and forth to the same industry with the same load all the time?

Peter, I'm glad you're finding this useful!  As I mentioned above, I'm not sure how to handle a formal yard in JMRI since I don't have one on this layout.  Are your staging locations "pure" staging or do you do fiddle work on them?  If you do any fiddle work, then you will probably want to set them up as a combination of C/I and storage locations like I did.  If they are pure staging (trains enter and exit untouched), then you can tinker with JMRI staging tracks.

Dealing with yards in JMRI seems to be a topic with lots of vigorous discussion in the forums.  Maybe someone else who has already been down this path could do a small worked example showing how they have got their yard working with JMRI.

Craig

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 0
Virginian and Lake Erie

I think this is most

I think this is most interesting and will go back through it in a more complete manner. What I am planning will have a large  terminal/classification yard. Cars in bound from the road trains will all go to locals. Cars in bound from locals will all go to road trains. Cars going from one industry to another will be inter mill locals between the various steel mills on the layout. I was thinking of using car cards, and switch lists, but this looks like a good alternative.

Since planning for in bound and out bound product is going to fall into the purview of the business I will assume they will not order more than they can handle, and should extras arrive there will be extra length on the sidings anyway. Industries will be very large and look like they need rail service.

Lots of cars are likely to be "captive" in once empty they will go back to their point of origin for another load.

Through trains will stop only long enough to be inspected and change power and crews and will then depart.

I also would be interested in the car card systems discussed in another post.

Reply 0
David Husman dave1905

CC&WB example

The CC&WB alternative is on this thread.

Dave Husman

Visit my website :  https://wnbranch.com/

Blog index:  Dave Husman Blog Index

Reply 0
Craig Thomasson BNML2

Part 5 - Things found after a month of running

It's been about a month or so since I got the track down on the layout and started running trains.  I've had a number of little operating sessions which have let me find and resolve any issues.  It's been an iterative process and overall, OperationsPro is working as expected.  Here are some of the adjustments I made.

Change the name of the Staging Cassette

When glancing at various windows, I was finding that "Staging" and "Storage" were too similar.  This was particularly the case whenever JMRI decided to re-sort the "Staging to Storage" and "Storage to Staging' routes. I renamed the Staging location to Interchange as well as any routes or trains that referenced Staging in the name.  Now it is easy to discern at a quick glance what is going where.

Random value for Storage Schedules not working as desired

In many cases, I'm using the same car type for different loads.  For example, center beam cars can carry plywood or lumber.  When an center beam returned to storage, I wanted it get lumber about 50% of the time and plywood about 50% of the time.  Referring back to a previous post, you can see that for the schedules for FC75, I assigned a random value of 50 to both lumber and plywood.  My thinking was that meant "assign lumber about half the time, and assign plywood about half the time".  Eventually I started getting cars in storage that were stuck in MTY state.  My interpretation of "Random" was incorrect when using "Match" mode.  In match mode, JMRI processes every schedule entry for that car type from top down looking for a match.  So in this case, there's a 50% chance of getting lumber.  If not, then there's a 50% chance of getting plywood.  If not, then the car remains empty!

For a quick fix, I simply removed the random value from all schedules for storage tracks. No more stranded empties, but now cars were always getting the same load.  JMRI would always match the first schedule found for the car type.

The final fix was to assign a random value to the first schedules, but ensure the last schedule for a car type has no random value.  Now when JMRI matches schedules, it has a 50% chance of getting lumber.  If not, it will always get plywood.

e2_fixed.PNG 

All other storage schedules were adjusted similarly.  You need not use 50%.  If you have three loads for a type, use 30% for the first two.

Car cycles too predictable

The first few sessions became predictable quickly.  If today's train brought six cars, tomorrow's train would be taking those same six cars back.  It took tweaking over a few sessions to get a nice mixture of random car cycles.

adjusted.PNG 

Here we see the adjusted schedules for Alamo Packaging.  A small percentage of the cars will be held for up to four cycles.  A closer inspection reveals that the hits for the random schedules is still 0 or 1.  I didn't notice until generating this image that I had the random schedule entries at the bottom, so JMRI would never get to them.  They are fixed now...

I also adjusted the random value for the Storage to Interchange route.  With "moves" set to 7, JMRI will select up to 7 cars for the session.  The random value for the route specifies the number of cars that JMRI can reduce the moves value by to generate a reduced maximum train length.  A value of 80% means that JMRI can reduce the length by up to 80%, or down to as short as two cars.

erchange.PNG 

On the OP Turn, I bumped up the moves count for Zone OP to 30.  With the previous lower values, JMRI didn't always have enough moves available to move cars from off-spots to final destinations.  I would encounter situations similar to where JMRI would make a bunch of other spots, pulls, and moves, and then pull all the cars from the Latex Distributor, but then it wouldn't move latex cars from off-spots to the distributor (or it would move one car, but not a second one).

ute_OP_4.PNG 

Also note the Moves for the first line leaving the Interchange is greater than the Moves for the Storage to Interchange train.  This ensures that no car is ever left at the interchange.

Tweaking the manifest printouts

This is an ongoing process, but this is the format I've settled on for the moment.  While almost every component has some sort of comment field (schedules, routes, trains, car types, locations, etc.), trying to figure out where the different comment fields print out on a manifest is a challenge.  So far, the comment column doesn't appear to have any connection to any other part of the program.  I haven't been able to figure out how JMRI generates the switch list for a location.  Rather than a single block of pick-ups, set-outs, and moves, there's a block of pick-ups, then some set-outs, then some moves, then some more set-outs, then some more pick-ups, then...

Manifest.PNG 

Create a Zone Chart

When was the last time you were operating at a layout and had to set-out a car at 'spot 3' of Acme Widgets, and had to ask "Where's spot 3?" or "Where's Acme Widgets?"

Similar to a SPINS or CLIC diagram, I created a simple Zone Chart for operators to reference.  It includes a track diagram, description of each spot, and any special instructions.

ne_Chart.PNG 

It's folded in thirds with the track diagram on top for quick reference.

Add "Yard" tracks

So far, I haven't added any schedules or moves for 3510.1, 3540.1, or any of the warehouses.  Despite having nothing for almost half of the spots on the layout, it still keeps me quite busy.  Until I can come up with ideas for warehouse customers, I've converted that entire track to a yard track and pooled the three spots together.  That lets JMRI use the track for additional off-spots.  In the manifest above, you can see the warehouse track being used as an off-spot.

 

That's about all for now.  So far I've been able to make OperationsPro do almost everything I want for operations. Before I started all of this, I thought that computer-generated operations would be hard to get working properly for such a small layout that only represents the "last mile".  Now I believe that computer operations is perfect for a small layout.

Craig

 

See what's happening on the Office Park Zone at my blog: http://model-railroad-hobbyist.com/blog/49643

Reply 1
sailorguy50

Thank you

I have a small-"ish" branch layout serving 3 towns and being fed from an off-layout main line.  I have been working with JMRI Ops for some time but having challenges.  Your series is certainly helping to iron out kinks i  my setup   thank you for your detailed explanations 

 

Joe

Reply 0
Reply