From f00e948844d2d02fcef3d541f73add2a455bffbb Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 17 Feb 2016 09:01:44 +0100 Subject: [PATCH] fix: combustion engine has to set AuxPowerDemand in response --- .../SimulationComponent/Impl/CombustionEngine.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index 34ac3aa477..51727350e7 100644 --- a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -190,7 +190,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return new ResponseDryRun { DeltaFullLoad = (CurrentState.EngineTorque - CurrentState.DynamicFullLoadTorque) * avgEngineSpeed, DeltaDragLoad = (CurrentState.EngineTorque - CurrentState.FullDragTorque) * avgEngineSpeed, - EnginePowerRequest = CurrentState.EngineTorque * avgEngineSpeed + EnginePowerRequest = CurrentState.EngineTorque * avgEngineSpeed, + AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed, }; } @@ -220,7 +221,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl AbsTime = absTime, Delta = delta, EnginePowerRequest = totalTorqueDemand * avgEngineSpeed, - Source = this + Source = this, + AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed, }; } @@ -230,13 +232,17 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl AbsTime = absTime, Delta = delta, EnginePowerRequest = totalTorqueDemand * avgEngineSpeed, - Source = this + Source = this, + AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed, }; } UpdateEngineState(CurrentState.EnginePower, avgEngineSpeed); - return new ResponseSuccess { EnginePowerRequest = totalTorqueDemand * avgEngineSpeed }; + return new ResponseSuccess { + EnginePowerRequest = totalTorqueDemand * avgEngineSpeed, + AuxiliariesPowerDemand = auxTorqueDemand * avgEngineSpeed, + }; } public IResponse Initialize(NewtonMeter torque, PerSecond angularSpeed) -- GitLab