Lets say I had installed 160W in coal fed steam engines and 40MW of atomic energy, At the moment base was consuming 100MW, half of max performance. I assumed nuclear reactor give me 40MW and coal setup 60MW. But steam is steam, regardless of temperature, so no priorities:) Consumption was 20 and 80 MW, half of U-235 wasted.
First idea: a switch driven by energy level in accumulators. I knew they have limit on power input/output and need 3 acc per steam engine to absorb whole power. It worked. The problem was that... the switch was ringing! It was changing on and off with frequency 10Hz.
Yes, I checked:) Combinators only pass the signal, if B>0: out = B.
I suppose combinators compute results in one tick. 2 tick 'on', 4 tick 'off', 6 total -> 0.1s. Charging time is probably just one tick, second one is a delay on the comparator.
lamp analyzer blueprint
I read here it may hit performance and, what is more important, it was ugly! So what to do? We want to turn power on when energy level in accumulator (signal A) is x, and turn off when it is y, but y>x. Combinators can send output to its own input. But sending 1A works in wrog direction. So, instead comparing A to a number, lets compare it to a signal B (a signal from constant combinator), and if A<B (power level less than a constant) send 1B to switch and to comparator input. Then when switch is activated the tested formula is A<B+1. Energy level in accumulators have to increase the whole 1%. It works nicely: Timescale on the plot is "5s".
one percent switch blueprint
Just remember: Accumulator have to be powered only by main grid. B+1 have to be at most 100, so B<=99. Big field of accumulators in main grid is needed.To further increase period I added an arithmetic combinator and multiplied deciders output by, for example, 5. B constant have to be decreased.
fully regulated switch
Now timescale is 1 minute. Yes, I know (now:)) about hoarding steam and punting a fuel cell only when needed, and with huge bonuses for multiple reactors starting nuclear power slow (as a constant addition to conventional sources) make no sense:)