TL;DR
Right now you can pretty much only hardcode stations into the list inside the trains. In order to make the train move dynamically, you have to globally enable and disable the stations it travels to, which in essence means this train has to own its own set of stations that no one else can use. Why not just have something like "if [circuit condition] travel to X"?What ?
In the train menu, when you select a station you would be able to fill in an optional condition. If the condition is unmet (be it based on data from the train or data sent from the circuit network) this would locally disable the station for this particular train.This is different from train limits because if a limit for a station is 0, the train waits for it to be unoccupied. With my suggestion, the train ignores the station altogether and can go somewhere else. When the condition is met the station appears, and the train can depart for that station (hingent upon whether all conditions for the previous stop has been fulfilled of course).
Why ?
Trains are a little too static in nature, in my opinion. Now you can simply pass a signal along the wire from an outpost that you need more supplies, and a train could react without interfering with others. This would prevent supply trains from going to places they don't need to. This can be achieved by enabling/disabling stations in vanilla, but as I said, you need to create brand new stations for it to not mess up for all the other trains. This simple system would also create options like having multiple instances of the same stations be in the menu. So the same train station, depending on what "version" of it you end up on can have vastly different subconditions. Like, "empty cargo", but also "fill sulfuric acid" etc. You also create the ability to jump around quite freely in the list by creating dependencies or whatever I shall call them, so if you arrive at a station, then that event alone could control what the next station for the train would be and so forth, if there's a particular order you need to travel depending on what role you are fulfilling.Simple trick, many opportunities. It's also optional so it wouldn't mess with existing setups.