Trying to fix starting friction myself Any advice is appreciated here
#1
Posted 09 January 2020 - 10:52 AM
I´m finally trying to fix the starting friction issue by enhancing th code on a private version and eventually show results and contribution. However I´m not very experienced with coding, only done some easy contributing programs with LiveCode, but nothing about C#. I guess this is the smaller problem, but the code is lacking orientation. I cannot find the position where to enter a new line which then could be written into the .wag/eng file. I thank you for any guidance or advise on this; it already feels quite complicated to get this far into ORTS, but at least this problem made me unimaginable angry. Hopefully I can make any kind of difference.
Thanks, Nick
#2
Posted 10 January 2020 - 11:02 AM
I will try yet again tonight to delve into seeing if I can find any current scholarly friction data on modern equipment, but as others have said, it is quite difficult to find good data for this... I will let you know if I find anything helpful.
By the way, if you want another issue to get angry about, I think OR's handling of adhesion in snow/rain with the "Advanced Adhesion Model" is a problem that causes even more dramatic variations from reality, but unfortunately it too is a topic that is extremely hard to find good scholarly data on, especially related to modern heavy-haul freight operations... The problem is such that on an upcoming payware route release, we are going to have to stipulate to users that for snow and rain activities to work, they must use the default adhesion correction factor of 135% (or whatever it is), because using the "realistic" correction factor of 100% makes it physically impossible to run prototypical (certain tonnage and locomotives) heavy trains up mountain grades in the snow...
#3
Posted 11 January 2020 - 12:34 AM
Quote
I know the traction degrading is as much at 1 snowflake an hour as it is at 1000 snowflakes, which is just not true...
#4
Posted 11 January 2020 - 01:37 AM
if (IsDavisFriction) // If set to use next Davis friction then do so { if (IsStandstillFriction) if (AbsSpeedMpS > MergeSpeedMpS) // if speed above merge speed turn off low speed calculations IsLowSpeed = false; if (AbsSpeedMpS == 0.0) IsLowSpeed = true; // Davis formulas only apply above about 5mph, so different treatment required for low speed < 5mph. if (AbsSpeedMpS > MpS.FromMpH(5)) // if speed above 5 mph then turn off low speed calculations IsLowSpeed = false; if (AbsSpeedMpS == 0.0) IsLowSpeed = true;
I dont know if this gonna work...
#5
Posted 11 January 2020 - 02:10 AM
The basic idea was to introduce two new lines which could then be written into the wagon section of.eng/wag files called ORTSStandstillFriction and ORTSMergeSpeed which would replace ORTSBearingType, although the old line still must be working to make it shareable. Every user than would be able to insert the values best suited. No idea how this can be done, the whole friction section of this .cs file just looks overly complicated und puzzling...
I keep trying and failing, but it really depresses me...
#6
Posted 11 January 2020 - 03:33 AM
I think I cannot handle this problem due to lack of experience with C#, so this problem may forever remain unsolved.
#7
Posted 11 January 2020 - 04:12 AM
StaticFrictionFactorN = DavisAN * (21 / 20) / (405 / 2);
Not even keeping ORTSBearingType and reworking them with factors based on the respective Davis A values works properly. It does (seemingly) for an ES44 but not for 132.2 US ton graincar... WHY?
#8
Posted 11 January 2020 - 05:03 AM
NickonWheels, on 11 January 2020 - 03:33 AM, said:
I think I cannot handle this problem due to lack of experience with C#, so this problem may forever remain unsolved.
To add a new .cs file to the project within RollingStocks use the Solution Explorer within Visual Studio. In your specific case right-click on RollingStocks within the Solution Explorer, select Add - Existing item, an Explorer window will open, go to the folder of your interest, click on the .cs file you want to add, and click on Add.
#9
Posted 11 January 2020 - 05:21 AM
Quote
Thanks
Do you think a new file could replace parts of MSTSWagon.cs, I mean there would then be two definitions of the friction model although with some differences. Fromm all the presented experiments it would makes me wonder if C# coding works at all because in last example it looks like a Davis A value of 1500 multiplied by 1.1 is >70900 pound-force. I always intended to get around this with the new lines, at last I expected too much...
#10
Posted 11 January 2020 - 06:47 AM
(Beware .txt file)
Can someone with more experience have a look on this and all these red lines indications something must be missing. As far as i know only FrictionV2 is missing in the lists. I know it´s a lot...