diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 009c0de5f1ae0fca9608dbddfd55f1a8fc80eb42..4596dc3e070535a52b39417aeac10da707487ce8 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -1288,9 +1288,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (response is ResponseOverload) { Log.Info("Brake -> Overload -> 2nd Brake -> Overload -> Trying accelerate action"); var gear = DataBus.GearboxInfo.Gear; - response = DataBus.GearboxInfo.GearEngaged(absTime) - ? Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient) - : Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient); + if (DataBus.GearboxInfo.GearEngaged(absTime)) + response = Driver.DrivingActionAccelerate(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient); + else + response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient); switch (response) { case ResponseGearShift _: diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index 3a356983def2bec37608f21c9e9f8dedbd2021ce..e1ff741aeb71ebffa0d8836c9de778bc00f40aeb 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -1735,7 +1735,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies // ICE is off, selected solution has a too low or too high engine speed - keep ICE off retVal.CombustionEngineOn = false; } - if (best.IgnoreReason.EngineSpeedTooLow() && !DataBus.EngineInfo.EngineOn && DataBus.VehicleInfo.VehicleSpeed.IsGreater(ModelData.GearshiftParameters.StartSpeed)) { + if (best.IgnoreReason.EngineSpeedTooLow() && !DataBus.EngineInfo.EngineOn + && DataBus.VehicleInfo.VehicleSpeed.IsGreater(ModelData.GearshiftParameters.StartSpeed)) { // ICE is off, selected solution has a too low or too high engine speed - keep ICE off retVal.CombustionEngineOn = false; }