From 041f76e94ff1af66a988445b04498b55c17d05a7 Mon Sep 17 00:00:00 2001 From: "VKMTHD\\haraldmartini" <harald.martini@student.tugraz.at> Date: Wed, 23 Nov 2022 09:49:41 +0100 Subject: [PATCH] write efficiency map in to model data if DEBUG is enabled --- .../ElectricComponents/ElectricMotor/ElectricMotorData.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/ElectricComponents/ElectricMotor/ElectricMotorData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/ElectricComponents/ElectricMotor/ElectricMotorData.cs index ef257670d0..c83694ef72 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/ElectricComponents/ElectricMotor/ElectricMotorData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/ElectricComponents/ElectricMotor/ElectricMotorData.cs @@ -192,9 +192,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data [ValidateObject] public ElectricMotorFullLoadCurve FullLoadCurve { get; protected internal set; } +#if DEBUG + [ValidateObject] + public EfficiencyMap EfficiencyMap { get; set; } +#else [ValidateObject] protected internal EfficiencyMap EfficiencyMap { protected get; set; } - +#endif public virtual PerSecond MaxSpeed => _maxSpeed ?? (_maxSpeed = VectoMath.Min(EfficiencyMap.MaxSpeed, FullLoadCurve.MaxSpeed)); public virtual EfficiencyMap.EfficiencyResult LookupElectricPower(PerSecond avgSpeed, NewtonMeter torque, uint gear, bool allowExtrapolation) -- GitLab