From eec789725c44e693f30e3b8f31575cb442c79747 Mon Sep 17 00:00:00 2001 From: "VKMTHD\\franzjosefkober" <franz.josef.kober@ivt.tugraz.at> Date: Tue, 14 Sep 2021 17:21:58 +0200 Subject: [PATCH] added for IEPC medium lorry optional tests --- .../IEPC_mediumLorry_n_opt.xml | 247 ++++++++++++++++++ VectoCore/VectoCoreTest/VectoCoreTest.csproj | 3 + .../XML/XMLDeclarationInputv210.cs | 29 +- 3 files changed, 272 insertions(+), 7 deletions(-) create mode 100644 VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.10/WithoutOptionalEntries/IEPC_mediumLorry_n_opt.xml diff --git a/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.10/WithoutOptionalEntries/IEPC_mediumLorry_n_opt.xml b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.10/WithoutOptionalEntries/IEPC_mediumLorry_n_opt.xml new file mode 100644 index 0000000000..a44d4e148c --- /dev/null +++ b/VectoCore/VectoCoreTest/TestData/XML/XMLReaderDeclaration/SchemaVersion2.10/WithoutOptionalEntries/IEPC_mediumLorry_n_opt.xml @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="2.0" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationJob.xsd" xmlns:v1.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.1" xmlns:v2.6="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.6" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:v2.10.2="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.2"> + <v2.0:Vehicle xsi:type="Vehicle_IEPC_MediumLorryDeclarationType" id="a"> + <Manufacturer>TU Graz</Manufacturer> + <ManufacturerAddress>Inffeldgasse 19</ManufacturerAddress> + <Model>HEV Heavy Lorry Px</Model> + <VIN>1234</VIN> + <Date>2017-01-01T00:00:00Z</Date> + <LegislativeCategory>N2</LegislativeCategory> + <ChassisConfiguration>Van</ChassisConfiguration> + <AxleConfiguration>4x2</AxleConfiguration> + <CorrectedActualMass>6000</CorrectedActualMass> + <TechnicalPermissibleMaximumLadenMass>12000</TechnicalPermissibleMaximumLadenMass> + <RetarderType>None</RetarderType> + <AngledriveType>None</AngledriveType> + <ZeroEmissionVehicle>false</ZeroEmissionVehicle> + <VehicleTypeApprovalNumber>ASDF</VehicleTypeApprovalNumber> + <ArchitectureID>E-IEPC</ArchitectureID> + <OvcHev>false</OvcHev> + <ADAS xsi:type="ADAS_IEPC_Type"> + <PredictiveCruiseControl>1,2,3</PredictiveCruiseControl> + </ADAS> + <Components xsi:type="Components_IEPC_LorryType"> + <IEPC> + <v2.10.1:Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="IEPCMeasuredDataDeclarationType" id="IEPC-asdf"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2017-01-01T00:00:00Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Measured for complete component</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <TestVoltageOverload>483</TestVoltageOverload> + <DifferentialIncluded>false</DifferentialIncluded> + <DesignTypeWheelMotor>true</DesignTypeWheelMotor> + <Gears xsi:type="v2.10.1:IEPCGearsDeclarationType"> + <Gear number="1"> + <Ratio>3.000</Ratio> + </Gear> + <Gear number="2"> + <Ratio>1.000</Ratio> + <MaxOutShaftTorque>2000.00</MaxOutShaftTorque> + </Gear> + </Gears> + <VoltageLevel> + <Voltage>400</Voltage> + <MaxTorqueCurve> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + </PowerMap> + </VoltageLevel> + <VoltageLevel> + <Voltage>600</Voltage> + <MaxTorqueCurve> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + </PowerMap> + </VoltageLevel> + <DragCurve> + <Entry outShaftSpeed="0.00" dragTorque="10.00"/> + <Entry outShaftSpeed="4000.00" dragTorque="30.00"/> + </DragCurve> + <Conditioning circuitId="0"> + <Entry coolantTempInlet="30" coolingPower="5000"/> + </Conditioning> + </v2.10.1:Data> + <v2.10.1:Signature> + <di:Reference> + <di:DigestMethod Algorithm=""/> + <di:DigestValue/> + </di:Reference> + </v2.10.1:Signature> + </IEPC> + <ElectricEnergyStorage> + <Battery> + <StringID>0</StringID> + <REESS> + <v2.10.2:Data id="BAT-asdf" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2017-01-01T00:00:00Z</Date> + <AppVersion>aaaaa</AppVersion> + <CertificationMethod>Measured</CertificationMethod> + <BatteryType>HPBS</BatteryType> + <RatedCapacity>72.00</RatedCapacity> + <ConnectorsSubsystemsIncluded>true</ConnectorsSubsystemsIncluded> + <JunctionboxIncluded>true</JunctionboxIncluded> + <TestingTemperature>20</TestingTemperature> + <OCV> + <Entry SoC="0" OCV="620.00"/> + <Entry SoC="100" OCV="640.00"/> + </OCV> + <InternalResistance> + <Entry SoC="0" R_2="10.00" R_10="11.00" R_20="12.00"/> + <Entry SoC="100" R_2="12.00" R_10="14.00" R_20="16.00"/> + </InternalResistance> + <CurrentLimits> + <Entry SoC="0" maxChargingCurrent="50.00" maxDischargingCurrent="0.00"/> + <Entry SoC="100" maxChargingCurrent="0.00" maxDischargingCurrent="50.00"/> + </CurrentLimits> + </v2.10.2:Data> + <Signature> + <di:Reference> + <di:DigestMethod Algorithm=""/> + <di:DigestValue/> + </di:Reference> + </Signature> + </REESS> + <SOCmin>20</SOCmin> + <SOCmax>80</SOCmax> + </Battery> + <Battery> + <StringID>1</StringID> + <REESS> + <v2.10.2:Data id="BAT-asdf" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2017-01-01T00:00:00Z</Date> + <AppVersion>aaaaa</AppVersion> + <CertificationMethod>Measured</CertificationMethod> + <BatteryType>HPBS</BatteryType> + <RatedCapacity>72.00</RatedCapacity> + <ConnectorsSubsystemsIncluded>true</ConnectorsSubsystemsIncluded> + <JunctionboxIncluded>true</JunctionboxIncluded> + <TestingTemperature>20</TestingTemperature> + <OCV> + <Entry SoC="0" OCV="620.00"/> + <Entry SoC="100" OCV="640.00"/> + </OCV> + <InternalResistance> + <Entry SoC="0" R_2="10.00" R_10="11.00" R_20="12.00"/> + <Entry SoC="100" R_2="12.00" R_10="14.00" R_20="16.00"/> + </InternalResistance> + <CurrentLimits> + <Entry SoC="0" maxChargingCurrent="50.00" maxDischargingCurrent="0.00"/> + <Entry SoC="100" maxChargingCurrent="0.00" maxDischargingCurrent="50.00"/> + </CurrentLimits> + </v2.10.2:Data> + <Signature> + <di:Reference> + <di:DigestMethod Algorithm=""/> + <di:DigestValue/> + </di:Reference> + </Signature> + </REESS> + </Battery> + </ElectricEnergyStorage> + <AxleWheels> + <v2.0:Data xsi:type="v2.0:AxleWheelsDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Axles> + <Axle axleNumber="1" xsi:type="AxleDataDeclarationType"> + <AxleType>VehicleNonDriven</AxleType> + <TwinTyres>false</TwinTyres> + <Steered>true</Steered> + <Tyre> + <Data id="WHL-5432198760-315-70-R22.5" xsi:type="TyreDataDeclarationType"> + <Manufacturer>Generic Wheels Manufacturer</Manufacturer> + <Model>Generic Wheel</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T14:00:00Z</Date> + <AppVersion>Tyre Generation App 1.0</AppVersion> + <Dimension>315/70 R22.5</Dimension> + <RRCDeclared>0.0055</RRCDeclared> + <FzISO>31300</FzISO> + </Data> + <Signature> + <di:Reference URI="#WHL-5432198760-315-70-R22.5"> + <di:Transforms> + <di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/> + <di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + </di:Transforms> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> + <di:DigestValue>4TkUGQTX8tevHOU9Cj9uyCFuI/aqcEYlo/gyVjVQmv0=</di:DigestValue> + </di:Reference> + </Signature> + </Tyre> + </Axle> + <Axle axleNumber="2" xsi:type="AxleDataDeclarationType"> + <AxleType>VehicleDriven</AxleType> + <TwinTyres>true</TwinTyres> + <Steered>false</Steered> + <Tyre> + <Data id="WHL-5432198760-315-70-R22.5" xsi:type="TyreDataDeclarationType"> + <Manufacturer>Generic Wheels Manufacturer</Manufacturer> + <Model>Generic Wheel</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T14:00:00Z</Date> + <AppVersion>Tyre Generation App 1.0</AppVersion> + <Dimension>315/70 R22.5</Dimension> + <RRCDeclared>0.0063</RRCDeclared> + <FzISO>31300</FzISO> + </Data> + <Signature> + <di:Reference URI="#WHL-5432198760-315-70-R22.5"> + <di:Transforms> + <di:Transform Algorithm="urn:vecto:xml:2017:canonicalization"/> + <di:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + </di:Transforms> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> + <di:DigestValue>KljvtvGUUQ/L7MiLVAqU+bckL5PNDNNwdeLH9kUVrfM=</di:DigestValue> + </di:Reference> + </Signature> + </Tyre> + </Axle> + </Axles> + </v2.0:Data> + </AxleWheels> + <Auxiliaries> + <Data xsi:type="AUX_IEPC_LorryDataType"> + <SteeringPump> + <Technology axleNumber="1">Vacuum pump + elec. driven</Technology> + </SteeringPump> + <ElectricSystem> + <Technology>Standard technology - LED headlights, all</Technology> + </ElectricSystem> + <PneumaticSystem> + <Technology>Medium Supply 2-stage + elec. driven</Technology> + </PneumaticSystem> + <HVAC> + <Technology>Default</Technology> + </HVAC> + </Data> + </Auxiliaries> + </Components> + </v2.0:Vehicle> +</tns:VectoInputDeclaration> diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index b2bc01898a..7c83a0e8f3 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -6079,6 +6079,9 @@ <Content Include="TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\WithoutOptionalEntries\IEPC_heavyLorry_n_opt.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> + <Content Include="TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\WithoutOptionalEntries\IEPC_mediumLorry_n_opt.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> <Content Include="TestData\XML\XMLReaderDeclaration\SchemaVersion2.10\WithoutOptionalEntries\PEV_heavyLorry_AMT_E2_n_opt.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> diff --git a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs index 50c848eb2f..ecb9268079 100644 --- a/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs +++ b/VectoCore/VectoCoreTest/XML/XMLDeclarationInputv210.cs @@ -1815,29 +1815,44 @@ namespace TUGraz.VectoCore.Tests.XML } - [TestCase(@"MediumLorry\IEPC_mediumLorry.xml")] - public void TestIEPCMediumLorry(string jobfile) + [TestCase(@"MediumLorry\IEPC_mediumLorry.xml", BASE_DIR)] + [TestCase(@"IEPC_mediumLorry_n_opt.xml", Optional_TESTS_DIR)] + public void TestIEPCMediumLorry(string jobfile, string testDir) { - var filename = Path.Combine(BASE_DIR, jobfile); + var filename = Path.Combine(testDir, jobfile); var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename)); Assert.NotNull(dataProvider.JobInputData); var vehicle = dataProvider.JobInputData.Vehicle; Assert.NotNull(vehicle); + Assert.IsNotNull(vehicle.ADAS); Assert.IsNull(vehicle.Components.EngineInputData); Assert.IsNull(vehicle.Components.ElectricMachines); Assert.IsNotNull(vehicle.Components.IEPC); Assert.IsNull(vehicle.Components.GearboxInputData); Assert.IsNull(vehicle.Components.TorqueConverterInputData); + + if (testDir == Optional_TESTS_DIR) + { + Assert.IsNull(vehicle.Components.RetarderInputData); + Assert.IsNull(vehicle.Components.AxleGearInputData); + Assert.IsNull(vehicle.Components.AirdragInputData); + Assert.IsNull(vehicle.CargoVolume); + } + else + { + Assert.IsNotNull(vehicle.Components.RetarderInputData); + Assert.IsNotNull(vehicle.Components.AxleGearInputData); + Assert.IsNotNull(vehicle.Components.AirdragInputData); + Assert.IsNotNull(vehicle.CargoVolume); + } + Assert.IsNull(vehicle.Components.AngledriveInputData); - Assert.IsNotNull(vehicle.Components.RetarderInputData); - Assert.IsNotNull(vehicle.Components.AxleGearInputData); Assert.IsNotNull(vehicle.Components.AxleWheels); Assert.IsNotNull(vehicle.Components.AuxiliaryInputData); + Assert.IsNotNull(vehicle.Components.AuxiliaryInputData.Auxiliaries); Assert.IsNull(vehicle.Components.BusAuxiliaries); - Assert.IsNotNull(vehicle.Components.AirdragInputData); Assert.IsNotNull(vehicle.Components.ElectricStorage); Assert.IsNull(vehicle.Components.PTOTransmissionInputData); - Assert.IsNotNull(vehicle.CargoVolume); Assert.IsNull(vehicle.TorqueLimits); Assert.IsNull(vehicle.ElectricMotorTorqueLimits); Assert.IsNull(vehicle.MaxPropulsionTorque); -- GitLab