0.13 Smart supply-train loader + other solutions

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

MindChanger wrote:
Case wrote:
MindChanger wrote:Will check it now and edit this post after tests :P\

I put in blue chest 100 rails and belt got stuck, when I put more rails (or something, don't remember) inserters were working all the time
lemme check if I messed up the blueprint...

nevermind! I know what happened. I put single item type and belt got stuck because of not working inserter. 2nd bug could happen because of 1 item type.

I got 0.13.4 and full tech
they added another item to the stack inserters in 0.13.6, hence the 13 in the decider you may have to adjust the 13 to 12 I guess (haven't tested it though)

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

MindChanger wrote:It is going in loop if you put for example 99 silver plates and got some silvver plates in blue chest
yes this is what I meant with the roboport example .. its because the blue chest gets constantly new items but not in a complete full stack so the system toggles its state constantly and can not terminate .. can you test that it works when you have enough items in the chest? I guess double the size you needed should be ok. And like I said it should not get stacked it just goes in a loop.

Edit: Test
1) filter in wagon 1 stack rails and 1 stack iron-plates rest of the wagon closed
2) 99 iron-plates in wagon
3) 200 rails and 5 iron plates in blue chest
4) move locomotive in position
5) after some iterations the system stops with full wagon and no stacked item in the inserter .. success?
Last edited by Case on Sat Jul 09, 2016 1:03 pm, edited 1 time in total.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

106 in the chest while loading and 99 in wagon, it just goes loops and is blocking inserting other item types

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

MindChanger wrote:106 in the chest while loading and 99 in wagon, it just goes loops and is blocking inserting other item types
Can you describe your full test setup? So far all tests on my side passed :( .. must be something I oversee .. or it is the 12 items ratios from the 0.13.4 version that tracks the system .. I check this out as well

Edit: tested it with 106 chest and 99 wagon and it worked here :( nothing got stacked and I could also add iron plates and they got loaded .. I check the 12 item stack size it must have something to do with this I suppose.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

Wagon:
100 rails
93 rails
98 iron plates
50 stone
0 robots (filter set)
20 coper plates

Only first slot doesn't have filter.

Chest:
34 robots
42 iron plates

on belts max iron plates possible

And I am talking about working all the time, not stucking. While working some items doesn't want to get loaded

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

MindChanger wrote:Wagon:
100 rails
93 rails
98 iron plates
50 stone
0 robots (filter set)
20 coper plates

Only first slot doesn't have filter.

Chest:
34 robots
42 iron plates

on belts max iron plates possible

And I am talking about working all the time, not stucking. While working some items doesn't want to get loaded
Yes I tested it with 12 items by disabling the new 'stack-inserter' research and it is working how you describe it .. with 13 items it works fine I suppose it has to do with the ratio between 3 and 13 of the different inserters .. well I don't know I could try to find the same ratio for lower tech but I doubt it will work :(

anyway thanks for testing

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

How to disable tech?

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

/c game.player.force.technologies['inserter-capacity-bonus-7'].researched=false

You have to change the name to the research you want to disable

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

Thx, really useful!

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

Hmm .. I have absolutely no idea why it is working with item size 13

I tested all fractions so from 87 to 99 and the system always ends up with 100 items in the wagon and no stacked item. This makes no sense :( if it is common devisor based it should end in a loop for some fractions. If it worked because of some sort of delay it should also work for item size 12 or lower .. I'm hopelessly lost here :(

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

I think it is cuz of difference between inserter's stack size.
Nomal inserters got 3 items and large inserter got 13.
Normal inserters will pick up it for example 4 times and it is 12.
Then Large inserter ends up with 1 item in hand so it can fill the train, always.

So your setup will work in the lastest version very well (but still slower than XKnight's solution I think)

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by Case »

I tested it a bit further for 0.13.6 and the system works for all tech levels beside "inserter-capacity-bonus-3"

The test was with 99 items in the wagon then moving it into the station .. it takes 1-3 iterations to succeed the test so it should be reasonable fast
I have not tested it with other fractions but I guess (hope) it should be ok.

Stack: Normal:
No research: 0 1
Stack-Inserter: 3 1
ICB 1: 4 1
ICB 2: 5 2
ICB 3: 6 2 (not working)
ICB 4: 7 2
ICB 5: 9 2
ICB 6: 11 2
ICB 7: 13 3

If you compare these ratios to <0.13.6 you see a significant difference .. I don't know if the 0.13.6 change was on purpose but it looks like it moved the ratios to a better state (at least for my little thingy here). But I think this could also be applied to smart furnace arrays.

Edit: you have to adjust the number in the decider combinator to the current stack-size of the stack inserters

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

Nice. But I think XKnight's solution is still faster (you can check it out on first page).
Also his solution doesn't require changing constants

I am currently working on dynamic filters, so it could supply one box with 44 item types and tell inserter which item to give. With that I will be able to do really fast solution.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

I got new idea and it will be super fast one (the fastest way possible probably) (not sure about size tho).

I just need fast dynamic filters. I got some dynamic filters created already, but the problem is it's size. XKnight's solution is smaller (if works as I imagine to).

Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Smart supply-train loader

Post by Jupiter »

siggboy wrote:My guess is that he uses inverted flummoxing through bit-reversion in combination with real-multiplexing of virtual signals. Like in the Tetris implementation.
Ehhh, what? Now in english plz :)

BTW, are there any info sources on combinators I'm missing out on? Like a specific thread or wiki page or w/e where I can find info on all those words you used there?
Thnx

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by siggboy »

MindChanger wrote:Nice. But I think XKnight's solution is still faster (you can check it out on first page).
Also his solution doesn't require changing constants
My vote clearly goes to Case's solution right now. It checks basically all boxes: super simple, probably even I can remember how to build it manually after I've done it 10 times; more than fast enough for the purpose; does exactly what it's supposed to do but not more; not "clever" where it's not necessary.

The fact that you have to change constants is only an issue if you want to use it before you have researched full tech. Which doesn't make it worse than any other implementation that requires full tech.

I've just tested it and I love it. Will go into my blueprint book for sure.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart supply-train loader

Post by siggboy »

Jupiter wrote:
siggboy wrote:My guess is that he uses inverted flummoxing through bit-reversion in combination with real-multiplexing of virtual signals. Like in the Tetris implementation.
Ehhh, what? Now in english plz :)

BTW, are there any info sources on combinators I'm missing out on? Like a specific thread or wiki page or w/e where I can find info on all those words you used there?
Thnx
I was joking. The sentence that you quoted makes no sense and I was making fun of the fact that XKnight is renowned for finding staggeringly complex and clever combinator designs.

"To flummox" means "to confuse", and who isn't confused at first when looking at his contraptions?

There's no good reference on combinators. The wiki is basically useless in this area, and there is one thread "combinators 101" with some good info and some really bad (that R/S flip flop is not a good idea, and half of the post deals with it and its limitations).

You basically have to learn by doing and gather the info from various threads. It's not easy, it took me a long time to wrap my head around it.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

Jupiter
Fast Inserter
Fast Inserter
Posts: 174
Joined: Thu Jun 23, 2016 2:38 pm
Contact:

Re: Smart supply-train loader

Post by Jupiter »

siggboy wrote:
Jupiter wrote:
siggboy wrote:My guess is that he uses inverted flummoxing through bit-reversion in combination with real-multiplexing of virtual signals. Like in the Tetris implementation.
Ehhh, what? Now in english plz :)

BTW, are there any info sources on combinators I'm missing out on? Like a specific thread or wiki page or w/e where I can find info on all those words you used there?
Thnx
I was joking. The sentence that you quoted makes no sense and I was making fun of the fact that XKnight is renowned for finding staggeringly complex and clever combinator designs.

"To flummox" means "to confuse", and who isn't confused at first when looking at his contraptions?
Wha ha ha. If only I had known what to flummox is.... :p
Btw, real-multiplexing (as in, multiplexing floating points) sounds like something that could possibly be done. I wonder when that will be useful.
siggboy wrote:There's no good reference on combinators. The wiki is basically useless in this area, and there is one thread "combinators 101" with some good info and some really bad (that R/S flip flop is not a good idea, and half of the post deals with it and its limitations).

You basically have to learn by doing and gather the info from various threads. It's not easy, it took me a long time to wrap my head around it.
Well, in that case I'm on the right track.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by siggboy »

There are two threads titled "Combinator contraptions" (I think one is actually titled "Combinator contriptions" [sic]), with a lot of useful info.

Or simply search for posts made by XKnight, DaveMcW, DrWalrus and the other alpha nerds who actually enjoy this shit and you'll find the relevant threads (it's what I did, anyway).

I've gone to great lengths myself when I described my train scheduler, maybe you can take something from that as well. The design is far from perfect, though, and the design that I have documented is obsolete now.

Then there are quite a few threads showcasing advanced designs, but in many cases the documentation is missing, and reverse engineering contraptions is not a lot of fun. It's not like reading source code and trying to understand it.

I think the key ideas to understand are:
  • Combinators require 1 game tick to calculate a result. So there is a delay of 1 tick from input to output. That's the most important principle to understand.
  • You can make a counter by feeding output back to input.
  • You can make a register by feeding output back to input.
  • Numbers are 32-bit signed integers, and they're basically treated like in C/C++. So it wraps into the negative numbers at (2^31)-1, and (-2^31)-1 equals zero. (Parentheses for clarity.) All sorts of shenanigans are possible by abusing this fact. You need to understand how "2s complement" arithmetic works to make full use of this.
  • Understand exactly how "Each", "Any" and "Everything" works, and the path to Englightenment should be open.
  • Figure out how to efficiently calculate AND, OR and NOT conditions in the various ways. Bitwise AND/OR is not possible in the general case without using several combinators (NOT is easy though, see the point about numbers).
  • There's probably more.
I still feel like a moron almost every minute when I try to design something complicated. I've come to terms with the fact :).
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: 0.13 Smart supply-train loader + system parts

Post by MindChanger »

siggboy wrote:
MindChanger wrote:Nice. But I think XKnight's solution is still faster (you can check it out on first page).
Also his solution doesn't require changing constants
My vote clearly goes to Case's solution right now. It checks basically all boxes: super simple, probably even I can remember how to build it manually after I've done it 10 times; more than fast enough for the purpose; does exactly what it's supposed to do but not more; not "clever" where it's not necessary.

The fact that you have to change constants is only an issue if you want to use it before you have researched full tech. Which doesn't make it worse than any other implementation that requires full tech.

I've just tested it and I love it. Will go into my blueprint book for sure.
Yeah, simple solutions are nice and I like his solution too due to that.
But I want to create as fast build as possible without need of changing constants (so you build train supplier and you forget about it without needing of changing constans after upgrade).

I want to create that kind of system and then try to "pack it" to lower size or/and logic.

About creating systems - read wiki, watch examples and create your own stuff from simple ones. I was really lost in the beginning, but after some playing with it you know more and more.

Case, if you want give me so info how to configure your system with blueprint and will put it in first post

Post Reply

Return to “Railway Setups”