Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
PLLovervoltage
Inserter
Inserter
Posts: 25
Joined: Fri Sep 07, 2018 5:33 pm
Contact:

Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by PLLovervoltage »

edit: version 2 in next comment



Goal

-Sushi belt for uneven products (sushi for equal products is relatively simple)

-No loops (Loops to recycle products back in is the ez way out)



Sushi belt logic

A good recipe to test with this experiment is blue circuit which requires 20 green and 2 red. First, the sushi belt needed to be created that provides the proper 20 to 2 ratio. The problem I initially had tho was that the counter I used in my initial design was too slow to stop the belt fast enough to send the proper amount. With the help of u/Caps_errors, the quick solution was to connect both the memory cell AND the read line to the enable/disable belt so that without having to have go through the memory cell to load the proper count, the belt could disable the tick immediately right after the desired circuit amount was reached. This was the simple part.


Inserter logic

Starting with just one line of assemblers, the first issue I had is sometimes the assembler requires red but has green in front of its inserter. So I double up on inserters. But then the problem was sometimes red or green circuits built up on the end when the filter inserter though could only pick up the other. This was fixed by mirroring the design and putting alternating filter inserters.


The problem now is that even with the proper ratios provided to the assemblers, sometimes the assembler syncs so that the top assemblers have red and don't have green but the bottom assemblers have green but no red stopping the whole thing. The first thing I tried was to fix the inserters to a clock. But the problem with this implementation was you can set the max stack size but not the min stack size. Even with a clock this messed up the distribution of ingredients.


So the required fix was to make sure that the assemblers took an equal amount of red and green. The same circuit from the sushi belt logic was utilized to pick up the proper ratio. This increased the delay before the system locked up but alas did not fix it. The problem still was syncing between the assemblers. Therefore, instead of each assembler resetting independently with the proper ratio, I synced all of them together to reset when all of them reached the proper ratio once. Now, the assemblers didn't starve each other.


Now here was the most difficult part. 64x speed, it lasted quite a while but it still came to a deadlock. I added counters to the design to diagnose the source of the problem and I found a very annoying problem. To explain how the system works, the system counts until 30 green and 3 red before resetting. This should work theoretically but sometimes the count went to 31.


Scenario:

Inserter is set to enable when total <30 so should disable when count is 30.

Code: Select all

Tick 0: Memory cell = 29. Total = 29. Inserter enabled.

Tick 1: Memory cell =  29. Inserter pick up = 1. Total = 30. Inserter enabled.
So. Inserter should disable on next tick right?

Code: Select all

Tick 2: Memory cell = 30. Inserter pick up = 1. Total = 31. Inserter disabled.
No. Depending on how the items are on the belt, an inserter can pick up every other tick or at the very next tick. Also, the same tick that you disable an inserter... if the inserter is lucky and can pick up an item, it'll still pick up an item on that same tick. Combinators require one tick to react. Therefore a system needed to be made that preemptively disabled the inserter. But disabling the inserter at a lower count (eg. 29 and 2) messes with the ratio and doesn't fix the problem which happens occasionally.



The first solution I came up was to create a 2 tick clock that disabled the inserters every other tick hoping to slow down the logic a bit. This just gave the inserters seizures and destroyed all functionality.



The next solution I came up was to create a combinator that added 1 fake count to the count until the count reached 29 and 2. This properly disabled the inserter for one tick for a moment.



New Scenarios:

Inserter is set to enable when total <30. Fake count enable when memory < 29.

The case where the inserter is lucky and picks up an item the same tick it's disabled.

Code: Select all

Tick 0: Memory cell = 28. Fake count = 1. Inserter hand = 0. Total = 29. Inserter enabled.

Tick 1: Memory cell = 28. Fake count = 1. Inserter hand = 1. Total = 30. Inserter enabled.

Tick 2: Memory cell = 29. Fake count = 1. Inserter hand = 1. Total = 31. Inserter disabled.

Tick 3: Memory cell = 30. Fake count = 0. Inserter hand = 0. Total = 30. Inserter disabled.
In the case, the inserter is unlucky and doesn't pick up anything right away.

Code: Select all

Tick 0: Memory cell = 28. Fake count = 1. Inserter hand = 0. Total = 29. Inserter enabled.

Tick 1: Memory cell = 28. Fake count = 1. Inserter hand = 1. Total = 30. Inserter enabled.

Tick 2: Memory cell = 29. Fake count = 1. Inserter hand = 0. Total = 30. Inserter disabled

Tick 3: Memory cell = 29. Fake count = 0. Inserter hand = 0. Total = 29. Inserter disabled.

Tick 4: Memory cell = 29. Fake count = 0. Inserter hand = 1. Total = 30. Inserter enabled.

Tick 5: Memory cell = 30. Fake count = 0. Inserter hand = 0. Total = 30. Inserter disabled.


There. The system was fixed, and now the system works indefinitely.





Limitations

-No full beacon coverage

-Overly complex inserter logic

-Assemblers have some downtime.



Conclusion

I think I came up with A solution to the inserter logic. I'm pretty sure there's a much simpler solution out there. I think I can already simplify the current design by 8 combinators. But a completely new approach is needed for a more elegant solution.
PLLovervoltage
Inserter
Inserter
Posts: 25
Joined: Fri Sep 07, 2018 5:33 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by PLLovervoltage »



Version 2. Much better logic. Previous version had a small error rate which was fixed. Better implementation cut down combinator use by 40%. Throughput also improved significantly and assembler downtime is practically eliminated.

My previous design of trying to force to take only exactly the desired amount was inefficient and faulty. This new design accepts those pickup errors but compensates for it by subtracting the desired amount rather than resetting the memory cells. That way the extra picks up are accounted for in the next cycle.
PLLovervoltage
Inserter
Inserter
Posts: 25
Joined: Fri Sep 07, 2018 5:33 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by PLLovervoltage »



Version 3. Made it full 8 beacon coverage along with simplifying inserter logic. Assemblers started pausing a bit. It's not bottlenecked by the sushi system but by the fact that the resources are limited to one belt.

My favorite addition is the "one belt width filter splitter". The problem was red/green getting stuck in front of the other green/red filter splitter. The one belt filter splitter only ensures that red goes to the end. The bottom wired belt reads if the middle belt has red. If it does, it stops. The green circuit filtered inserter than picks up all the green if there are any. The top wired belt reads if the middle belt has any green. If it does, it stops and doesn't let any through. If it doesn't, it only lets red through.
PLLovervoltage
Inserter
Inserter
Posts: 25
Joined: Fri Sep 07, 2018 5:33 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by PLLovervoltage »



Version 4! Extremely happy with this design. I was able to get absolutely everything on one belt!

I didn't think I could get the output on the same belt as the input as the feed was full compression and the output inserter has no space for it. Then I had a mini epiphany where I could temporarily hold the prior belt to create space. This reduces throughput pretty significantly unfortunately but I'd thought it was extremely cool to finally get everything on one single belt.

I think throughput could be improved with additional combinators to make the belt holding logic shorter.
User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 133
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by Brathahn »

This looks really cool!
Can you provide a blueprint for others to explore it?
gGeorg
Filter Inserter
Filter Inserter
Posts: 436
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by gGeorg »

Loading 3 materials by one yellow inserter, output by second yellow inserter.

Sushi is made by read and enable/disable belts.
Get noticed, several blue belts in yellow suschi it is countermeasure preventing get belt stucked. ;)

Image
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by Binoculars »

Brathahn wrote: Sat Sep 19, 2020 9:35 am This looks really cool!
Can you provide a blueprint for others to explore it?
I agree with this comment.

Presenting a creation without a blueprint is of little interest. Especially since your work is really very good.
User avatar
biggerw
Inserter
Inserter
Posts: 49
Joined: Fri Dec 25, 2020 8:14 am
Contact:

Re: Overly Complicated Sushi Belt for Uneven Ingredients w/o Loop

Post by biggerw »

I think I came up with A solution to the inserter logic. I'm pretty sure there's a much simpler solution out there. I think I can already simplify the current design by 8 combinators. But a completely new approach is needed for a more elegant solution.
What do you think about this. Easy to expand selforganising and cheap.
Image


I fogot: The two inserters at the lower bottom feed the wagon with green and red cirquids.
The slots in the two wagons have filters. So all different products have their place (fixed storage system).
You may wonder about the wagon approach. Perhaps you think this ist not realistic. Exactly the opposite is the case.
I made a project where several several dozen freight wagons stood on the factory premises. All of them with material waiting fur usage.
be patient if my english is not suitable it´s not my mother tongue.
Post Reply

Return to “Combinator Creations”