¿ªÔÆÌåÓý

Locked Re: Possible issue with a sequence mode spur schedule #operationspro


 

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 ( )

Join [email protected] to automatically receive all group messages.