Alt-F4 #52 - Fluidic Power Benchmarking

Post all other topics which do not belong to any other category.
Post Reply
AlternativeFFFF
Inserter
Inserter
Posts: 46
Joined: Fri Aug 28, 2020 12:07 pm
Contact:

Alt-F4 #52 - Fluidic Power Benchmarking

Post by AlternativeFFFF »

For issue #52, stringweasel returns with part two of the Fluidic Power Experiment where he dives into the rather surprising performance implications of his creation. If you liked last week’s article, you’ll like the second part this week. What a surprise!

Continue reading: https://alt-f4.blog/ALTF4-52/

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 145
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by DarkShadow44 »

Huh, interesting read, thanks!
Wouldn't that imply that ideas like viewtopic.php?t=68761 are not inherently as imperformant as one would assume?

User avatar
Stringweasel
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Stringweasel »

I think it's not as inperformant as it initially seemed, at least by the players. We can probably get quite far with more realistic electricity, but I do not think it should be included in vanilla Factorio.

It will still have an big influence on size of the bases you can build. There's a reason why players still go for solar instead of nuclear at massive scale. Now imagine a nuclear reactor almost the size of your megabase, all with fluid calculations. Personally I would rather be able to build at an gigantic scale than having more realistic electricity.

IMO it should stay as a mod. I'd rather have more control over electricity from the modding API to reduce the effect of the Electric Network. I'm still thinking of a good modding interface request to make to achieve this, so if anyone has ideas please share :P

And then there's of course a middle ground they could do as well, similar to the other mods I mentioned in Part 1. But IMO I'd rather have fully realisitic, or fully unrealistic electricity, not some mix of it.

Not sure what others would like though :)

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Stringweasel wrote:
Fri Nov 12, 2021 6:45 pm
It will still have an big influence on size of the bases you can build. There's a reason why players still go for solar instead of nuclear at massive scale. Now imagine a nuclear reactor almost the size of your megabase, all with fluid calculations. Personally I would rather be able to build at an gigantic scale than having more realistic electricity.
You mean something like this?
Reactor-386.zip
(4.57 MiB) Downloaded 39 times
That's a 2x25 reactor filling trains with 386 fluid wagons, which are about 2.8km long. Just the reactor alone means I can only run the game at ~170 UPS because the fluid/heat computations eat so much CPU.

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Maybe you could avoid majority of electric statistic collection by converting the fluidic power into heat and use heat using entities?

Even if the heat uses as much time as the electric statistics collection one benefit would be that heat is handled by multiple threads while electricity only uses one thread from your description.

User avatar
Stringweasel
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Stringweasel »

mrvn wrote:
Fri Nov 12, 2021 8:27 pm
Maybe you could avoid majority of electric statistic collection by converting the fluidic power into heat and use heat using entities?
Thought about that, but it doesn't work, because heat entities doesn't have undergrounds (or links). So the power poles will have to touch one another, which will be kind of weird.

User avatar
Stringweasel
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Stringweasel »

mrvn wrote:
Fri Nov 12, 2021 8:27 pm
Maybe you could avoid majority of electric statistic collection by converting the fluidic power into heat and use heat using entities?
Also, the issue isn't the fluidic entities, and I'll have the same issue with heat entities. The problem is converting fluid (or heat) to electricity and back. But I think you're suggesting letting all entities be heat powered and skip that step? It would theorerically work, but I don't really want to do that. Then every machine in the game needs to be modified to be heat/fluid powered, which is almost impossible to maintain, and I'm not even sure how I will "connect" machines to the poles.

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Stringweasel wrote:
Fri Nov 12, 2021 9:36 pm
mrvn wrote:
Fri Nov 12, 2021 8:27 pm
Maybe you could avoid majority of electric statistic collection by converting the fluidic power into heat and use heat using entities?
Also, the issue isn't the fluidic entities, and I'll have the same issue with heat entities. The problem is converting fluid (or heat) to electricity and back. But I think you're suggesting letting all entities be heat powered and skip that step? It would theorerically work, but I don't really want to do that. Then every machine in the game needs to be modified to be heat/fluid powered, which is almost impossible to maintain, and I'm not even sure how I will "connect" machines to the poles.
Yes. Keep the fluid stuff as is. But the last step is converting fluid to heat and using heat powered machines instead of electricity.

The idea would be to have an invisible heat input in the center (upper left corner for 2x2 entities) of each machine and a line of invisible heat pipes to the nearest power pole. The power pole would be a fluid-to-heat converter. It would be important to place the heat pipes so that the power poles don't connect with each other. At least not in general, a few connections are fine. The goal is to have many heat networks though to take advantage of the threads.

It's too bad there isn't a connected heat pipe and connected pipe entity. That would be much better and would allow building an actual heat network between poles and map voltage drops to heat loss.

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 145
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by DarkShadow44 »

Stringweasel wrote:
Fri Nov 12, 2021 6:45 pm
IMO it should stay as a mod. I'd rather have more control over electricity from the modding API to reduce the effect of the Electric Network. I'm still thinking of a good modding interface request to make to achieve this, so if anyone has ideas please share :P
What could help would be the option to disable statistics for a network from mods, no?
Also, maybe a way to teleport fluids. Like "linked belts", so you don't have the placement restrictions the mod currently has.
What I'd also still love to see would be a way to mark powerpoles as non-connected despite having a wired connection. You know, have a visual connection but technically separate electrical networks.
Especially a combination of the latter two would really improve the "fluidic power" thing I think.

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

DarkShadow44 wrote:
Fri Nov 12, 2021 11:54 pm
Stringweasel wrote:
Fri Nov 12, 2021 6:45 pm
IMO it should stay as a mod. I'd rather have more control over electricity from the modding API to reduce the effect of the Electric Network. I'm still thinking of a good modding interface request to make to achieve this, so if anyone has ideas please share :P
What could help would be the option to disable statistics for a network from mods, no?
Also, maybe a way to teleport fluids. Like "linked belts", so you don't have the placement restrictions the mod currently has.
What I'd also still love to see would be a way to mark powerpoles as non-connected despite having a wired connection. You know, have a visual connection but technically separate electrical networks.
Especially a combination of the latter two would really improve the "fluidic power" thing I think.
Doesn't look as nice but you can draw a line between the poles.

User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1058
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by NotRexButCaesar »

Stringweasel wrote:
Fri Nov 12, 2021 6:45 pm
IMO it should stay as a mod. I'd rather have more control over electricity from the modding API to reduce the effect of the Electric Network. I'm still thinking of a good modding interface request to make to achieve this, so if anyone has ideas please share :P
I think that there should just be an interface option to disable the production statistics, like there is an option to disable replay.
Last edited by NotRexButCaesar on Sat Nov 13, 2021 3:42 am, edited 1 time in total.
: Alea jacta est. Determine what you intend to accomplish with an action before execution.
Have you ever heard the gospel? Most have not.

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 145
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by DarkShadow44 »

mrvn wrote:
Sat Nov 13, 2021 1:01 am
Doesn't look as nice but you can draw a line between the poles.
Mhhh, not sure how that looks.
NotRexButCaesar wrote:
Sat Nov 13, 2021 2:01 am
I think that there should just be an interface option to disable the production statistics, just like there is an option to disable replay.
I think it should be more specialized than that. I wouldn't want to give up all statistics just for that.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Silari »

DarkShadow44 wrote:
Sat Nov 13, 2021 3:06 am
I think it should be more specialized than that. I wouldn't want to give up all statistics just for that.
Sounds like https://wiki.factorio.com/Prototype/Rec ... from_stats but for boilers/generators.

User avatar
Stringweasel
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Stringweasel »

DarkShadow44 wrote:
Fri Nov 12, 2021 11:54 pm
What could help would be the option to disable statistics for a network from mods, no?
Exactly, that could work. Like Silari said:
Silari wrote:
Sat Nov 13, 2021 5:15 am
Sounds like https://wiki.factorio.com/Prototype/Rec ... from_stats but for boilers/generators.
I don't think it's a clean solution though. Hiding it from statistics means it will also not apply to the overall production/consumption of that network. This means your "Production" and "Satification" bar graphs will be wrong, and it might show you're on the brink of having a brownout, but actually you have enough power. Or visa versa. As Silari said it's similar to "hide recipe from production" and could be handled the same. We have control over recipes and can create cases where the Production/Consumption graphs don't make sense either, but,the power statistics is the only real feedback you get on your power production as a player, while for item production it's more visual with your belts, trains, etc.

Essentially, your machine might run slow and you wonder if it has low power. You click on the power pole to open the graph (or hover over it) and see a full green bar (or empty?), because the generator is hidden froms statistics. But internally it is actually running slower because of low power, and you can't see or verify it. IMO it's not very intuitive :)

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Stringweasel wrote:
Sat Nov 13, 2021 8:16 am
DarkShadow44 wrote:
Fri Nov 12, 2021 11:54 pm
What could help would be the option to disable statistics for a network from mods, no?
Exactly, that could work. Like Silari said:
Silari wrote:
Sat Nov 13, 2021 5:15 am
Sounds like https://wiki.factorio.com/Prototype/Rec ... from_stats but for boilers/generators.
I don't think it's a clean solution though. Hiding it from statistics means it will also not apply to the overall production/consumption of that network. This means your "Production" and "Satification" bar graphs will be wrong, and it might show you're on the brink of having a brownout, but actually you have enough power. Or visa versa. As Silari said it's similar to "hide recipe from production" and could be handled the same. We have control over recipes and can create cases where the Production/Consumption graphs don't make sense either, but,the power statistics is the only real feedback you get on your power production as a player, while for item production it's more visual with your belts, trains, etc.

Essentially, your machine might run slow and you wonder if it has low power. You click on the power pole to open the graph (or hover over it) and see a full green bar (or empty?), because the generator is hidden froms statistics. But internally it is actually running slower because of low power, and you can't see or verify it. IMO it's not very intuitive :)
Why would you click on the power pole instead of just hovering over it and checking the electricity bar?

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

DarkShadow44 wrote:
Sat Nov 13, 2021 3:06 am
mrvn wrote:
Sat Nov 13, 2021 1:01 am
Doesn't look as nice but you can draw a line between the poles.
Mhhh, not sure how that looks.
It's just a straight line instead of a wire that dips in between poles. And no shadow.

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Stringweasel wrote:
Fri Nov 12, 2021 9:36 pm
mrvn wrote:
Fri Nov 12, 2021 8:27 pm
Maybe you could avoid majority of electric statistic collection by converting the fluidic power into heat and use heat using entities?
Also, the issue isn't the fluidic entities, and I'll have the same issue with heat entities. The problem is converting fluid (or heat) to electricity and back. But I think you're suggesting letting all entities be heat powered and skip that step? It would theorerically work, but I don't really want to do that. Then every machine in the game needs to be modified to be heat/fluid powered, which is almost impossible to maintain, and I'm not even sure how I will "connect" machines to the poles.
Heat using machines have the issue with connecting them, needing a number of heat pipes from power pole to machine. So maybe burner machines would be simpler like this:
fluidic-power-solids.png
fluidic-power-solids.png (579.17 KiB) Viewed 313 times
The top is how it should look in the game with the power switch being the transformer. Bottom is what it actually is underneath. The transformer (chemical plant) takes the fluidic power and produces solid power and dumps it in a connected chest. The power poles are connected chests with the same ID as the transformer and have inserters that load the solid power into every entity in the rang of the power pole.

The connected chests and inserters can be compressed into a single tile with the pick-up position on the chest and drop-off on the center of each entity. Make the inserter use void energy and insanely fast to extend/rotate. Drawback for this method would be that burner machines have no drain. Advantage would be that a machine can have inserters from multiple unconnected power poles and would take energy from each.

User avatar
Stringweasel
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by Stringweasel »

mrvn wrote:
Sat Nov 13, 2021 9:10 am
It's just a straight line instead of a wire that dips in between poles. And no shadow.
This is probably possible. The annoying part is that sometimes power poles slightly rotate when add you circuit wire. There's no event for when that happens, and after that the copper cable will hang in the air. You can probably just connect it "close enough", but it's not a perfect solution.
mrvn wrote:
Sat Nov 13, 2021 9:27 am
Heat using machines have the issue with connecting them, needing a number of heat pipes from power pole to machine.
That's a cool idea. As you mentioned though this will mess with burner machines. And also, it might behave odd for 1x1 machines like inserters. You would be able to pick up fluidic-solid-fuel from lamps for example. Inserters should be fine I guess having a chest and another inserter inside them, because it shouldn't change the input/output location. And you're going careful where you put it for assemblers and such so that normal inserters don't accidentally pick it up, or put something in the hidden chest.

In that way every solution has some side effect. A large portion of time during the development of Fluidic Power was going towards not accidentally connecting the power poles to normal poles. It's so easy to do because the power pole functions like any other underground pipe.

This makes me wonder. Maybe you could turn off power statistics for a specific force. Then I simply make all the fluid components part of that force, and the force simply doesn't have the ability to read statistics. :idea: Although they would probably not want to have something like that as a runtime setting, and rather a startup setting.

mrvn
Smart Inserter
Smart Inserter
Posts: 5100
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #52 - Fluidic Power Benchmarking

Post by mrvn »

Stringweasel wrote:
Sat Nov 13, 2021 9:46 am
mrvn wrote:
Sat Nov 13, 2021 9:10 am
It's just a straight line instead of a wire that dips in between poles. And no shadow.
This is probably possible. The annoying part is that sometimes power poles slightly rotate when add you circuit wire. There's no event for when that happens, and after that the copper cable will hang in the air. You can probably just connect it "close enough", but it's not a perfect solution.
mrvn wrote:
Sat Nov 13, 2021 9:27 am
Heat using machines have the issue with connecting them, needing a number of heat pipes from power pole to machine.
That's a cool idea. As you mentioned though this will mess with burner machines. And also, it might behave odd for 1x1 machines like inserters. You would be able to pick up fluidic-solid-fuel from lamps for example. Inserters should be fine I guess having a chest and another inserter inside them, because it shouldn't change the input/output location. And you're going careful where you put it for assemblers and such so that normal inserters don't accidentally pick it up, or put something in the hidden chest.
The fuel would be only in the connected chests. For an inserter to pick it up accidentally would mean you have an inserter with the power pole as pickup point. Which doesn't make any sense so it's ok if that breaks.

You wouldn't be able to pick up fuel from a "lamp" unless it's a boiler type entity with fuel pass through. You would set a fuel type so the fuel isn't usable for normal burner machines like burner inserters. I guess electric boilers that have a recipe that also outputs items would break. Because the inserter would pick up both the output and fuel. Can't win them all.

Post Reply

Return to “General discussion”