Power Overload


Performant, semi-realistic power distribution overhaul. Power poles can explode if the total electrical consumption on the network is too high. Use transformers to separate networks so that subnetworks do not take more power than they can handle.

Content
1 year, 9 months ago
1.1
3.32K
Power

b [Fixed-1.4.5] Why transformer output can't satisfy consumption sometimes?

1 year, 11 months ago

Heya,

I'm trying out the mod and started to split networks using a transformer and a fuse. However, on many places I have noticed that the Transformer output cannot satisfy the consumption on 100%? It fluctuates non-stop a little, just enough to bug out the factory. If I remove the transformer, everything is fine. I tried to add few capacitors after the transformer and I think there is a bit of improvement sometimes, but it still happens. On some networks, it just drastically falls in. It is like the Transformer cannot update its output on time and provide enough power.

Also, it will be great if that Transformer can rotate :)

Thank you for the great mod, btw. It brings interesting play.

1 year, 11 months ago

Are you able to provide a save? I definitely observe some slight fluctuations, but I don’t think this affects factory in any meaningful way, it just looks a bit funny in the electric network GUI.

Also, it will be great if that Transformer can rotate :)

Making it flippable is possible (though not simple), so that the input and outputs are reversed. It’s something I’d considered - the more people that request it, the more likely I am to get to it :)
Making it able to go up-and-rather than left-and-right is not possible though.

1 year, 11 months ago

I'm not sure how to do that? Is it fine if I have mods? Should be some external file sharing service be used?

1 year, 11 months ago

Yeah mods is fine, just upload it from your saves folder (https://wiki.factorio.com/Application_directory) to singing google drive or similar.

1 year, 11 months ago

Here, https://drive.google.com/file/d/1BYR0Xax7_FD51i75pBs5Q4pC0OuA72L6/view?usp=share_link
It is next to a pylon where you can see a lot of droppings down. An accumulator can help, but removing the transformer removes the issue.

1 year, 11 months ago

Thanks for the save. In this network, you have a very low idle power draw, but when many inserters suddenly become active, their power draw increases by ~50x briefly. This is causing problems because, yes transformers have a spin up time, currently they can increase power throughput by 1% every tick (1/60th of a second). This is sort of a game engine limitation, (or at least a limitation of the method I've chosen to make transformers work). If I speed up the spin up time significantly, it causes more visual strangeness in the production bars (you'll notice it currently says 60.0/60.2kW, this difference would increase a lot if transformers were more 'responsive').

Since the spin up time is percentage based, your best bet is to make sure the subnetwork is consuming more power, so that the difference of inserters on-vs-off doesn't require too many 1%-increases of the transformers to satisfy them. Adding several radars is an easy way of doing this, otherwise, just have larger subnetworks in general.

Whilst the spin-up time also feels rather thematic, I can appreciate that the usability of it isn't the best so I will ponder various ways of improving this situation without requiring strange workarounds.

1 year, 11 months ago
(updated 1 year, 11 months ago)

So it seems my theory that the Transformers can't update fast enough was kind of close. I did noticed that when overdrawing a bit helps, for example, when charging the accumulators. In a bigger networks these on/off states get mixed well enough this is not visible so much (still noticeable tho), or not making so big impact, but it is a still a bummer. I split the networks because you can't otherwise mix low and big fuses in one. The low ones will always blow up when they detect high input, even if the consumption after them is less (which is not how fuses work irl ^^'). Is it an idea to make the fuses directional? This will also leave the Transformer back to its vanilla, Power switch.

P.S. I had a quick look at your code. Have you considered to disable all that buffering due to efficiency when it is 100% for example? Another idea is to have fixed capacity transformers (akin to the idea about in/out fuses). I'm really not sure that having these hiccups actually improves UPS too. Anyway, I'm just brainstorming.

1 year, 11 months ago
(updated 1 year, 11 months ago)

I split the networks because you can't otherwise mix low and big fuses in one.

Sure, but that network was only using ~60kW, you could merge it with many other networks for approaching the limit.

which is not how fuses work irl

Indeed, the whole thing is a sort-of 'alternative' physics, for both gameplay and performance reasons :) You could view the entire subnetwork as a series circuit if you like, explaining why all components have the same current. When a pole breaks/explodes/is-removed, the circuit gets rewired so it is still a complete circuit, but may not be connected to the circuit on the other side of the removed pole.

Is it an idea to make the fuses directional? This will also leave the Transformer back to its vanilla, Power switch.

I've considered this, but I don't like the idea. I really like that the transformers are dynamic, so you can use them in any situation, and with modded poles as well. Fuses are just optional extras, fitting in with the corresponding power pole, but I don't want to forcibly limit every subnetwork onto a specific power consumption. If you do, you could add https://mods.factorio.com/mod/Electric_Transformators (or switch to Fluidic Power mod, which is closer to this in design philosophy). Also, if you have fixed transformers (or 'directional fuses', which are essentially the same thing, except they'd explode rather than limit when the reach their maximum power consumption), then you'd never get normal poles exploding, which is the whole point of the mod :)
You can see more discussion about fuses (before they were added) here: https://mods.factorio.com/mod/PowerOverload/discussion/601c29609250294d7c9b3600

Have you considered to disable all that buffering due to efficiency when it is 100% for example?

I hadn't considered that, but it wouldn't save much performance. The expensive parts are API calls, but the only things I'd be able to skip when efficiency is 100% is the two lines calculating actual_input_used and actual_output_gained, which are both simple maths calculations with no API calls.

Another idea is to have fixed capacity transformers (akin to the idea about in/out fuses).

Indeed it would help UPS not having to constantly increase and decrease the electric_buffer_size of each transformer. But for gameplay reasons explained above, this won't be changing. Though any changes made to decrease spin up/down time would decrease the number of buffer size changes, which would help UPS. Interestingly, Electric Transformators works without any on_tick scripting, instead using the input electricity to generate an internal fluid, which is consumed by the output, creating electricity there. This method is made possible by having fixed transformer transfer rates (which I don't want).

1 year, 11 months ago

I fixed the consumption problem with adding some batteries (accumulators) within the subnetwork. Works fine for me

1 year, 11 months ago

Sure, but that network was only using ~60kW, you could merge it with many other networks for approaching the limit.

It is just one example of the issue. If I start merging networks, basically you need to always up your poles. You can't put wooden ones for example. They explode right away.

Anyway, thank you for the discussion. I take this behaviour won't change, which is fair. I will seek how to solve this on my own.

1 year, 11 months ago

I fixed the consumption problem with adding some batteries (accumulators) within the subnetwork. Works fine for me

Yeah, I guess accumulators can respond instantly to electricity deficits so they can cover usage increases whilst the transformer catches up. A sort of load balancer.

It is just one example of the issue. If I start merging networks, basically you need to always up your poles. You can't put wooden ones for example. They explode right away.

Well I more meant closer to the limit of, e.g. wooden poles. 60kW is a lot lower than 20MW :)

I take this behaviour won't change, which is fair.

The overall behaviour definitely won't change, but I will definitely look at improving this particular case.

1 year, 11 months ago

I fixed the consumption problem with adding some batteries (accumulators) within the subnetwork. Works fine for me

Accumulators can fix up to certain extent that issue. As I have mentioned above, I have tried with1 or more accumulators already before posting this. Not everyone cares about these hiccups, so I understand.

1 year, 11 months ago

The overall behaviour definitely won't change, but I will definitely look at improving this particular case.

Maybe set a minimum size for that buffer? Like the lowest pole. Or grow faster than shrinking or else. Meeting an unexpected demand is a common problem with never perfect solution afaik.

1 year, 11 months ago

P.S. I think I have failed of how to use the mod. The last drop was my mall network unable to draw more than what was available (~200/480) and it started to oscillate on like 60% satisfaction. Tried to change even the pole limits, nothing changed. I really like the idea of each pole being to provide up to a certain amount of power, but the Transformers bug me.

I looked briefly at the other two suggested alternatives, but the Electric Transformers ignores the pole capacities and the other one while interesting, looks like a hack. I may return later back to this mod, thank you for the great idea and nice support you provide. Wish you all the best.

1 year, 11 months ago

This is mostly fixed in v1.4.5 :)

New response