Automatic Train Control – what should it look like?

Hi everyone,

One of the big future features for Traintastic will be automatic train control. Right now, trains are fully manual, but eventually we want the software to handle things like routing, stopping, and scheduling.

There are a lot of possible directions this could go, and I’d love to hear what you would like to see:

  • Should trains follow a timetable (arrivals and departures at stations)?
  • Would you prefer block-based control (train detection sections, stop when occupied)?
  • Or something simpler, like automatic route following with just start and destination?
  • How important are features like priority routing, random delays, or train categories?

What does “automatic control” mean for your layout?

  • Do you imagine it running in the background while you drive some trains manually?
  • Or would you like the computer to run a full operating session on its own?

Please share your ideas, even just a wish list. This will help shape the design and ensure we build something that works for different operating styles.

That how i would recomand to design it:

each contact where the train stopps should have the train name or image over it when occupied. When leaving the contact then it should disapear from it and change the looks of the track where it is driving on to the next contact as example arrows pointing in the direction. when ariving on the next contact the track design should be reset to default and the train should apear again on the right contact.

Each contact or train should have the options like: stop or ignore, stop delay, waittime and posibly execution of some train functions.

From some expiriance on some Boards it would be recomended to use multiple contacts for releability like: first one to start breaking. second one is the standart one for checking it something is there. third one for emergency breaking.

A timetable would be cool it could be automaticly translated to the delays on each contact or train. But also allowing specific trains to only target specific location in automatic mode would be nice.

I thing the perfect method would be the mix of everyting together. When nothing is configured for a specific train then they sould just run automaticly on the block-based control but it should be then be possible to setup some routes or time tables on some trains as exampel:

  • Loco 1 go to Station1 and wait 20sec
  • Loco 1 go to Station3 and wait 10sec
  • Loco 1 go to Station11 and wait 30sec

or

  • Loco 3 be from 13:30 to 13:35 on station 1
  • Loco 3 be from 13:55 to 14:10 on station 5
  • Loco 3 be from 15:00 to 15:15 on station 5

I’m really impressed with what I’ve seen so far with this application. :clap: Here are just some starting ideas for automation. I have lots of ideas as I have used many different automation software.

Automation Development

I believe once the backbone of the application has been well tested for manual operation of train running, then automation should be the next top priority. It’s nice to have trains automatically running on the layout while an operator does some manual switching and when the operator happens to need a block in a route, knows the system will automatically stop the route until that block becomes clear.

This development should be done in stages – from basic to complex. Here is what could potentially be the first stages.

I agree with the comments/suggestions added by kamil00110.

Routes

First, need the ability to create and save routes. Initially, this would just entail selecting starting and ending blocks and the appropriate blocks between these two. These routes would act on any train type that is currently in the ‘Start’ block. Eventually, these could be scheduled, started by buttons on the Board and designated for only specific types of trains (ie, passenger, freight, etc)

Basic Automation

Start a Route by any number of options:

  • Manually – select the route and click Start
  • Via button on Board
  • Programmatically - Via another Route, sensor condition, block condition, script program
  • Scheduled – starts at a designated time.

What occurs when route is started:

If a train is in the starting block, then system attempts to reserve the blocks in the route and if say, the first two are available, start the train and proceed until it reaches the last available block. Here it stops and waits while it continually attempts to reserve the next couple of blocks (ie. Other trains have cleared those blocks). This dance continues until it reaches the final block where it stops based on the block sensors, or distance into the block. If the blocks selected have different paths to the same ending block, the system will decide which is the best path depending on different rules (blocks already in use, blocks designated for specific directions, blocks designated for different train types, priorities)

Some potential Next Steps for Route Development

Once, this basic automation is working, then start to add in the other complexities such as:

Add route specifics to a Route dialog box

  • Add conditions to for which train will run the route.
  • Add ability to do something when the route ends (ie. Start another route)
  • Run only for specific trains or group of trains. (would require the ability to create type of trains as a group and add the trains to the them) This would ensure that if a freight train was in starting block of a route it wouldn’t run if it was designed only for passenger trains.

Create different route types

  • Basic Route - (Default) Run once
  • Out and Back - start same route in reverse direction and complete x many time
  • Loop Route - Allow a route to be run x many times (start and end blocks are the same)

Each block in that route has specific block properties

  • When entering/exiting that block route then do something (ie. blow horn, play a sound, start a script, start another route)

Add ability have multiple Start and End blocks. This would allow automation of a point to point operation from one yard to another yard and the system would randomly select which train to start (if they all have the correct type of train in them) and randomly pick from any empty tracks at the end to finish in.

@Randy welcome to the forum! :slight_smile:

@kamil00110 and @Randy big thanks for the input this is really helpful! There is still a lot to do, so it may take a while. Routes and automatic driving are on the roadmap for the 0.5 version, for 0.4 I want to finish some hardware stuff.

Then most of the foundation is there to support routes and automation.

Under the hood Traintastic already has paths, this is a connection from one block to another, it is direction aware due to one-way restriction. It is possible that there are multiple paths in the same direction between blocks due to turnouts. (There is not path weighting yet.)

For the multiple blocks option I like to utilize the zone logic. Currently the zone has a few properties, but I thinking about giving it a type, so it be a station or staging yard etc. That would be nice to use within routes.

For train/route/block types, I’m planning to use a more generic approach, instead of a fixed default set I want to introduce labels/tags, then users can create the ones they need, e.g. label trains by category, company, country or epoche and even mix them.

Feedback is welcome :slight_smile:

p.s. @Randy which apps have you used?

@reinder I have used JMRI, iTrain and TrainController recently. There were some others I investigated about 5 years ago, but don’t remember what they were called.

Currently, I use TrainController v9 Silver for my automation and have been very happy with it, except for the fact that it is VERY expensive. They released a version 10 about a year ago, but now it required the user to be constantly connected to the internet to verify the license and the upgrade was going to be costly again. In December 2025, they released a version 11 and again was going to be even more expensive to go from 9 to 11. I had purposely held off upgrading due to this cost. Thank goodness I did as they just recently closing down the sales and ‘hopefully’ those with the internet key ‘should’ still be able to run their layouts. :grimacing: I’m sure a lot of customers are quite upset as this was sold as a commercial product and quite a number of museums use it to run their layouts. It’s too bad, because the newer versions had some really cool additions to the product.

I also run JMRI (mostly for DecoderPro for setting up my locos) but have many times attempted to setup automation. Unfortunately, the Dispatcher really lacks the umph to be a truly viable option. A complex process of any automation, needs to have a really robust UI. I shouldn’t have to write scripts for every thing I need it to monitor for automation to work.

iTrain is my next favorite software after TrainController, and now that there won’t be anymore updates to TrainController I will need to further develop in iTrains as I need automation sooner rather than later. I built my whole layout based on that concept (Manual operation with Automation running behind the scenes). It does support Digitrax/Loconet but not documented to the same degree as other hardware. I really believe that train automation is not as big in North America as it is in European so the emphasis is for hardware there.

So when I found Traintastic during a web search for model train automation software, I was delighted to find a group that was in the process of building an Open Source Project. I was quite intrigued. Unfortunately, it’s been over 15 years since I’ve done any computer programming so I wouldn’t be able to contribute that way, but I could certainly act as beta tester. Glad to help.