farcast wrote: Sat Sep 30, 2023 10:13 pm
Including friction perfectly accounts for the difference (1800 Newtons per rolling stock, or 0.5 after converting seconds to ticks).
To be fair, i'm not understanding all the method that leads you to this conlusion. I think i understand how you get the distance using the energy and velocity^2 equation. That part i only got it when looking for the 5th time after Milo_Thatch posted his method. I can imagine that from this and precise measurement of where the train stops in game, ( which can be made arbitrarily precise thanks to the magic behind sqrt(2) and a not-less-magical-to-me setup exploiting this) you know the energy of the moving train, and make a prediction on where it is going to stop, looking at this prediction, you are able to deduce that some energy is dissipated away that is not coming only from the braking force, but also due to friction, otherwise doubling the braking force would halve the distance and the predictions are correct only if you account for the energy dissipated by friction.
There are some gaps in my understanding and i'm not sure how to interpret the difference of 11 and 13.98 at the end. It seem to me that those are the very very tiny variation you have using your updated method of prediction that include friction and your results with in-game measurements. Which then could either come from a very very tiny adjustment in the formula or from a very very tiny imprecision on the measurements due to the need of exponentially more train test for more significant digits.
It seems both of you are agreeing on this formula ( regarding how to add the friction's effect during braking ):
Milo_Thatch wrote: Mon Oct 02, 2023 6:08 pm
(3) total_braking_force = ((braking_force * cumulative_effect) + friction) / weight;
farcast wrote: Sat Sep 30, 2023 10:13 pm
Force = locomotives * (braking force per locomotive * research bonus + friction per locomotive) = 50 * (b * r + f)
But now i'm confused because i don't know if it's "perfect" or if there is still some little imprecisions and if so at which order of magnitude and what could cause it. As the interpretations of the results' precision seem to differ. is it perfect ? or is it 4% off sometimes ? and is it just me that didn't understand that it comes from the measurement methods ?
I thought of comparing with things that are known inspired by Milo's sanity check on measurement methods with acceleration because in the
doc linked in previous post , the air_resistance that is known to have an impact on acceleration is using this formula:
nextSpeed *= (1.0 - totalAirResistance / (totalWeight / 1000.0));
Which in the case of a train with 50 locomotives would give a multiplication of the speed by 0.999925 each ticks .
1.0 -(0.0075/((2000*50)/1000))
The 0.0075 being the air_resistance of a locomotive as indicated in the
readme from the gitlab
In the case of a train with only 1 locomotive it would give a multiplication of the speed by 0.99625 each ticks .
1.0 -(0.0075/((2000*1)/1000)).
Now if you take a number like 100 to represent the speed of a train, and you multiply it by one or by the other again and again, to represent how much impact it would have, it is possible to plot the equation
100*0.999925^x=50 or
100*0.99625^x=50 in wolfram alpha, with the idea of looking at how much time it would take for a train to lose half its speed due to air_resistance, ( as if it was the only force that apply to a train liberated from friction ). And well, the results are : 9241 ticks for the heavy 50 loco trains and 184 ticks for the only 1 loco train. ( it makes sense intuitively that the super heavy train keeps going for a long time and not the lighter one ).
I know air_resistance is not supposed to be part of the deceleration calculations, but i am in doubt since my test were showing non-linear behavior for deceleration and the formula both of you seem to agree on would yield a linear deceleration i think. The impact of air_resistance if it was to be accounted for in the deceleration as a multiplication by a number very slightly under 1 repeatedly would yield a non-linear deceleration so i like this idea it is a confirmation biais maybe. I think it would also explain why the formula seems more precise the heavier the train in Milo's test and why it's super precise on farcast's test with a 50 loco train but i'm not sure i understood that part correctly, 50 loco train would yield a negligible air_resistance, but the setup can be made arbitrarily precise, though it's 0.999925 vs 1 we are trying to measure with a 50 loco train if there was air_resistance in the deceleration. ( how many times did the train took to stop ?
)
It seems to me that the two numbers are close enough to 1 so that the impact would be barely noticeable given what i think is the relative time a train needs to come to a full stop : air_resistance is 0.0075 for a loco vs 0.5 for friction,If friction is a small variation to account for, air_resist could be even smaller. If i knew how many ticks does trains need to stop i could test my hypothesis or at least know if the supposed impact of air_resistance is within an order of magnitude that would be significant/noticeable given the measurement in game. ( plz send raw data and i can give it to wolfram myself
).
I realize now i thought i was going to help and it's me who need help understanding because i'm not sure my reasonning is correct and i'm curious to understand
How ?
I couldn't open the file i downloaded and read something it doesn't open a table, but an empty Math interface.
Milo_Thatch wrote: Mon Oct 02, 2023 6:08 pm
I'm happy with the result, as its precision looks proportional to the train length, but it still itches me that I couldn't find the precise formula.
I'm tempted to directly ask the devs, but I wonder if that would be rude.
Me too it itches
And i don't think it's rude if you are genuily interested in someone's work, and not trying to steal a secret formula to put in your own copy
But also don't expect an answer, i think it wouldn't be rude from the devs not to answer, because they could explain something, how to open a file on gitlab to me for example, and i would not understand, and ask more questions, and be explained again, and again, and again, to a point maybe the (very busy) dev feels i'm wasting its time and don't know how to say nicely and decide to avoid the awkward situation later like guideline.
Also i'm acting like i know what's rude or not because you asked and i posted a lot of message on this forum but really i don't know. I can say that i almost never see devs answering questions whose answer is a google search away or in the wiki. But if you can't find a simple formula that may also be because there is no simple formula and a knowledge of derivatives and integration and understanding of code is required and that could lead to an awkward math lesson that maybe no dev is willing to risk attempting to give to a random stranger on the internet x) .
I think Allaizn wrote the reddit post 5 years ago as a player and not as a dev yet at the time, and mention receiving an answer after "asking nicely" to the devs so it happens sometimes i guess