shanemadden / factorio-logistic-cargo-wagon

MIT License
6 stars 10 forks source link

Provide everything at once #7

Open Sil3ntStorm opened 5 years ago

Sil3ntStorm commented 5 years ago

When in active provider mode each wagon will only provide a single stack at once. The logistics network will thus deploy the necessary amount of robots for a single stack. Once the stack is emptied the next stack is immediately provided and the cycle repeats. Needless to say that deploying 10 ish robots every few seconds is going to take much longer than if the network would know that there are really 2k items to pick up and could just deploy a few hundred robots at once, enough to pick up everything (if enough robots are available anyway).

So instead of providing a stack at once, just provide every single item in the cargo wagon that is of the type(s) specified to be provided.

shanemadden commented 5 years ago

Can you describe the configuration and conditions you're seeing this under? The logic (here) is designed to loop through all items being provided at the station, adding an even number of stacks of each provided item present in the wagon's inventory to the proxy entity's trash slots.

I just checked my test file with the current release and that still seems to be behaving correctly, but that behavior might be breaking due to conditions I'm not recreating. Thanks!

Sil3ntStorm commented 5 years ago

Quite a simple setup. It requests ore at one station, provides it at the other station.

What I'm seeing is that there are wagons that keep having a few stacks in their inventory for quite some time despite bots picking stuff up. After some time these will eventually be removed, and sometimes a new stack will appear in the first slot of the wagon, before it slowly drop to zero.
I'm guessing that could have something to do with the use of fake trash slots and that there aren't enough of them to dump the entire cargo wagon into those trash slots?