[0.9.2] Production stats way off

This subforum contains all the issues which we already resolved.
Post Reply
FrozenOne
Fast Inserter
Fast Inserter
Posts: 177
Joined: Mon Mar 04, 2013 8:10 pm
Contact:

Re: [0.9.2] Production stats way off

Post by FrozenOne »

Also, mind the bugs in my original thread https://forums.factorio.com/forum/vie ... f=7&t=1914
(for example on the screenshot there the colors of graph are random/not matching, and others described there...)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.9.2] Production stats way off

Post by slpwnd »

FrozenOne wrote:Also, mind the bugs in my original thread https://forums.factorio.com/forum/vie ... f=7&t=1914
(for example on the screenshot there the colors of graph are random/not matching, and others described there...)
Ok, so there was actually a fundamental bug in the production statistics calculation. The consumption and production were added up in the same variable (with different signs) for given frame. This could really skew the numbers especially for longer times (when the frame is big enough for numbers to cancel out - for 5 s interval when 1 frame is 1 tick the effect would probably be negligible). This is because of the historical reasons - the production statistics and energy statistics use the same code and using same variable for the energy statistics was an intentional optimisation. Anyway, this is now fixed for the 0.9.3.

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [0.9.2] Production stats way off

Post by Holy-Fire »

slpwnd wrote:
FrozenOne wrote:Also, mind the bugs in my original thread https://forums.factorio.com/forum/vie ... f=7&t=1914
(for example on the screenshot there the colors of graph are random/not matching, and others described there...)
Ok, so there was actually a fundamental bug in the production statistics calculation. The consumption and production were added up in the same variable (with different signs) for given frame. This could really skew the numbers especially for longer times (when the frame is big enough for numbers to cancel out - for 5 s interval when 1 frame is 1 tick the effect would probably be negligible). This is because of the historical reasons - the production statistics and energy statistics use the same code and using same variable for the energy statistics was an intentional optimisation. Anyway, this is now fixed for the 0.9.3.
Thanks, but there's still a bug. Production stats for 5s interval are too high.

This is easy to see in a toy setup with only one furnace.

(There's probably some problem with the way this is sampled that causes an overestimate, which has the strongest effect in a short interval).

Post Reply

Return to “Resolved Problems and Bugs”