diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineOnlyCombustionEngine.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineOnlyCombustionEngine.cs index fbf750debd640fb9736d32e667151c460a55b939..cfc757149d1181ab1fbf561d6f1d876ae2362b09 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineOnlyCombustionEngine.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/EngineOnlyCombustionEngine.cs @@ -85,8 +85,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl //UpdateEngineState(CurrentState.EnginePower, avgEngineSpeed); - CurrentState.EngineTorque = CurrentState.EnginePower / CurrentState.EngineSpeed; - return new ResponseSuccess { Source = this }; } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs index 73a021dc314adb0285385b71548e113f9388b6ac..65fc0262941b62bdfa88d92f560d561bbbd6d7d2 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs @@ -66,13 +66,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl Data = cycle; CycleIterator = new DrivingCycleEnumerator(Data); - AbsTime = 0.SI<Second>(); + AbsTime = -1.SI<Second>(); } public virtual IResponse Initialize() { var first = Data.Entries[0]; - AbsTime = first.Time; + if (AbsTime < 0) { + AbsTime = first.Time; + CycleIterator.MoveNext(); + } var response = NextComponent.Initialize(first.Torque, first.AngularVelocity); response.AbsTime = AbsTime; return response;