The Software - Technical

The software is the critical bit, and a part that I won't be making public, at least for now.

It's written in .NET and runs as a couple of EXE processes on a Windows computer.  It also has a web component and all the user front end is delivered through a web browser with HTML5/AJAX.

Each train is calibrated carefully to tell the software it's characteristics on speed, acceleration, and most critically stopping distances.  This requires quite a few runs and measurements before a new train can be used on the layout.

It makes extensive use of configuration files for layout out the track, the sensors, the points and the locomotives.  This means it's possible for it to be used on somebody else's track in the future.

It keeps very detailed log files of everything it does, making it possible to work out why a certain behaviour happened.

The design works like a simulator - you can even use the software without a real layout at all.  When a train sets off, it simulates the movements and plots the moving train on the track.  However, when the train on the screen reaches a sensor, it pauses there until the sensors fires.  Once the sensor fires it knows the real train is where it should be, and it continues moving.

The next layer of functionality is the 'missions'.  Missions are setup - for example "From Top Station to Bottom Station".  These missions can then be applied to trains, and when a mission ends it can run another mission - either the same one in reverse or a different one entirely.  Having these missions configured then makes it possible to press "Start All" and for everything to begin at once.

Comments