[0.16.x] inserter rotation speed

 Long Handed Inserter
 Posts: 88
 Joined: Thu Feb 26, 2015 3:52 am
 Contact:
[0.16.x] inserter rotation speed
I have been trying to calculate the throughput of inserters for my mod ACT and have been using this wiki as a guide, but I've been unable (as far as I can tell) to come up with reliable numbers. Take the "inserter" as an example; it has a rotation speed of 0.014. The wiki claims that its 'turns per Gametick'. I don't know how the wiki has calculated .83 for 'Turns per Gamesecond' for chest to chest. The closest I get is .014 * 60 which is .84. The wiki also calls it 'Arm cycles per second'. Perhaps .83 is not correct I don't know, I have no way of knowing for sure. Can anyone(one of the devs) shed some light on this? thanks
 DaveMcW
 Smart Inserter
 Posts: 2719
 Joined: Tue May 13, 2014 11:06 am
 Contact:
Re: [0.16.x] inserter rotation speed
The number you really want is "ticks per cycle".
Ticks per cycle
Burner inserter  102
Inserter  72
Longhanded inserter  52
Fast inserter  26
When calculating ticks per cycle you can see where the rounding error comes from.
1 / 0.014 = 71.4 ticks per cycle = round up to 72
60 / 72 = 0.833 cycles per second
Ticks per cycle
Burner inserter  102
Inserter  72
Longhanded inserter  52
Fast inserter  26
When calculating ticks per cycle you can see where the rounding error comes from.
1 / 0.014 = 71.4 ticks per cycle = round up to 72
60 / 72 = 0.833 cycles per second

 Long Handed Inserter
 Posts: 88
 Joined: Thu Feb 26, 2015 3:52 am
 Contact:
Re: [0.16.x] inserter rotation speed
Well I'm not going to round the number in the middle of the calculation.
 DaveMcW
 Smart Inserter
 Posts: 2719
 Joined: Tue May 13, 2014 11:06 am
 Contact:
Re: [0.16.x] inserter rotation speed
Then you will get the wrong answer, because that is how the game does it.
 bobingabout
 Smart Inserter
 Posts: 6583
 Joined: Fri May 09, 2014 1:01 pm
 Contact:
Re: [0.16.x] inserter rotation speed
The game works in whole steps called ticks.
For example... You can carry 100 apples at a time in a box, you have 7166 apples. How many trips does it take to carry all those apples from point A to point B. is it 71.66 trips because 7166/100 is 71.66, or is it 72 trips?
it's 72 trips, you can't have 0.66 of a trip. That's how the game works, you can't have 71.66 game ticks, you need to round up to 72 ticks.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.

 Long Handed Inserter
 Posts: 88
 Joined: Thu Feb 26, 2015 3:52 am
 Contact:
Re: [0.16.x] inserter rotation speed
ok I understand, the number isn't actually 0.014 but 0.013888... which is 1/72.
inserter: shown  0.014 actual 0.01388... (1/72)
fast/stackinserter: shown  0.4 actual 0.03846... (1/26)
I can round the number for the inserter but rounding isn't going to help the fast/stack inserter. 1/.04 = 25. I really don't want to hard code the numbers. anyone have suggestions? perhaps 25 will be close enough
inserter: shown  0.014 actual 0.01388... (1/72)
fast/stackinserter: shown  0.4 actual 0.03846... (1/26)
I can round the number for the inserter but rounding isn't going to help the fast/stack inserter. 1/.04 = 25. I really don't want to hard code the numbers. anyone have suggestions? perhaps 25 will be close enough

 Filter Inserter
 Posts: 710
 Joined: Sun May 08, 2016 9:01 am
 Contact:
Re: [0.16.x] inserter rotation speed
Arm rotation isn't the only thing that matters, you're trying to calculate the total time for a pickup and a drop and two rotations from just the rotation speed, so you're already getting wrong answers, even before belts get involved. Trying to fit results into a deficient model is a recipe for frustration, doing it doggedly frustrates everybody watching too.
 DaveMcW
 Smart Inserter
 Posts: 2719
 Joined: Tue May 13, 2014 11:06 am
 Contact:
Re: [0.16.x] inserter rotation speed
I believe this is the correct formula (at least, it works for all four vanilla inserter speeds, and correctly gives 14 for a double speed fast inserter):
ticks_per_cycle = math.floor(0.5 / rotation_speed) * 2 + 2
The explanation is it takes 1 tick to pick up, 1 tick to drop, and half a rotation each way.
ticks_per_cycle = math.floor(0.5 / rotation_speed) * 2 + 2
The explanation is it takes 1 tick to pick up, 1 tick to drop, and half a rotation each way.
 bobingabout
 Smart Inserter
 Posts: 6583
 Joined: Fri May 09, 2014 1:01 pm
 Contact:
Re: [0.16.x] inserter rotation speed
Wouldn't it be math.ceil() to round up instead of down?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
 DaveMcW
 Smart Inserter
 Posts: 2719
 Joined: Tue May 13, 2014 11:06 am
 Contact:
Re: [0.16.x] inserter rotation speed
Why don't you just check the source code confirm I'm right.

 Filter Inserter
 Posts: 710
 Joined: Sun May 08, 2016 9:01 am
 Contact:
Re: [0.16.x] inserter rotation speed
Doesn't seem likely. Stack is .04, 1/25. so a half swing is 12.5 ticks, halfswing and a pickup/drop is 13.5 ticks, we can measure a full stack cycle at 26 ticks so if it's really 1tick pickup/drop, as seems likely, inserter hands just have to get close. Onetick pickup/drop is looking awfully good for burner inserter timing, .01 rotation speed gets you exactly 100tick full rotation, but the observed burner cycle is 102 ticks.bobingabout wrote: ↑Mon Feb 18, 2019 9:42 amWouldn't it be math.ceil() to round up instead of down?
Anyway, it doesn't really matter much, what matters is how long it actually takes and this model doesn't account for belts and other inserters competing and all. Trying to predict inserter performance with belts involved seems like a quick route to ... I dunno, somewhere I don't want to go.

 Long Handed Inserter
 Posts: 88
 Joined: Thu Feb 26, 2015 3:52 am
 Contact:
Re: [0.16.x] inserter rotation speed
anyone want to tackle picking up items from belts? Throughput (items/sec) = 1 / (t_item + t_arm / n) https://wiki.factorio.com/Inserters#Inserter_Throughput
I have no clue where t_item comes from. I have a little data on the number of ticks each inserter takes to pick up max stack size(3/12) but that doesn't tell me much.
I have no clue where t_item comes from. I have a little data on the number of ticks each inserter takes to pick up max stack size(3/12) but that doesn't tell me much.
 yellow belt (only one belt/inserter orientation  I may just assume it's the same for all configurations for simplicity)
basic, fast, stack inserter 18, 11, 74
 red belt
 11, 10, 52
 blue belt
 6, 5, 44
Who is online
Users browsing this forum: No registered users