Page 1 of 2

[0.17.66] - Inserter preferring incorrect lane

Posted: Mon Aug 26, 2019 4:28 am
by foamy
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:

Image

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

Posted: Mon Aug 26, 2019 12:03 pm
by foamy
Twinsen wrote: Mon Aug 26, 2019 11:57 am
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:

Image

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:

Image

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
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)
:
  1. Outer/near/left lane
  2. Near lane
  3. Inner/right/far lane
  4. Near lane
  5. Left/inner/far lane
  6. Near/right/outer
  7. Left lane
  8. Right
Terms
  • Near - lane nearest inserter
  • Far - lane away from inserter
  • Inner - lane on inner curve
  • Outer - lane on outer curve
  • Left - lane on left from inserter's perspective
  • Right - lane on right from inserter's perspective
Green wire just to synchronize to full belt.

Edit: Added this:

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:
  1. Left
  2. Near
  3. Left
  4. Near
  5. Left
  6. Left
  7. Left
  8. 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.
https://wiki.factorio.com/Inserters#Inserters_and_transport_belts wrote: If the belt is the same/opposite orientation of the inserter or a curve, the inserter prefers taking from the left lane, from the belt's perspective.
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

Posted: Tue Sep 03, 2019 5:38 pm
by foamy
Twinsen wrote: Mon Sep 02, 2019 8:54 am
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).