diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs index 4a1e7c63a24f63d0536bf7e54b7de3f4ce36427a..f47fb531e5bd242a75ddd0e615dbe02ad1259194 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMachinesDeclarationInputDataProvider.cs @@ -10,7 +10,7 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider { - public class XMLElectricMachinesDeclarationInputDataProvider : AbstractCommonComponentType, IXMLElectricMachinesDeclarationInputData + public class XMLElectricMachinesDeclarationInputDataProvider : AbstractCommonComponentType, IXMLElectricMachinesDeclarationInputData { public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS; public const string XSD_TYPE = "ElectricMachineType"; diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMotorDeclarationInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMotorDeclarationInputDataProvider.cs index ea37fe8a60bfd7958cee1169bf31ecf9456cc7c2..e765658c13b9e7c631defb8dd837d55e431e9fa2 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMotorDeclarationInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLElectricMotorDeclarationInputDataProvider.cs @@ -201,7 +201,26 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider #endregion } + // --------------------------------------------------------------------------------------- + + public class XMLElectricMotorSystemStandardDeclarationInputDataProviderV2101 : + XMLElectricMotorDeclarationInputDataProviderV2101 + { + public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V2101_JOBS; + public new const string XSD_TYPE = "ElectricMachineSystemStandardValuesDataDeclarationType"; + public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); + public XMLElectricMotorSystemStandardDeclarationInputDataProviderV2101(XmlNode componentNode, string sourceFile) + : base(componentNode, sourceFile) { } + + #region Overrides of XMLElectricMotorDeclarationInputDataProviderV2101 + + public override Volt TestVoltageOverload => null; + public override TableData Conditioning => null; + + #endregion + } + // --------------------------------------------------------------------------------------- public class XMLElectricMotorIHPCDeclarationInputDataProviderV2101 : XMLElectricMotorDeclarationInputDataProviderV2101 diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs index cc9a7e1694cddce3f62b5c95cc10292a7002acac..1e2e46449d297ff77fb68122f0ef097b88458e90 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/NinjectModules/XMLDeclarationInputDataV210InjectModule.cs @@ -277,6 +277,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules Bind<IXMLElectricMotorDeclarationInputData>().To<XMLElectricMotorDeclarationInputDataProviderV2101>() .Named(XMLElectricMotorDeclarationInputDataProviderV2101.QUALIFIED_XSD_TYPE); + Bind<IXMLElectricMotorDeclarationInputData>().To<XMLElectricMotorSystemStandardDeclarationInputDataProviderV2101>() + .Named(XMLElectricMotorSystemStandardDeclarationInputDataProviderV2101.QUALIFIED_XSD_TYPE); + Bind<IXMLElectricMotorDeclarationInputData>().To<XMLElectricMotorIHPCDeclarationInputDataProviderV2101>() .Named(XMLElectricMotorIHPCDeclarationInputDataProviderV2101.QUALIFIED_XSD_TYPE); diff --git a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs index 8df773d179ddd77d6cadda9ae195227883f6426b..d3ff969b171f406ab93e9e21b50a2438bd59eeac 100644 --- a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs +++ b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs @@ -737,7 +737,7 @@ namespace TUGraz.VectoCore.Tests.XML if (testDir == Optional_TESTS_DIR) { Assert.IsNull(vehicle.Components.AngledriveInputData); - Assert.IsNull(vehicle.Components.RetarderInputData); + Assert.IsNull(vehicle.Components.RetarderInputData); Assert.IsNull(vehicle.TorqueLimits); Assert.IsNull(vehicle.ElectricMotorTorqueLimits);//Vehicle EM Drive Limits Assert.IsNull(vehicle.BoostingLimitations);//Vehicle Max Prop. Limit @@ -745,7 +745,7 @@ namespace TUGraz.VectoCore.Tests.XML else { Assert.IsNotNull(vehicle.Components.AngledriveInputData); - Assert.IsNotNull(vehicle.Components.RetarderInputData); + Assert.IsNotNull(vehicle.Components.RetarderInputData); Assert.IsNotNull(vehicle.TorqueLimits); Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits);//Vehicle EM Drive Limits Assert.IsNotNull(vehicle.BoostingLimitations);//Vehicle Max Prop. Limit @@ -2046,8 +2046,31 @@ namespace TUGraz.VectoCore.Tests.XML Assert.NotNull(dataProvider.JobInputData); var vehicle = dataProvider.JobInputData.Vehicle; + Assert.AreEqual(1, vehicle.Components.ElectricMachines.Entries.Count); + var eMachine = vehicle.Components.ElectricMachines.Entries[0]; + Assert.AreEqual(1, eMachine.Count); + Assert.AreEqual(PowertrainPosition.BatteryElectricE2, eMachine.Position); + + Assert.AreEqual(ElectricMachineType.ASM, eMachine.ElectricMachine.ElectricMachineType); + Assert.AreEqual(CertificationMethod.StandardValues, eMachine.ElectricMachine.CertificationMethod); + Assert.AreEqual(1.SI<Watt>(), eMachine.ElectricMachine.R85RatedPower); + Assert.AreEqual(0.10.SI<KilogramSquareMeter>(), eMachine.ElectricMachine.Inertia);//RotationalInertia + Assert.AreEqual(200.00.SI<NewtonMeter>(), eMachine.ElectricMachine.ContinuousTorque); + Assert.AreEqual(2000.00.SI<PerSecond>(), eMachine.ElectricMachine.ContinuousTorqueSpeed);//TestSpeedContinuousTorque + Assert.AreEqual(400.00.SI<NewtonMeter>(), eMachine.ElectricMachine.OverloadTorque); + Assert.AreEqual(2000.00.SI<PerSecond>(), eMachine.ElectricMachine.OverloadTestSpeed);//TestSpeedOverloadTorque + Assert.AreEqual(30.00.SI<Second>(), eMachine.ElectricMachine.OverloadTime);//OverloadDuration + Assert.IsNull(eMachine.ElectricMachine.TestVoltageOverload); + Assert.AreEqual(true, eMachine.ElectricMachine.DcDcConverterIncluded); + Assert.AreEqual("None", eMachine.ElectricMachine.IHPCType); + + Assert.AreEqual(1, eMachine.ElectricMachine.VoltageLevels.Count); + TestMaxTorqueCurve(eMachine.ElectricMachine.VoltageLevels[0].FullLoadCurve); + Assert.IsNotNull(eMachine.ElectricMachine.VoltageLevels[0].PowerMap); + TestPowerMapData01(eMachine.ElectricMachine.VoltageLevels[0].PowerMap[0]); + Assert.IsNull(eMachine.ElectricMachine.Conditioning); - Assert.IsNotNull(vehicle.Components.ElectricMachines.Entries); + Assert.IsNotNull(eMachine.RatioPerGear); } @@ -2073,7 +2096,7 @@ namespace TUGraz.VectoCore.Tests.XML Assert.AreEqual(30.00.SI<Second>(), iepc.OverloadTime);//OverloadDuration Assert.AreEqual(false, iepc.DifferentialIncluded); Assert.AreEqual(false, iepc.DesignTypeWheelMotor); - Assert.AreEqual(1, iepc.NrOfDesignTypeWheelMotorMeasured); + Assert.AreEqual(1, iepc.NrOfDesignTypeWheelMotorMeasured); TestGearsData(iepc.Gears); Assert.AreEqual(1, iepc.VoltageLevels.Count);