david.haynes

In a  recent posting on this forum, rclanger suggested that a column on using JMRI would be a good addition to MRH. I replied that I would really like to see some worked examples of using JMRI operations.

Over the holiday period, I decided to dig into JMRI operations a lot more and that I would post my discoveries along the way as my own ‘worked example’. So, bear with me folks, this is really me going through a learning curve and documenting it along the way!

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
david.haynes

First JMRI post

It will be a multi-part posting as well as I get time to document my progress.

To start, I needed a good but simple example to work with. With the key values of ‘good’ and ‘simple’, I knew that Lance Mindheim would probably have something I could use. He has been advocating simple track designs for operations for a while now. So, I found a good idea in his blog posting from  September 17, 2012.

I like this example because it has only one industry (a bakery) but a variety of cars (hoppers, tank, box) and only one train to service it.

This blog entry assumes that you have read the JMRI operations tutorial and web pages and are mostly familiar with filling in the various forms.

Starting Small

The Operations menu in JMRI indicates the order of the steps you should take when starting out, namely: Settings, Locations, Cars, Locomotives, Routes and Trains.

Settings

I give the railroad a name of ‘Lance Mindheim – Bakery’, set the trains to travel East/West and check the box next to “Add Operations Menu to Main Menu”.

Locations

The first thing I did was analyze track plan in Lance’s blog. In JMRI terms, we have a location named ‘Bakery’ that can accommodate up to 10 cars – 1 grain hopper, 4 tank cars and 5 box cars. Assuming each car is a maximum of 50 feet, the spur must be longer than 500 feet. I’ll make it 600 feet for now.

I added the “Bakery” location as follows:

-%201(1).gif 

The JMRI Operations document recommends adding two interchanges when starting out. Since the bakery is service by a ‘turn’ train (one that leaves a yard, services some industries and then returns to the yard), I will set up the interchange as the cassette mentioned in Lance’s blog post.

Since, the recommendation is for two interchanges, I will model that by having two interchange tracks in my cassette.

A note about names in JMRI: If you have a hyphen followed by a number in a name, the hyphen and number and any following text will not show up in the reports or switch lists. For example, the name ‘Cassette-1’ will show up as ‘Cassette’ in the switch lists.

I added the “Cassette” location as follows:

%20-%201.gif 

I added the ‘Diesel’ rolling stock to this location because I want the train engine to arrive on the cassette.

Cars

To start simply, I will have one car – the Grain Hopper available. I will add it to the Cassette-1 track and set it to Loaded.

-%20Blue.gif 

Locomotives

I will have one locomotive – a diesel – also located on the Cassette-1 track.

%20-%201.gif 

Routes

The route is very simple: it starts from Cassette, travels west to Bakery and then travels east to Cassette. I will call this the ‘Bakery Turn’.

%20Route.gif 

Trains

Finally, I can set up a train to run along the Bakery Turn route.

rn%20Job.gif 

Generating the Train Manifest

Finally, I can try to generate a train manifest! Before I do, however, I want to check the ‘Build Reports’ and ‘Preview’ boxes so that I can see what actions JMRI operations is performing.

%20-%201.gif 

Now I press the ‘Build’ button. The button changes from ‘Build’ to ‘Preview’ so that I may look at the build report and switch list generated. Pressing the ‘Preview’ button presents two new windows: the “Train Build Report” and the “Train Manifest”. Looking at the Train Manifest first, it looks like JMRI Operations did what I wanted.

%20-%201.gif 

It says to pick up the grain hopper from the Cassette and drop it off at the Bakery but, wait a minute! What engine are we supposed to use? Maybe the Train Build Report will tell me something.

%20-%201.gif 

It says that the train does not require any locomotives. Not exactly what I had in mind… The ‘Edit Train’ form has a section named ‘Optional train requirements’ where the number of locomotives is currently set to 0. Let’s set that to one and see what happens.

%20-%201.gif 

In the ‘Trains’ form, select the radio button labeled ‘Reset’ and then select the ‘Reset’ action for the train. This will reset the Function to ‘Build’. I reset and then build the train again.

%20-%202.gif 

That’s more like it. The engine is picked up from the Cassette and returned to it at the end.

Now that the preview looks good, it’s time to tell JMRI that I have moved the cars. I select the ‘Move’ radio button in the Trains form and then click on the ‘Move’ Action for this train.

%20-%201.gif 

The train is now reported to be ‘In route’….

%20-%202.gif 

I push the ‘Move’ Action button again…

%20-%203.gif 

The train now has no cars. Where did the cars go? Checking the Cars form shows me the following:

%20-%204.gif 

So, the grain hopper has been dropped off at the Bakery.

Notice that the train has not terminated its journey. Press the ‘Move’ action button again.

%20-%205.gif 

Now the train is terminated. Checking the Locomotives form shows me the following:

-%206(1).gif 

So, in summary, I have created two locations: Bakery and Cassette, loaded the Cassette with an engine and a grain hopper car, created a route between the Cassette and the Bakery and then scheduled a train to run over the route.

The train picked up the loaded grain hopper and dropped it off at the Bakery and then returned the engine to the Cassette.

In the next section, I will add the other car types to the mix.

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
wp8thsub

Question

I'm not using JMRI for operations, so haven't investigated too far.  There are various things we do at my sessions I'm not sure JMRI will handle as-is.

Consider a typical local I have called the Milton Turn.  During the day, cars for this train show up in Junction City yard from other trains that stop to do block swaps.  There's a cutoff time approximately when the yard pulls everything for the Milton job from its track (up to 20 cars) and is instructed to block the train in rough station order (Chester block at front, Milton block behind it, and it's up to the turn's crew what to do from there).  The yard doesn't know (and really can't) exactly which cars will show up by the cutoff (the through trains that drop cars don't always run on time, and they aren't necessarily even built in their originating yard when the session starts).  After today's local departs, more cars for its two blocks will accumulate, so they'll just go into a yard track to wait for tomorrow when the process repeats.  The same basic idea affects other locals and through trains originating at this and other yards, as they are built from blocks.

So - does JMRI allow for situations where:

  • Cars show up whenever they show up (and to some extent locomotives and cabooses too),
  • A train is assembled from whatever is available for its destination(s) whenever its cutoff time comes, up to a given train length using the power and caboose available,
  • Block order (and integrity) matters, but individual car location within the block does not (with exceptions for hazmat being spaced away from an occupied locomotive or caboose),
  • There may be an intermediate company setout track en route where cars accumulate that we have to deal with too, and again the exact count of cars on such tracks isn't known beforehand - the idea just is that we pick up whatever's there and deliver to the industries, add to the front of the train up to our maximum length, etc.

The above is essentially how my prototype would have run trains in my era.  To get JMRI behind that, I'm thinking somebody would have to function as a clerk and continually update information until it's known what will be available for a train, and would have to do so for every yard and intermediate track where affected cars might be, including the active staging yard (where trains are also built from blocks).  How would this work?

Rob Spangler MRH Blog

Reply 0
david.haynes

Some answers

Rob,

I'm by no means an expert with JMRI operations and would suggest you post this set of questions on the JMRI Users forum on Yahoo for a completely accurate answer but, I *think* I can answer some of your questions.

So - does JMRI allow for situations where:

  • Cars show up whenever they show up (and to some extent locomotives and cabooses too),

    I think the answer is yes but you have to add a bit of 'plumbing' to make it all work. What you seem to be dealing with is a desire to have cars from 'other places' show up and then be used in your Milton turn job.. These cars can be held in a JMRI yard (which may have no physical representation on your layout) I will be showing how this works in an upcoming blog entry.
     
  • A train is assembled from whatever is available for its destination(s) whenever its cutoff time comes, up to a given train length using the power and caboose available,

    Definitely yes. Again the yard element allows you to do this.
     
  • Block order (and integrity) matters, but individual car location within the block does not (with exceptions for hazmat being spaced away from an occupied locomotive or caboose),

    Yes-ish (I think). JMRI operations has the route which indicates the order that locations are serviced and tries to order the manifest in that order but, if you are looking for JMRI to manage your yard to the level of 'put this car on track x' I don't think it will help you. The manifest reads more like 'drop this car in the yard'.

    A classification interchange may do this but I have not explored those yet.
     
  • There may be an intermediate company setout track en route where cars accumulate that we have to deal with too, and again the exact count of cars on such tracks isn't known beforehand - the idea just is that we pick up whatever's there and deliver to the industries, add to the front of the train up to our maximum length, etc.

    I think the answer is 'yes' here too. To JMRI Operations the set out track would simply be an interchange track where cars from one train would be assigned to one or more other trains.

    For clarification, a yard is used to hold cars prior to being assigned to trains. An interchange is used to hold cars that are to be exchanged with another train.

    There is also the concept of multi-step car routing (for custom loads) so that a car may be routed through up to 5 trains (I think) from source to destination.

    Again, this is my limited understanding. The Yahoo forum is the best place to get answers to questions like these since those answers will come from the folks who write and maintain the code.

David

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
wp8thsub

Thanks

I appreciate the time to answer.  The JMRI system seems to be more flexible than I thought it was based on your descriptions.  I'll keep following along with your future entries.

Rob Spangler MRH Blog

Reply 0
robteed

Thanks

Thanks David,

This is interesting information and I may find it useful in the future.

Rob Teed

Reply 0
arthurhouston

Another JMRI Operations User

I will answer all questions with this statement. Anything done on railroads to move traffic can be accomplished using Operations. And it is free. Download at JMRI.org. I run a large RR that currently has 519 cars in the program. I will make the following suggestions to beginners. One do not put locos and cabooses into program until you get your trains running. Think about restricting movement by car types. You can have as many car types as you want, 20 different tank cars. Do not get into schedules until you have program working and trains and cars running around layout. If you are rail op user you will have no problems switching over. You need JAVA on your computer. You do not need to have computer connected to command station. OPS program is stand alone and will work by its self. Yes you can tie it in and run "LIVE" with Layout Editor. LAST JOIN YAHOO CHAT GROUP JMRI. When you post a question start subject line with OPS: and you will get to know Dan.
Reply 0
arthurhouston

Good Bye Card.Cards

My operators love it no more car cars. We run 25 car trains and for the manifest trains that go across the layout it can make 60 plus moves. That was to many cards to handle. The other thing it did is you no longer see the same car showing up at this same location all the time. If a spur calls for a boxcar their are about 100 different cars for the computer to choose.
Reply 0
mecovey

Jmri discussion

Thanks for beginning this discussion. I plan to implement JMRI ops soon and will follow posts closely. Art a question about your suggestion not to put engines and cabooses into the program until trains are running...any particular reason?

20Avatar.jpg 

Reply 0
tetters

Question

I followed the instructions as posted and cannot duplicate the results shown here.

Mainly the car does not show up on the train.  I can get it to generate the manifest and show that the locomotive has been assigned but the car does not show up on the train?  The manifest simply tells me that there is no work at the cassette or the bakery?

Any suggestions or am I missing something here? 

 Shane T.

 

Reply 0
david.haynes

Check your train directions

Shane

I have found that a typical reason for the 'No work' message is that your train is going one way and the cars need to go the other.

If that doesn't help, contact me and I'll take a look at your train build report.

-david-

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
tetters

I got it.

I started all over again and was able to get it to work.  I honestly don't know what I did differently though.  I even used my own location labels, Saw Mill as a Spur Track and Car Float as the Interchange Tracks.  Worked this time though as per your tutorial.  Very Cool.

I'll move on with part two and see if I can move some more "stuff".

Thank you for your time and effort putting this together.

 

Shane

 

 Shane T.

 

Reply 0
stevelton

no locomotive available

I followed  this step by step. I have almost the same results as you, except, I cannot get it to add the locomotive at cassette. It adds and moves the one car fine, but Im stuck with the engine. In the "Edit Trains" window, I tried to use the "Optional Train Requirements" tool to require 1 locomotive, but it only gives me the option of either 0 or auto. Neither one will build the train with the locomotive.

Steven

(Male Voice) UP Detector, Mile Post 2 8 0, No defects, axle count 2 0, train speed 3 5 m p h,  temperature 73 degrees, detector out.

Reply 0
david.haynes

RE: no locomotive available

There are a couple of things to check:

  1. Do you have the locomotive defined in the Locomotives window?
  2. What type of locomotive is it? e.g. Diesel, Switcher, etc?
  3. In the 'Edit Train' window, do you have the number of locomotives set? You should have the option for 0, 1 or auto (I suggest you set it to 1 initially)
  4. For the cassette location, have you indicated that it can hold the locomotive type?

If this doesn't help, it will be time to look at the build report with the reporting level set to detailed to see what is happening.

-david-

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
stevelton

Heres what I see

I do have locomotive in the Locomotive Window. They are Diesels. In the edit train window, as you can see in the screen capture, only gives me the option for 0 or auto. I dont have the option to require 1 locomotive.

shot_1_0.jpg 

Also here is what my switch list and build report looks like. This is set to be very detailed.

shot_2_0.jpg 

(Male Voice) UP Detector, Mile Post 2 8 0, No defects, axle count 2 0, train speed 3 5 m p h,  temperature 73 degrees, detector out.

Reply 0
david.haynes

Locomotives?

There is a line in your build report that reads "The maximum number of locomotives that can be assigned is 0". From this, I suspect that you do not have your locomotive defined in the locomotives window (i.e. Operations -> Locomotives)

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
stevelton

Got it, heres what I did, oops

I happened to look back into the other edit windows.

When I first started out, in the settings window, It asked for "maximum locos per train". I had that set at 0. Changed that to 6, and now it works.

Cool. Im always happy when I get stuck, and work through the problem so I can learn as I go! I cant wait to learn Ops well enough to start using it on the layout!

Thanks for the help.

Steven

(Male Voice) UP Detector, Mile Post 2 8 0, No defects, axle count 2 0, train speed 3 5 m p h,  temperature 73 degrees, detector out.

Reply 0
BnOPaul

OPS Add location in middle

Dan, 

I have a list of about 100 locations running in order from East to West by Mile Posts. I have added a new town on the layout about in the middle. I just cannot figure out how to get that new town from the bottom of the Location list where it shows up when added to the middle of the list where it belongs. Any thoughts? Thanks, Paul

Reply 0
david.haynes

Sorting Locations

I'm not Dan, but I'll give this a go.

JMRI only supports ordering locations by name or ID. If you need them to be ordered by mile posts, the only way I can see this working is to name your locations with a prefix such as 'MP19' or 'MP129'. For example, the location 'Foobar' at mile post 129 would be named 'MP129 - Foobar'. You should probably zero-pad your numbers, so 1 becomes 001 and 27 becomes 027 so that the ordering is correct.

Usually, the order of the locations is not handled in the locations windows but in the route of the train instead. That is, this train stops at MP015, MP026 and MP054, etc.Like highway exits, you could also add an 'A', 'B', 'C' suffix for multiple locations within the same mile post area. For examples, MP157A - Fenlon Furniture, MP157B - Carlson Paints, etc.

The ID is computer generated and not editable by the user.

-david-

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
Michael Knight

Yard vs. Classification/Interchange vs. Staging

Dan, as used in JMRI, can you explain the differences in these three types of locations? For example, why use C/I for the cassettes and not staging (or even yard)?

There may already be an online explanation for this, and if so, I would appreciate the link. The JMRI manual doesn't seem to explain enough.

Thanks,

Mike

 

Reply 0
david.haynes

Location Tracks

Mike,

These are the definitions I use:

  • An interchange track allows drop offs from one train and pick ups by that train of different cars but it will not allow the same train to drop off and pick up the same cars. In this way, JMRI models a real interchange between two railroads. The car loads are not changed in an interchange.
  • A staging track will accept or supply cars but all cars that were in a train are kept together. That is, JMRI will not rebuild a train in staging using a subset of the cars in the train. The car loads are not changed in a staging track.
  • A yard track will accept and supply cars and JMRI may build a train using any of the cars from any of the yard tracks. The car loads are changed when a car is placed on a yard track toggling between empty and loaded or one custom load for another. The toggling of custom loads is configurable.
  • A spur track allows drop offs and pick ups of any cars by any train and will toggle the load of the cars.

When I say 'any' here, I mean 'any allowable'. For example, tracks can be configured to only accept certain types of cars.

David

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
Ian Millard liverpool_range

JMRI Ops with fixed trains

Hi David,

I am very, very new to JMRI, even more so with Ops (ie, never tried it!), but it sounds interesting.

I have a question for you.

My layout does not involve shunting (switching) cars around.  There will be trains in fixed consists in staging yards.  Could JMRI Ops be used to generate just a running list of trains to run, wait at crossing loops etc?

For example - Driver (engineer) #1, pickup train #1234 and head through location X to location Y,  and wait in the loop.  Driver #2 pickup train #5678 (heading in opposite direction) and head through location Z, Y and X and return to staging.

Cheers,

Ian

Ian Millard

Port Macquarie, NSW, Australia

https://liverpoolrange.wordpress.com/

Reply 0
Babbo_Enzo

Trains meetings

How possible to have instruction on Train order list, at one location stop, like : "at MP22, Wait meeting #91, take siding"?

As one build each train at time and print the train crew instructions, how to take in consideration a meet with another train? JMRI don't have knowledge of a Timetable? I don't see a simple solution to this operators request.

Any ideas or trick?

 

Reply 0
david.haynes

Train Instructions

JMRI operates more like a freight forwarding system than a time table system. I see it as an aid to creating trains rather than a replacement for the time table and train order system.

The best answer I can come up with for what you want is to add the train order to the 'Comments' section of the train.

Those train orders will appear at the top of the Manifest for the train.

JMRI does have a new Dispatcher function that allows you to specify train orders when the train is running. See here for more details: http://jmri.sourceforge.net/help/en/package/jmri/jmrit/dispatcher/Dispatcher.shtml

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
david.haynes

Fixed Trains

If I understand your question correctly, I think you are asking whether JMRI will support time table and train order operations. That is, you want JMRI to handle issues such as priorities, waits, etc.

It doesn't really do that. JMRI operations acts as more of a freight forwarding system than a TT & TO system. That is, it tries to fill scheduled trains with freight that is appropriate to the industries that the train will service and to handle the return of freight from those industries.

In your case, like Enzo's below, the best answer I can give you is to add the train orders to the comments section of the train.

NOTE: This answer is for JMRI operations. There is a new dispatcher functionality that is used when running trains that does seem to address what you want. i.e. The assignment of crossing loops as the train is running on the layout. You can read more about it  here: http://jmri.sourceforge.net/help/en/package/jmri/jmrit/dispatcher/Dispatcher.shtml

-----------------------------------------------------------------------------------------

N scale, DCC-NCE, Switching, Operations

Reply 0
Reply