Home      Up

Switchlist Generator

In 2006 I asked on Trainboard about some software to generate simple car lists for switching operations such as might be carried out on a timesaver layout. A member sent me an Excel document which uses macros to do this, but as I only have Excel at work I decided to rewrite it in OpenOffice format to use at home.

So this is a Switchlist generator in .ods format which is an OpenOffice spreadsheet, similar to Excel. It was written under version Open Office V2 so may not work in V1.n. I have checked briefly (Jan 2009) and it appears to run in V3.0. It almost certainly won't run under MS Excel. If you don't have OpenOffice it is a free package that can be downloaded from OpenOffice.org. Make sure you get the version for your system, eg. Windows, Linux. It is about 140MB (for Windows at V3).

In the way these things do it kinda grew a bit as I thought of neat features I'd like to add, but I had to draw a line somewhere or I'd never get back to playing with the actual trains. So I don't plan to develop this any more but will fix bugs and maybe make minor changes and improvements. The version here will probably be my latest, which includes definition of many of my freight cars. This gives you a sample list to play with before deciding if you want to use it yourself, at which point you need to remove my data and insert yours which is a non-trivial task if you have more than about six cars.

Thanks to Jack (Shortliner) for the seed, and in the spirit of open source software I am making the program available to others to evaluate and use (and find bugs and let me know about them).

The way it works is as follows:
It supplies a 'train by train' list of freight cars to be switched. The list is for one train from 'the main line' to call at one 'area', typically having a number of customers, such as a factory, mineral merchant, stockyard.
It does this by taking a randomised selection of cars from a list of all those available and putting them in a train for setting out. Cars that are set out are then marked to be pulled by another train in the future anything from next turn to many turns later. The number of turns before pulling is user defined for each car. Once a car has been pulled it is held out of use for a few turns before becoming available to the randomised selection process again.
You can run the program many times to generate a number of consecutive trains where following turns will pull cars set out by a previous train. When you have enough trains you can print the list.

If you do try it out please let me know how you get on and any bugs you find.

Click this link to download the
Switchlist
On some systems clicking this link does not work properly - if so try right clicking it and then select
(eg.) "Save target as ..." in Internet Explorer or "Save link as ..." in Firefox.
Failing that contact me and I'll e-mail a copy to you.

Please note that you will probably need to change the macro security in OpenOffice to allow the list to work - the default is High. To change this in (at least) V2.4 or V3.0 go to:
Tools -> Options -> Security -> Macro Security ... and select the Medium or Low option.
You then need to close and reopen the Switchlist at which point a popup asks about security - click Enable Macros.

Copyright Mike Sheridan, 2006-2008