Page 1 of 1

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

Posted: Tue Jul 09, 2019 4:35 pm
by SimonFlapse
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 5990 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 5990 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.

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Tue Jul 09, 2019 7:01 pm
by darkfrei

Code: Select all

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

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Tue Jul 09, 2019 7:21 pm
by SimonFlapse
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

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Wed Jul 10, 2019 10:54 am
by Rseding91
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.

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Wed Jul 10, 2019 3:05 pm
by darkfrei
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.

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Wed Jul 10, 2019 6:47 pm
by SimonFlapse
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

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Wed Jul 10, 2019 7:17 pm
by eradicator
@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 5856 times

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Wed Jul 10, 2019 9:31 pm
by Rseding91
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).

Re: [0.17.55] Electric energy interface and accumulator behavior

Posted: Thu Jul 11, 2019 9:11 am
by eradicator
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.

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

Posted: Thu Jul 11, 2019 12:47 pm
by kovarex
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.

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

Posted: Wed Oct 09, 2019 9:41 pm
by Zaflis
Rseding91 wrote:
Wed Oct 09, 2019 5:15 pm
darkfrei wrote:
Wed Oct 09, 2019 7:09 am
viewtopic.php?t=73078
Duplicate of that report - electric energy interfaces (the one the base game defines) has the same usage priority as accumulators so it will never consume power from them. You'll have to define your own with a different usage priority if you want them to do that.
Anyways, the interface is in a terrible spot as it is. As i said in the other topic, they do in fact not have same priority. Interface will charge to 100% while accumulators wait for their turn. It would be far better if we had separate items, 1 large accumulator and 1 dedicated power consumer that uses power same as radar for example.

What use cases do you get with the current all-in-one machine? Because it doesn't work as a replacement for testing different builds, especially circuited ones that rely on accumulator charge. We still need to make things like 10000 beacons or 10000 accumulators instead of the 1 creative block that was supposed to replace the awkward building.