I was messing about trying out train station layouts and I noticed something: In a basic splitter -> 2x 3-tile runout layout, one inserter pulls from the wrong lane; the result is that the draw is not lane-balanced. This doesn't match the documented behaviour on the wiki.
Here's a screenshot:
The inserter drawing from the highlighted tile is preferring to draw from the far lane, not the near one. This is asymmetric with the inserter directly below it, which correctly, on the mirrored curve, pulls from the outside lane. As a result there are four inserters pulling from the left lanes of the input belt, and only two from the right. Wiki suggests the inserters should be pulling from the near lane, which would result in balanced draw.
This behaviour is consistent across inserter types and capacities. Tested were normal inserters at stack size 1 and stack size 3, fast inserters at 3, and stack inserters at 12. In all cases the belt was saturated at the point in question.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 5:43 am
by Optera
Is it consistent between rotations or once again a case where a certain orientation behaves differently?
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 9:20 am
by Twinsen
Didn't it always work this way? Or is this something introduced in 0.17?
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 9:41 am
by Bilka
Twinsen wrote: ↑Mon Aug 26, 2019 9:20 am
Didn't it always work this way? Or is this something introduced in 0.17?
It has always worked that way.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 9:45 am
by posila
Afaik, inserters put items on far side of a belt, and how they take items is undefined, so even if it would have worked differently in 0.16 and the behavior changed in 0.17, it wouldn't have been a bug.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 11:23 am
by Twinsen
As long as it's consistent between blueprint rotations it's fine.
Even though I would prefer to fix this as the inconsistent behavior can be quite unintuitive, I'm marking it as minor issue
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 11:52 am
by foamy
Twinsen wrote: ↑Mon Aug 26, 2019 11:23 am
As long as it's consistent between blueprint rotations it's fine.
According to Bilka's test run it is *not* consistent between rotations, though.
EDIT: Wait, where'd their post go...
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 11:57 am
by Twinsen
foamy wrote: ↑Mon Aug 26, 2019 11:52 am
According to Blika's test run it is *not* consistent between rotations, though.
EDIT: Wait, where'd their post go...
They were not rotated correctly in that example(belts were not going the same way).
We just tested and they are rotationally consistent as far as blueprints are concerned.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Aug 26, 2019 12:01 pm
by Bilka
Sorry for causing confusion by deleting the posts, I didn't want to spread misinformation because I had somehow managed to set up 4 belts and inserters incorrectly. I have made the wiki more clear in regards to the lane preference:
If a belt is in the same orientation as the inserter, or a curve going towards the inserter and turning to a side, the inserter prefers taking from the left lane, from the belt's perspective.
Re: [0.17.66] - Inserter preferring incorrect lane
foamy wrote: ↑Mon Aug 26, 2019 11:52 am
According to Blika's test run it is *not* consistent between rotations, though.
EDIT: Wait, where'd their post go...
They were not rotated correctly in that example(belts were not going the same way).
We just tested and they are rotationally consistent as far as blueprints are concerned.
Ah. Yeah, just did the rotation test myself and it does, for the left-hand-turn, pick from the inside of the curve instead of the outside consistently regardless of rotation.
EDIT:
I can't speak for anyone else but the difference between the mirrored versions of the blueprint is unexpected behaviour even if not, strictly speaking, a bug. It also unbalances some very common and simple layouts (e.g. the train station stuff that I was looking at to start with) and doesn't match well with the output actions, which do both always put it on the far side. So you get this, starting from even seeding of both belts:
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Tue Aug 27, 2019 7:01 am
by foamy
Followup: I tested the other case of curves moving away from the inserter; they behave as expected and prefer to draw from the near lanes:
So, the counter-clockwise turn, moving items towards the inserter, is the odd man out here and the only one where the inserter prefers removing items from the far lane.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Fri Aug 30, 2019 11:08 pm
by foamy
2nd followup:
Which lane the inserters pull from can be influenced by construction order. Since this is now inconsistent behaviour I think I'm safe in saying it is not only unintended, but a genuine bug.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 8:54 am
by Twinsen
foamy wrote: ↑Fri Aug 30, 2019 11:08 pm
Which lane the inserters pull from can be influenced by construction order. Since this is now inconsistent behaviour I think I'm safe in saying it is not only unintended, but a genuine bug.
Ugh.
Can you make a detailed report about it? We might still consider it a minor issue but if i have some detailed steps i'll take a look at it.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 5:54 pm
by Trebor
Screen Shot 2019-09-02 at 1.15.44 PM.png (1.91 MiB) Viewed 5338 times
The following lists which lane the insert picks from listed from left to right. (Note the first term is what
I think the inserter is using):
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 6:24 pm
by Bilka
Left lane of belt is used for all curves (from the belt's perspective). Near lane is used for 2 and 4, the straight belts. Both of those are completely expected. Inserters 7 and 8 have belts going towards them, so they use the left lane of the belt (from the belt's perspective). All expected. All documented on the wiki.
Here's your list in my words:
Left
Near
Left
Near
Left
Left
Left
Left
Terms
Near - lane nearest inserter
Left - lane on left from belt's perspective
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 7:58 pm
by Trebor
Bilka wrote: ↑Mon Sep 02, 2019 6:24 pm
... Inserters 7 and 8 have belts going towards them ...
Inserter 7’s belt is going north, inserter 8’s belt is going south how is that towards?
Also 3 & 5 have different items in the left lane.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 8:02 pm
by Bilka
I just forgot to add "away".
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 8:09 pm
by Trebor
The Wiki states left from the Inserters perspective. The pic attempts to have its left the same as the inserter’s left. Never mind, read Wiki wrong/mis remembered.
Re: [0.17.66] - Inserter preferring incorrect lane
Posted: Mon Sep 02, 2019 8:12 pm
by Bilka
Trebor wrote: ↑Mon Sep 02, 2019 8:09 pm
The Wiki states left from the Inserters perspective. The pic attempts to have its left the same as the inserter’s left.
All inserters prefer to take from the left belt lane (from the belt perspective) except those picking up from perpendicular belts. It's really that easy.
Re: [0.17.66] - Inserter preferring incorrect lane
foamy wrote: ↑Fri Aug 30, 2019 11:08 pm
Which lane the inserters pull from can be influenced by construction order. Since this is now inconsistent behaviour I think I'm safe in saying it is not only unintended, but a genuine bug.
Ugh.
Can you make a detailed report about it? We might still consider it a minor issue but if i have some detailed steps i'll take a look at it.
I haven't been able to consistently isolate and reproduce it yet -- but I do have a save where a counter-clockwise turning belt, with the inserter on the outside of the loop, was preferentially pulling from the outside lane of the belt, i.e. the right hand lane from the belt's perspective. I'll throw it into a dropbox link later today for you to look at. Rebuilding precisely the same arrangement can switch it back to left-hand draw, and I've gotten it to pull from the both the left and right hand in other, distinct arrangements, that depend (somehow) on how they are constructed.
Per @Bilka the right hand draw is not intended. Personally I think orientation *to the inserter* should govern things, i.e. to prefer the near lane to the inserter in all cases bar the head-on (where it can't be determined).