Pipe throughput measurements
Posted: Mon Aug 15, 2022 4:51 pm
On the fluid system page on the wiki, there is a table of selected pipe throughput numbers for specific pipe lengths between pumps. I've previously verified those numbers by hand. Today, I automated the measurements. The motivation behind this was verifying whether a formula for pipe throughput that was added to the page is correct. (Spoilers: It's not.) I am providing the numbers and methodology here so that others can verify it or modify the mod for their own testing.
How it works: The mod adds a scenario that spawns tank -> pump -> pipes -> pump -> tank setups of pipe lengths 1 to 1001. The tanks automatically fill with water/empty of water. Then it increases the game speed until 9 minutes pass. At 9 minutes, a message is printed in chat, notifying the player that the pumping speed numbers in the pump tooltips can now be taken as reliable measurements. Before 9 minutes, input and output pumps of the pipelines may not report the same values, the throughput is not stable yet.
I've made use of the ability to modify the Factorio source code and locally, temporarily, added a way for the mod to read the pumping speed of the pumps. This is not possible in the normal game because the speeds are not save/loaded and doing anything with the read values can lead to desyncs.
Results of the measurements for pipeline lengths 1 to 1001 are attached in the txt file. They reveal that the value for pipe length 261 on the wiki is 1 off (will be corrected). Furthermore, the formula that was added to the wiki is not correct for all values. There is no explanation for the formula that would explain the discrepancies, so I will remove it from the wiki page. If someone can explain the discrepancies or provide a formula that is correct, please add it to the wiki or reply to this post!
I also attached a save file of the scenario (taken about 2 minutes of in-game time before measurements are reliable), so that the measurements can easily be verified manually. Note that saving the game in the paused state after the 9 minutes have passed and then loading again will have the pumping speeds displayed as 0/s due to the mentioned lack of save/loading. A zipped version of the mod (without the ability to read the pumping speeds in code) is also attached. Measurements were done in 1.1.65.
How it works: The mod adds a scenario that spawns tank -> pump -> pipes -> pump -> tank setups of pipe lengths 1 to 1001. The tanks automatically fill with water/empty of water. Then it increases the game speed until 9 minutes pass. At 9 minutes, a message is printed in chat, notifying the player that the pumping speed numbers in the pump tooltips can now be taken as reliable measurements. Before 9 minutes, input and output pumps of the pipelines may not report the same values, the throughput is not stable yet.
I've made use of the ability to modify the Factorio source code and locally, temporarily, added a way for the mod to read the pumping speed of the pumps. This is not possible in the normal game because the speeds are not save/loaded and doing anything with the read values can lead to desyncs.
Results of the measurements for pipeline lengths 1 to 1001 are attached in the txt file. They reveal that the value for pipe length 261 on the wiki is 1 off (will be corrected). Furthermore, the formula that was added to the wiki is not correct for all values. There is no explanation for the formula that would explain the discrepancies, so I will remove it from the wiki page. If someone can explain the discrepancies or provide a formula that is correct, please add it to the wiki or reply to this post!
I also attached a save file of the scenario (taken about 2 minutes of in-game time before measurements are reliable), so that the measurements can easily be verified manually. Note that saving the game in the paused state after the 9 minutes have passed and then loading again will have the pumping speeds displayed as 0/s due to the mentioned lack of save/loading. A zipped version of the mod (without the ability to read the pumping speeds in code) is also attached. Measurements were done in 1.1.65.