[Genhis][2.0.41] Extremely inefficient construction bot delivery to silo

thuejk
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

[Genhis][2.0.41] Extremely inefficient construction bot delivery to silo

Post by thuejk »

In the attached save, I have ghosted 1000 iron to be delivered by construction bot to the silo. There are 1397 idle construction bots, while the iron is being delivered by 3 construction bots at a time, taking forever.

The inefficiency happens when there are machines with unfulfillable module requests.

--------------------------
The below is my guess at what happens. It is speculation, it might be wrong, feel free to ignore:

There is a separate shared circular construction queue for delivering stuff to existing machines, both modules and e.g. ghosted stacks of iron in a rocket silo. Each tick, X (=10 or whatever) machines with such requests are looked at. So if there are 1000 machines with such requests, a bot will only have a chance to be dispatched to it every 1000/X ticks. Hence why module requests can make iron delivery to the silo slow.

The problem arises because apparently each time the silo request is visited by this queue, only 1 bot is dispatched. So if the silo is requesting 1000 iron via construction bots, then this construction bot queue has to loop through the whole queue 1000 times before the 1000 bots are dispatched, one at a time. And if there are lots of unfulfillable module requests making the queue permanently long, each of those 1000 queue loops required will take a non-trivial number of ticks. So you can end up with idle construction bots, while requests are unserviced.

Assuming the above is correct, there is an apparently obvious fix: Allow more than one construction bot to be dispatched, each time the construction queue visits the silo.

This is not new behavior btw. 2.0.7 behaved the same way as 2.0.41.
Attachments
botqueue_bug.zip
(1.26 MiB) Downloaded 10 times
Post Reply

Return to “Assigned”