[kovarex] [0.17.55] Electric energy interface and accumulator behavior

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
SimonFlapse
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Feb 28, 2019 1:20 pm
Contact:

[kovarex] [0.17.55] Electric energy interface and accumulator behavior

Post by SimonFlapse » Tue Jul 09, 2019 4:35 pm

Creating an electric network containing an electric energy interface and regular accumulators seems to "disable" accumulator behavior.

Limiting the electric energy interface to produce and store less energy than needed by consumers should make the consumer draw power from accumulators, this seems to happen without decrease the accumulated charge.

The save file shows a setup with three electric networks that can be combined to show the above mentioned behavior. Linking the left two network, using the power switch, will make the laser turrets fill their buffer, but without changing the accumulator charge level. Unlinking them will make the laser turrets slowly drain their buffer. The solar panels can be used to charge the accumulator, but the charge level seems not to affect anything, as long as it's not empty.

consumption_more_than_production.PNG
consumption_more_than_production.PNG (157.51 KiB) Viewed 470 times
The accumulator is not being charged, and it's full.
The graphs show only 59.9 kW being produced but 72 kW being consumed.


The setup:
the_setup.PNG
the_setup.PNG (576.88 KiB) Viewed 470 times

Expected behavior
Because the normal accumulator behavior seems to be broken when using the electric energy interface I'd have to disable accumulators from being built when using a electric energy interface in a scenario. I hope to be able to use the electric energy interface to facilitate power transferal from nother surfaces or servers, while preserving accumulator usage.

I'd expect that accumulators would be charged and discharged simultaneous/after the electric energy interface. In the provided save that would mean that the laser turrets would draw power from the accumulator to satisfy their drain. If any energy providers (Primary or secondary) would be added to the left most electric network, that those would charge the accumulator if they have any excess power.
Attachments
EEI_Accumulators.zip
(3.74 MiB) Downloaded 2 times
factorio-current.log
(4.71 KiB) Downloaded 1 time

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2037
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by darkfrei » Tue Jul 09, 2019 7:01 pm

Code: Select all

data.raw["electric-energy-interface"]["electric-energy-interface"].energy_source.usage_priority = "primary-output"

User avatar
SimonFlapse
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Feb 28, 2019 1:20 pm
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by SimonFlapse » Tue Jul 09, 2019 7:21 pm

darkfrei wrote:
Tue Jul 09, 2019 7:01 pm

Code: Select all

data.raw["electric-energy-interface"]["electric-energy-interface"].energy_source.usage_priority = "primary-output"
I'm trying to avoid manipulating the prototype.
I still think that it is a weird behavior for the electric energy interface to outright break regular accumulators

Rseding91
Factorio Staff
Factorio Staff
Posts: 9451
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by Rseding91 » Wed Jul 10, 2019 10:54 am

Thanks for the report. As already pointed out the electric energy interface is configured to be "tertiary" priority which means it operates identically to accumulators.

If that's not what you want you have to change it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2037
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by darkfrei » Wed Jul 10, 2019 3:05 pm

Rseding91 wrote:
Wed Jul 10, 2019 10:54 am
Thanks for the report. As already pointed out the electric energy interface is configured to be "tertiary" priority which means it operates identically to accumulators.

If that's not what you want you have to change it.
Is it possible to add another hidden electric energy interfaces to the vanilla? It doesn't cost UPS, but can be useful in scenarios or "soft mods" without data stage.
"Primary output" one must be enough.

User avatar
SimonFlapse
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Feb 28, 2019 1:20 pm
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by SimonFlapse » Wed Jul 10, 2019 6:47 pm

I don't think the priority is the problem. It seems the electric energy interface is incompatible with accumulators, as in you can't have both in the same electrical network

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3174
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by eradicator » Wed Jul 10, 2019 7:17 pm

@Rseding

I have to concur that this looks very buggy. The mere *existance* of a tertiary EEI seems to prevent accumulators from consuming their buffer.

Exact steps to reproduce:
  1. Build this blueprint:

    Code: Select all

    0eNqVlctugzAQRf9l1hBhHiFhm8+oqsoh09SSMciPUoT49xqSQtI4BHYYjY/Hl3uHFo7cYCWZ0JC1wPJSKMjeWlDsLCjv3+mmQsiAaSzAA0GLfqVKTqVfUYEcOg+YOOEPZKR79wCFZprhBTMsmg9hiiNKW+AEeFCVyu4pRX9ezwk8aCDzo67zHhjhQkY0w4gWMrYzjHhkcKpQ+tpIifoR4pN4k1w44SZxkZLFpPAFabuYFLwgpSNJ0hOVLsRFnMC1ezfpW1DOfeSYa8lyvyo5uljRc9Z+JWumrd5XV1ZV1lYfVTOdfzkgo9BWJ+tvGwthT2VDOlo4mODW3ew0dFkzicNz0MfgYMj/GkLui5wtknXXDWduOyWF5rkpDKe6dHzJP3sGbieQaFVo3a1MYVHmqDQd9j0i7mR3cZJVwXX3MoVk1BYFynPj2ymI8pPmbotee3sSGJKuksk5Ushu1WxzM/arJLIMa9ZhuGc3/wIPvlGqoTqNApLuSRrHcdf9ArAIBh0=
  2. Configure the EEI to 0/0/0. (I'm not on 0.17.55 yet, so the BP string doesn't have the EEI config.)
  3. Wait until the accumulator is fully charged.
  4. Remove the substation. Or remove all the solars if you want.
  5. Turn on the electric switch.
  6. Wait about a minute.
  7. The radar+lasers will now be powered for free.
I let this run for an in-game hour on speed=100 and it generates free energy all the time.

Mining the EEI instantly returns expected normal behavior.

I've also noticed "something weird with the EEIs and power consumption" during my own testing a few days ago, but i couldn't reproduce it, and shoved it off as "maybe my calculations are just wrong". But this would perfectly explain it.

Here's the one hour graph:
freeenergy.jpg
freeenergy.jpg (417.6 KiB) Viewed 336 times
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9451
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by Rseding91 » Wed Jul 10, 2019 9:31 pm

Now that you show it, a buffer size of 0 should never be allowed. I'm pretty sure there's stuff that divides by that value and if it's 0 it would cause division by zero and result in strange behavior (such as what you're seeing).
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3174
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [0.17.55] Electric energy interface and accumulator behavior

Post by eradicator » Thu Jul 11, 2019 9:11 am

Rseding91 wrote:
Wed Jul 10, 2019 9:31 pm
Now that you show it, a buffer size of 0 should never be allowed. I'm pretty sure there's stuff that divides by that value and if it's 0 it would cause division by zero and result in strange behavior (such as what you're seeing).
The "free energy" behavior does NOT depend on the 0/0/0 configuration, it works just as fine for 1/1/1 or any other value, i merely chose 0/0/0 for demonstration. If there is a division-by-0 bug that would be yet another bug.
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

kovarex
Factorio Staff
Factorio Staff
Posts: 7386
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.55] Electric energy interface and accumulator behavior

Post by kovarex » Thu Jul 11, 2019 12:47 pm

Hello. I fixed that the electric energy interface prevented any accumulators from working for the next version.

This still doesn't allow the interface to charge accumulators - as pointed out, it is terciary source, so it can be used also as a drain.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users