It was sorted with the pump fix I did to increase capacity, mentioned above somewhere. I remeasured the fluid wagon filling times after the 0.18.3 fix, the numbers that are on the fluid wagon wiki page. The pumps were just as fast as before 0.17, maybe even a few ticks faster: https://wiki.factorio.com/index.php?tit ... did=164837. The few tick difference between these values may be related to testing methodology, before 0.17 tick perfect testing of the train arrival/departure was hard because the map editor pause game/tick once function didn't exist yet.malventano wrote: ↑Fri Aug 19, 2022 7:02 am Hey Bilka, since you're going 'deep' on fluids, figured I'd ask if fluid wagon loading was ever sorted? I bring that up because it was one of those edge cases where max flow was not actually 12,000/s. Understood the list on the wiki doesn't mention fluid wagons, but... :)
(touched on in this thread from way back where we fixed the pump flow rate for most other cases)
To be clear here, your paper went a bit over my head. From my perspective, it may be possible that there are more than 2 formulas needed due to the 2 min() calls in the code, only one of which is considered in the older forum post which allows explanation of the wiki formula. But the min calls are not related to max pipe capacity, but rather low flow.haibane_tenshi wrote: ↑Fri Aug 19, 2022 11:40 am Hello there, author of this post here. People on reddit pinged me about this thread.
Just by looking at the numbers I can tell you that there is not two formulas, but at least three. The top entry in the table is 6000 units/sec = 100 units/tick -> pipe was overflowed, this is likely also true for the second entry and a few more. Those will have to use a different formula to correctly account for the effect.
However, the two formulas that are on the wiki work for the 1 and 2 pipe long cases too, they give the same values as what is measured.
If it helps, as far as I can tell with my limited understanding of the notation, the Lisp code given here is exactly what happens in the game code. It should be identical to what I explained in my second post in this thread.
There is no need for extra in-game methodology unless you must do the measurements yourself. The code that I have can give me the unfloored numbers. If you need anything beyond the "north" setup in complete glorious float (converted to double for Lua) precision, let me know. I can't measure things today and I am taking the next week off, but after that I can easily provide more values. Or maybe someone with source access can take my mod and run it with the modified lua api.haibane_tenshi wrote: ↑Fri Aug 19, 2022 11:40 am About measurements. Can we change methodology here? Working errors out with rounded numbers is painful.
I didn't work with unfloored number (beyond testing the errors) because the goal was info collection for the wiki, which only needs to be accurate with what the player sees. Easiest way to see pipe throughput is the pump tooltip, which floors.
From what I can tell, it is evaluated once per connection ("joint"), IsUpdateDirection is only modified on connect/disconnect:haibane_tenshi wrote: ↑Fri Aug 19, 2022 11:40 am Last, this is a bit awkward to to do after so many years, but can I ask something? Given two entities A and B connected to each other by fluid network, how many times the joint between them is evaluated every tick? Is it once or twice? It can be evaluated twice, first time when going through A, and second time when going through B, but it can also be evaluated only once (i.e. when going through B it is skipped). I'm asking because in the paper I made a subtle assumption that every joint is evaluated exactly once. If that doesn't hold then a whole bunch of math needs to be redone.
Code: Select all
double FluidBox::PipeConnection::calculateFlowSpeed(...)
{
assert(this->isUpdateDirection());
PipeConnection* opposite = this->getOpposite();
assert(!opposite->isUpdateDirection());
...