Unrealistic AI Train Speed!?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meeshu
    Senior Member
    • May 2010
    • 373

    #1

    Unrealistic AI Train Speed!?

    Doing AI train tests and found that AI trains seem to go much faster than in the case where the player drives the same trains!

    For example. One consist I've found does up to around 65~70 mph when run as an AI train (when compared to a driver train pacing the AI train). But driving the same AI consist later as a test, the maximum speed is only around 31 mph!

    Here is one consist which seems to have considerable speed differences when comparing AI speed and driver speed.

    2_up_44ac_397_mt_coal.zip

    Possibly the AI trains do NOT have realistic physics applied to them, which allows them to run faster than expected?

    Or what?

    This higher than expected AI train speed spoils reality and makes activities difficult to create and run.
  • trainmanaustin
    Senior Member
    • Oct 2004
    • 126
    • Helena, MT

    #2
    I wanna say that this issue has been brought up before but can not remember where. The unrealistic speed is also there if you are driving a consist and switch to autopilot as well. Example on the Mullan Pass route, when operating the Horsepower Hour activiity, the best I can do up the pass is 12-13MPH but when in autopilot, the train is about 1.3MPH slower than the posted speed which starts at 45MPH at the bottom and 20MPH at the top.

    Sent from my SM-G988U using Tapatalk

    Comment

    • baldwin
      6000 Post Veteran


      • Nov 1999
      • 6358
      • Chippenham, Wiltshire, UK.
      • ORTS

      #3
      AI and autopilot do not use the same physics set as the player. Both will accelerate up to the max permissible track speed, or max allowed consist speed as set in the consist file. as soon as possible. The player on the other hand has to deal with all of the natural laws of physics as determined by the OR code and applied to the player consist. Trying to compare AI and Player is like comparing a Ford Mustang with an 18 wheel rig.
      Beer is not a matter of life or death, it is much more serious than that.

      Comment

      • R. Steele
        3500 Post Veteran

        • Feb 2013
        • 3928
        • known universe
        • ORTS

        #4
        Originally posted by baldwin
        AI and autopilot do not use the same physics set as the player. Both will accelerate up to the max permissible track speed, or max allowed consist speed as set in the consist file.
        So in theory --- paying attention to the emphasized above --- if you have dedicated consists for a specific OR profile that contains one route or routes of comparable speed limits...you can adjust all the AI consist files to match max route speed or realistic speed as you prefer? Does this work in practice?
        Cheers, Gerry
        "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
        It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
        Forever, ridin' drag in railroad knowledge.
        Audi, Vide, Tace, Si Vis Vivere In Pace​

        https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

        Comment

        • meeshu
          Senior Member
          • May 2010
          • 373

          #5
          Comments noted, thanks.

          Yes. It was as I suspected, that the AI trains do NOT conform to physics as do player trains, unfortunately!

          So to limit AI train speed, one might have to edit consists maximum speed (temporarily) to make it more realistic.

          Is there no other (quicker or easier) way to limit AI train speeds?

          For Open Rails developers!? Can they perhaps enable an option to limit AI train speeds to more realistic ones?

          Comment

          • R. Steele
            3500 Post Veteran

            • Feb 2013
            • 3928
            • known universe
            • ORTS

            #6
            Originally posted by meeshu
            For Open Rails developers!? Can they perhaps enable an option to limit AI train speeds to more realistic ones?
            That's been discussed many many times, here and at ET...if I remember correctly it comes down to resources available to compute everything...the load on individual users might be unsupportable...please, do not rely on my explanation, look through the threads for a more reliable answer from one of the developers. There were some other reasons -- perhaps with AI traffic management -- that were involved.
            Cheers, Gerry
            "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
            It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
            Forever, ridin' drag in railroad knowledge.
            Audi, Vide, Tace, Si Vis Vivere In Pace​

            https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

            Comment

            • rman
              Member
              • Nov 2011
              • 99
              • California, USA

              #7
              Originally posted by R. Steele
              So in theory --- paying attention to the emphasized above --- if you have dedicated consists for a specific OR profile that contains one route or routes of comparable speed limits...you can adjust all the AI consist files to match max route speed or realistic speed as you prefer? Does this work in practice?
              Originally posted by meeshu
              Is there no other (quicker or easier) way to limit AI train speeds?
              You could either set the consist speed or use the maximum speed command in timetable mode. But either way, the speed limit would be applied over the length of the entire run, so it would still not quite be the same as having the full physics simulation. For activity mode, I believe there is also an "adherence" value that defines how fast the AI drives with respect to the line speed limit.

              Originally posted by meeshu
              For Open Rails developers!? Can they perhaps enable an option to limit AI train speeds to more realistic ones?
              No, because...

              Originally posted by R. Steele
              ...if I remember correctly it comes down to resources available to compute everything...the load on individual users might be unsupportable...
              It would too resource-intensive to simulate the physics for every AI train, so we have to fake it. Note that every train simulator does this - RailWorks, Train Sim World, Run 8. Except for OpenBVE, of course, which doesn't have AI...

              Comment

              • qballbandit
                6500 Post Veteran

                • Jan 2006
                • 6522
                • Elgin Il., USA.
                • MSOR

                #8
                On another note altogether, if you simply want to hard code speeds in to your AI trains:
                Open the consist file and look for this line: MaxVelocity ( xx.xx x.xx )

                Change the values in the below MaxVelocity lines to create a reasonable facsimile to the speeds listed on the right (min/max)

                MaxVelocity ( 12.34 0.50 ) 10:20
                MaxVelocity ( 12.34 0.75 ) 15:20

                MaxVelocity ( 18.50 0.50 ) 15:30
                MaxVelocity ( 18.50 0.75 ) 22.5:30

                MaxVelocity ( 24.60 0.50 ) 20:40
                MaxVelocity ( 24.60 0.75 ) 30:40

                MaxVelocity ( 30.80 0.50 ) 25:50
                MaxVelocity ( 30.80 0.75 ) 37.5:50

                MaxVelocity ( 37.00 0.50 ) 30:60
                MaxVelocity ( 37.00 0.75 ) 45:60
                Neil

                Chicago Railroading Fan

                Comment

                • meeshu
                  Senior Member
                  • May 2010
                  • 373

                  #9
                  Very useful information! Thanks!

                  Editing the parameters under MaxVelocity does limit AI train speeds. Also, changing the AI train Default performance value in the Activity Editor also changes/limits AI train speeds as I've just found out.

                  The downside to this is if wanting to drive any AI train, the train speed will be limited to that value edited previously in MaxVelocity and/or in Default performance. So the AI train MaxVelocity and/or Default performance values may have to be restored to their original pre-edited values if wanting the trains to perform to original speeds.

                  Comment

                  • baldwin
                    6000 Post Veteran


                    • Nov 1999
                    • 6358
                    • Chippenham, Wiltshire, UK.
                    • ORTS

                    #10
                    Just one small point. No matter how fast you set the consist max speed to, when running as AI it WILL conform to the various track speed limits, so if you have the consist speed set at 75mph maximum, but track speed is only 30mph, the train will run at 30mph.

                    The problem is not one of consist maximum speed, it is the unrealistic acceleration and braking plus the ability to maintain track speed while moving up grade with a heavy load.
                    Beer is not a matter of life or death, it is much more serious than that.

                    Comment

                    • roeter
                      Senior Member
                      • Nov 1999
                      • 171
                      • Netherlands.

                      #11
                      It's actually far more complicated then just resources.
                      There are a number of problems with the physics which made it necessary to set up overrides.

                      One of the major problems is wheelslip. Wheelslip occurs per engine but is not reported at train level. A player runs the engine and gets the wheelslip warning if things go wrong. But AI trains are controlled at train level, and at that level there is no wheelslip report. So, engines in a train can start slipping without the AI control ever knowing about this, which results in serious loss of tractive effort and could even stall the train. This is particularly a problem for consists of Multiple Units and push-pull sets, as the driving trailers (cab cars or whatever you want to call them) are defined as engines but ofcourse have a very low weight and therefor are very prone to slipping.
                      Another problem is the pretty large variation in controls and control reaction. Some engines need a full 100% throttle to even start moving, others shoot off like a rocket at just 10% or so. The same applies to brake control - some trains hardly react until brakes are applied at 25% or more, others just need 1%. When running the train as player one is often familiar with these characteristics, but AI control, ofcourse, cannot easily distinguish these differences.
                      So AI control does try to apply proper physics (not the full player train advanced physics but a more basic setup), but to ensure proper control there are overrides. If a train does not react quickly enough to the applied controls, AI control takes over and applies standard acceleration or brake rates.
                      It would perhaps be possible to have a more sophisticated control with regards to acceleration and maximum speed. It would require better wheelslip handling and a more 'patient' override control. But I would strongly suggest not to meddle with the brake overrides as that is very likely to cause problems with trains not stopping in time for stations and signals.

                      Some time ago (well, years ago, actually) I did some tests, removing the acceleration overrides. It did work for some trains but there were quite a number of trains which never got up to proper speed, sometimes slowing down to just 15 mph on gradients where as the same train could easily maintain linespeeds upto 80 mph when driven as player train. In all cases, the problems were caused by wheelslip.

                      Regards,
                      Rob Roeterdink

                      Comment

                      • rman
                        Member
                        • Nov 2011
                        • 99
                        • California, USA

                        #12
                        Very useful information, Rob. Thanks for chiming in.

                        Comment

                        • meeshu
                          Senior Member
                          • May 2010
                          • 373

                          #13
                          Interesting! Thanks!

                          The problem now is to try to determine approximate "realistic" speeds for AI trains. The speeds will vary according to whether the trains run on the flat, go up hill, and go down hill. One way is to drive AI trains under the wanted conditions and note the maximum speeds, and then edit the AI trains consist file and/or the Default performance under MSTS AE. This is a slow process. Plus the determined speed is only realistically applicable for AI trains under the conditions it was tested under (on the flat, up hill, or down hill). Since AI trains speed remains about constant regardless of the terrain it runs under, it becomes difficult to simulate AI train speeds over varying terrains.

                          One way around this is to create AI trains with set speed limits (set under consist file, and/or under the AE) for each of the varying terrains. So one AI train only runs on the flat, the other AI train only runs up hill (at set grade), and the other AI train only runs down hill (at constant grade). The AI trains are exactly the same consist, the only difference is their maximum speed settings (for various terrains).

                          Again a lot of extra work creating more realistic AI train speeds!

                          Sigh!!!

                          Comment

                          • rman
                            Member
                            • Nov 2011
                            • 99
                            • California, USA

                            #14
                            Indeed, it's quite frustrating.

                            In the far future, when Open Rails gets its own path format, perhaps we could add a special speed instruction that changes the AI's target driving speed when it reaches a specific point. Well, one can dream...

                            Comment

                            • R. Steele
                              3500 Post Veteran

                              • Feb 2013
                              • 3928
                              • known universe
                              • ORTS

                              #15
                              Originally posted by rman
                              Indeed, it's quite frustrating.

                              In the far future, when Open Rails gets its own path format, perhaps we could add a special speed instruction that changes the AI's target driving speed when it reaches a specific point. Well, one can dream...
                              That's an intriguing solution...using the AI path to provide speed control. Maybe in the next ten years.
                              Cheers, Gerry
                              "A mind is like a parachute. It doesn't work if it is not open." Frank Zappa
                              It's my railroad and I'll do what I want! Historically accurate attitude of US Railroad Barons.
                              Forever, ridin' drag in railroad knowledge.
                              Audi, Vide, Tace, Si Vis Vivere In Pace​

                              https://www.trainsim.com/forums/filedata/fetch?filedataid=79656&type=medium​ https://www.trainsim.com/forums/filedata/fetch?filedataid=79654&type=small

                              Comment

                              Working...