Inserters start new stacks in trains

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Inserters start new stacks in trains

Post by 19wolf »

I'm trying to make a train loader for outpost supplies, but I'm noticing if inserter X starts a stack of item A and inserter Y starts a stack of item B, then inserter Z will start it's own stack of item A. This is causing problems where the cargo wagon has a stack of 98 rails and a separate stack of 2 rails, so the car never gets "full", and never leaves the station. I'm filling up specific amounts of each item, based on what's already in the train and what a constant combinator says the train needs.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Inserters start new stacks in trains

Post by Rseding91 »

That's working as intended. Inserters don't use count-perfect logic to check if they should transfer items and don't account for other inserters moving items.
If you want to get ahold of me I'm almost always on Discord.

19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Re: Inserters start new stacks in trains

Post by 19wolf »

Shouldn't a stack fill up completely before a new one is started though? I'm getting like a stack of 78 rails and then a different inserter starts a new stack, and the stack of 78 never gets finished (based on my circuit logic telling it not to put more than 100 rails in)

19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Re: Inserters start new stacks in trains

Post by 19wolf »

So I've figured this out. The problem is when I want exactly 100 rails in my train, stack inserters will place 108 rails into the train, and another will take out 12, but the first has moved on to putting signals in the train in the next slot. Then, after the 8 rail stack is removed, the signals start filling in the empty spot where the 8 rails used to be, and I'll end up with two half stacks. This causes problems when I want to fully pack a train with exactly as many stacks as it can hold.

The reason for this behavior/the solution is that items are placed in the first available slot, while they're removed from the last available slot. The solution would be to place and remove from the first available slot in a train car. Another solution could be to make train inventories fill like the player inventory and automatically group stacks and sort them.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Inserters start new stacks in trains

Post by steinio »

Man, filter the slots by middle mouse button click.
Image

Transport Belt Repair Man

View unread Posts

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Inserters start new stacks in trains

Post by JimBarracus »

I you want precise amounts of items in the train you need to have stack size set to 1.
Just use cargo wagon filters
have one dedicated stack inserter/chest for one item.
Max 12 item types per wagon.
Use placeholder items if you dont need a full wagon
This is the best and easiest solution.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Inserters start new stacks in trains

Post by ColonelSandersLite »

JimBarracus wrote:
Tue Oct 16, 2018 11:43 am
Max 12 item types per wagon.
With red inserters, you can use a double bank of chests on each side for a max of 24 item types/wagon. Slower than stack inserters, but some items don't need high throughput.
20181016074635_1.jpg
20181016074635_1.jpg (820.83 KiB) Viewed 3456 times
JimBarracus wrote:
Tue Oct 16, 2018 11:43 am
have one dedicated stack inserter/chest for one item
....
This is the best and easiest solution.
Not always. It really depends on what the item is.

If it is a bulk good that you need a lot of (belts, tracks, etc), you will want to use stack inserters. Perhaps even multiple stack inserters for just that one item type.

With more intermediate items (chests, inserters, splitters, etc) red inserters will allow you to load a lot of different types of stuff on a wagon with reasonable throughput.

For misc low volume items (combinators, wire, cliff explosives, etc) a single chest feeding a fast inserter with stack size set to 1 can fill all demand with ease.

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Inserters start new stacks in trains

Post by JimBarracus »

How do you manage unloading with more than twelve items per wagon?
Or do you use it as a mobile chest where you grab your material by hand?

I usually use one chest for low demand items of which I usually just load one stack and load them with one blue inserter with stack size 1.
Stuff like radars or big power poles.
For unloading I have one chest with every item inside anf I never take all of it out.
Not a bulletproof system since I might take out all of one type and loose the slot which will be filled up with somethimg else.

Anyway its hard to setup a train with good loading ratios for every purpose.
Some constructions require a lot of pipes, others miners and belts.
It's almost good to have multiple building trains.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Inserters start new stacks in trains

Post by ColonelSandersLite »

Destination side, I use filter inserters linked to a simple system that just requests the items the outpost wants.

Use a few constant combinators where you can enter the requested items and link them all together.
Link all the chests together or just request from logistics network and multiply everything by -1.
Add that to the constant combinators.

Connect all that to the filter inserters. Only positive values are accepted as filters.
Note - Don't use stack filter inserters here. Stack filters can only have 1 filter, whereas regular filters can have up to 4.

Something like this:
20181016085407_1.jpg
20181016085407_1.jpg (750.87 KiB) Viewed 3440 times

19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Re: Inserters start new stacks in trains

Post by 19wolf »

So my use case is building my solar farm. I want my wagon filled with x number of substations, roboports, solar panels, and accumulators. I don't want to use filter slots in the wagon because I want it to be able to fill up with wood as trees are cut down. With filter slots, I wouldn't get the most efficient use of the wagon(s) of my train.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Inserters start new stacks in trains

Post by ColonelSandersLite »

19wolf wrote:
Tue Oct 16, 2018 4:02 pm
So my use case is building my solar farm. I want my wagon filled with x number of substations, roboports, solar panels, and accumulators. I don't want to use filter slots in the wagon because I want it to be able to fill up with wood as trees are cut down. With filter slots, I wouldn't get the most efficient use of the wagon(s) of my train.
Well, for that use, you probably don't need super precision, but just want the train to load approximately some arbitrary ratio of those 4 things right?

You can do that with stack inserters, chests, and some wire. Easy as pie. I'll just cobble together a simple demo.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Inserters start new stacks in trains

Post by ColonelSandersLite »

Try this on for size -
For this demo:

Get the creative mode mod.
Start a new map.
Place the BP
Put in a train with 1 engine and 4 wagons, scheduled to cycle between the stations after 15 seconds of inactivity.

Post Reply

Return to “Gameplay Help”