Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 12f1b8b0 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

serialize efficiency maps if IEPC data

parent 2df6b6c9
No related branches found
No related tags found
No related merge requests found
...@@ -192,13 +192,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data ...@@ -192,13 +192,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
[ValidateObject] [ValidateObject]
public ElectricMotorFullLoadCurve FullLoadCurve { get; protected internal set; } public ElectricMotorFullLoadCurve FullLoadCurve { get; protected internal set; }
#if DEBUG
[ValidateObject] [ValidateObject]
public EfficiencyMap EfficiencyMap { get; set; } 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 PerSecond MaxSpeed => _maxSpeed ?? (_maxSpeed = VectoMath.Min(EfficiencyMap.MaxSpeed, FullLoadCurve.MaxSpeed));
public virtual EfficiencyMap.EfficiencyResult LookupElectricPower(PerSecond avgSpeed, NewtonMeter torque, uint gear, bool allowExtrapolation) public virtual EfficiencyMap.EfficiencyResult LookupElectricPower(PerSecond avgSpeed, NewtonMeter torque, uint gear, bool allowExtrapolation)
...@@ -225,7 +222,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data ...@@ -225,7 +222,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
public class IEPCVoltageLevelData : ElectricMotorVoltageLevelData public class IEPCVoltageLevelData : ElectricMotorVoltageLevelData
{ {
[ValidateObject] [ValidateObject]
protected internal Dictionary<uint, EfficiencyMap> EfficiencyMaps { protected get; set; } public Dictionary<uint, EfficiencyMap> EfficiencyMaps { get; set; }
public override PerSecond MaxSpeed => _maxSpeed ?? (_maxSpeed = VectoMath.Min(FullLoadCurve.MaxSpeed, EfficiencyMaps.Values.Min(x => x.MaxSpeed))); public override PerSecond MaxSpeed => _maxSpeed ?? (_maxSpeed = VectoMath.Min(FullLoadCurve.MaxSpeed, EfficiencyMaps.Values.Min(x => x.MaxSpeed)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment