diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs index 59c9b16a6a1d98397424fe65f1cbfdc17f5f16fa..87a05b118fdb2fa0392125f3b1a4b313b2d8743b 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs @@ -196,7 +196,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl Second absTime, NewtonMeter outTorque, PerSecond outAngularVelocity, PerSecond inAngularVelocity, GearshiftPosition gear) { // Emergency Downshift: if lower than engine idle speed - if (inAngularVelocity.IsSmaller(DataBus.EngineInfo.EngineIdleSpeed)) { + if (inAngularVelocity.IsSmaller(DataBus.EngineInfo.EngineIdleSpeed) && Gears.HasPredecessor(gear)) { Log.Debug("engine speed would fall below idle speed - shift down"); Downshift(absTime, gear); return true; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 55fe96aee30e91329960eba4768a3732f3c93dea..0d028f047e783f515ac1ef6a8a3810f60d1d96ac 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -1005,6 +1005,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl third = Driver.DrivingActionCoast(absTime, ds, velocityWithOverspeed, gradient); debug.Add(new { action = "third:GearShift -> try again Coast", third }); } + switch (third) { + case ResponseSpeedLimitExceeded _: + if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission() && + !DataBus.GearboxInfo.Gear.IsLockedGear()) { + third = Driver.DrivingActionCoast(absTime, ds, velocityWithOverspeed + 1.KMPHtoMeterPerSecond(), gradient); + debug.Add(new { action = "third:Overload (AT, Converter gear) -> Coast", third }); + } else { + third = Driver.DrivingActionBrake(absTime, ds, velocityWithOverspeed, gradient); + debug.Add(new { action = "third:SpeedLimitExceeded -> Brake", third }); + } + + break; + } break; } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs index 221b1d533324eb09243949240088dd174d9e3fdc..df1f308455acdf190396b89480b47a1bae636849 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -624,7 +624,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var avgICDSpeed = (DataBus.EngineInfo.EngineSpeed + engSpeed) / 2.0; var drTq = (DataBus.EngineInfo.EngineDragPower(avgICDSpeed)) / avgICDSpeed; var maxTq = DataBus.EngineInfo.EngineDynamicFullLoadPower(avgICDSpeed, operatingPoint.SimulationInterval) / - avgICDSpeed; + avgICDSpeed * 0.995; var inTq = Formulas.InertiaPower( engSpeed, DataBus.EngineInfo.EngineSpeed, (DataBus as VehicleContainer)?.RunData.EngineData.Inertia ?? 0.SI<KilogramSquareMeter>(), @@ -844,8 +844,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl break; } - operatingPoint = SearchBrakingPower(absTime, operatingPoint.SimulationDistance, gradient, - operatingPoint.Acceleration, retVal); + try { + operatingPoint = SearchBrakingPower(absTime, operatingPoint.SimulationDistance, + gradient, + operatingPoint.Acceleration, retVal); + } catch (VectoSearchAbortedException vsa) { + Log.Warn("Search braking power aborted {0}", vsa); + if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission()) { + operatingPoint = SetTCOperatingPointATGbxBraking(absTime, gradient, operatingPoint, + response); + } + } + DriverAcceleration = operatingPoint.Acceleration; if (DataBus.Brakes.BrakePower.IsSmaller(0)) { DataBus.Brakes.BrakePower = 0.SI<Watt>();