From 25e203b8a1c7d6e2aa712b8b364f0f16d1f034e8 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Fri, 3 Mar 2017 10:12:25 +0100 Subject: [PATCH] Powertrain driving cycle: if powerdemand exceeds engine's max torque, reduce torque demand for this single simulation step but keep engine speed. --- .../SimulationComponent/Impl/PowertrainDrivingCycle.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs index 1b31ce3cd4..bfb53ef499 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/PowertrainDrivingCycle.cs @@ -128,11 +128,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CurrentState.InTorque = torque; }) .Case<ResponseOverload>(r => { - angularVelocity = SearchAlgorithm.Search(angularVelocity, r.Delta, 50.RPMtoRad(), + var torque = SearchAlgorithm.Search(CycleIterator.LeftSample.Torque, r.Delta, 50.SI<NewtonMeter>(), getYValue: result => ((ResponseDryRun)result).DeltaFullLoad, - evaluateFunction: n => NextComponent.Request(absTime, dt, CycleIterator.LeftSample.Torque, n, true), + evaluateFunction: t => NextComponent.Request(absTime, dt, t, angularVelocity, true), criterion: y => ((ResponseDryRun)y).DeltaFullLoad.Value()); - response = NextComponent.Request(absTime, dt, CycleIterator.LeftSample.Torque, angularVelocity); + response = NextComponent.Request(absTime, dt, torque, angularVelocity); CurrentState.InAngularVelocity = angularVelocity; }) .Case<ResponseFailTimeInterval>(r => { dt = r.DeltaT; }) @@ -173,8 +173,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public CycleData CycleData { - get - { + get { return new CycleData { AbsTime = CycleIterator.LeftSample.Time, AbsDistance = null, -- GitLab