diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/BusAuxiliaryInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/BusAuxiliaryInputData.cs index 4e8196bea16b9a2e9fa1503e7d2497d04ed92bcf..b4f559513be701c651b831b878347e39a731fc3c 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/BusAuxiliaryInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/BusAuxiliaryInputData.cs @@ -94,7 +94,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON // SmartElectrical - electricalUserInputsConfig.AlternatorType = elData.GetEx<string>("SmartElectrical").ParseEnum<AlternatorType>(); + electricalUserInputsConfig.AlternatorType = elData["SmartElectrical"] != null + ? (elData.GetEx<bool>("SmartElectrical") ? AlternatorType.Smart : AlternatorType.Conventional) + : elData.GetEx<string>("AlternatorType").ParseEnum<AlternatorType>(); // ResultCardIdle diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index 0eecbdde6c2258c59b81c9f5cc5448b8a925c4c9..5970914ef4ed865f1b86ab3ca0f42734df79a8e9 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -546,8 +546,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON get { return new EngineeringAuxiliaryDataInputData() { ElectricPowerDemand = Body["Padd_electric"] != null ? Body.GetEx<double>("Padd_electric").SI<Watt>() : 0.SI<Watt>(), ConstantPowerDemand = Body["Padd"] != null ? Body.GetEx<double>("Padd").SI<Watt>() : 0.SI<Watt>(), - PowerDemandICEOffDriving = Body["P_aux_ICEOff_Driving"] != null ? Body.GetEx<double>("P_aux_ICEOff_Driving").SI<Watt>() : 0.SI<Watt>(), - PowerDemandICEOffStandstill = Body["P_aux_ICEOff_Standstill"] != null ? Body.GetEx<double>("P_aux_ICEOff_Standstill").SI<Watt>() : 0.SI<Watt>() + PowerDemandICEOffDriving = Body["Paux_ICEOff_Driving"] != null ? Body.GetEx<double>("Paux_ICEOff_Driving").SI<Watt>() : 0.SI<Watt>(), + PowerDemandICEOffStandstill = Body["Paux_ICEOff_Standstill"] != null ? Body.GetEx<double>("Paux_ICEOff_Standstill").SI<Watt>() : 0.SI<Watt>() }; } }