diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PEVAMTShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PEVAMTShiftStrategy.cs index d1efc09b8f88f172c0a0ffbb21f16ea3c0bff8e1..71a18e47d0546afe822919190a90f44d71b7b595 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PEVAMTShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PEVAMTShiftStrategy.cs @@ -346,7 +346,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ? VectoMath.Max(-GearboxModelData.Gears[currentGear.Gear].MaxTorque, response.ElectricMotor.MaxDriveTorque) : response.ElectricMotor.MaxDriveTorque; - var tqCurrent = (response.ElectricMotor.ElectricMotorPowerMech / response.ElectricMotor.AngularVelocity).LimitTo(maxDriveTorque, maxGenTorque); + var tqCurrent = (response.ElectricMotor.ElectricMotorPowerMech / response.ElectricMotor.AngularVelocity); + if (!tqCurrent.IsBetween(maxDriveTorque, maxGenTorque)) { + return double.NaN; + } var engineSpeed = response.ElectricMotor.AngularVelocity;