¿ªÔÆÌåÓý

Locked Possible issue with a sequence mode spur schedule #operationspro


 

I am helping a friend to set up OperationsPro for his railroad. He has a large collection of cars and wants the software to make selections for trains from the "Drawer Yard" and "position" the cars on the layout ready to start an operating session. He also wants the software to route cars that have completed their run back to their proper place in the Drawer Yard. My friend is a cabinet maker and has made 50+ beautiful custom cabinet drawers to house his collection. Each drawer has a capacity of about 45 N-scale cars. We call this off layout collection of drawers the "Drawer Yard". Each drawer represents a track in the Drawer Yard. The tracks are named with "car type" <space> drawer #. (Box 1) for example. In the cars window the car types are listed with a hyphen in place of the space. This makes the manifests look cleaner. So, instead of "Box 1", you use "Box-1" in the cars list and then you only see "Box" in the manifest. The corresponding "Box 1" track in the Drawer Yard is constrained to only allow cars of car type "Box-1". Some car types occupy multiple drawers. I think there are more than 20 drawers for cars of type Box and variants there of. When it is time to select or replace cars in the Drawer Yard, the numeric portion of the car type indicates the correct drawer number to access. Cars of type "Box-1" belong in drawer #1.
-
So, where we are having a problem is in selecting cars for a train using a Sequence Schedule. He wants a train of 15 cars in the example I am using to illustrate the issue we have discovered. We have train "SB Select" running from the Drawer Yard to a spur called "Little Rock Temp". Little Rock Temp has only one track, also called "Little Rock Temp". Little Rock Temp has a Sequence Schedule called "SB 15 groups". The schedule, SB 15 groups, is made of groups of 15 cars of car types that are wanted in each 15 car train. The train allows 15 moves, which should select the first 15 car types from the Sequence Schedule, SB 15 groups, since the pointer is at the first entry. The first 15 car types from the schedule are shown in the attached image. Also shown in this image are the reporting marks for the car that the software selected for each car type and the move counts for that car. I have included the move counts because it appears that the selection process from the Drawer Yard is based on a list sorted in move count order from lowest to highest. A second image is included to show the last 4 cars in the sorted car list. The information in these two images are important to understanding the issue that we found.
-
For those who might be interested, once cars are delivered to the Temp track they are next taken to the Little Rock Departure track which is a staging track. Here they are automatically unloaded, then reloaded and routed to locations across the railroad as demanded by industry schedules.
-
I am not including the build report for this train because it runs in excess of ten megabytes! As a clue, the report says 1,267 cars were found for this train! I am including what I think are the pertinent portions of the build report to help to identify the issue. My comments below are prefaced with "***" to clearly separate them from the build report excerpts.

*** I am using JMRI 5.2 running on a Windows 10 machine.

*** This train is building in 2 pass aggressive mode. After the introductory material the car selection begins with the first car type from the schedule, "Box-8", shown below.

Try spur (Little Rock Temp, Little Rock Temp) for car (GTW 309340) with load (MT)
Train (SB Select) can transport car (GTW 309340) from yard (Drawer Yard, Box 8) to (Little Rock Temp, Little Rock Temp)
Route for car (GTW 309340): (Drawer Yard, Box 8)->(Little Rock Temp, Little Rock Temp)
Car (GTW 309340) load (MT) has assigned destination (Little Rock Temp, Little Rock Temp)
Car (GTW 309340) assigned to train, destination (Little Rock Temp, Little Rock Temp)

*** Successful car selections continue for the next 6 car types in the "SB 15 groups" sequence mode schedule with the same format as above.

*** Since this train was in Aggresssive mode, at the halfway point, after finding the 7th car type, TankTal-42 GATX 65224, you get the following:

Success 7/7 cars at location (Drawer Yard) assigned to train (SB Select)
Route location (Little Rock Temp) id 17r4 no pick ups

Multiple pass build (Aggressive Mode), begin 2 of 2 passes
Route location (Drawer Yard) id 17r5 requests 8 pick ups, 8/15 moves are available

*** Then 7 more cars were found in sequence, the 14th car type requested was Gon-36...

Try spur (Little Rock Temp, Little Rock Temp) for car (SOO 69465) with load (MT)
Train (SB Select) can transport car (SOO 69465) from yard (Drawer Yard, Gon 36) to (Little Rock Temp, Little Rock Temp)
Route for car (SOO 69465): (Drawer Yard, Gon 36)->(Little Rock Temp, Little Rock Temp)
Car (SOO 69465) load (MT) has assigned destination (Little Rock Temp, Little Rock Temp)
Car (SOO 69465) assigned to train, destination (Little Rock Temp, Little Rock Temp)

*** then continuing down the car list (see the image of the last cars in the sorted car list) sorted by move count we start looking for a car type HopWC-35. Only three cars remain in the list, all with move count = 15. None of these cars are of the required type. The build report shows them rejected as it should...

Find destinations for (SP 698697) type (BoxInsul-23) load (MT) at (Drawer Yard, BoxInsul 23)
Searching location (Little Rock Temp) route id 17r4 for possible destination
Can't send (SP 698697) to spur (Little Rock Temp) due to schedule (SB 15 groups) requests car type (HopWC-35)
Could not find a track for (SP 698697) at destination (Little Rock Temp)
Did not assign a destination for car (SP 698697)

Find destinations for (RI 8546) type (CHopAS2-33) load (MT) at (Drawer Yard, CHopAS2 33)
Searching location (Little Rock Temp) route id 17r4 for possible destination
Can't send (RI 8546) to spur (Little Rock Temp) due to schedule (SB 15 groups) requests car type (HopWC-35)
Could not find a track for (RI 8546) at destination (Little Rock Temp)
Did not assign a destination for car (RI 8546)

Find destinations for (CNW 182834) type (CHopCLY-3) load (MT) at (Drawer Yard, CHopCLY 3)
Searching location (Little Rock Temp) route id 17r4 for possible destination
Can't send (CNW 182834) to spur (Little Rock Temp) due to schedule (SB 15 groups) requests car type (HopWC-35)
Could not find a track for (CNW 182834) at destination (Little Rock Temp)
Did not assign a destination for car (CNW 182834)

*** All of this is fine because the last three cars do not match the requested car type HopWC-35 Then the wheels come off...

Partial 7/8 cars at location (Drawer Yard) assigned to train (SB Select)
Route location (Little Rock Temp) id 17r4 no pick ups
Partial 14/15 cars
Build for train (SB Select) took 17,750 mSec

*** Instead of going back to the top of the car list and continuing the search for car type HopWC-35, the program stops after one pass through the list with only 14 cars found. There are actually 39 cars of type HopWC-35 in the car list. 37 of these cars are available in the Drawer Yard, Drawer #35. The problem is that they only have move counts ranging from 0 to 7 and therefore they are nearer to the top of the sorted car list and already bypassed in the first reading. So cars of type HopWC-35 that were available and requested in a sequence schedule were left behind in the yard and not added to the train.

*** To check to see if the move counts problem was the only issue, I moved the request for car type HopWC-35 to the 8th position in the schedule and built the train again. All 15 car types were found and assigned to the train. That is great for this time around, but move counts change the more you operate and the next time this train is run it will be using the second group of 15 car types in the "SB 15 groups" sequence schedule so it is likely that down the road the same type of error will occur again. If I am doing something wrong, let me know. Otherwise, I think I may have found a small bug.

Dan, I want to thank you for providing and supporting this fabulous tool for the model railroad community. It is positively amazing what can be done with this software!

Sincere thanks,
--
Dave...
Castle Rock and Pacific ( )


 

On Mon, May 8, 2023 at 08:58 PM, David Cochrun wrote:
Instead of going back to the top of the car list and continuing the search for car type HopWC-35, the program stops after one pass through the list with only 14 cars found. There are actually 39 cars of type HopWC-35 in the car list. 37 of these cars are available in the Drawer Yard, Drawer #35. The problem is that they only have move counts ranging from 0 to 7 and therefore they are nearer to the top of the sorted car list and already bypassed in the first reading. So cars of type HopWC-35 that were available and requested in a sequence schedule were left behind in the yard and not added to the train.
Not sure why you would think that the program would keep cycling through the car list in order to complete a sequential list of cars needed for a spur. The program was designed to build trains, not service a spur.? Also,?if the spur in sequential mode demanded car type "A special car" , but that car type wasn't available for some reason, the program would cycle forever looking for that car.??

Note that you could use 4 passes to improvement the odds of the program getting all 15 cars for the spur.? But I think by playing with car move counts, that you or I could cause the program to only deliver a limited number of cars to the spur for each train build.? For example, give the cars that are demanded at the start of the schedule the highest move counts, that would make the program only deliver one car on the first pass. Than for the second pass, give the next car type the 2nd highest move count. I think we could force the program to only deliver 4 cars to the spur, not 15, even with 4 passes in aggressive mode.

One possible workaround would be to have multiple spurs running the schedule "SB 15 groups" and pool them together. Now the odds of getting 15 cars would be much greater. You could also reverse the sequential list of cars for "SB 15 groups" so that one spur would be looking for the cars at the end of the list while the other spur was looking for cars at the start of the list.

Dan


 

Dan,
Thanks for your response. I will investigate your suggestions.

In fact, I was trying to build a train, a 15 car train, but I also needed to control the consist of that train. The spur track was being used as a tool to control the consist. Because I am pulling cars from a large collection, without some constraints, I could get 15 box cars or 15 tank cars. The cars from this "Select" train will eventually run across the railroad and serve several industries. It also carries some cars from end to end. I also did not want a stagnant consist. It looked to me like I could control the consist by using a sequential schedule to essentially specify the consist. Then using a long schedule, I could add a variety of 15 car consists to the schedule and each time the train ran it would fill in a new and slightly different 15 car consist. Once the selection was made, another imaginary train would take the cars and place them on a departure track (staging track) where destinations and loads would be assigned. Both of these trains would run on nonexistent tracks, except for the final staging track, and only served the purpose of building a train with variety of appropriate cars and placing them on a track to be run in an operating session. This was to be part of staging the railroad for ops. In reality my friend, the operations session host, would just look at the car list from the second train, extract those cars from the appropriate drawers and place them on the departure track - ready for ops. From your reply, I can see that sequence schedule approach will not work as the software currently exists.

Another way of trying to accomplish the same thing might be to build a long imaginary track with track segments of varying lengths for each type of car desired. Each track segment would accept only one car type and the number of cars of that type would be limited by the track length. In cases where you don't want a particular car type every time you run the "select" train you can insert a one line schedule that incorporates a random control value. Is this approach more likely to produce a 15 car selection with an inbound 15 move train?? If it works then those cars could be collected the host and set out on the Departure (staging) track ready for the operating session.

Is there a better way to select cars for a consist as described above? I get tunnel vision sometimes and can't see the easy solution. Simple is better!

I was confused by your statement that, "if the spur in sequential mode demanded car type "A special car" , but that car type wasn't available for some reason, the program would cycle forever looking for that car. " I know you are an excellent programmer so you certainly know how to avoid endless loops. Also, if you are trying to fill a slot from a sequential schedule and you examine every available car without finding a match for the requested car, then you are done because the sequence schedule cannot progress to the next request until the current request is satisfied. In fact if you have a list of available cars sorted by move count from lowest to highest and you search the entire list in order for each requested car in turn, then you will always find a car that matches the request if such a car exists. In addition, the first matching car that you find will have the lowest move count of all matching cars - and you will build the largest train given the constraints because you will not miss any matches. Filling trains and moving cars with lowest move counts seem to be common themes in OperationsPro.

Many thanks,

--
Dave...
Castle Rock and Pacific ( )


 

David,

After thinking about your issue, I believe a better solution would be to simply create 15 unique tracks for the cars out of the drawer yard.? The tracks could be yard, C/I, or spurs, as it shouldn't matter.? For each car type create a track that would only accept that car type and enter a length equal to the number of cars of that type that you wanted.? Now the program will populate all 15 tracks if the car type was available during the build, and simply leave a track empty if the car type wasn't available from the drawer.? With this method, and if all of the car types were available, the train would always have the 15 car types requested. You could if you wanted, create a couple "extra" tracks with certain car types, so that in the case a car type was missing from the drawer, there would still be 15 cars delivered from the drawer yard. If you used C/I type tracks you could get creative with builds out of the drawer by having multiple trains out of the drawer, and controlling which trains would be allowed to deliver cars to the C/I tracks.? Now the make up of the 15 cars could vary with the train out of the drawers.

You could name each of your tracks something like Yard-boxcar for boxcars, Yard-coilcar for coil cars, etc.? Now all of the cars would depart from "Yard" on your Manifest.

Dan


 

Thanks Dan,
That is close to what I was describing in my last message as an alternative. I created tracks for each anticipated destination and limited the maximum number of cars by setting appropriate track length. Each destination may include multiple car types. I have used spurs because spurs offer the "random" moderator. I guessed at these random values for a starting point and then went through multiple builds to see how the consist varied. Within an anticipated destination group I can modify the random value of each car type individually to suit the application. After each build, I adjusted the random values until I was getting a good but varying consist. The tuning was a bit tedious, but in the end I was getting acceptable results with 15 car consists that varied slightly with each build. Having the random moderators was the key. Now each time I build the train I get different, but logical, distribution of desired cars within the 15 car consist. All schedules are in match mode to avoid the issue with sequence mode.
Thanks, Dan, for your help and for a great product!

It is worth noting for others that the random value for a particular car type is sensitive to the number of cars of that type that are contained in the pool of cars available for building the train. The higher number the cars of the type being adjusted in the pool, the more control you have with the random modifier. Move counts can also be a factor.

Next the selected cars will be taken to the Departure (staging) track where they will be ready for the operating session. OperationsPro will decide where they go and with what load.
--
Dave...
Castle Rock and Pacific ( )