Power+: Power Meter

by daydev

Adds a power meter combinator that directly outputs the percentage of power utilization in the electrical network over the four generation priorities.

Content
3 years ago
0.17 - 1.1
2.80K
Circuit network

i [Implemented] outputs for more reliable building of fail-safe power switches...

4 years ago

My use-case for this device, other than alerting when I'm close to capacity, is to enable fail-safe handling of a power crunch.

That is, handling as best as possible a situation when demand exceeds supply for whatever reason, including overbuilding, spike demand for defenses, something eating that one critical power pole that was a single point of failure connecting half my generation capacity, etc...

Building a fail-safe power switch means building one that will disconnect the consumer when power is too low to, eg, run combinators reliably -- total blackout, or just insufficient supply to keep them working full time.

Doing that requires a "positive test" for enabling flow through the switch, and since the default state for any signal is the value 0, that wants some sort of "capacity available" rather than "capacity consumed" input. That is, cutting off when power available is at 5% or less needs to be power >= 5 rather than power <= 95 -- because the "power is out" value there is zero...

I can make this happen with combinators, and they even kinda sorta limp along on the free power generation, but it would be much simpler if the device emitted a signal that was trivially 100 - percentage used for each field. At least, as far as possible. Solar is annoyingly special.

Either changing the current signals value output, or a new set of "capacity available" outputs, would work fine for this.

I was torn about posting this, but when it turned out that the "free" power was enough to run a single arithmetic combinator (doing 100 - signal) part time, it became clear that this was a ... challenging problem to solve effectively without support from the mod.

Note: I can clearly implement this in other ways, carefully placing different parts of the measure/calculate/act path into different power fields, but that is ... very complicated, and I dread the thought of having to write down, eg, what the placement rules for power connections would be when using a blueprint of this.

4 years ago

So, to be clear, what you're asking for is just another set of signals that are just (100 - P)? That shouldn't be hard. I don't think an inverse signal for solar currently makes sense, right? It's binary anyway, so three new "inverse" signals?

4 years ago

Yeah, that is it. and yes, unless solar can get a non-binary value, "percentage left" makes no sense. Thanks.

4 years ago

Ok, I implemented "spare capacity" signals, you can try it out.

New response