UPS optimized Steel smelting to 1 blue belt

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 Steel smelting to 1 blue belt

Post by Belter »

Based on the inspiring discussion on a full beacon smelting setup I've created a Iron Ore -> Steel smelter block to produce a full blue belt of steel

Update: UPS-wise the winner is direct insertion, clearly. See the BP from disentius there. Due to DI only 10 beacon fits, but the UPS benefit overwrites everything..


My priorities were:
- UPS optimization (as less as possible moving parts preferred) -> 12 beacon setup
- belt focused solution, minimal circuits to reduce inserter swings
- simplistic approach - also good looking :D

Not important for me:
- this is an end game setup, so very expensive and power hungry
- cannot fit to a 100x100 city block sry

Due to the productivity modules we have some funny rations - see calc. So the required furnace numbers:
- 45 steel (using 45)
- 38 iron (using 40)

Possible improvement areas:
- the steel smelting inserter controller could be slower - risking gaps (currently 3.5x slower than iron, in theory 5x slower can work as well)
upd: fixed, see below
- lane splitters: using 2 (upd: 1) only... I had some failed attempt to get rid of them (gaps) but maybe it is possible (not UPS friendly).
upd: fixed, see below
- removal of 2 iron smelters - would be painful to see, also even if would work would make the setup very fragile (risking gaps)
- removal of some beacons - ratio makes it possible for iron, but it won't add any value and look bad as well (11.1 vs 12)
won't fix the two above, as I need equal iron plates for the 5 rows
- better control of the inserters - as discussed in the referred forum thread it should be possible but would need a more complex circuit network. In short, if the inserters would be on when the belt is empty, they would turn off faster. Currently some of them is waiting 1-2 seconds as the belt is full
upd: fixed, see below
- removal of lamps - nono

Updated to v3.01
- upd: see below

Updated to v2.3:
- simplified lane side switch for iron plates - now I was able to align electr grid to same size
- updated steel lane merge: cleaned up, got rid of 1 splitter, the second stays
- cleaned up green wires a bit
- steel timer stays
- updated improvement list above

[/i]
Attachments
SteelSmeltingCalc.png
SteelSmeltingCalc.png (73.87 KiB) Viewed 15465 times
SteelSmelting v2.3 comps.png
SteelSmelting v2.3 comps.png (44.8 KiB) Viewed 15466 times
SteelSmelting v2.3 UPS optimized.png
SteelSmelting v2.3 UPS optimized.png (2.64 MiB) Viewed 15484 times
Last edited by Belter on Fri Jan 14, 2022 10:12 pm, edited 4 times in total.
User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1133
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by NotRexButCaesar »

Belter wrote: Wed Jan 05, 2022 2:47 pm My priorities were:
- UPS optimization (as less as possible moving parts preferred) -> 12 beacon setup
- belt focused solution, minimal circuits to reduce inserter swings
- simplistic approach - also good looking :D

Possible improvement areas:
- better control of the inserters - as discussed in the referred forum thread it should be possible but would need a more complex circuit network. In short, if the inserters would be on when the belt is empty, they would turn off faster. Currently some of them is waiting 1-2 seconds as the belt is full
If I were to make one improvement, it would be to switch to direct insertion of plates. The UPS saving of removing one inserter per machine (plate output, belt, and steel input inserter replaced with one transfer inserter) would definitely override the extra machines needed for smelting, especially as they would sleep more of the time. In general, you should try to reduce the number of inserter operations to optimize UPS.
—Crevez, chiens, si vous n'étes pas contents!
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

Following Rex, here is a direct insertion version.
Not sure if it will be more ups friendly. 12 beaconed is just a bit to fast for a long inserter in vanilla, leading to more furnaces, and more beacons. We 'll need to test it.

Inserter timer: the most UPS friendly way i know is giving a signal every N ticks. inserters are inactive as long as there is no signal. it is a global timer: the more smelters you have , the less significant the ups overhead.
Bonus of this setup: the timed output is exactly 45 i/s:) 54/45*12*60 (number of ticks) is exactly 864 ticks between swings. inserter will never have to wait for a free space on the belt, (they stay active with items in hand)
Since there is a slight overproduction, all furnaces will fill up to max eventually over time, reducing the active entity time even more.

Disadvantages:
- more beacons and furnaces could impact UPS afaik.
- doesn't fit in a 100x100 cityblock


2022-01-09 15_28_32-Factorio 1.1.50.png
2022-01-09 15_28_32-Factorio 1.1.50.png (1.32 MiB) Viewed 15385 times
2022-01-09 15_06_02-Factorio 1.1.50.png
2022-01-09 15_06_02-Factorio 1.1.50.png (33.49 KiB) Viewed 15385 times
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

Well... here is another one.
Same timings as above, but it fits in a city block by rearranging the furnaces.

Advantages over V1:
- fits in cityblock
- more inserters sleep (they are all green now)
- less beacons! (320)

(you can add your own bloody lamps) :mrgreen:

Attachments
2022-01-09 17_13_14-Factorio 1.1.50.png
2022-01-09 17_13_14-Factorio 1.1.50.png (2.09 MiB) Viewed 15368 times
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by Belter »

Woah, very cool, inspiring setups, thank you! I've dropped iron direct insertion for the same reasons as you guys mentioned: focusing on 12 beacon 40+45 setup. Not sure which is better for UPS, I think this is now crying for a UPS measurement.
I was able to optimize the inserter timings
- 169 inserters grabbing 100% 12 items
- 2 insertes grabbing 100% 6 items (at the 45th split steel furnace)
- Changed to a "snake" steel belt so was able to eliminate all splitters and lane merges
- Was not able to keep the poles 100% aligned, but pretty close

The cycle time is 5x the iron smelting - no surprise - 720 ticks (716.42, so 0.5% steel overproduction will happen).
I had big fun timing the 2 lanes on the snake belt :mrgreen:

It takes 2 minutes to start and I saw no gaps after.

Updates:
- screenshot updated to show v3.01 version as in BP (using constant combinator for steel counter)

Possible Improvements:
- as discussed direct inertion? - not for the full beaconed layout
- 38 iron smelters instead of 40? 7.5*4=30 + 8? - thereotically possible to do...
- find a way to measue, I think all blueprints here pretty close to optimal UPS, but how close?
- one belt could be saved (won't affect distance to travel)
- substations might be possible - I like them, but fine with poles as well
Attachments
Steel v3.01.png
Steel v3.01.png (4.35 MiB) Viewed 15286 times
Last edited by Belter on Mon Jan 10, 2022 9:39 am, edited 8 times in total.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by Belter »

Put the components to a table for easier comparison. Is there any way to measure the # of swings of an inserter? Maybe better for me if not :)
Attachments
components.png
components.png (28.79 KiB) Viewed 15350 times
User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1133
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by NotRexButCaesar »

Belter wrote: Sun Jan 09, 2022 7:45 pm Is there any way to measure the # of swings of an inserter? Maybe better for me if not :)
You should be able to calculate it theoretically based on the number of items and the stack size.

If the inserter is not clocked and does not take a full hand, you can experimentally look at just one of the modules and calculate based on that.
—Crevez, chiens, si vous n'étes pas contents!
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by DaveMcW »

If you want to compare designs for UPS, the best way is to build a map full of the same design (say 10k steel per minute) and run the command line UPS tool.

Code: Select all

factorio.exe --benchmark "savename.zip" --benchmark-ticks 10000
causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by causa-sui »

DaveMcW wrote: Tue Jan 11, 2022 9:38 am If you want to compare designs for UPS, the best way is to build a map full of the same design (say 10k steel per minute) and run the command line UPS tool.

Code: Select all

factorio.exe --benchmark "savename.zip" --benchmark-ticks 10000
Great tip, thank you! I compared the steel bp from Nilaus' master class video to OP's.

I made two saves, each producing roughly 10k steel / minute:

Image

Code: Select all

$ ./factorio --benchmark /home/ryan/.factorio/saves/nilaus_steel.zip --benchmark-ticks 50000 --benchmark-runs 3 --benchmark-sanitize
  Performed 50000 updates in 10835.469 ms
  avg: 0.217 ms, min: 0.161 ms, max: 3.107 ms
  checksum: 766509169
  Performed 50000 updates in 12243.952 ms
  avg: 0.245 ms, min: 0.164 ms, max: 13.765 ms
  checksum: 766509169
  Performed 50000 updates in 11426.800 ms
  avg: 0.229 ms, min: 0.165 ms, max: 3.987 ms
  checksum: 766509169
(cont'd because of post size limit)
Last edited by causa-sui on Wed Jan 12, 2022 4:35 am, edited 1 time in total.
causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by causa-sui »

Image

Code: Select all

$ ./factorio --benchmark /home/ryan/.factorio/saves/belter_steel.zip --benchmark-ticks 50000 --benchmark-runs 3 --benchmark-sanitize
  Performed 50000 updates in 9535.865 ms
  avg: 0.191 ms, min: 0.129 ms, max: 3.959 ms
  checksum: 3369046640
  Performed 50000 updates in 9293.891 ms
  avg: 0.186 ms, min: 0.129 ms, max: 2.473 ms
  checksum: 3369046640
  Performed 50000 updates in 9352.868 ms
  avg: 0.187 ms, min: 0.128 ms, max: 5.066 ms
  checksum: 3369046640
  
That seems like a clear performance improvement! A bit curious how it happened that OP's design used _that_ many more beacons though...
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

So, i tried to make a "proper" benchmark...:) I used my steel setup and belters latest steel setup.
Made two saves in editor mode, each produces 100 blue belts of steel. (saves attached)
Used this script to run the benchmarks at 20000 ticks, 5 3 runs per save: https://github.com/velit/Factorio-Benchmark-Powershell

Results:
2022-01-12 17_44_00-Window.png
2022-01-12 17_44_00-Window.png (26.22 KiB) Viewed 15166 times
Main differences:
2022-01-12 17_54_23-Window.png
2022-01-12 17_54_23-Window.png (13.27 KiB) Viewed 15166 times
(Direct insertion wins) :lol:
Attachments
bm_ results.csv
(1.94 KiB) Downloaded 125 times
bm_belter-steel.zip
(7.5 MiB) Downloaded 119 times
bm_dis-steel.zip
(4.36 MiB) Downloaded 120 times
Last edited by disentius on Sat Jan 15, 2022 11:21 am, edited 1 time in total.
causa-sui
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sat Sep 12, 2020 4:23 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by causa-sui »

disentius wrote: Wed Jan 12, 2022 4:56 pm So, i tried to make a "proper" benchmark...:)
Hey, was mine improper? :P
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

Nope. Incomplete. you left out mine. :lol:
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by Belter »

Very useful to see the scripts and tools to used, thanks for both of you causa-sui & disentius.

This is a very clear situation, 340 UPS vs 200 UPS, that's a huge diff! I was expecting like 20% not 150% (and to the other direction of course :shock:)

Direction insertion is the most UPS optimized, no Q about it. Seeing these measurements there is no point sticking to 12 beacons.
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by Belter »

disentius wrote: Sun Jan 09, 2022 4:18 pm - less beacons! (320)
290 beacon also works, as the iron smelters are OK with 8 beacons - see calc. They will be almost 100% on so a bit worse for UPS though.

Update:
v4.03: Cleaned up version (to my taste), no splitter


Attachments
Steel v4.03 ResNeed.png
Steel v4.03 ResNeed.png (37.19 KiB) Viewed 14994 times
Steel DI v4.03.png
Steel DI v4.03.png (1.37 MiB) Viewed 14994 times
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

Looks nice. did you do an UPS test comparison?
Belter
Fast Inserter
Fast Inserter
Posts: 207
Joined: Sun Mar 14, 2021 12:38 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by Belter »

Not yet, but will if I can make it work. Maybe a timer for the direct insertion inserters would make sense as well?
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by disentius »

So, I just did an UPS test:
Not sure why your last one is still(about 4%) slower.
Method used:
- made an empty save and added the blueprints
- made the two benchmark saves from the empty save (10 belts of steel each) and run the benchmark 3 times for 50000 ticks, including the empty one for reference)
Can someone repeat the test, or find a mistake? all files attached
2022-01-15 14_51_11-bm_ results.csv - LibreOffice Calc.png
2022-01-15 14_51_11-bm_ results.csv - LibreOffice Calc.png (42.15 KiB) Viewed 14975 times
Attachments
bm_belter-steel V4.zip
(1.08 MiB) Downloaded 117 times
bm_dis-steel V3.zip
(1.19 MiB) Downloaded 129 times
bm_empty.zip
(653.19 KiB) Downloaded 116 times
bm_ results.csv
(1.37 KiB) Downloaded 99 times
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by DaveMcW »

V4 only uses 8 beacons for iron plates, V3 uses 10 beacons for iron plates. This gives a 17% reduction in assembling machine uptime.

The advantage of V4 is you can replace the ore belts with mining drills for even more direct insertion.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: UPS optimized Steel smelting to 1 blue belt

Post by DaveMcW »

For comparison, here is a 11 beacon benchmark. It is about 10% slower than V3.

steel V5.jpg
steel V5.jpg (1.17 MiB) Viewed 14944 times
Attachments
bm_davemcw-steel V5.zip
(1.57 MiB) Downloaded 119 times
Post Reply

Return to “Combinator Creations”