Wednesday, 8 March 2017

The Open University course has started

I am now underway on the actual Open University TM470 course - The Computing and IT Project. The idea of this course is to prove that I can define and deliver a complex IT/Computing based project to a timescale set by the OU. I don't have to produce the software to prove that I have done the work. The main deliverable is a 10,000 word essay that describes theproject in detail.

A lot of the students have been searching around for a project theme and many ideas have been rejected as either not Computing/IT or not deep enough to warrant the work. However, my project was accepted immediately and without change.  The project is called (snappy title this)

Freight Car Routing On US. Outline Model Railroads

I have outlined the project before so there is no need to do that again. However, I now have to organise myself and get myself together for doing this properly such that I can finish my B.Sc (Hons) with a flourish. I have managed to get myself a few little assistants. One is a web app called Wrike! This is an only project planner. They do a free student version but were only clued up for .edu e-mail addresses. In the UK our student bodies issue .ac.uk accounts so a couple of e-mails bounced around until I got access to their professional version. That works very well. I also signed up for a thing called Toggi which lets you monitor the time that you spend on anything. However, I stopped using this when I let it run overnight on one task. I also started using Evernote for my notes but that didn't last either.

I decided that I could treat myself to a special item to do both of these tasks. I am a great user of Moleskine notebooks. I always have a few of the little A6 ones to hand and have three of the A5 ones for various purposes. I have always wanted to have a reason to acquire an A4 notebook and this was my chance. I now have a time record in the back of the book and a blow by blow account of my work, thinking and planning in the front.



I have to say that I am enjoying this greatly. This is the first time that I have had to detail my ideas, etc. on paper before going ahead and it is working very well. Not to say that my previous efforts were not so easy - I have always managed to write good software with few bugs. Mostly because I write tests at each stage and carry these tests out often to make sure that everything is going the way I want it. 

The project is spilt into three iterations. These are designed to fit in with the last two Tutor Marked Assignments TMAs) and the final End ofModule Assessment (EMA). I have the main part of the first iteration working, in that I can now deliver a full day's timetable with indicative trains created. For the time being there is no proper allocation of freight cars. This happens in the next round. What I am building at the moment ids the basic infrastructure of the system - there is a diagram at the end of this blog entry that shows the first iteration targets.

There are two ways to follow what is happening with the project - follow this blog or go to my project web site where I put all of the "techie" stuff.

The following diagram shows the "logical" setup of the system. Currently, I have the Data Controller working along with the Riak KV NoSQL database. I now have the main decision engine within the Web Controller working. before the next TMA is due on 11th April I have to have the Web Server in place and talking to the Web Controller. I then have to complete a 4,000 word report on my activities!





Wednesday, 8 February 2017

Assistance with my current Open University Project

I mentioned a few weeks ago that I was starting the OU course - TM470 the Computing and IT Project. I am now into the first few days and have been asked by my tutor to go looking for "clients" to assist me. When they speak of clients, they mean people who will assist and comment on my proposals as time goes along. I have just joined the NMRA (National Model Railroad Association) at an expensive cost! I have placed the following request on their Operations forum and on a US Forum. Perhaps there are people reading this blog that could give a hand. The message explains it.

------------------
Hi there.
I live in the UK and am currently completing the last couple of modules for my OU Honours degree in Computing. The main one of these is the TM470 Computing and IT Project. For this, I have to develop a project that incorporates much of what I have learned at the OU. 

Background: I am 72 years of age and started my OU course in 1974 but dropped out in 1982 as a hectic job in the City, four kids and a dog all got in the way. Since 1985 I have worked as a programmer both for myself and others so I have many years coding and project management under my belt. 

In 1956 I was given a Triang Transcontinental train set for Christmas and since then I have been a dedicated model railroader.

My project for the OU is entitled "Freight Car Routing for US Outline Model Railroads".

The intention is to develop a specification, detailed analysis and working prototype for a system that would be:
* Internet based
* multi-user
* operated by a tablet/phone
* data stored "in the cloud"

The software will deliver (after configuration for your specific railroad) the next train to run and its composition, taking into account a large number of parameters to decide on individual car routing (and on-line collection at stations en route). 

I have a long experience of running my own model railroad and a good knowledge of how freight cars are routed and the decisions required but my course requires that I have some outside "clients" that can comment and advise. I have to say that this is set up for younger people to obtain more experienced mentors but I am what I am - smile.

If you feel that you could be interested in the project please let me know and I will give you a more detailed description.

It is unlikely to get from the prototype stage and will not become a commercial product as I am too old to get into that game so there is not bait and switch in this at all.

I need two or three kind people to give me just a few hours reading over the next few months - the project has to be completed by late September.

I hope to hear from you.

David
Main man on the Sunset and North Eastern R.R.
------------------

Please contact me at dp7954@my.open.ac.uk if you think you would like to join in.

Monday, 23 January 2017

Blair Line Sam's Roadhouse

I needed a "seedy" building just outside the gates of the freight yard and Blair Line's Sam's Roadhouse seemed to fit the bill. Their description is:

Found at roadside in rural areas or along the outskirts of town this type of roadhouse is based on juke joints that would have offered drink, food, dancing and maybe even a few groceries or "recreational" gambling in the back room. Sam's is located far enough off the beaten path that an outhouse is provided. Build it without the signs and use it for a house."

I have made a Blair Line kit before so I knew what to expect. This time, I knew that parts were supplied with double sided tape already fitted - this affects the window, door and corner trim - and makes it easy to fit. In fact, I have learned from this and use my own double-sided tape quite often to fit small wooden parts. I have also learned from making the GC Laser Ice House to use marker pens for the general colouring. This time, I used  a Letraset Promarker Caramel pen for the wood and a Staples DuraMark dark green pen for the trim. The inside was coloured black to mask the fact that there was no interior detail. For this I used a Letrset Promarker black pen. Here are the main walls already coloured with the windows fitted.


The whole kit goes together very quickly and easily. The next step to show is when I had the walls up and the trim fitted.



I was a bit eager in colouring the trim as I should have coloured the Z bracing on the door with the caramel rather than the green but once it was done, I couldn't change it. The next shot shows the roof in place along with the foundation supports.I have also started to place some of the posters.


There is a whole sheet of posters in the kit and it is difficult to choose which ones to use. I fitted some that were in the wrong place, so at the the end I had to tear some off and refit them. From this point, things went really quickly so that, suddenly, it was all finished. I did manage to lose one of the light hangers so there is only one fitted. I have left the screen door and the privy door open.



I have lightly set it in place with the privy out the back and the road sign, sort of, in place.

                            

I think that this looks just the ticket and I am very pleased with the result. I like these laser kits.






Tuesday, 17 January 2017

GC Laser Ice House

My next project after working on the yard area was to get the layout moving again. I hadn't cleaned the rails since I laid the ballast so I knew that there was going to be some issues. I had a cash Christmas present so I spent it on the Woodlands Scenics track cleaning andloco wheel cleaning equipment.



These both worked perfectly and I had everything running except the Budd RDC. This is an indulgence of mine as I really like to see a Budd running around the track. However, it is, strictly speaking, way to long for the curves that I have. This came home to me when it came around the left hand curve. First off, it hit two trees. Then it stopped as it had run its pilot against the scenic bank. Lastly, it stopped because the Kadee uncoupler was fouling the track! I cleared all of these obstacles and then had to tweak the track a little and it was now running OK.


OK, so now I had the railroad running again. I then coupled up JMRI and started moving some points. Acouple were still gummed up from the ballasting but these were easily freed up. Next, it was back to some building for the next scene.

I had on hand a couple of GC Laser kits. One is the extension Icing Platform and the other was the Icing Office for the Ice Shed. What I didn't realise was that the platform was an extension to the main one and that I had missed getting the actual Ice Shed! Humm. So me quick thinking was in order. Anyway, off I went. The Office went together first. They recommend using marker pens to colour the model so I dragged out a red and Sepia marker. This went really well. They also recommend buying some needle tip bottles for apply the wood glue. I have some Titebond here which I bought years ago because that was what Norm Abrams used in'The New Yankee Workshop'. Norm is my hero. I even made oak furniture for a living (well not much of one) some years ago thanks to his programmes. Anyway , I had a look on EBay and bought one for £3.50. When it arrived, it turned out to be 10 of them for the price. 


This works brilliantly.You can put down a single spot or a really thin line. Off I went. The construction was very simple and the instructions were a little on the complex side but it all made sense in the end. here are some intermediary images.



Here is the Office complete (sorry about the fence bending buy it is only card so it is a bit flexible).


Next came the icing platform and here is where I realised that I had made a mistake. This is designed as an extension so has a part of the platform extended to reach out to the platform proper. This makes the trestles work in place. Without the other platform it looked stupid so I had to do a bit of cutting and shutting to get everything to look right. It was all I could do anyway, as I didn't have room for the main, long, platform.  Well, here it is completed - the construction went so quickly that I forgot to take any in-progress shots.



Finally, I have placed them in their intended location. Firstly the air shot which shows the placement.


Then, the moody, low shot to give a feel for the siting.



I think that it looks the part and will look even better when the real Ice Shed arrives. It gives me the opportunity to close off the area between it and the freight house.This will enable me to make a couple of scenarios rather than just one large on.

BTW, I know that the freight house is missing some roof supports. That is one of my next jobs. They are in a pile around the back!

Monday, 9 January 2017

My wife can't believe this

No only do we have cows, we have buildings, people, junk, etc. I have never got this far before!

OK, so first off, I have put the Fuel Depot in place - this is part of the Walthers kit. I have added a few signs plus some oil drums. I am going to add two petrol pumps. This will also be where the S&NE diesels refuel but that is to come. The fence behind, as mentioned before, is scratch built from coffee shop stirrers. My NWSL Chopper does a great job of cutting these things to size. The next bit to go in is the gates to the railroad yard. These will be open and you can see the road going away.


Next off, I have put the "General Manufacturing" industry in place. This is a Carolina Craftsman Kit - Grizz's Hidden Gems which I have adapted by building a new base. The base is two layers of 5mm foam board covered with stone effect styrene card and decking made from the above mentioned stirrers. Again, I have made up the signage. This was a slightly tricky kit as it was laser cut but came with lots of stripwood for the bracing etc. It ended up looking OK.


I am now getting on with the lumber yard. I am making this from scratch (apart from the crane, which comes from a Wills kit).  The pile of logs in the background is a flat car load that is there temporarily.



The yard, in theory, receives uncut tree trunks and converts them into coarse cut lumber. To achieve this it needs the crane for loading/unloading and a saw to cut the timber.  I found an image that I liked on the internet. (c) https://www.dreamstime.com


This seems to me to have all the attributes I need. A small installation, constructed of wood and an easily modelled saw. I decided that it could be built using my stirrers. It is going together very nicely at the moment. First off, I cut the back planks. I then used the jig that I made for the railroad yard fence to put together short sections - held together using masking tape. (You can see some of the sections in the back of the image below)


The cross braces had some double sided tape applied and then the short upright sections were attached. Following that, the roof and its bracing were attached. The roof is just some basswood that I had lying around.

Next, I had to make the concrete base. This was made from DAS air dry clay. Whilst it was setting, I inserted some cocktail sticks into the clay to make the holes ready for the main uprights.



Having got all that in place, I layered the roof with strips of printer paper to represent tar paper weatherproofing.  This is what it finally looked like:



A spray of Vallejo Model Air wood finished off the top part and a coat of Vallejo mid-grey covered the concrete base. I made a small table saw to look roughly like the one in the photo. This was made from bits of plastic card and strip wood - mostly held together by doble sided tape.

Once everything was in place, this is what it looks like. I am quite pleased. It was well worth the effort and I am thrilled to be bac scratch-building again after many years.


You can see that the back fence is now in place along with the gates. Not being sure quite how to handle the signage on the gates (and having search the internet for examples) I went for: "Sunset Rail Yard - No entry unless on business - By Order". That might be a bit too British but without more information, I looks OK to me. Also, there is only on US citizen that is ever going to see this in the flesh and he won't mind!

At the same time as getting all of this done, I have completed the Blair Line "Greene's Feed and Seed". This was a great kit and a pleasure to make. I liked it so much that I have ordered three more kits directly from them. They are charging me just $9.99 for shipping from the US so they are great people in my book. I liked the way the kit went together and I also liked it that you got "stuff" to place around. I haven't started scenicking this end of the layout yet so it looks a bit bare.


 Don't you just love all those posters! I have to admit that the back side of the building is bare of all these as I have loaded the side we can see.






Monday, 19 December 2016

Herd of Cows?

Of course I have heard of cows -the old ones are always the best!

Two packs of HO cows arrived the other day along with some fencing from York Modelmaking.

These two together have pretty much finished off the top corner of the layout.


I have ballasted the yard tracks with cinders and the coloured the surrounding area with a lighter black to provide a psuedo-tarmac effect. The next job is to build up the area to the top of the yard as seen above. I am putting a fuel company there along with a refuelling point for the company diesels.



I am also scratch-building a perimeter fence for the yard.
I am making this using wooded stirrers from the local coffee shop (Costa not Starbucks!). You can see the Chopper that I am using to cut the wood. I have made about half of the number required.



I have just noticed that I still haven't fixed the join in the scenery around the corner. My friend Mark has painted a couple of extra back scenes so that I can get the join corrected. I also need to clean up the track and get some trains running again.

Sunday, 27 November 2016

University Project Part 2

The core of the project is the random engine.


The complexity is actually from the routing issues:

  • Each freight car has a destination.
  • The destination has a maximum car limit as well.
  • The destination maybe had a/some car/s there already.
  • Each car has a destination has a loading/unloading time*
  • Some of these may be ready to be collected.
  • If we collect them on this train, could this generate a demand for a replacement car
  • and round we go again!

Determine the next train

  • Select all of the possible cars in the yard that are available to be shipped (excluding empties).
  • Select all of the cars on the route that are ready to be collected (either because they are empty or are now loaded - and have been at their current location for sufficient time (see * above)
  • Use a randomiser to provide a list of cars up to the defined maximum car number for the train (it is possible that the number of cars is less than the maximum, but that is OK). 
  • Assess the cars to be collected on route (remembering that empty cars can be skipped if required)
  • Assess the effect of these collections against the train length at each pickup/drop off location.
  • If the number exceeds the maximum train length, re-assess the list until everything is OK.
  • Once the train is  defined, calculate the weight of the train and allocate sufficient head end power.
  • If sufficient power is not available, reduce the length of the train accordingly - use the randomiser once more to decide on the final make up.

Complex Routing


The other interesting thing is that some cars have a complex routing requirement. let us take an example from the Pacific Fruit Express (PFE) back then when they used refrigerator cars that were chilled with block ice.  Let us say that the PFE storage yard is somewhere north of Los Angeles, CA. It might go as follows:
  1. The car is sitting on a storage track
  2. It needs icing at the Ice House
  3. It is then shipped to the appropriate fruit packing company (maybe there are 3 with sidings on our division so it could be any one of three.
  4. It is loaded (1 day)
  5. It is collected and shipped to its destination
  6. It is returned to the storage track for cleaning and awaiting the next time.
This is further complicated because these three fictitious fruit packers send their fruit to different destinations
  1. Ships to Oregon so their cars go north and transfer to other railroads
  2. Ships to Chicago so their cars go east and transfer to other railroads
  3. Ships to San Francisco so theirs stay on the home road
and so on...

Train Length

Initially, train length is determind by the number of cars that shuld be routed - taking into consideration that each and every industry has a frequency of cars attached. This means that it is possible for a train that is allocated a length of 10 cars may only be allocated 2 or 15. below the defined train limit, there is no issue but if the number is above then the randomiser will allocate cars to be dropped. 

However, the ultimate limit is set by the train length. This, in itself, is set by a few factors - the power of the loco, the weight of each car and also, because it may meet other trains en-route (most US railroads are single track), the length of a siding that it can get into to get out of the way. The power of the loco isn't that important as you can always connect a second (or even third or fourth) loco. It is the siding length that is the ultimate limiter consequently, the maximum train length is one of the attributes of the train itself. This may differ by train type. If the train is a local/way freight then the limit is the shortest siding at locations along the route. If it is a through freight then the limit would be any siding on the main line. Passing sidings are not necessarily at a town or industry along the route but just may be on the main line for efficiency's sake.

Note:

In American terminology what we in the UK call a siding as named a "spur". A siding, in US terminology, is a length of track parallel (usually)to the main track and connected at each end by a point (US - switch). This provides a "hole" for one train to go into thus getting out of the way of a, second, oncoming train. This is not something that we see often in the UK as very little of our routes (apart from a few branch lines) are single track.
This will be a fun bit of code to plan and implement.