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.
MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

0.13 Smart supply-train loader + other solutions

Post by MindChanger »

Fastest not full inserter v1: (the fastest avaible speed)
+ fastest solution
+ can load a lot different item types (up to 44 per one system)
+ simple to build and setup
- average size
- doesn't load to full stack (sometimes there can be items missing to up to max-1 stack inserter's capacity)
- needs enough items to get full desired amount
Image
How to setup
Blueprints
___________________________________________________________________________________________________________________________________________________________________________________

Smart loader v3: 00:09.49 (on empty wagon, on full item stacks it is slower) (test results below)
+ super fast solution if items are not full in wagon (time result shown is for empty container)
+ can load a lot of different item types
+ comfortable setting up if someone reads my instruction below
- slower with full item stacks in wagon (few secs more, depends on setup it can still be fastest way, other solutions don't care about full stack, so if stacks are full then other solutions will work faster)
- big size
- filtering stack inserters required
- doesn't load to full stack (sometimes there can be items missing to up to 3 to be fully loaded)
- not comfortable without reading instruction
Image
Instruction to setup
How it works
Blueprints
___________________________________________________________________________________________________________________________________________________________________________________

XKnight's solution v2:
+really fast
+loads items to fullstuck
- requires stack inserters, blue belts
Image
Blueprint
How it works
___________________________________________________________________________________________________________________________________________________________________________________

XKnight's solution: 0:17.36
+ really fast
+ loads items to fullstack
- works only on last tech (to make it work on lower techs setup needs to be some adjusted for every tech)
- requires stack inserters, blue belts
Image
Look at the end of the first page of topic to get blueprint string.

___________________________________________________________________________________________________________________________________________________________________________________


Smart loader V2: 0:22.91
+ fast solution (slower than XKnight's)
+ loads items to fullstack
+ works on every tech (didn't test yet, but it should do so)
- requires stack inserters, blue belts
Image
Blueprint
___________________________________________________________________________________________________________________________________________________________________________________


Smart loader v1: 1:06.15
+ loads items to fullstack
+ works with every tech
+ uses stack inserter, but can be changed on another inserter if player doesn't have
- really slow loading times
- really big building area
Image
Blueprint
___________________________________________________________________________________________________________________________________________________________________________________

Test speed of solutions
Image of testing items
___________________________________________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________________________________________


Other solutions.

Magazine Delivery v1
Magazines for storing goods that are needed localy, but their production is far away,
Image
How it works
Blueprint
___________________________________________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________________________________________
___________________________________________________________________________________________________________________________________________________________________________________


Parts for the systems.
I will put here parts that can be used to create bigger systems.

Cloning constants to loop *3

Copies constants and makes them 3x bigger (but they will stay x3 set constants without increasing number)
For what purpose
Image
How to use
Blueprint
___________________________________________________________________________________________________________________________________________________________________________________


Dynamic filter changer

It is big and you have to tweak some numbers in it to work for more items, but here it is:
Blueprint
Last edited by MindChanger on Tue Jul 12, 2016 3:28 pm, edited 56 times in total.

Miravlix
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Jun 01, 2016 8:48 am
Contact:

Re: Smart supply-train loader

Post by Miravlix »

Nice.

My current "work" wagon, is fed by 24 requester chests/long inserters, but if I ever need more than 24 different items pr. wagon, this looks like the way to go.

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

Re: Smart supply-train loader

Post by MindChanger »

I didn't think about long inserters that way ;)

Tho my set up allows for more chests for example for reloading wagon. I use my train station for everything (iron ore only for now, but will pick up every "raw" material).
I also created system which tells train to go off based on if inserters (loaders) works or not. I will probably post it later here.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

Unfortunately, I did not managed to run your blueprint, because it seems you forgot to include inserters in it, and I don't know their conditions.
But I like this idea, and tried to make my own version.

This is my assumptions based on your printscreen, so they might be wrong:
- you can load wagon with exact amount of material (not full stack for example)
- you are feeding cargo wagon by 1 item (I suppose those splitters are designed for this)
- wagon is emptied before loading

In my build I use full stack inserter capacity for loading, but it supports only full stacks (as in regular build). Also, wagon is not emptied in the beginning.


P.S. This build is designed for "Inserter capacity 7 tech", so some adjustments are need to make it work on lower techs.

BillH
Inserter
Inserter
Posts: 39
Joined: Sat Jul 25, 2015 8:01 pm
Contact:

Re: Smart supply-train loader

Post by BillH »

XKnight, do you mind explaining your setup? I'd love to implement that in my system.

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

Re: Smart supply-train loader

Post by MindChanger »

XKnight, thx for reply. I edited and added inserters. Your setup seems nice, maybe it will be even better due to lower size if fixed!
If you want to check it, go on.

"This is my assumptions based on your printscreen, so they might be wrong:
1. you can load wagon with exact amount of material (not full stack for example)
2. you are feeding cargo wagon by 1 item (I suppose those splitters are designed for this)
3. wagon is emptied before loading"

1. No, full stack always (or if no items left i chest).
2. I feed it several items at the time, this 1 item is only when inserter gets stuck.
3. Wagon is not emptied before loading

BTW I might have and Idea based on your setup, will check it later :)

I tired doing almost like you, but it sometimes getting stuck (belt part) :(

H4sIAAAAAAAA/91ZbW+bPBT9KxUfH0EfY9K0UcektT+jmpADTmKN2Mw2UaOI/z4bSMNLAENppK0fmhf72r7nnnt8aCN2F7MQxXeBf8JUEkmw8E8nivbYt4Tk
iGx30lEvsWUnTKhxRv3Tu+8s7aPvwMyOCMdh/q36YBC3mBgHp8WBaWETd+tLbkNiiblDqMBcvWmk594/6Fhw/1CNXtgho5KzOFjjHToQxv1TSHiYEhnsWYQD
tglYgjnKZ7v2eYxjFAU7RKNAx6u6Cl/yFH+M50P5JL2K72Z6H1psqsr/ZrnWT/+05Rir0xW8OAYk8leZ+rGLTDRNCI3wu9q3yFDhQkXCuHTWOJaWnmqUO6zk
Pipf02PDp4/M9acsqxytcehrVWkUBfYcUo1EZfiGcCEDQbYUxf5JHhO12YFwmSJFmpJJ+aCDD5gf5Y7QrZVnJCSiMt9mnyCVq9rA+qaHyk0wResYBxER+rVe
2aHKn78drj7HUQ1EFyjQ2tg+KiQrkxZVpF1zpOFNkP5RBdidC+ANisUcCK+uAlyHtE5elUj4q6utwAyS4s0sKc2U4arBl2sAPHZzKmZbIiQJnXCHhVJk/DtV
rx1QnAXGRDEeWnva5eJBl/zh94RjIZwmz0OWarYBYFq4ohfcfjmcm/++0mtDcPoYGeGQRErq1dJrQvXSVyUVDlGyXOeSphilqCjcVVMFtVS/WzZLZZKOwSw5
Bnkdgw1n+4BQFV30vTFq+u603yzYgSmo66jXR3OkNjtgJ+HsoEG6Sh/12/T+BRe+TbYexo21GGUh7HIc9vfYCAKCv41/rzPxz3X7CdhU4qkqq4k3qJUmGok4
kbs9zvftKCY8F7NdwEv0xBq+VgvoeADYF7pb/40toXmZHpvieq5Z6+4E3RUb6oJChb2v7YIXhaDAOnYE4FPb5KWzTbRN6YC/5XFXdfCrkgxhozBXrEq9JI14
t6eWXrOWg4u79cV7uvdM4gEyGOj/pZvNK5L3tV12vzqTORN0pG678gYwb6G+xjAQFe8LReWlJiqwKin/j6W7Iac9MIegDJKotB2LK09wZrbA7rTfcNJJvOFn
yS4+E4n31oDjuFxZneSuLjMYPobfXt0rLuvYLccSvvTki6H2/zT7m7bIcaffqcVa5tcq7HU/sO63Tfyy92/45VHeblF9qDBgFjgT6wZkuh2X4KpLUdtzn0bZ
Mq+toMsvsWUX1MBnnk0af7n8rPsy8T0Dffw03RN7ZpfGjODDBvj+7R1vN7itmbANbWaTMF+95+bL/0uSfVySWfbMsUw5vQueMY3+AMzi4p6AGgAA

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 »

BillH wrote:XKnight, do you mind explaining your setup? I'd love to implement that in my system.
Me, too, or post a blueprint so we can reverse the design.

My guess is that he uses inverted flummoxing through bit-reversion in combination with real-multiplexing of virtual signals. Like in the Tetris implementation.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Smart supply-train loader

Post by ratchetfreak »

Looks like the stack inserter sends what it is holding and is attached to a count down.

If that countdown triggers then it activates the filter inserter to pull out whatever item the stack inserter is holding to make room for that partial stack.

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

Re: Smart supply-train loader

Post by MindChanger »

Guys, just created some better system I think. It works so far good with full tech, don't know how about on lower ones, can't test it (don't have items for it in game).
I think it can work with lower techs as well. (Tried to do same system as XKnight, but tried to add some things from me aswell)

Image

Edit: fixed bug:
H4sIAAAAAAAA/82XbW+bMBDHv0rFywkqICFd1HlSP0c1IQcuiTWwmW2iRojvPuM8FBNDIFnb9U1U7Dv7fve/40jZQ8YSnD3EqAIqiSQgUFVRnANyCBXAJXDH
LZhQS4yi6g15M3ePvKB2U8Ih0U/ntXs0ydiGCEkSL9mCkB6HP6X6tbsI67OZkDj57fWcNz9sbp0XugmjkrMsXsEW7wjjqEoIT0oi45ylELN1zArgWO+euac1
DjiNt5imcWOv4hVI8hLO63pJb2q8IBWj2kcPhyosr07g/EIVh1Qh0rT2MUnR/Gyv/lE2raUgNNeav1PMKSQkBe4lLF8RiiXrxh08RhekbZEfHTUxpeR41TXh
QsaCbCjOUCX3hTpwR7gscea4R+Z60cN0L7eEbpzaFdC4GGX14jRs8gLz5uLI+em4rJRFOe7Mg3WxV1cuqYzXnOUxocpap6O+AXtoYJ81mF+dcGK2ouHcuRsO
QA1nwaw/vyoGJWsqexPsX2R3YcnummSqJJqiHE9WQUXzcDlfLp7CZeQSmsKbvt29YIfiPVx0qIivxnryfVbyFCHr7OjwD9wVX1OhtdvfI4IP7hGmmEIDHLwV
HITwJMdUFIxLbwWZtHRMfyw/oHiVQZwS0fyiNc4EjA7w9PR6kJf18N1Qy9LUznxAO1i9LAaU4/8/3f8y6Kfbsnnw/y8rAHbAz828pwxQqww6MjFgWGCZMhov
k4tamHVqwdJYnwZasVk9g6ND+OFdx2+jDrqoRwKJrgPpQuuvLBNPZyArsBBkB17B2a4ZGrojh+Y1dUS52pfum1Be2oi9BlYL8o9Jg0enQr5mAllYE7ycNBz6
XwC+I+4p3P1e3LqpjOQdWcFdiL+P+9JeWP4N4D9vJu+dZj4ev/1Nd6JrJWl0pUX/+x5zIrc56L7UA1oPPI+R8ZlpAf3u6UbWfkfk75OD820q5NEgTTZDop0o
z3ActfvkaSALP70tWHD29gDL3uhSlrVLEn1C5xuLSMhPV7aQr1tfVs8cZMnpQ/wMNP0LYzkzTlYRAAA=

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

Sorry guys, I really had to provide blueprint string together with built, but I didn't expect that you will be so engaged.
And it is funny to see how you are reverse-engineering this build :D
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.
The simplest solution is often the most optimal, but this solution is not necessarily to be obvious.
ratchetfreak wrote:Looks like the stack inserter sends what it is holding and is attached to a count down.
If that countdown triggers then it activates the filter inserter to pull out whatever item the stack inserter is holding to make room for that partial stack.
Almost correct. Except one thing.
On "Inserter capacity 7 tech" stack inserter can transfer up to 12 items, while filter inserter can transfer up to 3 items.
So next situation is the core problem:
1) Output storage: 90/100 iron plates
2) Stack inserter grabs 12 iron plates from input, and puts them into the output.
3) Stuck is detected (2 iron plates in inserter's hand). Filter inserter takes out 3 iron plates from output (97/100).
4) Stack inserter puts 2 items into the storage (99/100) and takes new 12 items.
5) Stuck is detected (11 iron plates in inserter's hand).
On the next iteration there will be 8 iron plates in hand, 5 iron plates in hand, 2, and 11 again, 8, 5, 2, 11...
The whole process will never end.

To solve this issue I am using next principle:
if item count in stack inserter's hand is less than 3, then we should wait until item count in "stack inserter's hand + fast inserter's hand + on the upper belt" is equal to 3 (this is always possible because filter inserter is still taking items out from the wagon). When this state is reached, stack inserter and the fast inserter almost simultanesouly put these items to the wagon, and it becomes full. Actually stack inserter will do this task slightly faster (because it is already on the half way) so it should wait for the fast inserter (condition "Everything > 2" will prevent grabbing new items).

How state "stack inserter's hand + fast inserter's hand + on the upper belt = 3" is reached?
Lower belt is responsible for feeding exact amount of materials to the upper belt, once this state is reached extra items will be taken out by the fast inserter (the rightmost inserter). Thats why the lower belt and the output inserter has opposite conditions: not (Everything < 4) = Anything > 3, so only belt or output inserter will work in a single moment of time.

Also, I am using 20 ticks for stucking detection: upper combinator is counting while the stack inserter holds items (condition Anything < 20), and lower combinator is used to detect 20 ticks.

The trickest thing in this build is 2147483647 constant...
Once the stack inserter puts the last item to the wagon "stack inserter's hand + fast inserter's hand + on the upper belt" will be less than 3, this means the lower belt will start working and this will break everything.
To prevent this I am using integer overflow trick "2147483647+1 = -2147483648":
stack inserter is holding an item: lower belt recieve -2147483648 value and it is able to work.
stack inserter is empty: lower belt recieve 2147483647 and it cannot feed new items to the upper belt.

That's all.
Blueprint string
Last edited by XKnight on Wed Jul 06, 2016 8:14 pm, edited 3 times in total.

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

Re: Smart supply-train loader

Post by MindChanger »

Pretty smart :P But as you said it works only on full tech?

I am curious how much my new system is worse than your and if my system will work with lower tech

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

MindChanger wrote:Pretty smart :P But as you said it works only on full tech?
Actually you can make some constants adjustments (for stack inserter condition, lower belt condition, and output inserter condition) to make everything work on the lower tech.

Like: if filter inserter capacity is N, then
stack inserter condition: Everything > N-1
lower belt condition: Everything < N+1
output inserter condition: Anything > N
So, if N == 1 than you don't need this complex stuff :D

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

Re: Smart supply-train loader

Post by MindChanger »

Yeah, but I think N has to be put manually, it is hard to easly detect N number without much effort.

I need to create some items and test both systems, Your is faster I think, my is probably more adjustable and easier to implement

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 »

Inverted flummoxing. I've said it first.

But seriously, it's very clever, but I'd like a simpler solution. Is there any?
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

siggboy wrote:Inverted flummoxing. I've said it first.

But seriously, it's very clever, but I'd like a simpler solution. Is there any?
What do you mean "simpler"?
- it should not depend on the tech level?
- it should have less than 2 combinators?
- it should control more than one stack inserter at the same time?
- it should be possible to build it within 5 seconds?
- it should use less CPU time?
- it should not use robots?
- it should not take items out of the wagon?
- it should be possible to use it without wagon's filters?
...

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

Re: Smart supply-train loader

Post by MindChanger »

The simplest solution is using few splitters (so in the end there will be always 1 item to be put to train), but it is really unefficient way I think (have to wait long time to insert everything)

I will try to build and test that tho, my system and your system too.

PS: How to build power switch? It doesn't connect itself :/

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 »

First, let me point out that I like perfect solutions. And you're really, really good at coming up with clever things. So it was not meant as criticism.

What do I mean by "simpler"?

It should have a good balance of being understandable and useful, and it's acceptable if it's not 100% accurate. For example, it could leave a 47 stack when 50 items would be possible, because that's still good enough for taking the train to the outpost for resupply. It's very unlikely that you need exactly 50 items.
XKnight wrote:- it should not depend on the tech level?
That would be top priority, even if it means it won't be perfect anymore (see above)
- it should have less than 2 combinators?
That's a balance question, it doesn't really matter if it's 2, 3 or 5 combinators if the payoff is good. I really don't like it if the solution requires arrays of constants in combinators, because that's tedious to setup without BP, and sometimes impossible to remember.
- it should control more than one stack inserter at the same time?
Not important because loading time does not matter at all for this use case.
- it should be possible to build it within 5 seconds?
It should be at least feasible to build manually. If you have to consult diagrams or notes it's too complex.
- it should use less CPU time?
Doesn't matter I have quad core CPU :lol:
- it should not use robots?
Robots are fine, they're in the game for a reason.
- it should not take items out of the wagon?
Does not matter.
- it should be possible to use it without wagon's filters?
Well, of course it's awesome if it works without filters, and usually you have a dedicated supply train so setting filters is not a huge deal. But of course if you don't have to set filters that a huge advantage.

So this is how I think about it, but I have put zero work into solving this problem so I'm afraid I have nothing really constructive to contribute at this point.
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 »

MindChanger wrote:PS: How to build power switch? It doesn't connect itself :/
The power switch is connected like a power pole with two ends. Very simple. What is the problem you're having, I don't quite understand.
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: Smart supply-train loader

Post by MindChanger »

I placed power switch and it is not connected to power network.

http://i.imgur.com/09xV2XY.jpg?1

Sry if I am being stupid here :)


About supply system, all updated in first post:
My first idea works on one of earliest and last tech, so it should work on every, but it is pretty big one setup.
2nd idea worked fine on last tech, didn't test on other, but should work as it doesn't require any info about size of items picked up by inserters. Quite small, little slower than XKnight's solution (will test it)

PS: I tested idea about splitters, 2 splitters taking items from requester chests, picking up single items to wagon, rest being picked up by other inserters to active provider chests. It is really slow, but works and it is simple.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

MindChanger wrote:The simplest solution is using few splitters (so in the end there will be always 1 item to be put to train), but it is really unefficient way I think (have to wait long time to insert everything)
And again, how can simplicity be measured?
What is simple and what is not?
Is placing down blueprint from the book simple or not?

For example, before designing any circuit I have a set of requirements to the future system: like be fast (specific amount of ticks), be compact (tile count), be extendable, also I have some kind of liberties to the new system: like it may unstable if (...), result may be in the (...) range, and so on. All these things can be measured and I understand them, having these properties allows me to select the most suitable solution for current task from tens different answers. The most important thing that I don't need to design every gear in every new system again and again, the only thing I need to know is how to combine small gears in a big system. Sometimes I even don't remember how my own gear works, but this didn't stop me from using it, because I know its contract and I can combine it with other contracts.

But simplicity... I don't understand.

By the way, creating splitters/inserters chain in such way to always make only one item in output, analyzing wagon storage (which is not readable right now), requesting necessary items (and types) - this sounds not very simple... at least for me, but if you want to design it - you are welcome. Factorio is a game, and if you think something is funny and you enjoy it - what are you waiting for? do it!
And if you want you can share your results with the community.

This sounds more like deterministic requirements and they even can be used for designing.
Quote
I am 1000% sure that every @siggboy's requirement can be done without breaking the others, but for me it is just a question of joy or necessity. To be honestly, I've listed all things which is not important for me in my own build... I feel like I've tricked you, I apologize.
Last edited by XKnight on Wed Jul 06, 2016 10:50 pm, edited 1 time in total.

Post Reply

Return to “Railway Setups”