Page 1 of 1
Items getting stuck in station inserters.
Posted: Mon Sep 10, 2018 2:23 pm
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.
Re: Items getting stuck in station inserters.
Posted: Mon Sep 10, 2018 3:00 pm
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.
Re: Items getting stuck in station inserters.
Posted: Mon Sep 10, 2018 3:30 pm
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.
Re: Items getting stuck in station inserters.
Posted: Mon Sep 10, 2018 6:10 pm
by Optera
Converting signals can be done like this:
- 2018-09-10-20-01-57-8882939.png (310.85 KiB) Viewed 4663 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).
Re: Items getting stuck in station inserters.
Posted: Wed Sep 19, 2018 4:17 pm
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.
Re: Items getting stuck in station inserters.
Posted: Wed Sep 19, 2018 5:26 pm
by Optera
The combinator above is all you need to add to the stations blueprints i posted in the design thread.
Re: Items getting stuck in station inserters.
Posted: Wed Sep 19, 2018 6:46 pm
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.
Re: Items getting stuck in station inserters.
Posted: Wed Sep 19, 2018 6:58 pm
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
Re: Items getting stuck in station inserters.
Posted: Thu Sep 20, 2018 1:36 pm
by xfir01
Ok, that makes more sense. Thanks!
Re: Items getting stuck in station inserters.
Posted: Thu Sep 20, 2018 2:51 pm
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.
Re: Items getting stuck in station inserters.
Posted: Thu Sep 20, 2018 2:54 pm
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.
Re: Items getting stuck in station inserters.
Posted: Mon Jan 28, 2019 6:54 pm
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.