mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 20:24:59 +01:00
AI braking: hold a train coming to a stand uphill
Uphill a long train often came to a stand with its brake on the way off and rolled back several metres: the AI released the train brake to 0 about 20 m short of the stop (the gradient alone would have stopped the train short of the stopping window), applied only the first step again at the last moment, and a G train cannot apply its brake again within the few seconds the gradient takes to stop it. Coming to a stand on an up gradient (also when only part of the train is on it) the AI now: - applies the brake before the train stops on the gradient alone, once the time left to the stand is no longer than half of what the brake takes to apply; - does not let the train coast on or pull up while the brake is applied and the gradient would stop the train sooner than the brake of the consist can be released; - does not release the train brake any further below 10 km/h on the way to a stand (unless the train is to be driven on); - puts the locomotive brake on below 3 km/h when the train will reach the point it is to stop at (not when it has slowed down short of it and is to pull up), and at once if the train rolls back.
This commit is contained in:
@@ -312,6 +312,8 @@ private:
|
||||
return mvOccupied->Vel * sign( iDirection * mvOccupied->V ); }
|
||||
|
||||
double brake_increase_margin() const;
|
||||
bool uphill_stop_hold() const;
|
||||
bool uphill_brake_committed( double const Velocity ) const;
|
||||
|
||||
void update_timers( double const dt );
|
||||
void update_logs( double const dt );
|
||||
|
||||
Reference in New Issue
Block a user