diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs index f785ba4ed0e9b1709858ea66921a214a03b0dcbd..484c7c5b873b69503da72954de72745948d79a10 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/PowertrainBuilder.cs @@ -1121,9 +1121,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl #region Implementation of IEngineControl - public bool CombustionEngineOn - { - get { return false; } set { } } + public bool CombustionEngineOn { get; set; } #endregion } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index b12a389455b3e8314d17b1f356e19215545928dd..41ca51f935a18ab3811a3fe80537943850f143a1 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -227,7 +227,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies } TestPowertrain.SuperCap?.Initialize(DataBus.BatteryInfo.StateOfCharge); - TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower; var currentGear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear; @@ -1197,22 +1196,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies return; } - var iceOn = DataBus.EngineInfo.EngineOn; - // if Hybrid P1 and Engine is off, the search for recuperation torque is not possible: - // Therefore, either switch on engine (if reasonable), or do not search at all. - if (emPos == PowertrainPosition.HybridP1 && !DataBus.EngineCtl.CombustionEngineOn) { - - var gearboxIn = firstResponse.Gearbox.InputSpeed * firstResponse.Gearbox.InputTorque; - var eMotor = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP1); - var powerToleranceEl = 0.1 * eMotor.MaxPowerDrive(DataBus.BatteryInfo.InternalVoltage, firstResponse.Gearbox.InputSpeed); - if (gearboxIn - firstResponse.Engine.DragPower < powerToleranceEl) { - DataBus.EngineCtl.CombustionEngineOn = true; - iceOn = true; - } else { - return; - } - } - // full recuperation is not possible - ICE would need to propel - search max possible EM torque var emRecuperationTq = SearchAlgorithm.Search( maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech / @@ -1230,7 +1213,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies }, evaluateFunction: emTq => { var cfg = new HybridStrategyResponse { - CombustionEngineOn = iceOn, + CombustionEngineOn = DataBus.EngineInfo.EngineOn, GearboxInNeutral = false, NextGear = nextGear, MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> { @@ -1253,10 +1236,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies if (emRecuperationTq.IsBetween( firstResponse.ElectricMotor.MaxDriveTorque ?? 0.SI<NewtonMeter>(), firstResponse.ElectricMotor.MaxRecuperationTorque ?? 0.SI<NewtonMeter>())) { var entry = new HybridResultEntry { - ICEOff = !iceOn, + ICEOff = !DataBus.EngineInfo.EngineOn, Gear = nextGear, Setting = new HybridStrategyResponse { - CombustionEngineOn = iceOn, + CombustionEngineOn = DataBus.EngineInfo.EngineOn, GearboxInNeutral = false, NextGear = nextGear, MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> { @@ -1270,10 +1253,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies if (emRecuperationTq.IsGreater(0)) { eval.Add( new HybridResultEntry { - ICEOff = !iceOn, + ICEOff = !DataBus.EngineInfo.EngineOn, Gear = nextGear, Setting = new HybridStrategyResponse { - CombustionEngineOn = iceOn, + CombustionEngineOn = DataBus.EngineInfo.EngineOn, GearboxInNeutral = false, NextGear = nextGear, MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {