Introduction

Blog & News

About the Model Railroad

RTAC Software

Videos

The Randall Museum in San Francisco hosts a large HO-scale model model railroad. Created by the Golden Gate Model Railroad Club starting in 1961, the layout was donated to the Museum in 2015. Since then I have started automatizing trains running on the layout. I am also the model railroad maintainer. This blog describes various updates on the Randall project and I maintain a separate blog for all my electronics not directly related to Randall.

2023-05-21 - Conductor v2 is now running on the Automation Computer

Category Randall

That’s a major milestone for my automation project. I spent the last two years on-and-off rewriting my Conductor automation software based on the experience of the first version.

The first version of the Conductor automation software has worked really well, but I have reached a limit in the 2000-lines automation script, which state machine was getting increasingly complex and tricker to modify. Thus a huge goal of Conductor 2 was to have an easier to understand automation script. In these two years, I wrote and discarded two early attempt prototypes which were not satisfactory, and the current version matches my expectations.

Ironically, from an external perspective, nothing has changed. The automation works exactly like it did before -- which was one of the key goals to achieve. Under the hood, there’s a whole new scripting engine based around the Kotlin scripting language and a whole new route/block based way to describe the automation which makes the automation script easier to write and understand. It gives me more flexibility to add new features.


The new UI with a live block map, sensors’ state, trains’ status, and a new Kiosk Mode feature.

One of the goals of the new scripting architecture is that I can now have some kind of automated recovery. In certain conditions, even if the trains are not at the right place when the automation starts, the script can take an educated guess and bring them back where they should be. The old behavior of Conductor v1 was simply to panic and stop everything, and let human intervention take care of it.

The new recovery mechanism only handles simple cases for now. For example, it purposely does not handle the case of a train stopped on two blocks -- simply because I needed to prioritize features so I had to start somewhere. I will add that support next.

As pointed out in the technical blog post here, I still have some more work to do.


The new Kiosk Mode display hides all the technical clutter.

On the script side, I’ve also expanded the SVG map to cover the entire layout mainline as I want to eventually control more of it via block detection and automation.


 Generated on 2024-10-24 by Rig4j 0.1-Exp-db84903