diff --git a/VectoCommon/VectoHashing/Resources/XSLT/SortInputData.xslt b/VectoCommon/VectoHashing/Resources/XSLT/SortInputData.xslt index f0d1ae473117ecebc84d68441300fe666e7e85cc..7a5ae9a4a9ad95437db85c2775b3008f37012f46 100644 --- a/VectoCommon/VectoHashing/Resources/XSLT/SortInputData.xslt +++ b/VectoCommon/VectoHashing/Resources/XSLT/SortInputData.xslt @@ -272,7 +272,7 @@ </xsl:if> </xsl:template> - <!-- Sorting for Job files --> + <!-- Sorting for Job files tags --> <!-- ElectricEnergyStorage --> <xsl:template match="*[local-name()='Battery' and ./*[local-name()='StringID']]"> @@ -287,18 +287,7 @@ </xsl:if> </xsl:template> - <!-- ElectricMachineTorqueLimits --> - <xsl:template match="*[local-name()='ElectricMachine' and ./*[local-name()='Position']]"> - <xsl:if test="count(preceding-sibling::*[local-name()='ElectricMachine']) = 0"> - <xsl:for-each select="../*[local-name()='ElectricMachine']"> - <xsl:sort data-type="text" select="./*[local-name() = 'Position']/text()" order="ascending"/> - <xsl:element name="{local-name()}"> - <xsl:apply-templates select="*"/> - </xsl:element> - </xsl:for-each> - </xsl:if> - </xsl:template> - + <!-- Sort SteeringPump Technology entries by axleNumber attribute --> <!-- For AUX Component SteeringPump --> <xsl:template match="*[local-name()='SteeringPump']"> <xsl:element name="{local-name()}"> @@ -310,6 +299,7 @@ </xsl:element> </xsl:template> + <!-- Sort P2.5GearRatios by gear attribute number--> <!-- For ElectricMachine component at HEV-Px, HEV-S2, HEV-S3, HEV-S4, PEV-E2, PEV-E3 and PEV-E4 --> <xsl:template match="*[local-name()='P2.5GearRatios']"> <xsl:element name="{local-name()}"> @@ -321,6 +311,7 @@ </xsl:element> </xsl:template> + <!-- Sort BoostingLimitation entries by rotationalSpeed attribute number --> <!-- For Vehicle HEV IEPC-S and Vehicle HEV-Px --> <xsl:template match="*[local-name()='BoostingLimitations']"> <xsl:element name="{local-name()}"> @@ -332,6 +323,45 @@ </xsl:element> </xsl:template> + <!-- Sort SmartAlternator elements by the value of the child element RatedCurrent --> + <!-- For AUX_Conventional_PrimaryBusType ElectricSystem --> + <xsl:template match="*[local-name()='SmartAlternator' and ./*[local-name()='RatedCurrent']]"> + <xsl:if test="count(preceding-sibling::*[local-name()='SmartAlternator']) = 0"> + <xsl:for-each select="../*[local-name()='SmartAlternator']"> + <xsl:sort data-type="number" select="./*[local-name() = 'RatedCurrent']/text()" order="ascending"/> + <xsl:element name="{local-name()}"> + <xsl:apply-templates select="*"/> + </xsl:element> + </xsl:for-each> + </xsl:if> + </xsl:template> + + <!-- Sort Battery elements by the value of the child elements BatteryTechnology and RatedCapacity--> + <!-- For AUX_Conventional_PrimaryBusType ElectricSystem --> + <xsl:template match="*[local-name()='Battery' and ./*[local-name()='BatteryTechnology']]"> + <xsl:if test="count(preceding-sibling::*[local-name()='Battery']) = 0"> + <xsl:for-each select="../*[local-name()='Battery']"> + <xsl:sort data-type="text" select="./*[local-name() = 'BatteryTechnology']/text()" order="ascending"/> + <xsl:sort data-type="number" select="./*[local-name() = 'RatedCapacity']/text()" order="ascending"/> + <xsl:element name="{local-name()}"> + <xsl:apply-templates select="*"/> + </xsl:element> + </xsl:for-each> + </xsl:if> + </xsl:template> + <!-- Sort Capacitor elements by the value of the child elements CapacitorTechnology and RatedCapacitance --> + <!-- For AUX_Conventional_PrimaryBusType ElectricSystem --> + <xsl:template match="*[local-name()='Capacitor' and ./*[local-name()='CapacitorTechnology']]"> + <xsl:if test="count(preceding-sibling::*[local-name()='Capacitor']) = 0"> + <xsl:for-each select="../*[local-name()='Capacitor']"> + <xsl:sort data-type="text" select="./*[local-name() = 'CapacitorTechnology']/text()" order="ascending"/> + <xsl:sort data-type="number" select="./*[local-name() = 'RatedCapacitance']/text()" order="ascending"/> + <xsl:element name="{local-name()}"> + <xsl:apply-templates select="*"/> + </xsl:element> + </xsl:for-each> + </xsl:if> + </xsl:template> </xsl:transform> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Sorted/Conventional_primaryBus_AMT.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Sorted/Conventional_primaryBus_AMT.xml new file mode 100644 index 0000000000000000000000000000000000000000..b71181fbfe8b743b82fefe87373f17418bfc660f --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Sorted/Conventional_primaryBus_AMT.xml @@ -0,0 +1,349 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tns:VectoInputDeclaration schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" 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.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3" xmlns:v2.4="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationJob.xsd"> + <v2.0:Vehicle id="VEH-1234567890" xsi:type="Vehicle_Conventional_PrimaryBusDeclarationType"> + <Manufacturer>Generic Truck Manufacturer</Manufacturer> + <ManufacturerAddress>Street, ZIP City</ManufacturerAddress> + <Model>Generic Model</Model> + <VIN>VEH-1234567890</VIN> + <Date>2017-02-15T11:00:00Z</Date> + <LegislativeCategory>M3</LegislativeCategory> + <ChassisConfiguration>Bus</ChassisConfiguration> + <AxleConfiguration>4x2</AxleConfiguration> + <Articulated>false</Articulated> + <TechnicalPermissibleMaximumLadenMass>25000</TechnicalPermissibleMaximumLadenMass> + <IdlingSpeed>600</IdlingSpeed> + <RetarderType>Transmission Output Retarder</RetarderType> + <RetarderRatio>1.000</RetarderRatio> + <AngledriveType>None</AngledriveType> + <ZeroEmissionVehicle>false</ZeroEmissionVehicle> + <ADAS xsi:type="ADAS_Conventional_Type"> + <EngineStopStart>false</EngineStopStart> + <EcoRollWithoutEngineStop>false</EcoRollWithoutEngineStop> + <EcoRollWithEngineStop>false</EcoRollWithEngineStop> + <PredictiveCruiseControl>none</PredictiveCruiseControl> + </ADAS> + <TorqueLimits xsi:type="v2.0:TorqueLimitsType"><!-- optional --> + <v2.0:Entry gear="1" maxTorque="2500"/> + <v2.0:Entry gear="6" maxTorque="1800"/> + <v2.0:Entry gear="12" maxTorque="1900"/> + </TorqueLimits> + <Components xsi:type="Components_Conventional_PrimaryBusType"> + <Engine xsi:type="v2.0:EngineComponentDeclarationType"> + <v2.0:Data xsi:type="v1.0:EngineDataDeclarationType" id="ENG-gooZah3D" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0"> + <Manufacturer>Generic Engine Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Engine</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-02-15T11:00:00Z</Date> + <AppVersion>VectoEngine x.y</AppVersion> + <Displacement>12730</Displacement> + <IdlingSpeed>560</IdlingSpeed> + <RatedSpeed>2200</RatedSpeed> + <RatedPower>380000</RatedPower> + <MaxEngineTorque>2300</MaxEngineTorque> + <WHTCUrban>1.0097</WHTCUrban> + <WHTCRural>1.0035</WHTCRural> + <WHTCMotorway>1.0200</WHTCMotorway> + <BFColdHot>1.0000</BFColdHot> + <CFRegPer>1.0000</CFRegPer> + <CFNCV>1.0000</CFNCV> + <FuelType>NG</FuelType> + <FuelConsumptionMap> + <Entry engineSpeed="560.00" torque="-149.00" fuelConsumption="0.00"/> + <Entry engineSpeed="560.00" torque="1180.00" fuelConsumption="12869.00"/> + <Entry engineSpeed="2100.00" torque="-320.00" fuelConsumption="0.00"/> + <Entry engineSpeed="2100.00" torque="1100.00" fuelConsumption="50653.00"/> + </FuelConsumptionMap> + <FullLoadAndDragCurve> + <Entry engineSpeed="560.00" maxTorque="1180.00" dragTorque="-149.00"/> + <Entry engineSpeed="1800.00" maxTorque="1800.00" dragTorque="-300.00"/> + <Entry engineSpeed="2100.00" maxTorque="1100.00" dragTorque="-320.00"/> + </FullLoadAndDragCurve> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#ENG-gooZah3D"> + <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>/qqS7iMvDm0MYurhsIRZTF5FeS+MNA2HnoS1P8SrSdA=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Engine> + <Gearbox xsi:type="v2.0:GearboxComponentDeclarationType"> + <v2.0:Data id="gbx-vi2Oak2N" xsi:type="v2.0:GearboxDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Gearbox</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <TransmissionType>AMT</TransmissionType> + <MainCertificationMethod>Standard values</MainCertificationMethod> + <Gears xsi:type="GearsDeclarationType"> + <Gear number="1"> + <Ratio>14.930</Ratio> + <MaxTorque>1900</MaxTorque> + <MaxSpeed>2000</MaxSpeed> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/> + <Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/> + <Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/> + <Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/> + <Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/> + <Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/> + </TorqueLossMap> + </Gear> + <Gear number="2"> + <Ratio>11.640</Ratio> + <MaxTorque>1900</MaxTorque> + <MaxSpeed>2000</MaxSpeed> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/> + <Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/> + <Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/> + <Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/> + <Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/> + <Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/> + </TorqueLossMap> + </Gear> + </Gears> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#gbx-vi2Oak2N"> + <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>8fsWE1AvinkI5UcWuU/vyx3X2kKjarP/qPC+Uon+aBE=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Gearbox> + <TorqueConverter><!-- optional --> + <v2.0:Data id="tc-123xyz" xsi:type="v2.0:TorqueConverterDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Some Manufacturer</Manufacturer> + <Model>Some Model</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-02-15T11:00:00Z</Date> + <AppVersion>TC CalcApp 123</AppVersion> + <CertificationMethod>Standard values</CertificationMethod> + <Characteristics> + <Entry speedRatio="0.0000" torqueRatio="1.00" inputTorqueRef="300.00"/> + <Entry speedRatio="0.5000" torqueRatio="1.00" inputTorqueRef="200.00"/> + <Entry speedRatio="0.9000" torqueRatio="0.90" inputTorqueRef="200.00"/> + </Characteristics> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#tc-123xyz"> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> + <di:DigestValue>BpqbVEM5dAFXyIeZfvKBUhv+Oj4OU5R85aK9M4ylV+4=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </TorqueConverter> + <Angledrive><!-- optional --> + <v2.0:Data id="agl-vi2Oak2N" xsi:type="AngledriveDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Gearbox</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <Ratio>2.345</Ratio> + <CertificationMethod>Standard values</CertificationMethod> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-10000.00" torqueLoss="100.00"/> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="10.00"/> + <Entry inputSpeed="0.00" inputTorque="10000.00" torqueLoss="100.00"/> + <Entry inputSpeed="1000.00" inputTorque="-1000.00" torqueLoss="100.00"/> + <Entry inputSpeed="1000.00" inputTorque="0.00" torqueLoss="10.00"/> + <Entry inputSpeed="1000.00" inputTorque="1000.00" torqueLoss="100.00"/> + </TorqueLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#agl-vi2Oak2N"> + <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>iVRxT+wETVrlCQhZMsiqRC1mKcw3a3KSeb1y5uhINQk=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Angledrive> + <Retarder><!-- optional --> + <v2.0:Data id="RET-Shai9imi" xsi:type="RetarderDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Retarder Manufacturer</Manufacturer> + <Model>Generic Retarder</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <CertificationMethod>Standard values</CertificationMethod> + <RetarderLossMap> + <Entry retarderSpeed="0.00" torqueLoss="10.00"/> + <Entry retarderSpeed="2300.00" torqueLoss="20.58"/> + </RetarderLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#RET-Shai9imi"> + <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>xcfok6Uo1kvFefSRo+W/oMfEfS5BdTklBugAjby2DUQ=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Retarder> + <Axlegear> + <v2.0:Data id="AXL-EC3ohnoh" xsi:type="v2.0:AxlegearDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck AxleGear</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <LineType>Single portal axle</LineType> + <Ratio>2.590</Ratio> + <CertificationMethod>Standard values</CertificationMethod> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-5000.00" torqueLoss="115.00"/> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="40.00"/> + <Entry inputSpeed="0.00" inputTorque="15000.00" torqueLoss="265.00"/> + <Entry inputSpeed="2100.00" inputTorque="-5000.00" torqueLoss="115.00"/> + <Entry inputSpeed="2100.00" inputTorque="0.00" torqueLoss="40.00"/> + <Entry inputSpeed="2100.00" inputTorque="35000.00" torqueLoss="565.00"/> + </TorqueLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#AXL-EC3ohnoh"> + <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>Ux2vo+s07pGr9XCbvNs/YbJcFaZClORRGXpP6Eyeze8=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Axlegear> + <AxleWheels> + <Data xsi:type="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>A/sq1ng4cqeOyauDUqUEnonRSPch3VCqZDX9Pf3tW1Q=</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>z+KDXmc5MIezM6RVgfYax5J9Efi0ghciG2/wLLmWaBk=</di:DigestValue> + </di:Reference> + </Signature> + </Tyre> + </Axle> + </Axles> + </Data> + </AxleWheels> + <Auxiliaries> + <Data xsi:type="AUX_Conventional_PrimaryBusType"> + <Fan> + <Technology>Hydraulic driven - Constant displacement pump</Technology> + </Fan> + <SteeringPump> + <Technology axleNumber="1">Variable displacement elec. controlled</Technology> + <Technology axleNumber="2">Dual displacement with elec. control</Technology> + <Technology axleNumber="3">Variable displacement mech. controlled</Technology> + </SteeringPump> + <ElectricSystem> + <AlternatorTechnology>conventional</AlternatorTechnology> + <SmartAlternator><!-- optional --> + <RatedCurrent>50</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <SmartAlternator><!-- optional --> + <RatedCurrent>90</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <SmartAlternator><!-- optional --> + <RatedCurrent>100</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <Battery><!-- optional --> + <BatteryTechnology>lead-acid battery – AGM</BatteryTechnology> + <RatedCapacity>60</RatedCapacity> + <NominalVoltage>48</NominalVoltage> + </Battery> + <Battery><!-- optional --> + <BatteryTechnology>li-ion battery - high power</BatteryTechnology> + <RatedCapacity>50</RatedCapacity> + <NominalVoltage>48</NominalVoltage> + </Battery> + <Capacitor><!-- optional --> + <CapacitorTechnology>with DCDC converter</CapacitorTechnology> + <RatedCapacitance>120</RatedCapacitance> + <RatedVoltage>30</RatedVoltage> + </Capacitor> + <Capacitor><!-- optional --> + <CapacitorTechnology>with DCDC converter</CapacitorTechnology> + <RatedCapacitance>130</RatedCapacitance> + <RatedVoltage>30</RatedVoltage> + </Capacitor> + </ElectricSystem> + <PneumaticSystem> + <SizeOfAirSupply>Large Supply 2-stage</SizeOfAirSupply> + <CompressorDrive>mechanically</CompressorDrive> + <Clutch>none</Clutch> + <CompressorRatio>1.000</CompressorRatio> + <SmartCompressionSystem>false</SmartCompressionSystem> + <SmartRegenerationSystem>false</SmartRegenerationSystem> + <AirsuspensionControl>electronically</AirsuspensionControl> + <PneumaticSCRReagentDosing>true</PneumaticSCRReagentDosing> + </PneumaticSystem> + <HVAC> + <AdjustableCoolantThermostat>true</AdjustableCoolantThermostat> + <EngineWasteGasHeatExchanger>true</EngineWasteGasHeatExchanger> + </HVAC> + </Data> + </Auxiliaries> + </Components> + </v2.0:Vehicle> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Unsorted/Conventional_primaryBus_AMT.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Unsorted/Conventional_primaryBus_AMT.xml new file mode 100644 index 0000000000000000000000000000000000000000..fc81289adea43197b5dc19b001c93ae4f60e4cda --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Job/Unsorted/Conventional_primaryBus_AMT.xml @@ -0,0 +1,349 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tns:VectoInputDeclaration schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationInput:v2.0" 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.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.3" xmlns:v2.4="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.4" xmlns:di="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationJob V:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationJob.xsd"> + <v2.0:Vehicle id="VEH-1234567890" xsi:type="Vehicle_Conventional_PrimaryBusDeclarationType"> + <Manufacturer>Generic Truck Manufacturer</Manufacturer> + <ManufacturerAddress>Street, ZIP City</ManufacturerAddress> + <Model>Generic Model</Model> + <VIN>VEH-1234567890</VIN> + <Date>2017-02-15T11:00:00Z</Date> + <LegislativeCategory>M3</LegislativeCategory> + <ChassisConfiguration>Bus</ChassisConfiguration> + <AxleConfiguration>4x2</AxleConfiguration> + <Articulated>false</Articulated> + <TechnicalPermissibleMaximumLadenMass>25000</TechnicalPermissibleMaximumLadenMass> + <IdlingSpeed>600</IdlingSpeed> + <RetarderType>Transmission Output Retarder</RetarderType> + <RetarderRatio>1.000</RetarderRatio> + <AngledriveType>None</AngledriveType> + <ZeroEmissionVehicle>false</ZeroEmissionVehicle> + <ADAS xsi:type="ADAS_Conventional_Type"> + <EngineStopStart>false</EngineStopStart> + <EcoRollWithoutEngineStop>false</EcoRollWithoutEngineStop> + <EcoRollWithEngineStop>false</EcoRollWithEngineStop> + <PredictiveCruiseControl>none</PredictiveCruiseControl> + </ADAS> + <TorqueLimits xsi:type="v2.0:TorqueLimitsType"><!-- optional --> + <v2.0:Entry gear="6" maxTorque="1800"/> + <v2.0:Entry gear="12" maxTorque="1900"/> + <v2.0:Entry gear="1" maxTorque="2500"/> + </TorqueLimits> + <Components xsi:type="Components_Conventional_PrimaryBusType"> + <Engine xsi:type="v2.0:EngineComponentDeclarationType"> + <v2.0:Data xsi:type="v1.0:EngineDataDeclarationType" id="ENG-gooZah3D" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0"> + <Manufacturer>Generic Engine Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Engine</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-02-15T11:00:00Z</Date> + <AppVersion>VectoEngine x.y</AppVersion> + <Displacement>12730</Displacement> + <IdlingSpeed>560</IdlingSpeed> + <RatedSpeed>2200</RatedSpeed> + <RatedPower>380000</RatedPower> + <MaxEngineTorque>2300</MaxEngineTorque> + <WHTCUrban>1.0097</WHTCUrban> + <WHTCRural>1.0035</WHTCRural> + <WHTCMotorway>1.0200</WHTCMotorway> + <BFColdHot>1.0000</BFColdHot> + <CFRegPer>1.0000</CFRegPer> + <CFNCV>1.0000</CFNCV> + <FuelType>NG</FuelType> + <FuelConsumptionMap> + <Entry engineSpeed="560.00" torque="-149.00" fuelConsumption="0.00"/> + <Entry engineSpeed="2100.00" torque="1100.00" fuelConsumption="50653.00"/> + <Entry engineSpeed="560.00" torque="1180.00" fuelConsumption="12869.00"/> + <Entry engineSpeed="2100.00" torque="-320.00" fuelConsumption="0.00"/> + </FuelConsumptionMap> + <FullLoadAndDragCurve> + <Entry engineSpeed="1800.00" maxTorque="1800.00" dragTorque="-300.00"/> + <Entry engineSpeed="560.00" maxTorque="1180.00" dragTorque="-149.00"/> + <Entry engineSpeed="2100.00" maxTorque="1100.00" dragTorque="-320.00"/> + </FullLoadAndDragCurve> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#ENG-gooZah3D"> + <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>/qqS7iMvDm0MYurhsIRZTF5FeS+MNA2HnoS1P8SrSdA=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Engine> + <Gearbox xsi:type="v2.0:GearboxComponentDeclarationType"> + <v2.0:Data id="gbx-vi2Oak2N" xsi:type="v2.0:GearboxDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Gearbox</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <TransmissionType>AMT</TransmissionType> + <MainCertificationMethod>Standard values</MainCertificationMethod> + <Gears xsi:type="GearsDeclarationType"> + <Gear number="2"> + <Ratio>11.640</Ratio> + <MaxTorque>1900</MaxTorque> + <MaxSpeed>2000</MaxSpeed> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/> + <Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/> + <Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/> + <Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/> + <Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/> + <Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/> + </TorqueLossMap> + </Gear> + <Gear number="1"> + <Ratio>14.930</Ratio> + <MaxTorque>1900</MaxTorque> + <MaxSpeed>2000</MaxSpeed> + <TorqueLossMap> + <Entry inputSpeed="2100.00" inputTorque="3000.00" torqueLoss="64.69"/> + <Entry inputSpeed="0.00" inputTorque="-1000.00" torqueLoss="25.06"/> + <Entry inputSpeed="2100.00" inputTorque="-1000.00" torqueLoss="35.69"/> + <Entry inputSpeed="2100.00" inputTorque="50.00" torqueLoss="16.69"/> + <Entry inputSpeed="0.00" inputTorque="50.00" torqueLoss="6.06"/> + <Entry inputSpeed="0.00" inputTorque="3000.00" torqueLoss="54.06"/> + </TorqueLossMap> + </Gear> + </Gears> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#gbx-vi2Oak2N"> + <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>8fsWE1AvinkI5UcWuU/vyx3X2kKjarP/qPC+Uon+aBE=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Gearbox> + <TorqueConverter><!-- optional --> + <v2.0:Data id="tc-123xyz" xsi:type="v2.0:TorqueConverterDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Some Manufacturer</Manufacturer> + <Model>Some Model</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-02-15T11:00:00Z</Date> + <AppVersion>TC CalcApp 123</AppVersion> + <CertificationMethod>Standard values</CertificationMethod> + <Characteristics> + <Entry speedRatio="0.5000" torqueRatio="1.00" inputTorqueRef="200.00"/> + <Entry speedRatio="0.0000" torqueRatio="1.00" inputTorqueRef="300.00"/> + <Entry speedRatio="0.9000" torqueRatio="0.90" inputTorqueRef="200.00"/> + </Characteristics> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#tc-123xyz"> + <di:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> + <di:DigestValue>BpqbVEM5dAFXyIeZfvKBUhv+Oj4OU5R85aK9M4ylV+4=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </TorqueConverter> + <Angledrive><!-- optional --> + <v2.0:Data id="agl-vi2Oak2N" xsi:type="AngledriveDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck Gearbox</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <Ratio>2.345</Ratio> + <CertificationMethod>Standard values</CertificationMethod> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="10000.00" torqueLoss="100.00"/> + <Entry inputSpeed="1000.00" inputTorque="-1000.00" torqueLoss="100.00"/> + <Entry inputSpeed="1000.00" inputTorque="0.00" torqueLoss="10.00"/> + <Entry inputSpeed="0.00" inputTorque="-10000.00" torqueLoss="100.00"/> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="10.00"/> + <Entry inputSpeed="1000.00" inputTorque="1000.00" torqueLoss="100.00"/> + </TorqueLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#agl-vi2Oak2N"> + <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>iVRxT+wETVrlCQhZMsiqRC1mKcw3a3KSeb1y5uhINQk=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Angledrive> + <Retarder><!-- optional --> + <v2.0:Data id="RET-Shai9imi" xsi:type="RetarderDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Retarder Manufacturer</Manufacturer> + <Model>Generic Retarder</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <CertificationMethod>Standard values</CertificationMethod> + <RetarderLossMap> + <Entry retarderSpeed="2300.00" torqueLoss="20.58"/> + <Entry retarderSpeed="0.00" torqueLoss="10.00"/> + </RetarderLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#RET-Shai9imi"> + <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>xcfok6Uo1kvFefSRo+W/oMfEfS5BdTklBugAjby2DUQ=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Retarder> + <Axlegear> + <v2.0:Data id="AXL-EC3ohnoh" xsi:type="v2.0:AxlegearDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> + <Model>Generic 40t Long Haul Truck AxleGear</Model> + <CertificationNumber>e12*0815/8051*2017/05E0000*00</CertificationNumber> + <Date>2017-01-11T11:00:00Z</Date> + <AppVersion>3.0.1</AppVersion> + <LineType>Single portal axle</LineType> + <Ratio>2.590</Ratio> + <CertificationMethod>Standard values</CertificationMethod> + <TorqueLossMap> + <Entry inputSpeed="2100.00" inputTorque="35000.00" torqueLoss="565.00"/> + <Entry inputSpeed="0.00" inputTorque="15000.00" torqueLoss="265.00"/> + <Entry inputSpeed="2100.00" inputTorque="-5000.00" torqueLoss="115.00"/> + <Entry inputSpeed="0.00" inputTorque="-5000.00" torqueLoss="115.00"/> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="40.00"/> + <Entry inputSpeed="2100.00" inputTorque="0.00" torqueLoss="40.00"/> + </TorqueLossMap> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#AXL-EC3ohnoh"> + <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>Ux2vo+s07pGr9XCbvNs/YbJcFaZClORRGXpP6Eyeze8=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </Axlegear> + <AxleWheels> + <Data xsi:type="AxleWheelsDataDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Axles> + <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>z+KDXmc5MIezM6RVgfYax5J9Efi0ghciG2/wLLmWaBk=</di:DigestValue> + </di:Reference> + </Signature> + </Tyre> + </Axle> + <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>A/sq1ng4cqeOyauDUqUEnonRSPch3VCqZDX9Pf3tW1Q=</di:DigestValue> + </di:Reference> + </Signature> + </Tyre> + </Axle> + </Axles> + </Data> + </AxleWheels> + <Auxiliaries> + <Data xsi:type="AUX_Conventional_PrimaryBusType"> + <Fan> + <Technology>Hydraulic driven - Constant displacement pump</Technology> + </Fan> + <SteeringPump> + <Technology axleNumber="2">Dual displacement with elec. control</Technology> + <Technology axleNumber="1">Variable displacement elec. controlled</Technology> + <Technology axleNumber="3">Variable displacement mech. controlled</Technology> + </SteeringPump> + <ElectricSystem> + <AlternatorTechnology>conventional</AlternatorTechnology> + <SmartAlternator><!-- optional --> + <RatedCurrent>90</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <SmartAlternator><!-- optional --> + <RatedCurrent>50</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <SmartAlternator><!-- optional --> + <RatedCurrent>100</RatedCurrent> + <RatedVoltage>48</RatedVoltage> + </SmartAlternator> + <Battery><!-- optional --> + <BatteryTechnology>li-ion battery - high power</BatteryTechnology> + <RatedCapacity>50</RatedCapacity> + <NominalVoltage>48</NominalVoltage> + </Battery> + <Battery><!-- optional --> + <BatteryTechnology>lead-acid battery – AGM</BatteryTechnology> + <RatedCapacity>60</RatedCapacity> + <NominalVoltage>48</NominalVoltage> + </Battery> + <Capacitor><!-- optional --> + <CapacitorTechnology>with DCDC converter</CapacitorTechnology> + <RatedCapacitance>130</RatedCapacitance> + <RatedVoltage>30</RatedVoltage> + </Capacitor> + <Capacitor><!-- optional --> + <CapacitorTechnology>with DCDC converter</CapacitorTechnology> + <RatedCapacitance>120</RatedCapacitance> + <RatedVoltage>30</RatedVoltage> + </Capacitor> + </ElectricSystem> + <PneumaticSystem> + <SizeOfAirSupply>Large Supply 2-stage</SizeOfAirSupply> + <CompressorDrive>mechanically</CompressorDrive> + <Clutch>none</Clutch> + <CompressorRatio>1.000</CompressorRatio> + <SmartCompressionSystem>false</SmartCompressionSystem> + <SmartRegenerationSystem>false</SmartRegenerationSystem> + <AirsuspensionControl>electronically</AirsuspensionControl> + <PneumaticSCRReagentDosing>true</PneumaticSCRReagentDosing> + </PneumaticSystem> + <HVAC> + <AdjustableCoolantThermostat>true</AdjustableCoolantThermostat> + <EngineWasteGasHeatExchanger>true</EngineWasteGasHeatExchanger> + </HVAC> + </Data> + </Auxiliaries> + </Components> + </v2.0:Vehicle> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/VectoJobHashSortTest.cs b/VectoCommon/VectoHashingTest/VectoJobHashSortTest.cs index 54137d9860adc5735ebbdc35e895f2070674bd79..4f1c88d348f640e638cdaf343137957c59aa3087 100644 --- a/VectoCommon/VectoHashingTest/VectoJobHashSortTest.cs +++ b/VectoCommon/VectoHashingTest/VectoJobHashSortTest.cs @@ -7,35 +7,52 @@ namespace VectoHashingTest { public class VectoJobHashSortTest { + private const string UnsortedJobPath = @"Testdata\XML\Sort\Job\Unsorted\"; + private const string SortedJobPath = @"Testdata\XML\Sort\Job\Sorted\"; - private const string UnsortedComponentPath = @"Testdata\XML\Sort\Job\Unsorted\"; - private const string SortedComponentPath = @"Testdata\XML\Sort\Job\Sorted\"; - - [OneTimeSetUp] - public void RunBeforeAnyTests() - { - Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); - } - - [TestCase("HpFMjk3vmSp7FuZD6FEyBmDyrix7ifdcrKI26a5qEiw=", SortedComponentPath + "HEV-S_heavyLorry_IEPC-S.xml")] - [TestCase("HpFMjk3vmSp7FuZD6FEyBmDyrix7ifdcrKI26a5qEiw=", UnsortedComponentPath + "HEV-S_heavyLorry_IEPC-S.xml")] - public void TestJobHashSort(string expectedJobHash, string filePath) - { - var loadedFile = VectoHash.Load(filePath); - - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Engine)); - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.ElectricMachineSystem));//ElectricMachineGEN - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.REESS,0));//ElectricEnergyStorage - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.REESS,1));//ElectricEnergyStorage - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.IEPC)); - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Retarder)); - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Axlegear)); - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre,0));//AxelWheels - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre,1));//AxelWheels - Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Airdrag)); - - Assert.AreEqual(expectedJobHash, loadedFile.ComputeHash()); - } - - } + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + } + + [TestCase("HpFMjk3vmSp7FuZD6FEyBmDyrix7ifdcrKI26a5qEiw=", SortedJobPath + "HEV-S_heavyLorry_IEPC-S.xml")] + [TestCase("HpFMjk3vmSp7FuZD6FEyBmDyrix7ifdcrKI26a5qEiw=", UnsortedJobPath + "HEV-S_heavyLorry_IEPC-S.xml")] + public void TestJobHEV_S_HeavyLorryHashSort(string expectedJobHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Engine)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.ElectricMachineSystem));//ElectricMachineGEN + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.REESS, 0));//ElectricEnergyStorage + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.REESS, 1));//ElectricEnergyStorage + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.IEPC)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Retarder)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Axlegear)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre, 0));//AxelWheels + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre, 1));//AxelWheels + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Airdrag)); + + Assert.AreEqual(expectedJobHash, loadedFile.ComputeHash()); + } + + [TestCase("gn9Zq6pNRbb+cwWh2m08uUDbWBUufMrQmdICqqWL/Y8=", SortedJobPath + "Conventional_primaryBus_AMT.xml")] + [TestCase("gn9Zq6pNRbb+cwWh2m08uUDbWBUufMrQmdICqqWL/Y8=", UnsortedJobPath + "Conventional_primaryBus_AMT.xml")] + public void TestJobPrimaryBusHashSort(string expectedJobHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Engine)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Gearbox)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Axlegear)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Retarder)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.TorqueConverter)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Angledrive)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre, 0)); + Assert.IsTrue(loadedFile.ValidateHash(VectoComponents.Tyre, 1)); + + Assert.AreEqual(expectedJobHash, loadedFile.ComputeHash()); + + } + } }