Page 1 of 1

[0.16.43] Lab science flask consumption stats wrong.

Posted: Sun May 20, 2018 10:52 am
by Zavian
(Credit for noticing this goes to ColonelSandersLite viewtopic.php?f=18&t=60489).

The science flask consumption stats on the Production Stats page don't seem to be reflecting actual consumption.

If I send 6x200 flasks through belt fed labs the production Stats page shows
Image

If I send the same amount of flasks through labs which are grabbing flasks from other labs
Image

Reproduction Recipe.
Load the save game from https://drive.google.com/file/d/16hjkE1 ... sp=sharing
The save contains 2 lab setups fed from chests. Both setups are missing a power pole. (Both setups have been run before, and have excess space science, but all labs are empty of everything except space science flasks).
Open production tab switch, to 1 hr view to verify no recent consumption.
Pick a lab setup to test.
If desired inspect the feed chest(s) to verify that there are 6x200 science flasks (with excess space science).
Place a power pole to start one of the lab setups.
Let it run, when it finishes open the production stats screen, and switch to 1 hr.
If desired confirm that no flasks (other than space science) are stuck anywhere.
Reload the initial save and test the other setup.

Factorio 0.16.43, .zip version on windows 10.

The setup was created with creative mod fix for 0.16, but the screenshots above were from running the save without mods.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Sun May 20, 2018 4:04 pm
by Aeternus
You've found the reason why I don't chainfeed labs by inserters anymore. The problem is that while flasks are pushed through, the labs shut down since one of the flasks is missing, and it won't do research while all components aren't there. It's not like the nuclear reactor that an item is consumed and then the lab works for a specific time...

You can somewhat mitigate this by using fast inserters and limiting their stack count to 1. But this isn't really a bug I think.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Sun May 20, 2018 4:47 pm
by ColonelSandersLite
Not the problem.

The research is consumed. The research points are awarded. The production screen reports the number of flasks consumed incorrectly.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Sun May 20, 2018 6:59 pm
by Rseding91
Thanks for the report however this isn't likely to ever be fixed.

When 2 science packs at 50% used are combined by putting them into the same inventory the game doesn't register it as "consumed" for the purpose of statistics so it won't show up in the graph.

That means if you chain labs using inserters this happens.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Sun May 20, 2018 7:04 pm
by Zavian
Ok. Fair enough, for the chained labs. But the first example was entirely belt fed, with no chaining. The consumption was still under-reported by 1.5%.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Mon May 21, 2018 1:48 am
by Jap2.0
So if (hypothetically) I have 20 labs researching automation (a 10 science pack research), it will show 0 consumption?

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Mon May 21, 2018 2:17 am
by ColonelSandersLite
I hadn't really thought about the issue of partially consumed items getting merged into one item. That's interesting.

That says to me that in the first example, items are sometimes getting merged when they really shouldn't be. Maybe something like - An inserter inserts a stack of science packs. If the timing is just right (1.5ish out of 100 times), the partially consumed pack is getting added to a full pack. If that's what's happening, I wonder if that little bit of leftover is being credited or just truncated? It would probably be a small value and hard to detect.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Thu Apr 11, 2019 12:28 am
by Rhamphoryncus
Just tripped over this and spent an hour diagnosing. For perspective if you disabled stats entirely when using lab chaining people would be quite upset but since we have bogus stats people don't notice.

Counting item merger as "consumption" sounds like the correct and reasonable solution.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Thu Apr 11, 2019 12:36 am
by Rseding91
Rhamphoryncus wrote:
Thu Apr 11, 2019 12:28 am
Just tripped over this and spent an hour diagnosing. For perspective if you disabled stats entirely when using lab chaining people would be quite upset but since we have bogus stats people don't notice.

Counting item merger as "consumption" sounds like the correct and reasonable solution.
The problem is more complex than that. It's not isolated to labs - when items are merged due to durability logic the game has no way to know "you should count this as consumed for X force" because it's just item transfer logic and has nothing to do with forces or statistics.

Making *every* single bit of item transfer logic know which force is supposed to "own" the items isn't going to happen because that would add a ton of overhead to all item transfer logic.

Re: [0.16.43] Lab science flask consumption stats wrong.

Posted: Thu Apr 11, 2019 3:23 am
by Rhamphoryncus
Alright. An alternative would be for labs to track pack consumption incrementally.