Elvas Tower: AI train acceleration - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

AI train acceleration Rate Topic: -----

#1 User is offline   Coolhand101 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 998
  • Joined: 13-June 15
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 11 August 2017 - 06:41 AM

A while ago, i notice my AI trains were accelerating quite slow. I read that the AI engine parameters should be at or around real world levels and sure enough they where quite low, ie horsepower at 125hp when it should have been at 500hp.

Recently, i have notice that when running along side AI trains in the same speed restriction, as soon as the speed restriction clears to a higher speed, the AI trains accelerates like a rocket to the new line speed and leaves the player train well behind. Both player and AI trains use the same force and power values.

As a test, i used 1hp and 1kn in the AI train. From a standing start, both trains accelerated on par to around 15mph, then the AI acceleration was once again quite high and left the player train well behind.

The test was done with electric trains.

Is the acceleration of AI trains hardcoded from a certain speed, or is there other factors in the ENG files that have to be adjusted other than power and force?

Thanks

#2 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 15 August 2017 - 06:22 AM

The program attempts to use the real physics, but due to all sorts of problems with AI train control (no feedback on wheelslip, for instance), it doesn't always work.
To avoid trains getting stuck and not moving despite being at full power, there is an 'overrule' such that if the train is at full power but it does not accelerate as expected, a hardcoded acceleration is applied.
Admittedly, the present code is a bit impatient and is too enthousiastic in applying the overrule acceleration.
A rewrite of the AI train control code is somewhere down the list of things to do; some experiments which I did within my own version looked promising but there's still a lot to sort out before new logic which is fully reliable can be introduced.
In timetable mode there is an option to adjust the preset acceleration and deceleration, but I'm afrain there are no such options in activity mode.

Regards,
Rob Roeterdink

#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,996
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 15 August 2017 - 06:46 AM

In activity mode there are following presets (unit of measure is meters/squaredseconds) for AI trains
        public float MaxDecelMpSSP = 1.0f;               // maximum deceleration
        public float MaxAccelMpSSP = 1.0f;               // maximum acceleration
        public float MaxDecelMpSSF = 0.8f;               // maximum deceleration
        public float MaxAccelMpSSF = 0.5f;               // maximum acceleration

(first two lines for passenger trains and second two lines for freight trains).
Within the code these values are often reduced by a correction factor to compute the applied acceleration/deceleration.

Then there are some hardcoded exceptions for the above numbers:
- if the max speed allowed for the train is greater than 55 meters/s, maximum deceleration is 2.5 m/s2;
- if the max speed allowed for the train is between 40 and 55 m/s, maximum deceleration is 1.5 m/s2;
- EMU trains with max speed less than 40 m/s have a maximum acceleration of 1.5 m/s2 and maximum deceleration of 2 m/s2 (to imitate behaviour of electric interurban trains, underground trains and so on).

It is clear that these presets are far from being universally appropriate, but at the moment there is no place where to specify these values for the single consist in activity mode.

Page 1 of 1
  • 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