[0.12.32] [kovarex] Incorrect display values in electrical graph

This subforum contains all the issues which we already resolved.
Post Reply
JasonC
Filter Inserter
Filter Inserter
Posts: 363
Joined: Tue Mar 22, 2016 3:05 am
Contact:

[0.12.32] [kovarex] Incorrect display values in electrical graph

Post by JasonC »

Present in at least 0.12.29 - 0.12.32.

If an entity was created more recently than the currently selected history length on the electrical consumption graph, the number displayed for its average power consumption is the average over its life time, rather than the average over the selected history length. However, its indicator bar and position in the sort order still matches its average consumption over the history time. Only the displayed number is incorrect.

For example, if an object was created 1 minute ago with a 1 MW demand, and the graph is set to 10 m, the displayed value will be 1 MW instead of 0.1 MW, even though it will be sorted in the correct order. Here, there are 5 radars (0.3 * 5 = 1.5 MW) that have existed longer than 1 hour, and 5 beacons (0.48 * 5 = 2.4 MW) that were recently created (graph says 2.3 because it took me a second to insert modules in them to get their power usage up):

Image

The beacons should not be 2.3 over 1 hour, they should be less. Note that they are after the radars in the sort order, and that their indicator bar appears correct, although the displayed value is higher.

Two saves are attached. The first, sort-order-test, does not have the beacons built yet. To reproduce:
  1. 5 radars have already been built (and I advanced the game speed to make them take up a few hours of history).
  2. Build 5 beacons and put modules in them.
  3. Immediately view the 1m or 10m consumption graph and watch the beacon's displayed usage increase to higher than the radar's as it stays on the bottom of the list.
The second, sort-order-test-2, is the same as the above but the beacons have just been built. Load this save and just immediately view the 10m consumption graph to see the issue.

This report is a spin off for the issue observed here.

Edit: I apologize, I've attached a required mod. I thought I removed all dependencies, but this is for the fuel supply chests for the generators. If it is an issue please let me know and I will redo the saves without it. The saves will still function without the mod, just not for very long.
Attachments
toy-box_0.2.2.zip
required mod
(46.11 KiB) Downloaded 59 times
sort-order-test-2.zip
(706.02 KiB) Downloaded 54 times
sort-order-test.zip
(752.87 KiB) Downloaded 63 times
Took a break from 0.12.29 to 0.17.79. I never know what's happening.
Gates are broken for trains. | The people demand a better chain signal! | Disabled inserters are a lie! (see also)

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

Re: [0.12.32] [kovarex] Incorrect display values in electrical graph

Post by kovarex »

Hm, I looked into the source file, and this is actually the way it is programmed to calculate the power depending on how long the entity is working, so it depends on the point when it first appeared in the graph.
On the contrary, in the production graph, it always divides the overall production by the timeframe regardless of when the entity started to be produced.

So I unified this for 0.12.33, to always show the value based on the timewindow.

Post Reply

Return to “Resolved Problems and Bugs”