Milo_Thatch wrote: ↑Thu Oct 05, 2023 11:06 am
Sorry I didn't specify that it was a "libreoffice calc" file. You can open it
with google sheets if you understandably won't install the libre office suite
.
Google sheets did it, i tried using the libre office suite i knew it was this
, but for some reason it kept opening the file not as calc but
with this functionnality of open office
https://www.openoffice.org/product/math.html , and i didn't know what to do. But now i can see it all
Milo_Thatch wrote: ↑Thu Oct 05, 2023 11:06 am
- It gave very precise results compared to the game, in the range of 0.1-0.3 delta-tick (%). I can consider that the main culprits are my sausage fingers and reflexes, because the measurement method isn't automated.
I understand that you have an order of magnitude difference in precision between acceleration and deceleration when you compare your formula
with in game behavior. Acceleration is 0.1-0.3% off, whereas Deceleration is up to 3% off. Both test being done
with the same measurement method. The logical conclusion to me is that the formula for deceleration is less precise than the one for acceleration. (but farcast used the same formula as far as i understand and the results are more precise than 3% off, but the measurement method used by farcast i don't understand well enough to conclude anything and train is different that's confusing me)
You can, in game, use speed 0 by the way "pause" in editor, and only use "next frame" to go 1 update at a time, then map this to a hotkey, and do several trains at a time, press a key, write down their speed values, press a key, write down their speed values, and so on if you want to remove the reflexes part. Though that would still not be automated and quite tedious if 1 speed value takes 3 second to write in a .calc it will take 10 minutes for 200 ticks of manual recording x). i don't know how to write a command to " Export the speed of a locomotive entity every tick in file".
Milo_Thatch wrote: ↑Thu Oct 05, 2023 11:06 am
* I think that looks like what you already tried
with wolfram. If I have a speed formula like "speed = speed - constant", I can easily calculate :
- How many steps it takes for the speed to reach 0.
That's the logic i had in mind when using wolfram, more precisely "how many steps for the speed to reach 1/2 of original speed". Because i only used the equation for the air_resistance of acceleration. such formula is " speed = speed * constant " where constant is approaching 1 but constant is always less than 1, depending on the weight and on air_resistance of the first rolling stock.
(1.0 - totalAirResistance / (totalWeight / 1000.0) with 0.0075 for totalAirResistance when there is only a front loco.
In such case it takes infinity to reach 0. This yield a non-linear behavior unlike the "speed = speed - constant ". Because when speed is high, more speed is removed than when speed is low. But that's just a vague notion, i wanted to go more precise but i don't know the proper math so i tried something that would give me an order of magnitude for the supposed maximum hypothesis of the impact of air_resistance.( considering air_resistance exist and have an impact, left alone, how much time is required for a human player to notice it, or to measure it in the case of 1 loco and in the case of 50 loco).
Maybe this could explain why in one case the formula seems perfect, and in another case 3% off i thought.
I think it shows that for 50 loco trains, the impact is an order of magnitude less than for a single loco train. ( 9000 tick vs 200 tick needed to half the speed). As such it may create a discrepancy between predictions without air_resistance and considering there is air_resistance that would way more be noticeable for a single loco, and not for 50 locos, if the overall braking time is closer to 200 tick for both trains.
My idea is that the overall speed in game may be calculated doing first "speed = speed - constant" ( to account for friction and braking force) and then " speed = speed * constant " ( to account for air_resistance ) both for acceleration and deceleration. But i don't know how to make a prediction for step 150 without being forced to math step 149 and 148 and 147 and 146 like in 1 formula to easily compare the results ... So i did this in a .calc Now that i was able to open the .ods
i could compare my predictions and your measurements .
It shows the "constant part" and the "variable part" using the datas i found from this thread, weight, friction number of loco and wagon allow to compute for 2 constant, one to subtract thus "constant part", one to multiply thus "variable part" because the amount of speed lost is not the same at all tick it depend on current speed.
I don't know what to think of it yet. I took for comparaison point a 1-4 trains like you did so i could reuse the 1.38 tile/tick speed as this is hardcoded in my .ods and compared my prediction
with air_resistance as if it was to be applied in the same way for braking and acceleration , your prediction
with friction model3 , and the result in game from your measurement which i understand now the method to measure time
with a phone chronometer x).
My prediction with air_resistance, is not accurate. Less precise than your model3, it gives the train too much braking power and my predictions are consistently telling that the train will stop in less ticks than what you measured.
When i plotted the delta speed that the prediction
with air_resistance would give between tick (x) and tick (x+1), it's not a straight line. That's what i called non-linear, which i suppose means it's not an arithmetic progression.(i'm not sure the meaning in english) I think one can say the derivative is not an horizontal lane if this is considered a function. Since the difference between 2 terms is smaller at low speed than at high speed. That's what i expected from my old measurement graphs. But it doesn't seem to fit really
with the in-game number either.
I still need to try and re-do the top speed calculation based on fuel so that i can compare the prediction
with more datas instead of re-using 1.38 tile/sec. But
i no longer think air_resistance apply the same way for acceleration and deceleration. It would be too strong to miss its impact. In any case here is the doc :