[0.18.40] Electric network priority

Bugs that are actually features.
Artyom
Inserter
Inserter
Posts: 41
Joined: Sun Mar 22, 2020 8:41 pm
Contact:

[0.18.40] Electric network priority

Post by Artyom »

Is there any priority according to which electricity network powers a consumer if it belongs to several of them?

Network #1:
1. Water pump
2. Boiler
3. Steam engine

Network #2:
1. Solar panel
2. Accumulator

The consumer is a lamp which can be powered from both of network that aren't connected. As you can see from the screenshots the lamp is powered by the steam engine though the solar panel has enough power and the accumulator is fully charged.
Attachments
steam_engine_power.jpg
steam_engine_power.jpg (639.43 KiB) Viewed 2108 times
solar_power.jpg
solar_power.jpg (674.94 KiB) Viewed 2108 times
accumulator_power.jpg
accumulator_power.jpg (681.3 KiB) Viewed 2108 times
Last edited by Artyom on Wed Aug 05, 2020 6:28 pm, edited 1 time in total.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.18.40] Electricity network priority

Post by mrvn »

Have you tried changing the order in which you build the lamp and poles?

What if one of the networks runs out of power, will it change to the other? Will it stay there when power comes back or revert what it had first?
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3336
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.40] Electricity network priority

Post by boskid »

Ref 79566
Rseding91
Factorio Staff
Factorio Staff
Posts: 14720
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.40] Electricity network priority

Post by Rseding91 »

Which ever electric network updates first in the list of networks will transfer power to the things that need it. I don't see that as changing since it would add a *huge* overhead to the transfer logic to first check all other connected networks for each entity it was about to give power to.
If you want to get ahold of me I'm almost always on Discord.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3336
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.40] Electricity network priority

Post by boskid »

Moving to Not a bug.

Trying to implement priority in case of multiple network would result in huge complication of electric network update logic since update would have to go in order "primary in network A, primary in network B, secondary in network A" etc. For simplicity, cache locality and performance i do not care if this would be ever implemented. The network with lower sub-network-id is the first to update so will have a priority.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.18.40] Electricity network priority

Post by mrvn »

I think he is saying it is drawing from both networks, using double the power. And the ref you added points in the same directions.

That certainly sounds like a bug. The entity should stop drawing power from later (whatever that is) electrical networks if it has it's buffer full.
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [0.18.40] Electricity network priority

Post by disentius »

Hmm... I dont understand the problem, i think.
Made a test setup, and the three radars connect use one network only. if it runs out, it switches to the other one.
(tested in /editor)

[EDIT] On 0.18.42
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.18.40] Electricity network priority

Post by mrvn »

disentius wrote: Wed Aug 05, 2020 5:29 pm Hmm... I dont understand the problem, i think.
Made a test setup, and the three radars connect use one network only. if it runs out, it switches to the other one.
(tested in /editor)

[EDIT] On 0.18.42
From the ref 79566:
I am able to confirm this, and have found it is not the overlapping power networks per se, but just the lamps within overlapping power networks that cause the issue.
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [0.18.40] Electric network priority

Post by disentius »

Ah, thanks. I ll test again.
Post Reply

Return to “Not a bug”