[kovarex] [1.1.14] Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 9:32 pm
by OptimisticPeach
I was designing a very fast water train loader, and I happened upon this design:
factoriobug.png (539.44 KiB) Viewed 3400 times
Providing power and a fluid wagon to put water into creates a very jittery display when hovering the mouse over one of the pumps pumping the train:
factoriobug.gif (83.77 MiB) Viewed 3400 times
In the gif, it looks much less jittery because of the compression. On inspection of the actual frames, a switch between 800 and 12000 occurs every frame.
Here's the blueprint if necessary:
Re: Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 9:49 pm
by boskid
Long time ago when i was looking into this it was related to the pump moving fluid to the train, because in this case there are 2 fluid move operations that consume energy from the energy buffer and the buffer has enough energy for only one operation. Because of that in 1st tick pump may consume all the energy to move a lot of fluid to its internal fluid box consuming all the energy, and there is no energy left to pump fluid to train. In the next tick pump does not consume much energy to fill itself because fluidbox is almost full however the second pump action pumps all the fluidbox content to the train and the cycle repeats.
Re: Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 10:04 pm
by kovarex
boskid wrote: Sat Jan 23, 2021 9:49 pm
the buffer has enough energy for only one operation.
This sounds like a problem with an easy solution.
Re: [1.1.14] Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 10:06 pm
by OptimisticPeach
Wouldn't making the energy buffer be enough to fill the fluid box, and pump all the fluid out be a fix?
Re: [1.1.14] Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 10:11 pm
by boskid
OptimisticPeach wrote: Sat Jan 23, 2021 10:06 pm
Wouldn't making the energy buffer be enough to fill the fluid box, and pump all the fluid out be a fix?
But in that case when pump would be moving from fluidbox to fluidbox it would only consume half the energy, same when pumping out of the train. Other hacky option would be to halve power usage for pumping to train (ugly) or making one of those operations not consume energy in that case. I think easiest approach would be in case of pumping to the train for the second operation to not consume energy and pump for free (it would be limited anyway by the pumping speed to the internal fluidbox)
Re: [1.1.14] Jittery Display on Pumps Pumping out of a Tank
Posted: Sat Jan 23, 2021 11:36 pm
by OptimisticPeach
Wait, if I understand it, there're three fluidboxes: Source, Pump, Destination, and it costs energy to move from source to pump, and from pump to destination, no?
If that's the case, then its buffer should be filled with enough energy to move from source to pump and pump from destination in a single update.
Apologies if what I'm saying makes no sense and I've got a huge misunderstanding about the implementation details.
Re: [kovarex] [1.1.14] Jittery Display on Pumps Pumping out of a Tank
Posted: Sun Jan 24, 2021 2:33 pm
by kovarex
Thanks for the report, it is fixed for the next release now.