Tuesday, September 13, 2022

Freight wagon categories (for my Psion pocket computer)

 Last year, I programmed my Psion pocket computer with a cut-down version of my freight management program so I could transport it out into the garden with me during operating sessions. I had tried to do this previously by writing a Google Sheets version which I could use on my mobile phone but the difficult with this was that the screen is difficult to see when the sun shines and also, the Android version of Sheets annoyingly does not support the use of on-screen buttons instead requiring the user to click on cells on the spreadsheet, making it tricky to use on a mobile phone screen in daylight.

I then uncovered my old Psion 3a Pocket Computer and, despite being nearly 30 years old, was in perfect working order, Furthermore, with the help of its manual, I discovered I was able to program it. (See How I created the Psion version of my freight management program)

I therefore produced a version of my freight management program to run on it. The advantage being that the screen was perfectly visible in daylight and its operation made use of its Sinclair Spectrum style rubberised keyboard. The disadvantage was that is was restricted to 1Mb of memory and so I had to rewrite the program to ensure it used minimal memory. To achieve this, rather than providing individualised weightings for each wagon dictating the possible destinations for each wagon, I devised a series of eight categories (or Types) for wagons - with destination weightings for each category.

The categories I used were:

  • C - Coal
  • T - Timber
  • M - Miscellaneous
  • F - Fruit
  • P - Pit-Props
  • B - Beer/Brewery
  • S- Sacks
  • G - Gunpowder
I found these categories were sufficient to guide the production of probable destinations for all 80+ wagons on the PLR. Although I have outlined these weightings in my previous post, I felt it was necessary to provide more detail.

The weightings for each category are as follows.

Category B Market B Castle P'forton Mill Bulkeley Cop Mine Bick'ton
Coal 9 6 5 2 5 4 5
Timber 7260404
Misc.8663617
Fruit9040805
Pit-props6060060
Beer8640404
Sacks8507505
Gunpowder8000080

Assuming that 0 = never and 9 =certain, we can see that Coal wagons could travel to any location on the railway, though they will definitely return to Beeston Market if out at any other station, they are more likely to travel to Beeston Castle than anywhere else and are least likely to travel to the Mill Siding.

Timber wagons are most likely to travel to Beeston Market and then Peckforton, but will never travel to the Mill.

Miscellaneous wagons could travel anywhere but are highly unlikely to travel to the Copper Mine.

Fruit wagons (mostly vans) are most heavily weighted to travel to Beeston Market and Bulkeley (where the loading dock for the fruit farms is located), though could also travel to Peckforton and Bickerton.

Pit Prop wagons have an equal chance of travelling to Beeston Market, the Copper Mine and Peckforton but will never travel to other locations.

Beer wagons are most likely to travel to Beeston Market and Beeston Castle (where the brewery is located) but have a fair chance of travelling to other stations - but no chance of travelling to the Copper Mine or Mill Siding.

Sack wagons are most likely to travel to Beeston Market and the Mill, but could also travel to Beeston Castle and to Bulkeley and Bickerton.

And Gunpowder wagons will only travel to and from Beeston Market and the Copper Mine.

Livestock wagons have been assigned to the Miscellaneous category which means it is possible (though less likely) that they will travel to the Mill and the Copper Mine. I can justify these unusual movements by assuming that the Mill owner might also own some land for grazing sheep and the Copper Mine makes use of pit ponies.

To make life interesting, some wagons have been assigned to categories other than those which might be expected. For example, one coal wagon has been assigned to Miscellaneous and another to Fruit.

I've been using this version of the Freight Management program for two seasons, now. Over that time, I've tweaked the weightings slightly and also rewritten part of the program to save even more memory as sometimes an 'Out of Memory' error message was displayed half way through a session. Since then the program seems to be a lot more stable.

I find being able to update the database on the fly results in a lot more flexibility. Occasionally, I might forget to deliver a wagon at a station or decide to include an additional wagon in a train. Both these eventualities can be easily managed.

The downside of using the Psion is that I no longer have the capability to print out a list of wagons and their locations which makes checking all the stock is in the right place at the start of a session a bit time consuming. However, I feel the added flexibility in using the Psion compensates for this.



No comments: