[0.10.1] Issue with train loading

Bugs that are actually features.
Post Reply
Telarin
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Tue Mar 05, 2013 2:17 pm
Contact:

[0.10.1] Issue with train loading

Post by Telarin »

I have noticed that when you are trying to load a train from a chest, where the train has filters set on several slots, sometimes the inserter ends up holding an item for which the train car no longer has space. This results in the inserter being unable to continue loading the car. It can be worked around by loading each item from a different chest (not a huge deal, but somewhat sloppy), however, a more permanent fix would be nice.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.10.1] Issue with train loading

Post by DaveMcW »

Transport belts have always worked like this. If you try to put 2 different items in one lane it will eventually get clogged.

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: [0.10.1] Issue with train loading

Post by FishSandwich »

DaveMcW wrote:Transport belts have always worked like this. If you try to put 2 different items in one lane it will eventually get clogged.
..wat? He didn't say anything about transport belts...


I'm not sure on this, but as for the problem, couldn't it be solved with a smart inserter and conditions?

Dakkanor
Fast Inserter
Fast Inserter
Posts: 243
Joined: Wed Feb 27, 2013 6:18 am
Contact:

Re: [0.10.1] Issue with train loading

Post by Dakkanor »

each carraige can have 4 inserters per side, i would say just use one item type per inserter Max

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.10.1] Issue with train loading

Post by DaveMcW »

FishSandwich wrote:
DaveMcW wrote:Transport belts have always worked like this. If you try to put 2 different items in one lane it will eventually get clogged.
..wat? He didn't say anything about transport belts...
I am though. I am comparing the process of loading filtered cargo wagons to the process of loading assemblers with transport belts.

Transport belt -> Assembler
Chest -> Filtered Cargo Wagon

They have similar benefits, and similar problems.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.1] Issue with train loading

Post by kovarex »

The same can happen with one type of item, when you have more than one inserter.
Both inserters pickup a thing, and just one more of the thing can fit the container.

The solution would be to track items "incoming" into the container and take it into consideration when the insert is deciding whether to put another thing into it.

The question is, if programming system like this is worth it (and the overhead).

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.10.1] Issue with train loading

Post by ssilk »

I edited this a lot now, sorry.

In short:

When a critical filling is reached, the wagon/chest or whatever can "hold back" the inserters until one/the last remaining inserter (which is not holded) filled up the small rest.


In long:

I don't think that. I think, this will make more and more problems in the future. :)

And if you make an easier algorithm?
Provided, that you don't insert into it "by hand", the maximum change can be only the number of inserters, that load into it, right?

So, when X is the maximum items, which can be put into it,
and N is the number of inserters, that can load into it,
and M is the inserter-stack-size-bonus,

then beginning from X - N * M items loaded into it, there can be only one inserter, which loads. All other needs to be deactivated. Or better to be hold back.

Example:
X = 100 (maximium items)
N = 5 (inserters)
M = 3 (inserter-stack-size-bonus)

if there are loaded more than 84 items, then only one inserter can load. If more than 97 items, the inserter can take only the remaining number.

So in the worst case:
Beginning with 87 items which the first inserter has just put into it (before was 84 - which is below that limit - plus 3 is now 87, which is above), there are still 4 inserters "on the way" to load 3 items each into the wagon/chest or whatever. 3 * 4 = 12, so after that, the chest is filled with 99 items.

The wagon now "holds" these 4 inserters, it avoids the return.

The first inserter will then take the last item (it should be a way to tell him "I need only 1") and load it.

There is some space for optimizing this, but I think it can work quite well. I think this is also natural, because filling of big amounts into anything needs always a slowdown at the end to avoid this kind of "deadlock".

Can be seen the best when filling a bottle of beer into an empty glass: I need to slowdown cause of the foam.
This is btw. a good idea now: a cool beer. :) :D
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Telarin
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Tue Mar 05, 2013 2:17 pm
Contact:

Re: [0.10.1] Issue with train loading

Post by Telarin »

A possible solution, which would not solve 100% of these issues, but would probably catch like 90% of cases:
If an inserter is not able to drop the item at the drop off location, it will attempt to return it to where it picked it up. Note that if it picked it up from a belt, it should attempt to return it to the same side of the belt that it was picked from.

Post Reply

Return to “Not a bug”