diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs index 1c95fccf2242baf39722d5ece56e2967dcfbee7c..be1f1305a97abc5b48b7820936f8c2e349f808b0 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs @@ -28,7 +28,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public bool DeRatingActive { get; protected internal set; } - public bool EmOff => PreviousState.EMTorque == null || PreviousState.EMTorque.IsEqual(0) ? true : false; + public bool EmOff => PreviousState.EMTorque == null /*|| PreviousState.EMTorque.IsEqual(0)*/ + ? true : false; public BusAuxiliariesAdapter BusAux { protected get; set; } @@ -603,7 +604,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ThermalBuffer = e.ThermalBuffer; DeRatingActive = e.DeRatingActive; PreviousState = e.PreviousState.Clone(); - CurrentState = e.CurrentState.Clone(); + //CurrentState = e.CurrentState.Clone(); return true; } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs index 91e5aa2c49bfca6311f31aaca2afc075533f21fb..db86c0a8097edc1e69cedae06be57b99159fbdb3 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs @@ -88,9 +88,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies TestPowertrain.Charger.UpdateFrom(maxPowerGenset); TestPowertrain.HybridController.Initialize(Controller.PreviousState.OutTorque, Controller.PreviousState.OutAngularVelocity); TestPowertrain.Gearbox?.UpdateFrom(DataBus.GearboxInfo); - + TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower; - + TestPowertrain.ElectricMotor.UpdateFrom(DataBus.GetElectricMotors() + .Single(e => e.Position == TestPowertrain.ElectricMotor.Position)); + + var testResponse = TestPowertrain.HybridController.NextComponent.Request(absTime, dt, outTorque, outAngularVelocity, false); TestPowertrain.HybridController.ApplyStrategySettings(new HybridStrategyResponse { CombustionEngineOn = false,