Items getting stuck in station inserters.

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Bushdoctor
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Feb 21, 2016 6:33 pm
Contact:

Items getting stuck in station inserters.

Post by Bushdoctor »

Good day,

I'm playing a game with LTN and Bob-mods and have set my LTN stations to 1 locked slot per wagon to prevent items getting stuck in the inserters. This worked well for the vanilla train, but now that I've switched to MK2 locomotives and wagons, it no longer seems to work.

I have messed with the Encoded Positions of trains, trying to tell the combinator I've got a MK2 locomotive at position 1, and MK2 wagons at positions 2 and 3, but that didn't work. I seems this needs binary encoding? If I manage to get that done, would it solve my problem?

Thank you.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Items getting stuck in station inserters.

Post by Optera »

My designs work by using the virtual signals encoded position of vanilla locomotive/wagons.
To get them to work with modded carriages simply use an arithmetic combinator to convert signals. e.g. for bobs you can do Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
Bushdoctor
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Feb 21, 2016 6:33 pm
Contact:

Re: Items getting stuck in station inserters.

Post by Bushdoctor »

Optera wrote:My designs work by using the virtual signals encoded position of vanilla locomotive/wagons.
To get them to work with modded carriages simply use an arithmetic combinator to convert signals. e.g. for bobs you can do Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
Thank you for your reply. I think I understand what you explained, but my problem is that I have no idea how to do that with arithmetic combinators. Is there a page you can refer me to?
Also, those encoded positions you mention, are those in binary? Because reading the help-topic on that was like trying to read Aramaic.

Thank you.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Items getting stuck in station inserters.

Post by Optera »

Converting signals can be done like this:
2018-09-10-20-01-57-8882939.png
2018-09-10-20-01-57-8882939.png (310.85 KiB) Viewed 4662 times
Attaching the combinator like that will feed the converted signal right back into circuit the decoder combinator is attached to in my blueprints. (the one doing each * encoded positon = each).
Bushdoctor
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Feb 21, 2016 6:33 pm
Contact:

Re: Items getting stuck in station inserters.

Post by Bushdoctor »

Thank you for posting that image.
I have connected the Arithmetic combinator as shown, but obviously I'm still missing something.
Did I understand you correctly in that there's another part to this solution that is not shown in your image?
Being the part where you mention the setting 'each * encoded position = each' ?
Do I have to add an encoder with that setting for each type of wagon?

I really wish this stuff wouldn't be so complicated for the average gamer.
Some kind of blueprint book with ready-to-go solutions would be great.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Items getting stuck in station inserters.

Post by Optera »

The combinator above is all you need to add to the stations blueprints i posted in the design thread.
xfir01
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Feb 10, 2017 5:08 pm
Contact:

Re: Items getting stuck in station inserters.

Post by xfir01 »

Encoded position Wagon Mk1 + Encoded Position Wagon Mk2 = Encoded Position of vanilla wagon.
Similarly use another arithmetic with Mk3+ Mk4 = vanilla and all 5 will work.
I guess I'm confused as well. Can you go into more detail about what this is actually doing? Is it a bitwise AND operation on encoded position wagon? And it's wired up to itself and the output on the LTN station?

I've got it set up and working on my stations, but I have no idea why.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Items getting stuck in station inserters.

Post by Optera »

wagon mk1 + 0 = wagon stores the input wagon mk1 in a different variable wagon.
Since all we care for where any kind of cargo wagon is positioned that'd be wagon + wagon mk 1 + wagon mk2 + ...
Insert above and you get what this combinator does for 2 signals at once wagon + (wagon mk1 + wagon mk2) + .... = wagon
xfir01
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Feb 10, 2017 5:08 pm
Contact:

Re: Items getting stuck in station inserters.

Post by xfir01 »

Ok, that makes more sense. Thanks!
mrvn
Smart Inserter
Smart Inserter
Posts: 5885
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Items getting stuck in station inserters.

Post by mrvn »

I believe you can't mix wagon types in trains and expect the reserved slots to work. Here is why:

Say you have a train with a locomotive, a wagon mk1 and wagon mk2. The station has 1 reserved slot. So the first wagon can fit 1950 coal and the second wagon can fit 4950 coal for a total of 5900 coal. So the train arrives and the inserters will input 2000 coal into both wagons for a total of 4000 before the first inserters get stuck with items in hand. The inserters for the second wagon then cotinue till 5900 coal are loaded and don't get stuck.

You would have to change the number or speed of inserters or the stack size override so they load the wagons in the same ratio as their sizes are. You could even do that dynamically depending on the train composition signal but that would be huge job.

Note: Train composition is an output only. You can't tell LTN that the station can only cope with wagon mk1. Something I miss too.
mrvn
Smart Inserter
Smart Inserter
Posts: 5885
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Items getting stuck in station inserters.

Post by mrvn »

Optera wrote: Wed Sep 19, 2018 6:58 pm wagon mk1 + 0 = wagon stores the input wagon mk1 in a different variable wagon.
Since all we care for where any kind of cargo wagon is positioned that'd be wagon + wagon mk 1 + wagon mk2 + ...
Insert above and you get what this combinator does for 2 signals at once wagon + (wagon mk1 + wagon mk2) + .... = wagon
Note hat since there can only one wagon at any one position the "+" is the same a "logical or". It simply combines the bitmasks of all wagons to a bitmask showing where any kind of wagon is.
Bushdoctor
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Feb 21, 2016 6:33 pm
Contact:

Re: Items getting stuck in station inserters.

Post by Bushdoctor »

Optera,

A short while ago I finally figured out why your help and examples did not work for me!
The problem, as it turned out, was that my inserters were upgraded to a point where they dumped so much in one move,
that the single locked slot in the wagon no longer did the trick. As soon as I switched to locking 2 slots, everything worked as it should.
(Which was a pretty huge moment actually, considering I was playing that map for weeks at that point)

So, again I'd like to thank you for explaining this, and basically just wanted to let you know that it worked out after all. :D
Post Reply

Return to “Logistic Train Network”