power switch to expose power transferred to circuit network

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
gHoST INFERNO
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Nov 15, 2015 11:06 pm
Contact:

power switch to expose power transferred to circuit network

Post by gHoST INFERNO »

tl;dr - I'd like to be able to query the amount of power that flows through a closed power switch with a circuit network.

A little more background:
I have a massive centralized solar power plant, but to avoid global failures should anything happen to that one (e.g. I forget to scale it up enough and suddenly all my accumulators are dead and it's night or a remote bases power supply gets disrupted), I have a few "emergency nuclear plants" that automatically turn on should they detect a power outage (by measuring the contents of a local accumulator). The condition to turn this on isn't hard to do (and I'm ok with a quick disruption there), but the condition to automatically turn it off again is tricky. There are ways to solve it by having "local" accumulators that can output a substantial amount of energy (1552 for 80 steam turbines : 80 * 5.82MW/300kW - note that it's the discharge rate that's relevant here), but even nicer would be if I could determine if my power plant is actually "contributing" energy to the network.
One way to do this would be if I could query the power switch that I use to connect / disconnect this emergency plant for the amount of power that flows through it. Only once accumulators are reasonably charged AND the flow is <=0 should I turn off the plant.

Given my limited knowledge of how the power network & power switches are implemented, I'm giving this a small chance of happening, but thought I'd just ask and see :-)

another way would be if I could query the power output of steam turbines (or power producers in general).
and yet another way would be if I could query the steam consumption rate, but that's not exposed either.

In any case, thanks for a fun game!

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: power switch to expose power transferred to circuit network

Post by Tekky »

Power "flow" is currently not simulated, for performance reasons. See Factorio Friday Facts #115 for details of the internal working of the power network.

Therefore, in order to implement your main suggestion, this would have to be changed. This has already been suggested in the following threads:

viewtopic.php?f=6&t=51585 Electric System Rework (thread with developer response)
viewtopic.php?f=6&t=55637 More realistic power grid
viewtopic.php?f=6&t=51050 energy transmission should have a diminishing return
viewtopic.php?f=6&t=42648 Watt limiter
viewtopic.php?f=6&t=42652 Poles limit
viewtopic.php?f=6&t=57163 Power Management
viewtopic.php?f=6&t=15543 Power Conductor Limit

gHoST INFERNO
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Nov 15, 2015 11:06 pm
Contact:

Re: power switch to expose power transferred to circuit network

Post by gHoST INFERNO »

I was actually aware of what's in that fff, but was hoping that by constraining the request to the power switch, which is already a little special, maybe it's a little more reasonably feasible. E.g. given that (afaict) the elements in the sub-networks aren't updated when the power switches opens / closes, might possibly indicate that during the power calculation, the aggregates are available on a per-subnetwork-level. If so, one might be able to derive the flow-numbers from those, without a major rework of things.

All that said, yes I knew this would be a long shot :-)

Also note the other proposals that might be simpler, e.g. exposing the load from steam-turbines to circuit networks.

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: power switch to expose power transferred to circuit network

Post by Engimage »

Sadly this is too major change to electric network to be even considered for implementation. Power switch does not transfer anything it just triggers recalculation of power networks. So it does not hold or have any access to your desired data.

So won’t happen.

Tekky
Smart Inserter
Smart Inserter
Posts: 1039
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: power switch to expose power transferred to circuit network

Post by Tekky »

Actually, there is a way to have limited control of power "flow" between power networks. This is described at the end of the following thread:

viewtopic.php?f=6&t=42648 Watt limiter

Maybe there is also a way to measure the amount and direction of the power flow, for example by having several accumulators in separate networks next to each other and measuring their charge. For example, the direction of the power flow could theoretically be determined by which accumulators charge up first. However, even if this works, I'm afraid that it would be a messy solution.

User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 355
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: power switch to expose power transferred to circuit network

Post by Philip017 »

i have done this with multi accumulator setups and various power switches and latches with accumulators for triggers, but it gets quite messy.

if you have one area of your factory you absolutely don't want to go offline, place a bunch of accumulators on that side of the power switch and set it to open if the accumulators go below a certain value (like 50%), just make sure that you also have a power source on that side to kick the switch back closed once the accumulators fill back up (like 90%).

if your power source happens to be on the other side of the power switch you will have to monitor the other side with it's equally large accumulator base and the circuit network monitoring becomes more complicated.

if you are interested in using a mod to address this:
https://mods.factorio.com/mod/Transformers

is a mod i have used for this very purpose, although it is fairly hard on ups.

Post Reply

Return to “Ideas and Suggestions”