Elvas Tower: Ineffective Train Brakes - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Ineffective Train Brakes Who destroyed the Brakes? Rate Topic: -----

#11 User is offline   dcarleton 

  • Fireman
  • Group: Status: Active Member
  • Posts: 107
  • Joined: 06-February 08
  • Country:

Posted 06 June 2023 - 03:25 AM

Running the same activity using U2023.06.06-0507
Same issue. See screenshot (attached).

After taking the screenshot I put the brakes into emergency, and the train continued to accelerate!

Attached File(s)



#12 User is offline   darwins 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,250
  • Joined: 25-September 17
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 06 June 2023 - 05:08 AM

Just an observation. If you have three locos at the front of the train, why is only the first one braking? The second one looks like it still has power on (although this could be due to the work on adhesion) and the third one is just coasting.



#13 User is offline   dcarleton 

  • Fireman
  • Group: Status: Active Member
  • Posts: 107
  • Joined: 06-February 08
  • Country:

Posted 06 June 2023 - 05:37 AM

The units are in full dynamic braking, so their air brakes are bailed (prototypical American freight train handling practice to avoid overstressing the wheels). The third unit is dead-in-tow due to a failure on the road, and for that reason is not providing dynamic braking.

#14 User is online   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 364
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 06 June 2023 - 06:47 AM

I believe I see what's going on here-carleton is running with advanced adhesion OFF. With advanced adhesion off, the friction factor returned is just
                frictionfraction = (7.6f / (MpS.ToKpH(AbsSpeedMpS) + 17.5f) + 0.07f); // Base Curtius - Kniffler equation - u = 0.50, all other values are scaled off this formula; // For simple friction use "default" curve
                return frictionfraction;


This doesn't adjust the friction to compensate for the brake friction force being defined, and the brake force ends up being multiplied by that friction fraction (in this case, 0.17) as if it were a brake shoe force. So the brake force being developed is 1/6th of what's intended, and this changes with speed, asymptotically approaching zero as speed goes to infinity-which doesn't make sense. Is the friction fraction supposed to be (7.6f / (MpS.ToKpH(AbsSpeedMpS) + 17.5f) + 0.07f) or (7.6f / (MpS.ToKpH(AbsSpeedMpS) + 17.5f)) + 0.07f?. Also, if advanced adhesion is off, why not just set brake shoe friction to 100% always?

Deciding whether or not the brake shoe adjustment needs to be done should probably be determined based on the presence or lack of ORTSBrakeShoeForce (if brake shoe force is defined, no adjustment needed, if friction force is defined, adjustment is needed) rather than the current setup of deciding based on the adhesion setting and the type of brake shoe.

Carelton-try turning advanced adhesion ON and running the activity again. The default brake settings are unrealistically weak on those freight cars but increasing the brake force you feel by a factor of 6 would probably help keep things under control.

#15 User is online   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,457
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 06 June 2023 - 07:25 AM

Same Activity --- Not having trouble here, advanced adhesion is my default, using Joe Realmuto's ORTS Brake settings as my defaults ( disclosure -- braking is a mystery to me ) -- what I did notice, is this regarding sanding.
1. Sanding set to 15mph
2. OR indicated sanding off at around 5mph
3. Looking at the forces hud shows wheelslip to be around 31% +/- with sander sound still audible
4. Shut sander off using keyboard and wheelslip goes up to +50%...indicating sander is off.

I haven't had time to troubleshoot my setup -- could be something I missed. Any ideas? or is this a sander bug?
Using monogame when this happened. Activity runs okay in both MG and "U" versions of OR.
I do know from experience with this activity that if you come out of the tunnel near the speed limit, and haven't got your braking setup --- you will get a runaway.

Looking at dcarleton's log >>> Adhesion set to 130% ... why? Wouldn't 100% be better practice?


#16 User is online   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 364
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 06 June 2023 - 08:23 AM

Well that's a different problem...Looking at MSTSLocomotive.cs, it seems that the code is more complicated than it needs to be, which leads to unintended behavior of the maximum sanding speed. For example, in dry weather...
            else // dry weather
            {
                if (AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0 && (AbsSpeedMpS > 0))
                {
                    if (SanderSpeedEffectUpToMpS > 0.0f)
                    {
                        if ((Sander) && (AbsSpeedMpS < SanderSpeedEffectUpToMpS))
                        {
                            SandingFrictionCoefficientFactor = (1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS) * 1.40f;
                            BaseFrictionCoefficientFactor *= SandingFrictionCoefficientFactor;
                        }
                    }
                    else
                    {
                        if (Sander)  // If sander is on, and train speed is greater then zero, then put sand on the track, also fallback for when speed is 0
                        {
                            SandingFrictionCoefficientFactor = 1.40f;
                            BaseFrictionCoefficientFactor *= SandingFrictionCoefficientFactor; // Sanding track adds approx 140% adhesion (best case)
                        }
                    }
                }
                else if (Sander && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0)
                {
                    SandingFrictionCoefficientFactor = 1.40f;
                    BaseFrictionCoefficientFactor *= SandingFrictionCoefficientFactor; // Sanding track adds approx 140% adhesion (best case)
                }
            }


Just look at all those conditionals and redundant checks and operations...It can be seen that even if the speed check fails (ie, AbsSpeedMpS >= SanderSpeedOfMpS), the subsequent else statement can still activate, so long as the sander is on, there's still sand in the boxes, and the main res pressure is sufficient. Thus, you experience an increase in adhesion even though the sander should be blocked.

As far as I can tell, this separate if else is there because the if statement has the possibility to cause division by 0 if AbsSpeedMpS == 0, but putting all this in a separate else if is more complicated than it needs to be, and it introduces the bug with sander max speed being ignored. I think something like this would avoid division by 0 and still preserve the sander blocking behavior, while also being less messy by removing redundant lines. Should still behave the same despite having far less fluff. And I imagine even more clean up could be done as similar code is repeated two other times (for wet and snowy weather).
            else // dry weather
            {
                if (Sander && AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0)
                {
                    if (SanderSpeedEffectUpToMpS > 0.0f && AbsSpeedMpS > 0 && AbsSpeedMpS < SanderSpeedEffectUpToMpS)
                    {
                        SandingFrictionCoefficientFactor = (1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS) * 1.40f;
                    }
                    else // Simplified case
                    {
                        SandingFrictionCoefficientFactor = 1.40f; // Sanding track adds approx 140% adhesion (best case)
                    }
                    BaseFrictionCoefficientFactor *= SandingFrictionCoefficientFactor;
                }
            }


Feels like a 5 minute fix, might have a go at doing that to get some practice in for making pull requests and whatnot.

#17 User is online   R H Steele 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 3,457
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 06 June 2023 - 09:36 AM

Thank you for taking your time to look at the code, I will also enter a bug and reference this thread. Much appreciate your efforts.


#18 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,890
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 06 June 2023 - 12:59 PM

I have added a patch to the latest Unstable version which removes any influence of brake shoe friction on the braking force when in "Simple" mode, ie brake force will be constant at all speeds.

This should bring the functionality back in line with previous OR versions.

#19 User is offline   dcarleton 

  • Fireman
  • Group: Status: Active Member
  • Posts: 107
  • Joined: 06-February 08
  • Country:

Posted 06 June 2023 - 03:00 PM

Thank you for having a look at that. Just ran the same activity twice, using simple and advanced adhesion, and it worked exactly as intended both times. Only difference being finer control using advanced adhesion. Very slight wheel slipping, but the train remained under control.

Thank you!

#20 User is offline   steamer_ctn 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,890
  • Joined: 24-June 11
  • Gender:Male
  • Country:

Posted 06 June 2023 - 08:57 PM

View Postdcarleton, on 06 June 2023 - 03:00 PM, said:

Thank you for having a look at that. Just ran the same activity twice, using simple and advanced adhesion, and it worked exactly as intended both times. Only difference being finer control using advanced adhesion. Very slight wheel slipping, but the train remained under control.

Thanks for the feedback.

Just a note, probably confirming what you already know, the legacy and simple physics mode do not provide the most "realistic" braking performance, instead see this thread to set up a more accurate approach.

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users