UPS optimized 12-beacon smelting - w/minimal circuits

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.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

Edit: problem solved (TY!)
- v5 blueprints are here
- v6 blueprints are here - best for UPS!


Can someone tell me what I miss, why the compressed setup (top) cannot give a full belt? I use the same timings... Maybe I miss sometime obvious :D

Continuing a discussion here: viewtopic.php?f=202&t=100553&p=557154#p557154
THX for the comments there! The whole circuit idea is coming from there from mmmPI.

My goal was to have final setup 12-beacon smelter for my mega base w/o circuits, but for UPS optimization a _minimal_ circuit looks inevitable to control the inserters grabbing 10-12 plates instead of <4 -> much less swings. Power/resource need to build is not a priority here.

This beacon setup is very fragile as to have a full belt 8.96 smelters required. But I prefer going with it to use the ore the most efficient way.

To improve even further I've tried to apply the same logic but squeeze vertically to take as minimal space as possible. For some reasons this setup does NOT produce a full belt of plates. The only difference is side loading for both lanes:
  • top row is the compressed setup, vertically 1 tile smaller
  • bottom row is the orignal setup, working nice
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt.png
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt.png (1.48 MiB) Viewed 21614 times

So I re-placed the smelters with new ones, started with empty belts, let it run like 15 minutes, then cut the ore. The original setup (bottom) produced a full belt after like 2 minutes, the new was never able to catch-up and had gaps. My base is at 40UPS but is should not matter, testing there.

Here are the number of plates produced.
Table cells are matching the smelter on the screenshots/blueprint. Sum is 46209 vs 47065 plates: 1.81% diff.
Per the table the last smelter is going full throttle clearly, still not enough, the original setup is much more balanced. I don't know what's going on at #3...#6, why not getting enough ore??
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-Stats.png
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-Stats.png (10.17 KiB) Viewed 21614 times

Blueprint (important: put someting on the controller O belt, outer lane, not inside to get proper timing for the inserters):
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-BP.png
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-BP.png (538.88 KiB) Viewed 21614 times
Last edited by Belter on Sun Feb 06, 2022 9:23 pm, edited 5 times in total.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by SoShootMe »

The obvious explanation is that in the compressed setup, the buffer (the belts to be side-loaded onto the output belt) from the ninth furnace is insufficient, so (occasionally) there's no item to fill a gap left by the "earlier" furnaces.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

SoShootMe wrote: Fri Nov 26, 2021 11:16 am The obvious explanation is that in the compressed setup, the buffer (the belts to be side-loaded onto the output belt) from the ninth furnace is insufficient, so (occasionally) there's no item to fill a gap left by the "earlier" furnaces.
I'm not sure. That smelter (#9) is actually producing 1.6% more than the one in the orginial setup. It has to fill too many gaps, clearly, as the smelters before producing much less for some reason. Like #6 is the worst, -5.4%!

When I start the test w/empty lanes, the full setup is slowly building up the queue but at the one in the compressed setup is not able to fill the - I agree shorter - buffer even.

I'll do more tests on the weekend in creative mode. Added %s, same data. See the 1..8 sum and the -2.3% diff:

Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-Stats3g3.png
Smelting-UPSoptimizedMaxBeacon-WhyNoFullBelt-Stats3g3.png (24.81 KiB) Viewed 21561 times
mrvn
Smart Inserter
Smart Inserter
Posts: 5844
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mrvn »

Why aren't the furnaces working full time? Are they running out of ore or stopping because the output is full?

You might have to wire up the input inserters and only enable them once the ore belt is filled so all furnaces are in sync. Otherwise the timing between inserting ore, the plates being produced and your output inserter removing plates can hit some bad configurations.

PS: Instead of having 9 furnaces per row why not have 9 rows of 8 furnaces each and merge the output into 8 belts?
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by SoShootMe »

mrvn wrote: Fri Nov 26, 2021 1:26 pm Why aren't the furnaces working full time? Are they running out of ore or stopping because the output is full?
I took a deeper look (ie actually tried in the game), and it is the former (makes sense given the figures, which I had misinterpreted). It takes longer for an inserter to pick up from an underground entrance (compressed version) than an underground exit (uncompressed version). This results in no input at times, at least on the partially depleted belt.

The underground pairs in the compressed version can be moved along one so the inserters pick up from underground exits, except for the ninth furnace, where it requires shortening the buffer or replacing the (unnecessary) entrance with a belt facing the inserter. With these changes, the belt buffers from the ninth furnace fill up (as does the furnace's output, slowly), so no gaps in the output.
You might have to wire up the input inserters and only enable them once the ore belt is filled so all furnaces are in sync. Otherwise the timing between inserting ore, the plates being produced and your output inserter removing plates can hit some bad configurations.
Clocking the input inserters may be better for UPS, but they'd need their own clock.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

SoShootMe wrote: Fri Nov 26, 2021 5:46 pm ... It takes longer for an inserter to pick up from an underground entrance (compressed version) than an underground exit (uncompressed version). This results in no input at times, at least on the partially depleted belt.
THANK YOU.

I did not know that - and also feel pretty stupid that did not spot this difference!!!

Numbers are identical now as they should and I've spotted no gaps after the first 2 mins:
TY.png
TY.png (53.49 KiB) Viewed 21493 times
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

Well, there are actual measurements about this furnace output inserter topic.

The relevant conlusion is pretty convincing, referring to avg tick update time:
Clocking furnace output inserters is extremely effective... ....by at least 50% in the chests case over unclocked output inserters.
See:
test-000101 : Best way to load/unload furnaces? Cars vs. Chests, clocked vs freerunning inserters?



Note: 10.000 :O furnaces were in this tests... +other crazy stuff is there as well!
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by SoShootMe »

Belter wrote: Fri Nov 26, 2021 7:58 pm
SoShootMe wrote: Fri Nov 26, 2021 5:46 pm ... It takes longer for an inserter to pick up from an underground entrance (compressed version) than an underground exit (uncompressed version). This results in no input at times, at least on the partially depleted belt.
THANK YOU.

I did not know that - and also feel pretty stupid that did not spot this difference!!!
FWIW, I didn't know either, and it took me a little while to figure out! Part of it is that I (and I guess you too) wouldn't expect any difference between the two.

A lot of "weirdness" emerges from item-chasing behaviour - picking up from an entrance fed by a full, moving belt, it looks like the inserter tries and fails to pick up from the far lane, but misses items on the near lane as a result. But not always...
Belter wrote: Fri Nov 26, 2021 8:19 pm
Clocking furnace output inserters is extremely effective... ....by at least 50% in the chests case over unclocked output inserters.
See:
test-000101 : Best way to load/unload furnaces? Cars vs. Chests, clocked vs freerunning inserters?


Note: 10.000 :O furnaces were in this tests... +other crazy stuff is there as well!
With full productivity modules and 12 beacons/furnace, 10k furnaces is sufficient for ~16k science/minute (all seven science packs), though about 1/4 are for steel with a lower output rate. I think the more shocking fact is that 10k furnaces is not completely out of this world :).

From a UPS perspective, a few other things spring to mind:
  • Is it better to sideload output or not? (In the uncompressed setup, you can route the belt to the north of the furnaces to load the left lane of the output belt.)
  • If not sideloading, does it make a difference if you load output onto an underground exit, underground entrance or belt?
  • Is it better to clock input inserters?
  • Is it better to run two, single-sided input belts? If so, sideload to "top up" or keep separate?
mrvn
Smart Inserter
Smart Inserter
Posts: 5844
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mrvn »

SoShootMe wrote: Fri Nov 26, 2021 5:46 pm Clocking the input inserters may be better for UPS, but they'd need their own clock.
Clocking isn't needed. The inserter go to sleep when the funace has enough ore in the input slot and always pick up 12 ore if there is some on the belt.

The circuit control I mentioned is so that all furnaces start at the same time so they all produce plates at the same time and the clocked inserter to remove plates have 12 plates. Without circuit control the furnaces will start one after the other as ore travels down the belt. But they probably get in sync enough after a while on their own.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

SoShootMe wrote: Fri Nov 26, 2021 5:46 pm With full productivity modules and 12 beacons/furnace, 10k furnaces is sufficient for ~16k science/minute (all seven science packs), though about 1/4 are for steel with a lower output rate. I think the more shocking fact is that 10k furnaces is not completely out of this world :).
I was impressed about the testing itself, the guy even created a factorio mod to crete the test worlds!

I'm optimizing my 3k spm base, in theory it needs 1888 furnaces, actually I have 6k.. Even with the 8 beacon setup 2372 the theoretical req.
SoShootMe wrote: Fri Nov 26, 2021 5:46 pm From a UPS perspective, a few other things spring to mind:
  • Is it better to sideload output or not? (In the uncompressed setup, you can route the belt to the north of the furnaces to load the left lane of the output belt.)
  • If not sideloading, does it make a difference if you load output onto an underground exit, underground entrance or belt?
  • Is it better to clock input inserters?
  • Is it better to run two, single-sided input belts? If so, sideload to "top up" or keep separate?
Woah, nice points!

As the output inserters are controlled, the input inserters are working pretty nicely, just in time putting 12 items in the furnace. As the current compressed setup is working fine now, I'm really happy with it.

My main goal is to minize entities to get out of my 40 ups/fps trap, TODO is list is really long...

So the use the compressed setup with power stations I've reduced the buffer to 3 belts which gives space for ( per wiki:
- bottom buffer: ( 256 + 256 + 295 ) / 64 = 12.6 items
- top buffer: (256 + 295 + 106 ) / 64 = 8.7 items

It is a significantly shorter buffer but enough according to my tests. Will post the final BP.

The last smelter does the least amount - so it can keep up:
Smelting-UPSoptimizedMaxBeacon-CompFix2.png
Smelting-UPSoptimizedMaxBeacon-CompFix2.png (14.82 KiB) Viewed 21379 times
quyxkh
Smart Inserter
Smart Inserter
Posts: 1031
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by quyxkh »

Belter wrote: Sat Nov 27, 2021 4:57 pm My main goal is […] to get out of my 40 ups/fps trap, TODO is list is really long...
Then your strategy's optimizing the wrong thing. Entities aren't what dominates UPS cost, what dominates UPS cost is inserter swings. That's not an absolute, you can get the inserter swings down to a level where other things matter as much, but you're not there yet. And inserters are entities too.

What slows the game down is entities in some kind of motion or other change. Inserters swing for at least 26 ticks per handful, plus, for belts, absolute best case is two or three ticks of hunting to load/unload each item.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mmmPI »

I didn't know either for the underground belt. I would have expected that the inserters fail to grab items when picking up from an underground Exit, and not Entrance. With the idea that maybe it is harder for the inserter to anticipate item position/ chasing the item when the previous belt is underground, because it cannot see :D

From what i understand from quyxkh comment's there would be some room for optimization by removing the belts ? to avoid the inserter chasing item on them as it's the costly part in their functionning ?

There was some contest time ago called "UPS war" on this forum where the aim was to produce an item with the most UPS friendly build on a given map. And the organizers tested each submission and ranked them based on UPS. I remember some very efficient build used trains instead of belts, to reduce the amount of inserter/inserter swing required i think, maybe also to avoid the chasing-item-on-belt ?
I remember this website, I think it dates back from this period of the "UPS war" contest, the version of the game was 17.XX, i do not doubt the high quality standard of the test, but i am unsure if everything stated is still the exact same with current version.

They do say in the test that setting filter to the inserter seem to yield better result than just enable/disable which is what i used in the previous post but i had no data to back it up it was more something i've heard and i'm not sure it's still true with current version :).
User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by ptx0 »

mmmPI wrote: Sat Nov 27, 2021 8:55 pm I remember this website, I think it dates back from this period of the "UPS war" contest, the version of the game was 17.XX, i do not doubt the high quality standard of the test, but i am unsure if everything stated is still the exact same with current version.

They do say in the test that setting filter to the inserter seem to yield better result than just enable/disable which is what i used in the previous post but i had no data to back it up it was more something i've heard and i'm not sure it's still true with current version :).
circuit clocking inserters is still lucrative but filters vs enable-disable are no longer better. that's been fixed.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

quyxkh wrote: Sat Nov 27, 2021 6:44 pm What slows the game down is entities in some kind of motion or other change. Inserters swing for at least 26 ticks per handful, plus, for belts, absolute best case is two or three ticks of hunting to load/unload each item.
Timing the inserters makes them turned off like 75% of the time in this setup. Pretty safe to assume that it gives a UPS improvement. Not timing them -> working 100% of the time.
ptx0 wrote: Sun Nov 28, 2021 4:37 pm
mmmPI wrote: Sat Nov 27, 2021 8:55 pm ...setting filter to the inserter seem to yield better result than just enable/disable...
...filters vs enable-disable are no longer better. that's been fixed.
Good to know, you guys rock!

After playing around a bit I've realized that using the circle belt timer cool but also a pain - cannot just copy&paste the blocks, had to place the item on the timer belt manually... Before dumping it I've calculated that the small circle method is good for 17.7 ... 147.5 tick cycles.

...so did the math and replaced it with a single combinator & the overflow counting method to achieve the same ~123 tick cycle.
  • increment a signal by 35M (2^32/123) and feed it back to the input
  • turn on inserter if signal is >2G
Here is the OCD friendly updated version of the compressed setup v5 (tested):
v5-BP.png
v5-BP.png (783.97 KiB) Viewed 21277 times


This version is for iron/copper smelting, outputs a full blue belt, tested w/a full blue belt ore, consumes 0.84.

100% self contained (circuit control, power, undergound belts) and modular.

For multi-row setup the combinator can saved if green wire is connected -> pain again... :lol:
mrvn
Smart Inserter
Smart Inserter
Posts: 5844
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mrvn »

Belter wrote: Sun Nov 28, 2021 7:14 pm For multi-row setup the combinator can saved if green wire is connected -> pain again... :lol:
Add the substation for the previous row in the blueprint and connect the green wire across that. On the first placement you get an extra substation that is easy to remove. And you probably should have a separate blueprint for the clock including the green wire connection to one inserter. Blueprinting 2 clocks when the rows are connected would be bad.

Or a blueprint for the first row and one with 2 connected rows (without clock) for extending. Put them in their own blueprint book for easy selection.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mmmPI »

ptx0 wrote: Sun Nov 28, 2021 4:37 pm circuit clocking inserters is still lucrative but filters vs enable-disable are no longer better. that's been fixed.
do you have any source please ? not that i'm suspicious but i'd be again in the situation i was earlier to think something is true but without any data to back it (except now i should think it's false). it must be in a changelog somewhere i'm obvisouly unware:)
Belter wrote: Sun Nov 28, 2021 7:14 pm After playing around a bit I've realized that using the circle belt timer cool but also a pain - cannot just copy&paste the blocks, had to place the item on the timer belt manually... Before dumping it I've calculated that the small circle method is good for 17.7 ... 147.5 tick cycles.
...so did the math and replaced it with a single combinator & the overflow counting method to achieve the same ~123 tick cycle.
increment a signal by 35M (2^32/123) and feed it back to the input
turn on inserter if signal is >2G
I would have advised you to only make 1 control belt somewhere and then use overlapping blueprint to have the green wire connect ALL inserters. To avoid placing manually 1 item every 9 furnace and also and mostly because i would have never thought of the method you used which is more sophisticated that what i do :).

The blueprint is nice in itself, hopefully it also serve the purpose you made it for !

What if the extra sideloading required for the compact version eat-up the ups-efficiency gained by clocking the inserters ? eheheh factorio's a fun game
User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by ptx0 »

mmmPI wrote: Sun Nov 28, 2021 9:35 pm do you have any source please ?
viewtopic.php?f=204&t=77314&p=463860&hi ... er#p463860

always from stevetrov, mulark, or DaveMcW, if not posted by Rseding91 or boskid.. usually in that order. ;)
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mmmPI »

maybe there was a misunderstanding, in the thread you linked the winning design uses filter inserter for the furnaces output.

The post you mentionned in particular is not saying that enabling/disabling regular stack inserter has been made equally CPU-intensive as setting filter on stack filter inserter.

It is saying on the contrary (i think) that since 0.17 the filter inserter will go to sleep when not filter is set and it isn't swinging.

It then says using enable/disable makes them never sleep ( which is corrected the following post) and says that there is a PR waiting to be approved.

This is from 2019, maybe things have changed since then but i need a source of information at least the same magnitude of the source of information that established my previous belief to change my mind, it would be a changelog saying something about the sleep of the inserter, or a new contest where there is clearly a consensus that it is equivalent, or my own tests, or several third party test. ( i don't have much more data with your source :/ )
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by Belter »

mmmPI wrote: Sun Nov 28, 2021 10:36 pm ...it would be a changelog saying something about the sleep of the inserter...
Only found this in the changelog related: v0.18.0 / 21.01.2020 / Optimizations section:
- Improved performance of inserters interacting with assembling machines and furnaces.
- Improved performance of inserters when the circuit network turns them off.
- Improved performance of mining drills and inserters in general.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3619
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: UPS optimized 12-beacon smelting - w/minimal circuits

Post by mmmPI »

The time period correspond to after the mentionned ups wars was had gone inactive, so it would seem it is the conclusion of the pending (at the time) PR.

I'm willing to believe/hope it is better for UPS , however the source doesn't mention precisely enough for me to infer the cost in UPS is now necessarily the same as fllter inserter.

It also mention sideloading has been made more ups-efficient, and many others :)

It's better to have incomplete/ambiguous source than no source at all anyway ! And the blueprint looks solid !
Post Reply

Return to “Combinator Creations”