18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 13:26:08 +01:00

AI: start a train uphill on the train brake

Starting uphill the AI released the train brake (and the locomotive
brake with it) at once, while the power came on only later: a train on
10 per mille rolled back 20-30 m (E186 with 19 container wagons), and an
E189 with 7 Z2 coaches rolled back for minutes without power, because
the brake applied again for the rollback kept the power off. Many
locomotives cannot pull while their own cylinder is under pressure
(asynchronous drives switch to braking, others have a control pressure
switch), so holding the train on the locomotive brake is no way out.

A train standing on an up gradient with the train brake applied now
starts as a driver of a heavy train does:

- the train brake stays applied, the locomotive brake is released and
  the locomotive's own share of the train brake is let off with the
  releaser;
- the power is applied against the braked train (Ready does not hold
  it back meanwhile, and the rule that brakes a train slipping back
  is off);
- the train brake is released only once the tractive force exceeds 1.1
  times the gradient force, the train moves forward, or after 45 s if
  the locomotive cannot hold the train on its own power.

Multiple units are not affected.
This commit is contained in:
pwarszawski
2026-11-07 15:37:48 +01:00
parent f53e184949
commit 137eb9641f
2 changed files with 72 additions and 4 deletions

View File

@@ -314,6 +314,7 @@ private:
double brake_increase_margin() const;
bool uphill_stop_hold() const;
bool uphill_brake_committed( double const Velocity ) const;
void control_uphill_start();
void update_timers( double const dt );
void update_logs( double const dt );
@@ -408,6 +409,8 @@ private:
double fShortfall = 0.0; // how far the train fell short of the braking demand at the last check [m/s2]
double fShortfallTime = 0.0; // when that was checked
int iShortfallGrowth = 0; // how many checks in a row the shortfall has grown
bool bUphillStart = false; // starting uphill: the train brake holds the train until the power does
double fUphillStartTime = 0.0; // when the uphill start began
double fAccDesiredGravity = 0.0; // część AccDesired odjęta na spadku jako kompensacja pochylenia; AbsAccS zawiera ją już sam
double VelforDriver = -1.0; // prędkość, używana przy zmianie kierunku (ograniczenie przy nieznajmości szlaku?)
double VelSignal = 0.0; // ograniczenie prędkości z kompilacji znaków i sygnałów // normalnie na początku ma stać, no chyba że jedzie