What's up with inserters?
Posted: Fri Feb 10, 2017 5:40 pm
Here are my assumptions:
1. Each belt tile has 32 slots.
2. Each item occupies 9 slots on a belt.
3. Yellow belt advances by 1 slot every frame.
4. If there are no items on a belt inserters will always place an items on the same slot of the belt.
5. If the usual slot is occupied inserters have two options:
a) Wait for a free slot
b) Drop an item to nearest slot available before or after the item occupying the default slot if a free slot is close enough (don't know how close it needs to be)
6. In both these cases they will not leave gaps between items on a belt and will not break belt compression.
7. If there are less than 9 free slots between 2 items on a belt inserters consider these slots occupied and skip them.
8. Hand rotation times are always the same if inserter takes items from a container (like a furnace)
Example 1: 2 inserters unload 2 items on a belt at the same time. First item occupies slots 0-8 (9 total), second item occupies slots 32-40 (9 total), slots 9-31 (23 total) are free. This gap can contain 2 additional items, occupying 18 slots, leaving belt with 5 unoccupied slots that cannot be filled. This section of the belt cannot be compressed no matter where items will be dropped.
Example 2: same as 1, but second inserter skips 5 frames after the first inserter. Now first item occupies slots 5-13, second item still occupies slots slots 32-40 and slots 14-31 (18 total) are free. These 18 slots can be filled with 2 items without any gaps. This section of the belt can be fully compressed if items will be dropped into right slots.
Now imagine a belt as a constantly moving line of slots numbered from 0 to 8. If inserters drop items only on slots marked 0 this will ensure that number of free slots between items on a belt are always divisible by 9 and this belt can always be fully compressed. This can be achieved by circuit network signal cycling from 0 to 8. If there is an item on a belt inserter will wait for a free slot or drop it next to the existing item (see assumptions 5 and 6). Because 2 tiles are 32 slots apart there will always be a delay of 5 frames per tile the further you go down the line. Therefore:
Delay = Tile_Number * 5 mod 9. This pattern will repeat every 9 tiles. So the magic delay timings should be: 0, 5, 1, 6, 2, 7, 3, 8, 4. And since rotation times are supposed to be the same (assumption 8) everything should sync perfectly.
I made the circuit. It doesn't work. At least 1 gap every 12 items.
What can be happening - hand rotation times are not the same (doesn't seem to be the case), or inserters are able to misplace items on belts or inserters can move items that are already on the belt.
So what's up with inserters?
1. Each belt tile has 32 slots.
2. Each item occupies 9 slots on a belt.
3. Yellow belt advances by 1 slot every frame.
4. If there are no items on a belt inserters will always place an items on the same slot of the belt.
5. If the usual slot is occupied inserters have two options:
a) Wait for a free slot
b) Drop an item to nearest slot available before or after the item occupying the default slot if a free slot is close enough (don't know how close it needs to be)
6. In both these cases they will not leave gaps between items on a belt and will not break belt compression.
7. If there are less than 9 free slots between 2 items on a belt inserters consider these slots occupied and skip them.
8. Hand rotation times are always the same if inserter takes items from a container (like a furnace)
Example 1: 2 inserters unload 2 items on a belt at the same time. First item occupies slots 0-8 (9 total), second item occupies slots 32-40 (9 total), slots 9-31 (23 total) are free. This gap can contain 2 additional items, occupying 18 slots, leaving belt with 5 unoccupied slots that cannot be filled. This section of the belt cannot be compressed no matter where items will be dropped.
Example 2: same as 1, but second inserter skips 5 frames after the first inserter. Now first item occupies slots 5-13, second item still occupies slots slots 32-40 and slots 14-31 (18 total) are free. These 18 slots can be filled with 2 items without any gaps. This section of the belt can be fully compressed if items will be dropped into right slots.
Now imagine a belt as a constantly moving line of slots numbered from 0 to 8. If inserters drop items only on slots marked 0 this will ensure that number of free slots between items on a belt are always divisible by 9 and this belt can always be fully compressed. This can be achieved by circuit network signal cycling from 0 to 8. If there is an item on a belt inserter will wait for a free slot or drop it next to the existing item (see assumptions 5 and 6). Because 2 tiles are 32 slots apart there will always be a delay of 5 frames per tile the further you go down the line. Therefore:
Delay = Tile_Number * 5 mod 9. This pattern will repeat every 9 tiles. So the magic delay timings should be: 0, 5, 1, 6, 2, 7, 3, 8, 4. And since rotation times are supposed to be the same (assumption 8) everything should sync perfectly.
I made the circuit. It doesn't work. At least 1 gap every 12 items.
What can be happening - hand rotation times are not the same (doesn't seem to be the case), or inserters are able to misplace items on belts or inserters can move items that are already on the belt.
So what's up with inserters?