Inserter optimization question
Inserter optimization question
Still trying to optimize my factory and while watching and thinking I noticed that
Inserters move whatever they can get hands on, so worst case is a stack inserter with capacity 12 moves 1 item.
Wouldn't it be much UPS friendlier, if they move only when they get a full stack? Maye not as default, but as an option?
(Yes I know you can build a timer for inserters, but that's not very handy in mixed production areas as all assemblers have different timings)
Inserters move whatever they can get hands on, so worst case is a stack inserter with capacity 12 moves 1 item.
Wouldn't it be much UPS friendlier, if they move only when they get a full stack? Maye not as default, but as an option?
(Yes I know you can build a timer for inserters, but that's not very handy in mixed production areas as all assemblers have different timings)
Re: Inserter optimization question
Just make a timer for each recipe. If you are building big enough to care about UPS, there will be many machines running the same recipe. Then it is simply a wiring challenge.
The best case scenario is +30% UPS, which is decent but not "much" better.
Re: Inserter optimization question
I build everything from raw material to science on several sites, that would make 50 or so timers per site.... You think that's more UPS friendly?
Inserters are the highest consumers of UPS after bots and assemblers in my game, 30% sounds like worth a try.
Would it be possible to try this out with a mod before suggesting it to the devs?
Re: Inserter optimization question
50 or so timers per map. Then you have to wire all the sites together so they can share the same timer.
Luckily wires do not suffer any distance penalty!
Luckily wires do not suffer any distance penalty!
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Inserter optimization question
Probably not. This would require C++ changes I suspect for UPS improvements. You could look at loaders though, different mods have them.
However, if it's your 3rd biggest issue for UPS, you probably aren't going to see very compelling gains.
I'd start on bots and assemblers if they are your worst culprits:
/c game.player.force.worker_robots_storage_bonus=63
OptimaUPS Mod, pm for info.
Re: Inserter optimization question
Hehe, that's a nice cheat Just setting the bonus to 4 gave back my 60UPS.blazespinnaker wrote: ↑Tue Jan 12, 2021 10:53 amI'd start on bots and assemblers if they are your worst culprits:
/c game.player.force.worker_robots_storage_bonus=63
After making belts multithreaded I think (hope) natural next step would be to multithread the bots, that would have a massive impact on performance.
-
- Filter Inserter
- Posts: 665
- Joined: Wed Sep 16, 2020 12:45 pm
- Contact:
Re: Inserter optimization question
Yeah, though you'll want some nice CPU fans. I have to put an ice pack under my laptop when I play factorio.
OptimaUPS Mod, pm for info.
Re: Inserter optimization question
That's a good sign, Factorio at least uses all your processor powerblazespinnaker wrote: ↑Thu Jan 14, 2021 2:43 pmYeah, though you'll want some nice CPU fans. I have to put an ice pack under my laptop when I play factorio.
My laptop runs at 91°C when Factorio is working.
BTW: To test the multithreaded belts I started to rebuild the smelter arrays from bot to belt,
but I have the imagination that the inserter time usage is growing faster than the bot time usage is going down.
Inserters to belts are incredibly UPS-hungry as it seems.
Re: Inserter optimization question
make sure they're sleeping. see in debug output, show-active-state. red circle is the goal.Guenni7 wrote: ↑Fri Jan 15, 2021 2:26 amThat's a good sign, Factorio at least uses all your processor powerblazespinnaker wrote: ↑Thu Jan 14, 2021 2:43 pmYeah, though you'll want some nice CPU fans. I have to put an ice pack under my laptop when I play factorio.
My laptop runs at 91°C when Factorio is working.
BTW: To test the multithreaded belts I started to rebuild the smelter arrays from bot to belt,
but I have the imagination that the inserter time usage is growing faster than the bot time usage is going down.
Inserters to belts are incredibly UPS-hungry as it seems.
Re: Inserter optimization question
That's easier to say than to do actually, I find it a bit hard to time them, because they a) need so much time to get rid of the 12 items and b) you never know when there is space on the belt. I have them be activated twice the time as when doing inserters->chest just to not get the assemblers filled up
Well, just one more thing why inserters should only move with full hands (optionally), to get rid of the timer thingy
BTW: I don't need gameplay help on this one, why was this moved from general discussion? If general doesn't fit I think Development Suggestions would be it, or doesn't it?
Re: Inserter optimization question
How would inserters only moving with full hands actually reduce CPU usage though? I expect inserters to belt to be most UPS efficient at a stack size of 1, since the inserter only needs to look at the belt for a minimum of 1 tick on a swing to drop the item. With more items in hand, it needs to check each tick until the hand is empty.
Re: Inserter optimization question
With a stack-size of 1 the inserter is constantly moving/active.Zanthra wrote: ↑Wed Jan 20, 2021 7:21 pmHow would inserters only moving with full hands actually reduce CPU usage though? I expect inserters to belt to be most UPS efficient at a stack size of 1, since the inserter only needs to look at the belt for a minimum of 1 tick on a swing to drop the item. With more items in hand, it needs to check each tick until the hand is empty.
With stack size 12 and a full hand it would move, unload, sleep for x seconds (x depending on assembler speed) until it has a new full hand (if there's enough free space on the belt).
Re: Inserter optimization question
It would depend on how expensive the inserter swing is vs how expensive it is to check for space on the belt. I guess without knowing the time complexity of each, it's hard to determine.Guenni7 wrote: ↑Wed Jan 20, 2021 7:33 pmWith a stack-size of 1 the inserter is constantly moving/active.Zanthra wrote: ↑Wed Jan 20, 2021 7:21 pmHow would inserters only moving with full hands actually reduce CPU usage though? I expect inserters to belt to be most UPS efficient at a stack size of 1, since the inserter only needs to look at the belt for a minimum of 1 tick on a swing to drop the item. With more items in hand, it needs to check each tick until the hand is empty.
With stack size 12 and a full hand it would move, unload, sleep for x seconds (x depending on assembler speed) until it has a new full hand (if there's enough free space on the belt).
I suppose you could make a mod that automatically moves assembler products to an adjacent chest, then make a circuit between that chest and the inserter to only activate the inserter when the chest has at least X items.
Re: Inserter optimization question
That would just double the amount of inserters, don't think that's any better for UPS...
Edit: maybe if I wire both inserters to the chest it could work, I will try...
Re: Inserter optimization question
If you make a mod you could transfer to the chest without inserters. Transfering to belts by mod is more difficult if the loader mods are any indication.