Inserters behavior modification

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
nafira
Fast Inserter
Fast Inserter
Posts: 107
Joined: Fri Mar 16, 2018 12:20 pm
Contact:

Inserters behavior modification

Post by nafira »

Change how inserters take things on belts and go for infinite science
My proposal is quite simple : when an inserter take something from a belt, it pick on both side, not right then left. Or if possible, we make a choice (right, left, toggle).
And if necessary, add another tier or change science limit for inserters size (infinite?). (Math later)

What ?
I've tried to fetch item on a full Tier 3 belt, and the biggest problem was : the arm is only taking on the right side of the belt (was coming north), and the other side was untouched. So mainly, this means, that the arms is not using a 40 item/s lane, but a 20/s because it's only taking on one side.

Also adding infinite research may be viable to add, because if you are able to put like 64k SciencePack for adding 1 element, it means that you manipulating huge numbers. And also because belts have a 12.5% boost on 0.17
So :
13 items : 2K
14 items : 4K (6K total)
15 items : 8K (14K total)
etc.

Seems fair to me.
Why ?
Only one lane moves (so half of the belt is moving). It's just not normal, just because inserters only check one side then another.


Edit : shortened version !!
Last edited by nafira on Tue Jan 29, 2019 11:12 pm, edited 1 time in total.

User avatar
leadraven
Filter Inserter
Filter Inserter
Posts: 354
Joined: Fri Jan 18, 2019 7:23 pm
Contact:

Re: Inserters behavior modification

Post by leadraven »

Are you using stack inserters for furnaces? Even blue inserters are overkill for them.
Also I never had problems with taking from belt, only with putting on belt.
Usually I have to place massive (and unreliable) lane balancers before any production with unbalanced items consumption.
Anyway this problems should be solved with lane balancers, not with inserters changes.

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

Re: Inserters behavior modification

Post by JimBarracus »

long post, short answers:

-belt balancers
-feed the copper wires directly
-smeltung is fine with yellow inserters

adding actual "smart" logic might be more harmful than the behaviour now
now everything is predictable

nafira
Fast Inserter
Fast Inserter
Posts: 107
Joined: Fri Mar 16, 2018 12:20 pm
Contact:

Re: Inserters behavior modification

Post by nafira »

JimBarracus wrote:
Mon Jan 28, 2019 10:04 am
long post, short answers:

-belt balancers => That's kinda of the whole point : a 40items per second lane need 3 splitter and 4 stack inserters to empty it after smelting
-feed the copper wires directly => didn't understand your sentence, can you rephrase please ?
-smeltung is fine with yellow inserters =>Doing with blue, and it's fine to empty it with 12 smelters under +20% production modules

adding actual "smart" logic might be more harmful than the behaviour now
now everything is predictable
I'm still discovering many things about logic gates and how it works fully. What do you propose ? Is there something I missed ?

@leadraven : blue belt, outputing to electric smelters with blue inserters as you said (3 items), and then my "nearly" full output blue belt with "actually" 2 stack inserters on a splitter (only one right now).
My main problem is not that a lane is empty and the other not, its that inserters only pick on one side, and if the segment is empty on this side, it start to check the other, instead of taking left-right-left-rightleft-right-etc. (up to 12 items)


PS : long post for not a big problem, was a bit obsessed by that all night ^^, so it was messy .... I should revamp it and make screenshot.

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

Re: Inserters behavior modification

Post by JimBarracus »

Image
belt balancer
it also works reverse, the inserters take from one side but the items before the splitter flow from both sides of the belt

I barely use logic for such things
the natural limits are reached quickly
maxing it out to the last bit is more difficult than just making the next production block

feed the copper wires directly
I was reffering to the current yellow science production
you need so much of them, handling it with belt is difficult
placing one copper wire assembler for every yellow science assembler is way easier
without massive speed bonus one copper wire assembler can feed two science assemblers

User avatar
leadraven
Filter Inserter
Filter Inserter
Posts: 354
Joined: Fri Jan 18, 2019 7:23 pm
Contact:

Re: Inserters behavior modification

Post by leadraven »

nafira wrote:
Tue Jan 29, 2019 10:56 pm
@leadraven : blue belt, outputing to electric smelters with blue inserters as you said (3 items), and then my "nearly" full output blue belt with "actually" 2 stack inserters on a splitter (only one right now).
My main problem is not that a lane is empty and the other not, its that inserters only pick on one side, and if the segment is empty on this side, it start to check the other, instead of taking left-right-left-rightleft-right-etc. (up to 12 items)
Build furnaces on both sides of a belt, so they take items evenly.
Or build enough furnaces to empty entire belt, and it will not matter that they empty one lane first, other lane later.
P.S. Lane balancing is a major problem for me too. So I have to learn tricks. But I'm not sure this problem has a universal solution except using "underground exploit".
JimBarracus wrote:
Wed Jan 30, 2019 6:06 am
belt balancer
it also works reverse, the inserters take from one side but the items before the splitter flow from both sides of the belt
Wrong. It does not balance lanes if belt is queued up and only 1 lane gets consumed.

nafira
Fast Inserter
Fast Inserter
Posts: 107
Joined: Fri Mar 16, 2018 12:20 pm
Contact:

Re: Inserters behavior modification

Post by nafira »

leadraven wrote:
Wed Jan 30, 2019 6:50 am
nafira wrote:
Tue Jan 29, 2019 10:56 pm
@leadraven : blue belt, outputing to electric smelters with blue inserters as you said (3 items), and then my "nearly" full output blue belt with "actually" 2 stack inserters on a splitter (only one right now).
My main problem is not that a lane is empty and the other not, its that inserters only pick on one side, and if the segment is empty on this side, it start to check the other, instead of taking left-right-left-rightleft-right-etc. (up to 12 items)
Build furnaces on both sides of a belt, so they take items evenly. => Its kinda of basics, I got that 400h ago. No offense :)
Or build enough furnaces to empty entire belt, and it will not matter that they empty one lane first, other lane later. => I think you didn't get the point
P.S. Lane balancing is a major problem for me too. So I have to learn tricks. But I'm not sure this problem has a universal solution except using "underground exploit".
JimBarracus wrote:
Wed Jan 30, 2019 6:06 am
belt balancer
it also works reverse, the inserters take from one side but the items before the splitter flow from both sides of the belt
Wrong. It does not balance lanes if belt is queued up and only 1 lane gets consumed. => Finally, my point is mentioned : one side only is taken by inserters
Better explanation here :
Image

See how my left side is crowded with plates and not the other ?
I could belt balance, and it's pretty much everywhere in my map, but it's not the final problem. In the end, the inserter will only take 1 side, ignoring the other. It's like having a 20 items/s belt.

And look at the left side of the screen : around 300 item smelted while the smelter on the other side is around 8k... Just because the deposit lane is crowded.


Math explanation :
Item advance at 20 item/s on each side of the lane, which make it 40 item/s for both sides, and it's how we know it.
Since an inserter (whatever inserter used) is taking only one side, these are the number with blue belt :

With 1 inserter : 0 items taken on left, 12 on right in 0.6 sec
With 2 inserters and a splitter : 4 items taken on left, and 8 on right (now empty) =>16 items are remaining on left side
  • Then Choice 1 : with 3 inserters, a splitter and and balancing system : (after the previous stage) 4 taken on the left (4 remaining), 8 on right (now empty)
    And Choice 2 : with 4 inserters, a splitter and and balancing system + another splitter : 4 taken on left, 4 on right. 4 unused, and belt empty.
Third and easier choice rigth now : 3 splitter to divide in 4 lanes outputting 5 items each side, then you need 4 inserters ; end of story.

But don't you think it needs such a brutal outcome (3 splitters and 4 stack inserters) to empty a lane safely ?
All of that for smelting a full blue lane ? And my factory is a small one.

First thing first, the way inserter pick should change IMO, but infinite science pack is not a luxury, or else you go with bots....before driving crazy with belts.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Inserters behavior modification

Post by Zavian »

Actually the root cause of your problems looks like not enough inserters to pick up the 22.2 items per second your smelter is producing. So the inserters spend most of the time picking up from their preferred lane, and not enough picking up from the non-preferred lane. Even if the game's mechanics were changed as per your suggestion, 2 inserters still could not pick up enough items per second to handle that smelters output (unless the the change in mechanics also resulted in an increase in belt to chest inserter throughput). If the smelters ever fill their output slots, then 2 inserters per belt won't be able to pick up the 40 items per second the belts can supply.
nafira wrote:
Wed Jan 30, 2019 3:59 pm

Better explanation here :
Image

See how my left side is crowded with plates and not the other ?
I could belt balance, and it's pretty much everywhere in my map, but it's not the final problem. In the end, the inserter will only take 1 side, ignoring the other. It's like having a 20 items/s belt.
As already stated in this thread, although inserters pickup from a preferred side, they will take from the non-preferred side if the preferred side is empty. If you care about balanced loading, you can easily design inherently balanced loading stations. eg
balanced loading station.png
balanced loading station.png (976.83 KiB) Viewed 2232 times
(The smelter you showed above looks like another inherently balanced design. It has the same number of inserters grabbing from each side of the belt. Also note that picking up from the end of a belt, like in your train station design above, or from a belt oriented in the same direction as the inserter, the inserter always prefers the left hand side of the belt, so your loading station design is going to be difficult to make inherently balanced).

Even if you don't bother with balanced designs, if you have enough inserters picking up, they will empty both sides of the belt. eg
unbalanced loading station.png
unbalanced loading station.png (501.36 KiB) Viewed 2232 times
To pickup a full blue belt, you actually need 5 stack inserters. So your 22.2 plates per second per belt smelter needs 3 stack inserters per belt. Eg see the unbalanced loading station above, which is pictured with 3 stack inserters doing 20 items per second. (Those 3 stack inserter can do around 24 items per second).

nafira wrote:
Wed Jan 30, 2019 3:59 pm

Math explanation :
Item advance at 20 item/s on each side of the lane, which make it 40 item/s for both sides, and it's how we know it.
Since an inserter (whatever inserter used) is taking only one side, these are the number with blue belt :

With 1 inserter : 0 items taken on left, 12 on right in 0.6 sec
With 2 inserters and a splitter : 4 items taken on left, and 8 on right (now empty) =>16 items are remaining on left side
  • Then Choice 1 : with 3 inserters, a splitter and and balancing system : (after the previous stage) 4 taken on the left (4 remaining), 8 on right (now empty)
    And Choice 2 : with 4 inserters, a splitter and and balancing system + another splitter : 4 taken on left, 4 on right. 4 unused, and belt empty.
Third and easier choice rigth now : 3 splitter to divide in 4 lanes outputting 5 items each side, then you need 4 inserters ; end of story.

But don't you think it needs such a brutal outcome (3 splitters and 4 stack inserters) to empty a lane safely ?
All of that for smelting a full blue lane ? And my factory is a small one.
Your math ignores inserter swing time, and the time it takes an inserter to change lanes. It ignores the fact that the inserters preferred lane isn't full. It ignores the splitter in your design, which sends half the plates of the prefered lane (on average) to a different inserter, meaning that each belt is only partially full, with an item every 6 ticks on average for the inserters preferred lane. (An overly simplistic estimate of the effect of the splitter takes the time it takes to pick up 12 items from that lane 1.2 seconds, rather than the 0.6 seconds your quoted above. That is overly simplistic, but the point is the splitter changes the average spacing between plates and hence changes the 0.6 seconds you claimed above).

You don't need lane balancing or even any splitters for a train loading station. (Although you might want a belt balancer to make sure that every wagon gets the same number of plates on average. More relevant for ore loading stations than for your smelter above). eg
1 belt load.png
1 belt load.png (510.78 KiB) Viewed 2231 times
Typically unbalanced lanes only cause actual problems when merging belts, or when blocking lanes with underground belts. In your case your actual issue is not enough inserters to pick up 22.2 items per second.


Edit: I made a mistake in the math of an earlier version of this post. (I forgot to include the extra production from the productivity modules, and said that the smelter output was 18.5 plates per second. i've now fixed the post above). However that doesn't change the basic premise of what I posted. That smelter design needs 3 inserters per belt.

nafira
Fast Inserter
Fast Inserter
Posts: 107
Joined: Fri Mar 16, 2018 12:20 pm
Contact:

Re: Inserters behavior modification

Post by nafira »

Zavian wrote:
Thu Jan 31, 2019 8:35 am
Actually the root cause of your problems looks like not enough inserters to pick up the 22.2 items per second your smelter is producing. So the inserters spend most of the time picking up from their preferred lane, and not enough picking up from the non-preferred lane. Even if the game's mechanics were changed as per your suggestion, 2 inserters still could not pick up enough items per second to handle that smelters output (unless the the change in mechanics also resulted in an increase in belt to chest inserter throughput). If the smelters ever fill their output slots, then 2 inserters per belt won't be able to pick up the 40 items per second the belts can supply.
nafira wrote:
Wed Jan 30, 2019 3:59 pm

Better explanation here :
Image

See how my left side is crowded with plates and not the other ?
I could belt balance, and it's pretty much everywhere in my map, but it's not the final problem. In the end, the inserter will only take 1 side, ignoring the other. It's like having a 20 items/s belt.
As already stated in this thread, although inserters pickup from a preferred side, they will take from the non-preferred side if the preferred side is empty. If you care about balanced loading, you can easily design inherently balanced loading stations. eg balanced loading station.png

(The smelter you showed above looks like another inherently balanced design. It has the same number of inserters grabbing from each side of the belt. Also note that picking up from the end of a belt, like in your train station design above, or from a belt oriented in the same direction as the inserter, the inserter always prefers the left hand side of the belt, so your loading station design is going to be difficult to make inherently balanced).

Even if you don't bother with balanced designs, if you have enough inserters picking up, they will empty both sides of the belt. egunbalanced loading station.png

To pickup a full blue belt, you actually need 5 stack inserters. So your 22.2 plates per second per belt smelter needs 3 stack inserters per belt. Eg see the unbalanced loading station above, which is pictured with 3 stack inserters doing 20 items per second. (Those 3 stack inserter can do around 24 items per second).

nafira wrote:
Wed Jan 30, 2019 3:59 pm

Math explanation :
Item advance at 20 item/s on each side of the lane, which make it 40 item/s for both sides, and it's how we know it.
Since an inserter (whatever inserter used) is taking only one side, these are the number with blue belt :

With 1 inserter : 0 items taken on left, 12 on right in 0.6 sec
With 2 inserters and a splitter : 4 items taken on left, and 8 on right (now empty) =>16 items are remaining on left side
  • Then Choice 1 : with 3 inserters, a splitter and and balancing system : (after the previous stage) 4 taken on the left (4 remaining), 8 on right (now empty)
    And Choice 2 : with 4 inserters, a splitter and and balancing system + another splitter : 4 taken on left, 4 on right. 4 unused, and belt empty.
Third and easier choice rigth now : 3 splitter to divide in 4 lanes outputting 5 items each side, then you need 4 inserters ; end of story.

But don't you think it needs such a brutal outcome (3 splitters and 4 stack inserters) to empty a lane safely ?
All of that for smelting a full blue lane ? And my factory is a small one.
Your math ignores inserter swing time, and the time it takes an inserter to change lanes. It ignores the fact that the inserters preferred lane isn't full. It ignores the splitter in your design, which sends half the plates of the prefered lane (on average) to a different inserter, meaning that each belt is only partially full, with an item every 6 ticks on average for the inserters preferred lane. (An overly simplistic estimate of the effect of the splitter takes the time it takes to pick up 12 items from that lane 1.2 seconds, rather than the 0.6 seconds your quoted above. That is overly simplistic, but the point is the splitter changes the average spacing between plates and hence changes the 0.6 seconds you claimed above).

You don't need lane balancing or even any splitters for a train loading station. (Although you might want a belt balancer to make sure that every wagon gets the same number of plates on average. More relevant for ore loading stations than for your smelter above). eg 1 belt load.png

Typically unbalanced lanes only cause actual problems when merging belts, or when blocking lanes with underground belts. In your case your actual issue is not enough inserters to pick up 22.2 items per second.


Edit: I made a mistake in the math of an earlier version of this post. (I forgot to include the extra production from the productivity modules, and said that the smelter output was 18.5 plates per second. i've now fixed the post above). However that doesn't change the basic premise of what I posted. That smelter design needs 3 inserters per belt.
Thank you for your very complete contribution !

I know and use these kind of balancing with belts, which I use in nearly every mining station.
Thanks for the math correction, I didn't found any number about that splitting time, it adds a lot if you goes through 2 splitters, but it's not a problem no ? It only create a gap of 6 ticks per splitter but doesn't go against the "equal repartition" thing ?

Here is why I'm asking it :
In your picture you show picking lanes. The problem is : the first arm gets maximum amount while the last is often empty. It's not problematic when you just want to fill a wagon.
But if you want to fill a wagon the fastest way possible (12 stack inserters), you'll need equally shared amount between chests, and not the 2 first chests to load it.

I've created an unloading blueprint to empty the wagon of 144 items every 58 ticks per wagon, so around 13.5 seconds to empty a wagon of 500 stack items.
I wanted to created the same thing but halved (not 12 stack inserters per wagon but only 6) to load a train of 2 wagons.
Going wagon=>chest=>lane=>chest is not a problem.
Going lane=>chest=>wagon is another peace of cake. The chest between is just here to buffer and gain a bit of time, I'm not learning you anything :D

Anyway, i think only infinite science could solve that bottleneck... So sad.

I may want an answer about the "equal repartition" thing, but this thread can be closed either way. I don't think devs are going to put infinite science to inserters. In custom maps, it would be overpowered and causing problems at a certain point.


Thanks for participating to you all.

My only care is equal sharing and total emptying of the lane.
In the end, shifting by 12 ticks (2 splitters), is just a matter of when plates arrives no ? Tell me I didn't missed something.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Inserters behavior modification

Post by Zavian »

nafira wrote:
Thu Jan 31, 2019 6:35 pm
Thanks for the math correction, I didn't found any number about that splitting time, it adds a lot if you goes through 2 splitters, but it's not a problem no ? It only create a gap of 6 ticks per splitter but doesn't go against the "equal repartition" thing ?
Consider a simple case of a blue belt with one full lane of plates arriving at an inserter. The inserter takes roughly 12 tick to swing from the chest to the belt, then roughly 36 ticks to pick up 12 plates. It then takes roughly 12 ticks to swing back to the chest, and drop the plates. Approximate cycle time of 60 ticks for 12 plates, or around 2 plates per second.

Now add a splitter at the end of the belt, and a second inserter. The exact result depends on the relative timing between the inserters, but consider the scenario where both inserters start swinging at the same time (eg when the output chests start full, and then a train arrives). So both inserters grab plate 1 at roughly tick 15 as above, and plate 2 at roughly tick 18. (I think the splitter has 2 plates "stockpiled" per output). Also on tick 18 the splitter sends a plate to the first inserter, which picks it up on tick 21 (the first inserter now has 3 plates). On tick 24 the second inserter picks up plate 3. The splitter is now sending a plate to alternating outputs every 3 ticks, so each inserter gets a plate every 6 ticks. So on tick 75 the first inserter gets plate 12 and starts swinging back to the chest. On tick 78 the second inserter gets plate 12 and starts swinging back to the chest. On roughly tick 87 the first inserter reaches the chest, and the second inserter at tick 90. Also at roughly this time the splitter has filled both output slots, so it stalls, and so does the belt that is feeding it. That cycle time was roughly 87 ticks. Since the 2 inserters are now out of sync, that particular probably won't repeat until the next time the output chest fills up.

Another scenario with the inserters further out of sync is the first inserter grabs 4 plates in roughly 12 ticks, whilst the second inserter swings from the chest to start picking up plates. The second inserter grabs a plate, and now the splitter starts alternating sending a plate to either output every 3 ticks. So at tick 15 the first inserter gets plate 5 (and the second inserter grabs plate 2), at tick 18 the second inserter gets plate 3, at tick 21 first inserter gets plate 6 .... at tick 57 the first inserter gets plate 12, and starts swinging to the chest, and at tick 60 the second inserter gets plate 10, at tick 63 a plate arrives at the splitter output ready to be picked up by the first inserter. At tick 66 the second inserter gets plate 11, and plate 12 at tick 72. The first inserter finishes it's swing to the chest, at roughly tick 69, and arrives back to the splitter ready to start picking up plates at roughly tick 81. (Approximate cycle time of 81 ticks). If we use 80 ticks as a average then that is 24 pates in 1.333 seconds, or 18 plates per second. (I don't know what the actual throughput is, and building a setup to measure it is more hassle than I can be bothered with atm. It is also probably dependent on the initial starting conditions/inserter timings).

Now the above is filled with lots of roughly and approximately, since it ignores things like the inserter arm extensions as the inserter chases items, and the actual timings are very complicated, such that they should be measured rather than calculated. For example just look the the following image from the wiki to see how even minor changes to the geometry of the pickup location affect cycle times (https://wiki.factorio.com/Inserters#Inserter_Throughput)
Image
It is also simpler than your case, since I constrained it to just a single fully compressed lane, to avoid considering the inserters changing lanes.

So whilst adding a splitter and a second inserter does improve throughput or one inserter, it won't double it. If you really want to do that, then you should add 3-4 belt segments after the splitter that can buffer items whilst the inserters are swinging, and allow the inserters to pick up items every 3 ticks, and also prevent the splitter from stalling. Doing that to your loading station I can get 2 inserters to cope with 22.2 items per second. (Actual max throughput is probably around 24 items per second. You could probably improve that slightly by using underground belts as per the wiki image above).
22.2itemspersec.png
22.2itemspersec.png (339.48 KiB) Viewed 2148 times
nafira wrote:
Thu Jan 31, 2019 6:35 pm
In your picture you show picking lanes. The problem is : the first arm gets maximum amount while the last is often empty. It's not problematic when you just want to fill a wagon.
But if you want to fill a wagon the fastest way possible (12 stack inserters), you'll need equally shared amount between chests, and not the 2 first chests to load it.
For me a design is only rarely about doing something in the fastest possible way. I'm much more likely to say "I need a loading station design that copes with xxx items per second". In addition, I prefer simple and elegant designs. If you really want max throughput loading stations, then you need to either use bots to feed the loading chests, or at least 2 stack inserters picking up from belts per loading chest giving something like
ugly.png
ugly.png (733.15 KiB) Viewed 2148 times
Note that 2 stack inserters can't quite match the chest to chest throughput of stack inserters loading the actual train, but since the train will be full fairly quickly, those stack inserters will be idle part of the time, so 2 stack inserters picking up from belts is probably enough. Also I think that design is ugly. I would prefer to use a dual station design, and have multiple loading stations. eg.
dual load.jpg
dual load.jpg (1.55 MiB) Viewed 2148 times
Those stations are loading 618 plates per second, and such a design can be scaled to at least 4 stations.

Post Reply

Return to “Ideas and Suggestions”