You could create more flexible/efficiant production lines by having a new type of beacon and a new type of power pole. The power pole would only be active when it could (or couldn't) read the existence of a beacon with a given name. You could manually isolate and turn off single machines or whole sections of production line by placing (or removing) the beacon.
The beacon would also be placable on storage containers with the options of turning on when empty, half full, or completely full, allowing your production lines to react to current stock levels.
The idea is to be able to create smarter behaviour with the smallest development overhead and avoid any need for a specific programming interface or a whole bunch of extra options needing to be added to all existing machines.
Some of the other programming suggestions I've seen get really complicated and whilst that could also be fun, it feels like it would be changing the nature of the game from a logistics challenge to a programming one. Hopefully this idea doesn't have that issue and if you don't want to use it then you can just ignore it and you wouldn’t even see it in your game.
The idea is outlined above but would allow for the following things:
- Manually enable/disable parts of production (from single machines to whole production lines).
- Only turn on production when you run out of parts.
- Turn production off when storage is half full so that you can clear as many resources as possible from the production chain. No more backed up belts!
- Slow down earlier parts of the production chain when resources start to back up half-way through.
- Automatically redirect resources to higher-tier components when the low-tier ones are full.
The main benefit of this as a solution is that it only requires the creation of a new beacon (attachable to storage) and new power pole. You might want the beacon to be a switchable lever so the player doesn't need to place and name the beacon every time (and I don’t know how it works in the game with regards to attaching to other structures and whether you would actually need to build a specific beaconed storage box). Optionally turning these new beacons on in the HUD would also let you debug/see the status of your factory. All of the complexity of turning things on and off and creating logic is all done using the existing power poles rather than needing new options for everything. (I’m afraid I am making some assumptions about how easy it would be to dynamically alter the power grid).
You could jerry-rig AND gates with power poles in series and OR gates with power poles in parallel. Timing loops could be created with storage boxes and conveyer belts linked to themselves. Totally not necessary but might be fun to play with.
Another potentially useful new machine (but not required) would be a physical gate that you would connect to your conveyers. It would be exactly the same as the power pole functionally, but instead of letting power through, it would be letting resources through or not depending on available beacons.
One thing to consider is that you probably would want the beacons to have a fairly slow reaction time to stop rapid flip-flopping when you reach edge conditions and it would also make it easier to lower the clock speed of your beacons when they are at a distance.
By the way, the only reason I'm suggesting you create a different beacon type is just because you could end up with a lot of them and you probably don't want them covering your HUD. I think it could work with the existing beacons as well.