From e6b976064141ae427e8ff78eb1e39f38f1cc0239 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Thu, 24 Sep 2020 10:27:48 +0200
Subject: [PATCH] if no thermal degrading is available in input data set it to
 high values (i.e. disable thermal buffer) provide debugging info (toString
 method) on hybridstrategy response, hybridcontroller response and em-settings

---
 VectoCommon/VectoCommon/Models/HybridStrategyResponse.cs      | 4 ++--
 VectoCommon/VectoCommon/Models/IResponse.cs                   | 2 +-
 .../VectoCore/InputData/FileIO/JSON/JSONElectricMotor.cs      | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/VectoCommon/VectoCommon/Models/HybridStrategyResponse.cs b/VectoCommon/VectoCommon/Models/HybridStrategyResponse.cs
index c11db7a245..408ba98a65 100644
--- a/VectoCommon/VectoCommon/Models/HybridStrategyResponse.cs
+++ b/VectoCommon/VectoCommon/Models/HybridStrategyResponse.cs
@@ -15,7 +15,7 @@ namespace TUGraz.VectoCommon.Models {
 		public PerSecond DeltaEngineSpeed { get; set; }
 	}
 
-	public class HybridStrategyResponse : IHybridStrategyResponse
+	public class HybridStrategyResponse : AbstractComponentResponse, IHybridStrategyResponse
 	{
 		public Dictionary<PowertrainPosition, NewtonMeter> MechanicalAssistPower;
 		public bool ShiftRequired { get; set; }
@@ -62,7 +62,7 @@ namespace TUGraz.VectoCommon.Models {
 			return ToString().Equals(other.ToString(), StringComparison.InvariantCultureIgnoreCase);
 		}
 
-		public string ToString()
+		public override string ToString()
 		{
 			var setting = string.Join(", ", Setting.MechanicalAssistPower.Select(x => $"{x.Key}, {x.Value}"));
 			return $"{U}: {setting} {Score} G{Gear}";
diff --git a/VectoCommon/VectoCommon/Models/IResponse.cs b/VectoCommon/VectoCommon/Models/IResponse.cs
index e6485da4f8..3af51d4357 100644
--- a/VectoCommon/VectoCommon/Models/IResponse.cs
+++ b/VectoCommon/VectoCommon/Models/IResponse.cs
@@ -181,7 +181,7 @@ namespace TUGraz.VectoCommon.Models
 		HybridControllerResponse HybridController { get; set; }
 	}
 
-	public class HybridControllerResponse
+	public class HybridControllerResponse : AbstractComponentResponse
 	{
 		public HybridStrategyResponse StrategySettings { get; set; }
 	}
diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONElectricMotor.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONElectricMotor.cs
index efa188219f..031e9e0cc5 100644
--- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONElectricMotor.cs
+++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONElectricMotor.cs
@@ -53,7 +53,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON {
 
 		public Joule OverloadBuffer
 		{
-			get { return Body.GetValueOrDefault<double>("ThermalOverloadBuffer")?.SI(Unit.SI.Mega.Joule).Cast<Joule>() ?? 0.SI<Joule>(); }
+			get { return Body.GetValueOrDefault<double>("ThermalOverloadBuffer")?.SI(Unit.SI.Mega.Joule).Cast<Joule>() ?? 1e18.SI<Joule>(); }
 		}
 
 		public double OverloadRecoveryFactor
@@ -66,7 +66,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON {
 
 		public Watt ContinuousPower
 		{
-			get { return Body.GetValueOrDefault<double>("ContinuousPower")?.SI<Watt>() ?? 0.SI<Watt>(); }
+			get { return Body.GetValueOrDefault<double>("ContinuousPower")?.SI<Watt>() ?? 1e12.SI<Watt>(); }
 		}
 
 		
-- 
GitLab