Bottleneck

by trold

A tool for locating input starved machines.

Utilities
3 years ago
0.13 - 1.1
219K

g Possible to tweak algorithm for facilities that have 1+ fluid output?

7 years ago

Atm, if a production facility has some fluid product in its output buffer (any non-zero), the facility waits until this buffer empties a certain amount before starting the next cycle of production - I suspect this is because the internal buffer would "overflow" if there weren't atleast one production cycle's worth of capacity.

So how does this affect Bottleneck?

Bottleneck currently marks facilities as "red" if they are in this interim state where they are waiting for their buffer to empty before starting the next production cycle, when, I believe they ought to be marked "yellow" as, from the player's standpoint, the facility does not have any problems with input.

I can upload an image if my description of the issue doesn't make sense - please lmk!

(Also, just wanted to say again - really fantastic work with this mod. I don't know how I played without it. I suspect/hope it will be one of the next utilities incorporated into the main game, after Rail Tanker.)

7 years ago

That seems weird. I am not sure I understand the bug you describe, and I can't figure out how to reproduce it. If you could upload an image or other info, that would be great.
When a chemical plant or assembler cannot get rid of its output (fluid or otherwise), it gets stuck with a full progress bar (or bonus bar). This is what the mod currently checks for, when determining what color indicator to assign.

7 years ago

The problem is that chem plants with liquid outputs don't wait for free outputs with a full bar. The inserters actually don't add the final required resource until the output on the plant falls below a certain value. This screenshot exemplifies that:http://steamcommunity.com/sharedfiles/filedetails/?id=771166315. I have a sulfuric acid plant that won't add the final sulfur required until the output buffer falls below 10 units. Despite the fact that the bottleneck is on the output, the plant shows a red light. The plant in question is directly to the right of the GUI window and at the time this screenshot was taken the sulfur inserter was stationary (and didn't move for a couple more seconds).

7 years ago

Now I see the problem, thanks, and I think I know how to fix this. I'll hopefully have time for testing it soon.

7 years ago

This should be fixed with 0.4.0. It requires a more complicated check, which causes the mod to hit the CPU harder. I don't know how to avoid this, since the mod now needs to check the recipes being used and check the corresponding fluid or item outputs. I am also not sure what the right behavior should be, when there are multiple outputs. Should a factory be "yellow" as long as it has some output available, or should be only be if all output types have positive amount?

7 years ago

With 0.4.2, the overhead for this check is almost gone, because the adoption of the rule "not producing, but at least one type of output available => yellow light"

New response