Page 1 of 1

Electric System Rework

Posted: Sat Aug 05, 2017 9:39 am
by Fuller
Hello :)

Is there any chance that we can get a "proper" electic system similar to the fluid system?
In my opinion energy distribution is boring and tedious at the same time.
There are currently only 5 variables that can be adjusted.
1.) Tech level/research
2.) Wire reach. (small pole: 7.5; ;substation: 18)
3.) Supply area. (small pole: 5x5 ;substation: 18x18)
4.) Material cost.
5.) Dimension. (small pole: 1x1; ;substation: 2x2)

Tech and material cost are negligible (especially in mid/late game), so we end up with 3 variables.
A first iteration of the new system could look like this:

power source ->transformer ->{large power poles -> substation -> large power poles }^N->transformer ->medium/small power poles -> factory

Power source:
-variables: volt, ampere, watt,
-infinite throughput if power sources of the same type are connected or power source is directly conneceted to a factory. (this would probably lead to the replacement of large poles with solar panels.)
-solar panels: V_1 Volt, A_1 Ampere , W_1 Watt
-steam engine: V_2 Volt, A_2 Ampere , W_2 Watt
-nuclear power: V_3 Volt, A_3 Ampere , W_3 Watt

Transformer:
Transforms eveything to e.g. 2000V, 500A , 10MW thorughput
With 98% efficency.

Large power pole:
Supports up tp 10MW throughput @ 20 KV, 500A.
Loses 0.5% Volt every 25 tiles.

Medium/small power pole:

Supports up to 2.5MW @5KV , 500A.
Loses 0.25% Volt every 10 tiles.




Tl;DR
The idea is that you have to build multiple substations to connect your power source to the network (similar to pumps
in the liqud network) and you have to build them if you want to connect distant factories to your network
(because you lose power over distance, similar to pressure).
Turbines won't need substations because they already output high volt/ampere and thus you encourge players to
build them.
I'd also like to see hugh power lines connecting generators and factories. At the moment it's like having unlimited
belt/pipe throughput and that's contradicting the factorio spirit :/

I hope you understood the stuff i wrote because i'm not a native english speaker/writer.




EDIT:

Would be fun to see a more sophisticated and realistic power network but this posts' intention is to
start a conversation and to maybe encourage the developers to implement a simple version of the power network
which can be improved upon.

Re: Electric System Rework

Posted: Sat Aug 05, 2017 12:18 pm
by Tekky
This has already been suggested in the following threads:

viewtopic.php?f=6&t=51050 energy transmission should have a diminishing return
viewtopic.php?f=6&t=42652 Poles limit

Here is a quote of my comment on your suggestion from the first thread mentioned:
Tekky wrote:I agree that this would be nice. However, I don't think it would be worth the additional CPU load/memory bandwidth that would be necessary to simulate the actual power flow.

There are already many people complaining that their games slow down significantly when they build a very large base. This would get worse if your suggestion were implemented.

For some technical information about how power networks work internally in Factorio, see Factorio Friday Facts #115.

Re: Electric System Rework

Posted: Sat Aug 05, 2017 4:20 pm
by Fuller
I read the FFF115 https://www.factorio.com/blog/post/fff-115 and the power network "simulation" is indeed very simple but
i still think that it's possible to rework the electric network with only a slight performance impact.
If you use something like https://en.wikipedia.org/wiki/Johnson%27s_algorithm the worst case performance is of order |V|^2 log (|V|) +|V|*|E|
which is of course not linear but we will also use lot's of simplifications in the model.
You could use something like a Manhattan-Metrik for the 2D plane in factorio so that there is no need to add
lots of different paths for the "fluid".
Would be great for another FFF which describes the problematic a little bit more in depth :)

Re: Electric System Rework

Posted: Sat Aug 05, 2017 5:05 pm
by Rseding91
Fuller wrote:... i still think that it's possible to rework the electric network with only a slight performance impact. ...
Then it's not likely to ever happen. Unless it can be done with zero additional overhead it's most likely never going to happen.

Re: Electric System Rework

Posted: Sun Aug 06, 2017 1:09 am
by Volvith
Collapsed Quote by Fuller
I have to say, i agree with the tediousness of power-distribution, and i see some good ideas here.....
But, like Rseding said, it's almost definitely not going to be implemented like this, due to user-end hardware-limitations, and the game slowly dying with larger factories.

I do like the idea of needing a substation for large power-poles though.
And i have another proposal on the same subject, but i'm nowhere near sure how to implement it:
Better powerline connections. (if you build electric-poles with robots, they come out like a 3 year old connected them. NOT ocd friendly... ':D)

But yeah, i can definitely see room for improvement here, even though it won't be easy to optimise performance with additional features, not unlike these. ;)

Re: Electric System Rework

Posted: Sun Aug 06, 2017 4:02 am
by Patashu
I really like the idea of this, but think it's too complicated/performance intensive for vanilla.
It would be great to have it as a mod, but suspect the modding capabilities required for it won't ever be provided. If you could just edit the code directly like Minecraft mods, then great, but Factorio is C++, so good luck with that.

Re: Electric System Rework

Posted: Tue Aug 08, 2017 11:44 pm
by Shadowkeeper256
Fuller wrote:Transformer:
Transforms eveything to e.g. 2000V, 500A , 1KW thorughput

Large power pole: Supports up tp 100KW throughput @ 20 KV, 500A.

Medium/small power pole: Supports up to 25KW @5KV , 500A.
Just a little note there as this hurts the electrical engineer in me:

With those values the;
-Transformer has a throughput of 1MW
-Large pole 10MW
-med/small pole 2.5MW

Watts = Volts x Amps ...

Re: Electric System Rework

Posted: Wed Aug 09, 2017 1:34 am
by d3x0r
Shadowkeeper256 wrote: Just a little note there as this hurts the electrical engineer in me:

With those values the;
-Transformer has a throughput of 1MW
-Large pole 10MW
-med/small pole 2.5MW

Watts = Volts x Amps ...
:) You haven't gotten into mods and internals yet then...
Joules is Watts per tick not Watts per second in the internals.

Re: Electric System Rework

Posted: Wed Aug 09, 2017 4:16 am
by m44v
d3x0r wrote: :) You haven't gotten into mods and internals yet then...
Joules is Watts per tick not Watts per second in the internals.
Not true. It takes several seconds to discharge an accumulator at maximum output. See https://wiki.factorio.com/Units#Joule_.28J.29

Re: Electric System Rework

Posted: Wed Aug 09, 2017 10:36 am
by Fuller
@Shadowkeeper

Thx. My intention was to pick some arbitrary numbers because people often don't like hugh amount of variables...

Watt= Joule per second but internally factorio uses (afaik) joule per tick as a unit of power.