Week ending 11th June 2017

5th June

Started to re-organise the project plan. Due to losing quite a few days, I have had to rethink how I am going to get the rest of the course completed in the manner that I originally envisaged. I have had to remove some of the intermediary testing steps. This isn’t too important as I work to a rigorous testing regime whereby no method is closed down unless I have tested it and all its affected parts. This means that I expect not to have any bugs bite me later on.  The original schedule looked like this:

Secondly, I have had to remove the data structure analysis. I don’t think that this will matter as the current one is well thought out and will work for any expanded version.This is mainly because the database for any user is quite small – even for a large railroad. Riak KV  can serve users with thousands of keys and data very quickly so this application is not likely to stress it.

The main aim, as I see it, is for a successful conclusion to the project out in September with a working tablet interface (prototype only maybe) that interfaces, using REST, to an efficient decision engine and key/value database to provide freight car routing against a timetable of trains. This will meet all of the requirements for reference to previous OU courses and for the original aims of the project.

The project plan now looks as follows:

From tomorrow, the plan will be to work on the DE for the next two weeks, reporting daily on the progress via this blog.

6th June 2017

I have had to do some thinking about how this project is going to work.I have had lots of comments from knowledgeable people about how it “ought” to work but most of these have missed the most important things about the project.

a)  It is a course that provides a written report, not a course to supply a working piece of commercial software.
b) The software is to manage a model railroad, not a real one. (It was suggested that, if the software generates a request for an empty and that there wasn’t enough room on the train for that car, this should be retained for addition to the next train – as though the requestor is a real business.)

It would be nice to incorporate every real world action but, firstly, that isn’t the aim of the software and, secondly, there isn’t the time or the scope to do such a thing. After all, the aim is to create an idea, define it in software terms and demonstrate its achievability and to write a final report about the process to gain a good pass on the module. Should there be a nice piece of software at the end that would run my model railroad – well, that would be a bonus!

OK, so I have sat down with some paper and a sharp pencil to try and define quite how far I want to go with the decision process.

(Click on either image for a full sized view).

As a result of this little bit of scratch planning, I have worked out a decision tree.

To save space on this blog entry, I have created a separate page for this.

7th June 2017

I collated all of the forum comments ready for some analysis. They are in a separate Word document and will be supplied as an appendix to the upcoming TMA. I will provide a summary of these later in the week.

In the meantime, I have been editing the CSV files that are used to seed the database.  The main reason for this is that the layout shown on the blog no longer exists. I had difficulty using it due to my arthritis (it was too high and standing is a problem for me). It has been dismantled and rebuilt at a lower level. The previous layout had  some very tight curves that were causing problems with derailments so, instead of a “roundy-roundy” form, it is now end-to-end with, what the Americans call, staging at both ends.

.

This has caused me to review the CSV files that describe the layout and make the changes required to reflect the new traffic patterns. I have updated the “industries’ file and there are now 21 possible locations. The “locos” file now includes the two extra locos that have appeared since Christmas. I have also purchased some passenger cars as, previously, these were left out of the process. This means that the “routes”and “trains” files have been updated to include a “Boston & Maine” (B&M) passenger return trip. As I only have one B&M loco, I have to ensure that it will be in the available at the right location when it is needed for both passenger and freight trains. This will add another twist to the problem. The first thing to do is to make a running chart of the trains as currently defined.

Now, I have to put into this a journey from Boston to Hartford and back using the B&M loco 1536 as this is the only B&M loco that I have. This action resulted in a few changes but the final version was verified with another running chart.

Without running the trains we won’t get a feel for whether  this is right. I think that there will be some changes but this version will do for now.

Not only have I had to change the trains but I have also had to review the industries spread around as I now only have two locations rather than the three in the previous layout. I have also decided that it is easier of each car type gets its own entry rather than having multiple car types for a single industry. Here is the final (for now) version.

id name type location carTypes waitTime Send To
1 Classification Yard Sunset allFreight 0
2 Freight House Industry Sunset allFreight 1
3 O.H. Wright Industry Sunset boxcar 2
4 O.H. Wright Industry Sunset flatcar 2
5 O.H. Wright Industry Sunset gondola 2
6 Sunset Gen. Manf. Industry Sunset boxcar 2
7 N.E. Ice Industry Sunset reefer 1 reefer
8 Loco Oil Industry Sunset tank 1
9 Creamery Industry Sunset reefer 2
10 Creamery Industry Sunset boxcar 2
11 E.C. Fuels and Oils Industry Webster tank 2
12 E.C. Fuels and Oils Industry Webster hopper 2
13 Greene’s Feeds Industry Webster boxcar 2
14 Freight House Industry Webster allFreight 2
15 Blums Lumber Industry Webster flatcar 2
16 Blums Lumber Industry Webster gondola 2
17 Burgess Manf/ Industry Webster boxcar 2
18 A.N. Other Industry Webster allFreight 2
19 Boston1 Staging Boston allFreight 0
20 Hartford1 Staging Hartford allFreight 0

Notes:

  1. There is a new column – Send To. This is required because the type of freight car in question needs servicing before it can be used. The only one here is the refrigerator car (reefer) as this (in the era we are working) needs to have ice blocks insert in special channels to ensure that the car is cold for its service. This, when requested by an industry, it must go to theIcing Company first.
  2. Those entries with zero as their wait times are storage yards that have large capacities  and are effectively unlimited in this context.

8th June 2017

Today, I am going to commence the planning for programming the new trains.  This is going to be done in two parts

  1. On Railroad/Train
  2. Off Railroad/Train

but I only expect to get  1. done today. I will define it “on paper” and do a theoretical run through. Once this and2. are complete, I will start the programming – expected on 10th June 2017.

Part 1.0 On Railroad is  provided on a separate page – HERE.

Part 2.0 Off Railroad is provided on a separate page – HERE.

11th June 2017

Spent s difficult day getting back to grips with the software, not having touched it for a few weeks and having my mind on Javascript. Over the last couple of days I have been busy reconsidering the data that is needed. This resulted in quite a few changes to the data definitions. hence, I haves pent a long day today (11am to 4pm) going through the routines that load data from the CSV files I use to create the data and convert them into Riak JSON data. It is pretty much sorted now so tomorrow I will be able to get going again with writing the software for the decision Engine.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s