[0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Things that we don't consider worth fixing at this moment.
Post Reply
User avatar
spiral_power
Fast Inserter
Fast Inserter
Posts: 167
Joined: Wed Oct 30, 2019 5:17 am
Contact:

[0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by spiral_power »

To tank: speed 5000-6000/s, probably correct.

To wagon: speed always 12800/s ,this is not correct.
To wagon speed is a bit faster than To tank.
Is real speed 6000-7000/s ?
totank.png
totank.png (2.15 MiB) Viewed 3615 times
towagon.png
towagon.png (1.24 MiB) Viewed 3615 times
factorio-current.log
(5.13 KiB) Downloaded 147 times

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by TruePikachu »

I can confirm, at least, that pumps shouldn't be capable of such speeds in vanilla, due to two different factors in `Pump::update()` (which I recently dug through for unrelated reasons). I wasn't paying close attention to the code responsible for tracking fluid transfer logging, however, so I can't say for certain if the bug is there or in the tooltip code.

According to my math, the maximum transfer rate into a fluid wagon should be the same as a storage tank; under vanilla conditions, this absolute maximum should be `(2-0)*0.4 + 2/10` = 1 internal unit/tick = 6000/s in-game, assuming the tank is continuously emptied and the pump is continuously filled.


EDIT: Disregard: I just remembered that I was also ignoring the wagon transfer logic, which might override the fluidbox-based logic.

migiyubi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Nov 06, 2019 1:04 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by migiyubi »

This can be confirmed since 0.17.76.
Perhaps the fix for 77656 broke this?
viewtopic.php?f=7&t=77656

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by TruePikachu »

I just dug through the code again. Aside from a possible issue with modded pumps containing multiple input connections (going by a rough disassembly, it appears the pumping speed is limited per input connection; I don't know if this is correct or intended), the member `Pump::pumpedLastTick` is (in the case of filling a fluid wagon) first set to the amount of fluid transferred from the internal fluidbox to the wagon (which costs energy), and then in the loop per input connection the member is further added onto (also costing energy). This might mean that the pump not only can pump more than the specified speed if there's multiple input connections (only relevant to mods), but that it can also pump an additional multiple of the speed if it's feeding into a fluid wagon (which is 2x the speed in vanilla, assuming the wagon doesn't fill up entirely and the pump can take 2 internal units of fluid from the rear fluidbox every tick) — while consuming extra power as a result (e.g. a pump that's pumping 12800/s would be using 106.667% of the maximum power consumption, as listed in the prototypes).

For OP, the actual flow speed in this circumstance should top out at 12000/s, and is otherwise limited by how much fluid is available in the tank the pump is taking from. The bug is that both the movement from tank to pump and the movement from pump to train is counted.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by TruePikachu »

And I just reproduced the issue including the extra power consumption; this suggests the actual throughput is 6400/s. I'm not quite sure why the rear pump is behaving the way it is, though, from a theoretical perspective (but I think this is also a known bug that's marked as won't fix).
Attachments
Capture.PNG
Capture.PNG (265.13 KiB) Viewed 3488 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by Klonan »

It is just the max rate, which is limited by input and output bottlenecks

Even if it is a bug, the fix is a new fluid algorithm

User avatar
spiral_power
Fast Inserter
Fast Inserter
Posts: 167
Joined: Wed Oct 30, 2019 5:17 am
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by spiral_power »

The core problem is the ACTUAL speed is 6000-7000/s(6400/s?) but it displays 12800/s.
Is it really NOT a tooltip bug?
I may not matter 12800/s exceed ceiling 12000/s.

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by TruePikachu »

Except there's still a bug that the fluid transferred (and energy consumed) is double-counted. A simple fix would be to remove the energy usage and rate accumulation for filling a fluid wagon with the pump's fluidbox (since it still takes energy to fill its fluidbox from the rear fluidbox).

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by Honktown »

There's been a longstanding complaint that pump numbers seem way off. ANY fluid only transfers at a max of 1200/sec at a 100->0 connection through piping or from tank-to-tank. Unless pumps have some special logic if they're connected end-to-end, it doesn't make sense.
I have mods! I guess!
Link

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.79] Tooltip for pumps display incorrect speed (12800/s?)

Post by Klonan »

Honktown wrote:
Thu Dec 05, 2019 9:22 am
There's been a longstanding complaint that pump numbers seem way off. ANY fluid only transfers at a max of 1200/sec at a 100->0 connection through piping or from tank-to-tank. Unless pumps have some special logic if they're connected end-to-end, it doesn't make sense.
Yea, they were set crazy high so they basically never bottleneck or make additional problems

When/If the fluid logic rework happens, then the value shows will be set to something more reasonable

Post Reply

Return to “Won't fix.”