18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 20:54:59 +01:00

fix: line contactors interlocked with speed-started blowers close at a standstill

With LineContactorsInterlock=MotorBlowers the line contactors waited for
every motor blower to run. A blower with MotorBlowersStartVelocity starts
only with the vehicle moving and the motors drawing current, so standing it
never ran, the contactors never closed, no current flowed and the vehicle
couldn't start at all; the same after a stop longer than
MotorBlowersSustainTime.

- For a blower with a start velocity the interlock now asks whether it is
  switched on and has power (not switched off, switched on where the driver
  starts it, its power source present), instead of whether it runs. Blowers
  without a start velocity still have to run.
- The power source of a blower (battery: 24 V, converter: 110 V, else the
  main circuit) is one function, MotorBlowerPowerIsAvailable(), used by
  MotorBlowersCheck() and the interlock. None of the three needs the line
  contactors closed: the battery and the converter run before them, and the
  main circuit is the line breaker they need anyway.

(eu07/maszyna#460)
This commit is contained in:
jerrrrycho
2026-11-11 15:00:27 +01:00
parent 6f519436de
commit efe5b682f7
3 changed files with 200 additions and 4 deletions

View File

@@ -2403,9 +2403,7 @@ void TMoverParameters::MotorBlowersCheck(double const Timestep)
}
blower.is_active =
// TODO: bind properly power source when ld is in place
(blower.start_type == start_t::battery ? Power24vIsAvailable :
blower.start_type == start_t::converter ? Power110vIsAvailable :
Mains) // power source
MotorBlowerPowerIsAvailable(blower) // power source
// breaker condition disabled until it's implemented in the class data
// && ( true == blower.breaker )
&& false == disable &&
@@ -2435,6 +2433,19 @@ void TMoverParameters::MotorBlowersCheck(double const Timestep)
}
}
bool TMoverParameters::MotorBlowerPowerIsAvailable(cooling_fan const &Blower) const
{
switch (Blower.start_type)
{
case start_t::battery:
return Power24vIsAvailable;
case start_t::converter:
return Power110vIsAvailable;
default:
return Mains;
}
}
void TMoverParameters::PantographsCheck(double const /*Timestep*/)
{
using enum start_t;
@@ -7503,7 +7514,16 @@ bool TMoverParameters::LineContactorsInterlockReleased() const
// the converter of this very vehicle, not the 110 V of the trainset: a section with its fans off doesn't start
return ConverterFlag;
case line_contactors_interlock::motor_blowers:
return std::ranges::all_of(MotorBlowers, [](auto const &Blower) { return Blower.is_active; });
return std::ranges::all_of(MotorBlowers, [this](auto const &Blower) {
if (Blower.min_start_velocity < 0)
{
return Blower.is_active;
}
// a blower which starts with the speed and the motor current (MotorBlowersStartVelocity) can't run before
// the contactors close, nor after a stop longer than it keeps running for: it's enough that it's
// switched on and has power, so it starts once the vehicle moves
return MotorBlowerPowerIsAvailable(Blower) && false == Blower.is_disabled && (Blower.start_type == start_t::manual ? Blower.is_enabled : true);
});
default:
return true;
}