Page 1 of 1

Belt Compression via circuits

Posted: Mon Jan 01, 2018 10:52 pm
by FrodoOf9Fingers
Belt compression can be *mostly* achieved with the following design:
GIF.gif
GIF.gif (40.67 KiB) Viewed 2848 times
It creates gaps nearly perfect in size for inserters to place objects in. The size of the gap can nearly match any stack size (numbers below), allowing a fairly easy, space-sensitive belt compression technique.

The combinator to the right is a counter (counting from 0 - infinity). The left one (hereafter the "Range" combinator) is doing a mod operation (in my case, 60). The belt is turned on whenever the Range combinator is over some number.

How to use: First, determine how many items you want to place per side (1,2,3,4... 12). Set the belt's on/off logic to > the number listed.

Items | Frames to Wait (BLUE BELTS)
1 | 3
2 | 6
3 | 10
4 | 13
5 | 16
6 | 19
7 | 22
8 | 25
9 | 28
10 | 31
11 | 34
12 | 37

Then, decide the wait time between each gap. Do this by changing the range combinator's number to the number of frames per cycle (this time includes the gap).

Now, I say this is almost perfect compression. There's a small bit of extra gap, 1-2 slots (an item takes 9 slots iirc) that is formed with each gap. I'll let others try and minimalize it, I've played with both time amounts and could not get rid of it. So, the larger each gap, and the less of them, the less waste. I would judge this gap to be about 3% on the smallest gap (3 frame gap) settings with a 60 frame cycle. The trick is to know how many items the last inserter will place and how often and set the timing accordingly.

Code: Select all

0eNrFVNFu2zAM/BcCfZo92G6XFX4Y0P7GUBhyzDYEbMmg6KBBoH8vZS2pl3TIGmDYiwWK5Ol4J2sPbT/hyGQF6j3Q2lkP9c89eHqxpo97shsRaiDBATKwZoiRYZLNgELrfO2GlqwRxxAyINvhK9RlyC5i4OvI6H0ubKwfHUveYi8LkCo8ZYBWSAgTqznYNXYaWmQ95QKfDEbntdvZSEIRc+3Y6VJ8/abH6LDCrm9a3Jgtab0WvQM1mu7mZh8Tz8RemrORtsQy6c6RSarIH+IcHiNGBPJiosKrIgM3IpvECW60z00yTp9AfoQQEnmL6yO9Mn5eGNEuhaJOVdRa4vVEksLwpN3VH8vvNB+ieydaV5/Vuvi/Upe/K/3lCqUf/q3SJ+XlQvQ5Pk1/7Mvtpf/pzJj0DxTKrSNOg0Xbz6HvroTOyxPsj/0/THc0/wrvHyEZdDC9iNEwGp7vZA0/5vyvg9CatsemIx9XqIUnfM8ymq7ZmHSJRKVQt59N7xclh0SqHVyHSce/viHl+Q0J8ZGbH8Z68RZnsEX2syar++9VUa1uy9V9CG+T0PgK

Re: Belt Compression via circuits

Posted: Mon Jan 01, 2018 10:53 pm
by FrodoOf9Fingers
The best part of this is that the circuitry is global, IE the only piece you need nearby is the belt itself.

Re: Belt Compression via circuits

Posted: Tue Jan 02, 2018 11:21 am
by Caine
Instead of an infinite counter you can just loop the modulo onto itself and feed it with an additional 1 value from a constant combinator. It is a bit cleaner as it doesn't overflow. However, it does change the range from [0 .. N-1] into [1 .. N].

I am not entirely familiar with the slot mechanics. What is the logic behind the number of wait frame increments? They are jumps of three with the exception of 3 items which increased by four. Why four?

Re: Belt Compression via circuits

Posted: Tue Jan 02, 2018 7:27 pm
by FrodoOf9Fingers
I don't know to be honest. I saw the pattern of 3 too, but I arrived at those numbers through trial and error. They are the smallest frame counts to fit in X items onto the belt.

I've heard that a yellow belt advances one slot per frame, and each item takes up 9 slots. A blue belt is 3 times faster than a yellow belt, so in 3 frames 9 slots advance, meaning 1 item. Why the pattern is off right at the start is probably related to the new v16 belt mechanics. There's a bug report relating to the jumping forward effect here. viewtopic.php?f=7&t=56039

Thanks for the improved circuitry. I did well in my digital circuits class, but it's just been too long... (6 years)