The above matrix shows all of the possible trains that run in a single day. This took a lot of manipulating to ensure that locos, cabooses and RDCs were always in the right place to enable the next required train to run. The timings were calculated as follows:
|Type||Avge Speed||Max Speed||Stop Time|
This lets me calculate the times between stations on the route and thus get the appropriate times for action through Sunset. I have to admit that I haven't gone the next step and ensured that there aren't any problems with passing of trains between stations. As the rest of the railroad doesn't exist, it would have been a lot of work for nothing. Mind you, the plan for the layout includes me building a second station later when I complete the full circuit of the room. I will probably have to rework the timetable at that point.
Anyway, I got all the information sorted and put it into the CSV that defines the trains. This CSV looks like this:
|SNE Way Freight #1||SNE1||5||y||y||n||10.00:20.22||4|
|SNE Way Freight #2||SNE1||5||y||y||n||14.00:00.22||12|
|SNE Way Freight #1||SNE2||5||y||y||n||02.00:12.22||9|
|SNE Way Freight #2||SNE2||5||y||y||n||05.00:15.22||16|
|SNE Way Freight #1||SNE3||5||y||y||n||06.00:15.52||1|
|SNE Way Freight #2||SNE3||5||y||y||n||13.00:22.52||11|
|SNE Way Freight #1||SNE4||5||y||y||n||02.00:11.52||8|
|SNE Way Freight #4||SNE4||5||y||y||n||06.00:15.52||15|
|BM Thru Fr. #102||BM1||7||n||y||n||03.00:07.13:11.46||2|
|BM Thru Fr. #101||BM2||7||n||y||n||10.10:14.42:18.56||14|
|BM Thru Fr. #104||BM1||7||n||y||n||07.15:11.28:16.01||7|
|BM Thru Fr. #103||BM2||7||n||y||n||06.04:10.36:14.50||6|
|NH Commuter #67||NH1||1||y||n||y||06.00:08.35:10.59||3|
|NH Commuter #68||NH2||1||y||n||y||08.00:10.26:12.59||5|
|NH Commuter #69||NH1||1||y||n||y||10.00:12.35:14.59||10|
|NH Commuter #70||NH2||1||y||n||y||12:00:14.26:16.59||13|
|NH Commuter #71||NH1||1||y||n||y||14.00:16.35:18.59||17|
|NH Commuter #72||NH2||1||y||n||y||16.00:18.26:20.59||18|
From this data, the software can work out each train in the correct order. I ran the whole thing through, yesterday, and it worked fine. It might look a bit strange when you see the start times - these don't correspond with the running order - but you must remember that the aim is to get a train through Sunset so start times from Hartford or Boston are irrelevant and only the Sunset time matters.
So far, there is only one small problem. It seems that the software delivered a Reefer to the Lumber Yard! I am going to run the software for a few logical days before I try looking for the problem. I have looked at the code but I couldn't see why it should have happened so maybe it was a carry over from all of the test runs. Let's wait and see.
What was good was that when I did a full 18 train run, the system reverted back to train number 1 and all of the locos and cabooses were in the correct places to start the next day. We shall see whether it actually keeps to track capacities.
For those of a technical bent, the software is written in Instantiations VisualAge Smalltalk 8.6.1 with all of the web design being built using the Seaside add-on. I have been writing software in Smalltalk for 24 years now and cannot recommend it too highly. If you want to build bug free software quickly and efficiently, Smalltalk is the way to go. For more on Instantiations VA Smalltalk, check out their Web Page and for more information on Smalltalk, check out Wikipedia. More information about Seaside is available here