On the picture 225k and 112k means that the average flow is equal to 22.5 and 11.2 items per second.
The main idea is to use the simplified Kalman filter: if f_n denotes the instant flow speed at tick n, then prediction of the average flow is
Code: Select all
K_(n+1) = a * f_n + (1-a) * K_n
The instant flow speed f_n is equal to the number I_n of items on a belt multiplied by 45/8 (for express belts). I also decided to multiply I_n by 10000 due to integer computations in factorio. So
Code: Select all
F_(n+1) = ( (10000*45/8) * I_n + 89 * F_n ) / 90 = ( 56250 * I_n + 89 * F_n) / 90
Code: Select all
F_(n+1) = ( 18800 * I_n + 89 * F_n) / 90 (normal)
F_(n+1) = ( 37500 * I_n + 89 * F_n) / 90 (fast)
F_(n+1) = ( 56300 * I_n + 89 * F_n) / 90 (express)
I'm interested if this design seems interesting/usable.