Staging The Layout


Traffic Generator

This is the form for the Traffic Generator. The numbers at the bottom of the form are an estimate of the number of cars it will place on each interchange based on the number of operational cars available off the layout. There are three functions perform by the Traffic Generator each controlled by one of three buttons. The top button "Cycle The Layout" backups all of the tables, removes the cars from the layout that are currently located on the interchanges, selects new cars for the interchanges and produces log files of all activity. The second button "Generate EP Waybills" generates waybills for all loaded interchange cars and for the businesses based on their random number range and the current random numbers. The third button "Reset Layout To Previous Cycle" will undo the last iteration of the first two buttons.

Let's look at the process in detail.

Cars Leaving Layout Table

The Cars Leaving Layout Table must be updated before any other function is executed. I do this by placing the CarID and CurrentLocation for each car that is on an interchange and leaving the layout. The Traffic Generator will remove these cars from the layout when I execute the "Cycle The Layout" function. In the above table row one will remove the car associated with CarID 28 located at the N&W interchange from the layout. (The location information is for history purposes only.) It will not use this car in any subsequent processing during this iteration of "Cycle The Layout".

Car Table

The Car Table is a complete inventory of all cars reguardless of operational status. The columns are (left to right);
CarID - a sequential number that uniquely identifies each car
Type - type of car, for example XM is a box car
Operational - a check box that when check indicates the car is operational and ready for the layout
InterchangeLoadStatus - denotes whether the car on the interchange is loaded or not
InterchangeDestination - denotes the future destination of the car
InterchangePointRN - random number that determines based on the Interchange Point Control Table which interchange, if any, the car will be placed
InterchangeLoadStatuRN - random number that determines if the car will arrived loaded or MT at the interchange
InterchangeWaybillRN - random number that determines the InterchangeDestination (see above).

When I execute the "Cycle The Layout" function the traffic generator reads this table and assigns three random numbers to each opeartional car that is currently not on the layout. It then rereads the table and selects the cars to be placed on the interchanges and updates this table with that information. It then reads the table a third time and updates the load status and destination fields. The Interchange Load Report will read this table to produce the paper work needed to help with locating the cars and loading the interchanges. As far as stagging the layout is concerned this is all the Traffic Generator does with the cars.

Business Waybill Control Table

The Business Waybil Control Table is a list of all valid business/car type/destination combinations. When I execute the "Generate EP Waybills" the Traffic Generator will read this table and assign a BusinessWaybillRN to each record. The Business Waybill Report will read this to produce the paper work needed to help with placing the waybills and MT requests in the Car Cards, Business Cards and White Hall yard. In the table above the highlighted row shows the entry for a gondola for Hopkins Spring Mining Company (HSM) going to the C&O. It has a random number of 66 and a probability range of 1 to 5 meaning 5% of the time Hopkins Spring Mining Company will ship a gondola to the C&O interchange. Since the random number is 66 this record was not selected during this cycle.

Let's take a look at the reports.