diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ADC_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ADC_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..10a700031cfd2be34b6b69003ca400280d5e9fcc --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ADC_unsorted.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:ADC xsi:type="v2.10.1:ADCComponentDeclarationType" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1"> + <Data xsi:type="v2.10.1:ADCDataDeclarationType" id="ADC-123" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1"> + <Manufacturer>Generic Vendor</Manufacturer> + <Model>ADC 20</Model> + <CertificationNumber>ADC-20-CERT</CertificationNumber> + <Date>2021-11-18T14:09:17.2810263Z</Date> + <AppVersion>VectoCore</AppVersion> + <Ratio>0.035</Ratio> + <CertificationMethod>Option 1</CertificationMethod> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#ADC-123"> + <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>NiyH2Xp0rQswwXIOf52Jm0wvK4Yc2/PL/T+zQCWQGFo=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:ADC> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/BatterySystem_1_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/BatterySystem_1_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d273adcfb5ac3387eb25a214a644b7496f85ae1 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/BatterySystem_1_unsorted.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:BatterySystem xsi:type="v2.10.1:BatteryComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="BatterySystemDataType" id="BAT-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:11:51.3452323Z</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="100" OCV="640.00" /> + <Entry SoC="0" OCV="620.00" /> + </OCV> + <InternalResistance> + <Entry SoC="100" R_2="12.00" R_10="14.00" R_20="16.00" /> + <Entry SoC="0" R_2="10.00" R_10="11.00" R_20="12.00" /> + </InternalResistance> + <CurrentLimits> + <Entry SoC="100" maxChargingCurrent="0.00" maxDischargingCurrent="50.00" /> + <Entry SoC="0" maxChargingCurrent="50.00" maxDischargingCurrent="0.00" /> + </CurrentLimits> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#BAT-asdf"> + <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>tam1LGpdznHGFGo+rp0WVr0/6+F2yU2Kv4G4tYvAe+Y=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:BatterySystem> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/CapacitorSystem_1.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/CapacitorSystem_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..b321bdf54073126af2c798374a485267e70db1f2 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/CapacitorSystem_1.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:CapacitorSystem xsi:type="v2.10.1:CapacitorSystemComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="CapacitorSystemDataType" id="CAP-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:14:06.0791626Z</Date> + <AppVersion>aaaaa</AppVersion> + <CertificationMethod>Measured</CertificationMethod> + <Capacitance>1.00</Capacitance> + <InternalResistance>23.45</InternalResistance> + <MinVoltage>3.55</MinVoltage> + <MaxVoltage>30.45</MaxVoltage> + <MaxChargingCurrent>100.00</MaxChargingCurrent> + <MaxDischargingCurrent>99.45</MaxDischargingCurrent> + <TestingTemperature>30</TestingTemperature> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#CAP-asdf"> + <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>dBadIN60l8Iqcanj/nrx1EbD+KixtDxLAusUcutITk8=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:CapacitorSystem> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem-IHPC_1_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem-IHPC_1_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..c48484ef294bb12d673a549e6681c6a38e86d495 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem-IHPC_1_unsorted.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:ElectricMachineSystem xsi:type="v2.10.1:ElectricMachineSystemComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="ElectricMachineSystemIHPCMeasuredDataDeclarationType" id="EM-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:22:33.399635Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Measured</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <DcDcConverterIncluded>true</DcDcConverterIncluded> + <IHPCType>IHPC Type 1</IHPCType> + <VoltageLevel> + <Voltage>400</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap gear="2"> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + </PowerMap> + <PowerMap gear="1"> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + </PowerMap> + </VoltageLevel> + <VoltageLevel> + <Voltage>600</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap gear="2"> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + </PowerMap> + <PowerMap gear="1"> + <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"/> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + </PowerMap> + </VoltageLevel> + <DragCurve> + <Entry outShaftSpeed="4000.00" dragTorque="30.00" /> + <Entry outShaftSpeed="0.00" dragTorque="10.00" /> + </DragCurve> + <Conditioning> + <Entry coolantTempInlet="30" coolingPower="5000" /> + </Conditioning> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#EM-asdf"> + <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>vvxJmw6PIWC5lHtnDAYVoxy6sF97g24Ti/QDlUq09tc=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:ElectricMachineSystem> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_1_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_1_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..3dffc91da18b536cc7f52b4611ee0b8219ebd92c --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_1_unsorted.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:ElectricMachineSystem xsi:type="v2.10.1:ElectricMachineSystemComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="ElectricMachineSystemMeasuredDataDeclarationType" id="EM-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:20:11.60244Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Measured</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <DcDcConverterIncluded>true</DcDcConverterIncluded> + <IHPCType>None</IHPCType> + <VoltageLevel> + <Voltage>600</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + </PowerMap> + </VoltageLevel> + <VoltageLevel> + <Voltage>400</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <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"/> + </PowerMap> + </VoltageLevel> + <DragCurve> + <Entry outShaftSpeed="4000.00" dragTorque="30.00"/> + <Entry outShaftSpeed="0.00" dragTorque="10.00"/> + </DragCurve> + <Conditioning> + <Entry coolantTempInlet="30" coolingPower="5000"/> + </Conditioning> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#EM-asdf"> + <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>TilK8FUXim9VK3Jy2qTIdogjpWvSF0cj/Ny1fyuoajk=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:ElectricMachineSystem> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_StdValues_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_StdValues_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..326ff58a2f78b9e8279b279bdafbd16290926549 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/ElectricMachineSystem_StdValues_unsorted.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:ElectricMachineSystem xsi:type="v2.10.1:ElectricMachineSystemComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="ElectricMachineSystemStandardValuesDataDeclarationType" id="EM-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:21:25.8564983Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Standard values</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <DcDcConverterIncluded>true</DcDcConverterIncluded> + <IHPCType>None</IHPCType> + <VoltageLevel> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <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"/> + </PowerMap> + </VoltageLevel> + <DragCurve> + <Entry outShaftSpeed="4000.00" dragTorque="30.00"/> + <Entry outShaftSpeed="0.00" dragTorque="10.00"/> + </DragCurve> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#EM-asdf"> + <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>CunnDxsiE9kciX+v9oeEGADZpEc88NtfMtmrHyJkCQ0=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:ElectricMachineSystem> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_APT-N_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_APT-N_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..2695fd8d6f9fb0ae8f870559546a01d9130e9b29 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_APT-N_unsorted.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" 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:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:Gearbox xsi:type="v2.0:GearboxComponentDeclarationType"> + <v2.0:Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="v2.10.1:GearboxDataDeclarationType" id="GBX-asdf"> + <Manufacturer>Generic Vendor</Manufacturer> + <Model>GB_12-gear</Model> + <CertificationNumber>GBX-GB_12-gear</CertificationNumber> + <Date>2021-11-18T14:23:31.4958567Z</Date> + <AppVersion>VectoCore</AppVersion> + <TransmissionType>APT-N</TransmissionType> + <MainCertificationMethod>Standard values</MainCertificationMethod> + <v2.10.1:Gears xsi:type="v2.0:GearsDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Gear number="2"> + <Ratio>11.640</Ratio> + <TorqueLossMap> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="1"> + <Ratio>14.930</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="3"> + <Ratio>9.020</Ratio> + <TorqueLossMap> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + + </TorqueLossMap> + </Gear> + </v2.10.1:Gears> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#GBX-asdf"> + <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>hRzWfx3/El/LwEtP86Utm3dgBAF6CagrpEREsca7+/0=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </tns:Gearbox> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_IHPC_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_IHPC_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f6f28a11c8d2005bc10dc7b342c84ca6d90a867 --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/Gearbox_IHPC_unsorted.xml @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" 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:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:Gearbox xsi:type="v2.0:GearboxComponentDeclarationType"> + <v2.0:Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="v2.10.1:GearboxDataDeclarationType" id="GBX-asdf"> + <Manufacturer>Generic Vendor</Manufacturer> + <Model>GB_12-gear</Model> + <CertificationNumber>GBX-GB_12-gear</CertificationNumber> + <Date>2021-11-18T14:30:10.5091769Z</Date> + <AppVersion>VectoCore</AppVersion> + <TransmissionType>IHPC Type 1</TransmissionType> + <MainCertificationMethod>Standard values</MainCertificationMethod> + <v2.10.1:Gears xsi:type="v2.0:GearsDeclarationType" xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0"> + <Gear number="5"> + <Ratio>5.640</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="3"> + <Ratio>9.020</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="1"> + <Ratio>14.930</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="4"> + <Ratio>7.040</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="2"> + <Ratio>11.640</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + </TorqueLossMap> + </Gear> + <Gear number="6"> + <Ratio>4.400</Ratio> + <TorqueLossMap> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + </TorqueLossMap> + </Gear> + <Gear number="7"> + <Ratio>3.390</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="9"> + <Ratio>2.050</Ratio> + <TorqueLossMap> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="10"> + <Ratio>1.600</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="8"> + <Ratio>2.650</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="12"> + <Ratio>1.000</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="1000.00" /> + <Entry inputSpeed="0.00" inputTorque="-250.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="250.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="1000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="1000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-845.00" torqueLoss="17.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="17.00" /> + <Entry inputSpeed="5000.00" inputTorque="845.00" torqueLoss="17.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="1000.00" /> + </TorqueLossMap> + </Gear> + <Gear number="11"> + <Ratio>1.280</Ratio> + <TorqueLossMap> + <Entry inputSpeed="0.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="0.00" inputTorque="-125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="0.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="125.00" torqueLoss="5.00" /> + <Entry inputSpeed="0.00" inputTorque="50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-50000.00" torqueLoss="2000.00" /> + <Entry inputSpeed="5000.00" inputTorque="-780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="0.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="780.00" torqueLoss="31.00" /> + <Entry inputSpeed="5000.00" inputTorque="50000.00" torqueLoss="2000.00" /> + </TorqueLossMap> + </Gear> + </v2.10.1:Gears> + </v2.0:Data> + <v2.0:Signature> + <di:Reference URI="#GBX-asdf"> + <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>XZCluPiG05mOAj5rTjTllCWbhCTEYVxCbE940ck3XsA=</di:DigestValue> + </di:Reference> + </v2.0:Signature> + </tns:Gearbox> +</tns:VectoInputDeclaration> \ No newline at end of file diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_1_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_1_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..f539f7dcc37fa05050d7867498aa7210dc636acb --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_1_unsorted.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:IEPC xsi:type="v2.10.1:IEPCComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="IEPCMeasuredDataDeclarationType" id="IEPC-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:31:52.4460619Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Measured for complete component</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <DifferentialIncluded>false</DifferentialIncluded> + <DesignTypeWheelMotor>true</DesignTypeWheelMotor> + <Gears xsi:type="v2.10.1:IEPCGearsDeclarationType"> + <Gear number="2"> + <Ratio>1.000</Ratio> + <MaxOutShaftTorque>2000</MaxOutShaftTorque> + </Gear> + <Gear number="1"> + <Ratio>3.000</Ratio> + </Gear> + </Gears> + <VoltageLevel> + <Voltage>600</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap gear="2"> + <Entry outShaftSpeed="5000.00" torque="-5000.00" electricPower="-25000.00"/> + <Entry outShaftSpeed="0.00" torque="-500.00" electricPower="-1500.00"/> + <Entry outShaftSpeed="0.00" torque="500.00" electricPower="1500.00"/> + <Entry outShaftSpeed="5000.00" torque="5000.00" electricPower="25000.00"/> + </PowerMap> + <PowerMap gear="1"> + <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>400</Voltage> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap gear="2"> + <Entry outShaftSpeed="5000.00" torque="-5000.00" electricPower="-25000.00"/> + <Entry outShaftSpeed="5000.00" torque="5000.00" electricPower="25000.00"/> + <Entry outShaftSpeed="0.00" torque="-500.00" electricPower="-1500.00"/> + <Entry outShaftSpeed="0.00" torque="500.00" electricPower="1500.00"/> + </PowerMap> + <PowerMap gear="1"> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + </PowerMap> + </VoltageLevel> + <DragCurve gear="2"> + <Entry outShaftSpeed="4500.00" dragTorque="35.00"/> + <Entry outShaftSpeed="0.00" dragTorque="15.00"/> + </DragCurve> + <DragCurve gear="1"> + <Entry outShaftSpeed="4000.00" dragTorque="30.00"/> + <Entry outShaftSpeed="0.00" dragTorque="10.00"/> + </DragCurve> + <Conditioning> + <Entry coolantTempInlet="30" coolingPower="5000"/> + </Conditioning> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#IEPC-asdf"> + <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>3L/fYxKTdIwzADHQMnUBPxcNwZNEHM+sKEC2M32UnEA=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:IEPC> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_StdValues_unsorted.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_StdValues_unsorted.xml new file mode 100644 index 0000000000000000000000000000000000000000..5b450a5298f9788a78d09422744adcedb9f31dcb --- /dev/null +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Sort/IEPC_StdValues_unsorted.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.10.1" xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v2.10" xmlns:v2.0="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v2.0" xmlns:v2.3="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.3" xmlns:v2.10.1="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent v:\VectoCore\VectoCore\Resources\XSD/VectoDeclarationComponent.xsd"> + <tns:IEPC xsi:type="v2.10.1:IEPCComponentDeclarationType"> + <Data xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.10.1" xsi:type="IEPCStandardValuesDataDeclarationType" id="IEPC-asdf" xmlns:v2.9="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:DEV:v2.9"> + <Manufacturer>a</Manufacturer> + <Model>a</Model> + <CertificationNumber>token</CertificationNumber> + <Date>2021-11-18T14:33:55.6801441Z</Date> + <AppVersion>aaaaa</AppVersion> + <ElectricMachineType>ASM</ElectricMachineType> + <CertificationMethod>Standard values for all components</CertificationMethod> + <R85RatedPower>1</R85RatedPower> + <RotationalInertia>0.10</RotationalInertia> + <DifferentialIncluded>false</DifferentialIncluded> + <DesignTypeWheelMotor>true</DesignTypeWheelMotor> + <Gears xsi:type="v2.10.1:IEPCGearsDeclarationType"> + <Gear number="2"> + <Ratio>1.000</Ratio> + <MaxOutShaftTorque>2000</MaxOutShaftTorque> + </Gear> + <Gear number="1"> + <Ratio>3.000</Ratio> + </Gear> + + </Gears> + <VoltageLevel> + <ContinuousTorque>200.00</ContinuousTorque> + <TestSpeedContinuousTorque>2000.00</TestSpeedContinuousTorque> + <OverloadTorque>400.00</OverloadTorque> + <TestSpeedOverloadTorque>2000.00</TestSpeedOverloadTorque> + <OverloadDuration>30.00</OverloadDuration> + <MaxTorqueCurve> + <Entry outShaftSpeed="4000.00" maxTorque="100.00" minTorque="-100.00"/> + <Entry outShaftSpeed="0.00" maxTorque="450.00" minTorque="-450.00"/> + </MaxTorqueCurve> + <PowerMap> + <Entry outShaftSpeed="4000.00" torque="-4000.00" electricPower="-20000.00"/> + <Entry outShaftSpeed="4000.00" torque="4000.00" electricPower="20000.00"/> + <Entry outShaftSpeed="0.00" torque="-400.00" electricPower="-1000.00"/> + <Entry outShaftSpeed="0.00" torque="400.00" electricPower="1000.00"/> + </PowerMap> + </VoltageLevel> + <DragCurve> + <Entry outShaftSpeed="4000.00" dragTorque="30.00"/> + <Entry outShaftSpeed="0.00" dragTorque="10.00"/> + </DragCurve> + </Data> + <v2.10.1:Signature> + <di:Reference URI="#IEPC-asdf"> + <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>BTHs/Hh2SgycIwU5OSuTgU/2SptMvmRFvPXr2X1Y7XQ=</di:DigestValue> + </di:Reference> + </v2.10.1:Signature> + </tns:IEPC> +</tns:VectoInputDeclaration> diff --git a/VectoCommon/VectoHashingTest/VectoHashSortTest.cs b/VectoCommon/VectoHashingTest/VectoHashSortTest.cs new file mode 100644 index 0000000000000000000000000000000000000000..8488b883a79a94c0155e6774f260856864784a56 --- /dev/null +++ b/VectoCommon/VectoHashingTest/VectoHashSortTest.cs @@ -0,0 +1,73 @@ +using System.IO; +using Ninject; +using NUnit.Framework; +using TUGraz.VectoCommon.Hashing; +using TUGraz.VectoCore; +using TUGraz.VectoCore.InputData.FileIO.XML; +using TUGraz.VectoHashing; + +namespace VectoHashingTest +{ + public class VectoHashSortTest + { + protected IXMLInputDataReader xmlInputReader; + private IKernel _kernel; + + [OneTimeSetUp] + public void RunBeforeAnyTests() + { + Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); + + _kernel = new StandardKernel(new VectoNinjectModule()); + xmlInputReader = _kernel.Get<IXMLInputDataReader>(); + } + + + [TestCase("NiyH2Xp0rQswwXIOf52Jm0wvK4Yc2/PL/T+zQCWQGFo=", @"Testdata\XML\Sort\ADC_unsorted.xml")] + public void TestADCHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.ADC)); + } + + [TestCase("tam1LGpdznHGFGo+rp0WVr0/6+F2yU2Kv4G4tYvAe+Y=", @"Testdata\XML\Sort\BatterySystem_1_unsorted.xml")] + public void TestBatterySystemHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.BatterySystem)); + } + + [TestCase("dBadIN60l8Iqcanj/nrx1EbD+KixtDxLAusUcutITk8=", @"Testdata\XML\Sort\CapacitorSystem_1.xml")] + public void TestCapacitorHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.CapacitorSystem)); + } + + [TestCase("vvxJmw6PIWC5lHtnDAYVoxy6sF97g24Ti/QDlUq09tc=", @"Testdata\XML\Sort\ElectricMachineSystem-IHPC_1_unsorted.xml"), + TestCase("TilK8FUXim9VK3Jy2qTIdogjpWvSF0cj/Ny1fyuoajk=", @"Testdata\XML\Sort\ElectricMachineSystem_1_unsorted.xml"), + TestCase("CunnDxsiE9kciX+v9oeEGADZpEc88NtfMtmrHyJkCQ0=", @"Testdata\XML\Sort\ElectricMachineSystem_StdValues_unsorted.xml")] + public void TestElectricMachineHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.ElectricMachineSystem)); + } + + + [TestCase("hRzWfx3/El/LwEtP86Utm3dgBAF6CagrpEREsca7+/0=", @"Testdata\XML\Sort\Gearbox_APT-N_unsorted.xml"), + TestCase("XZCluPiG05mOAj5rTjTllCWbhCTEYVxCbE940ck3XsA=", @"Testdata\XML\Sort\Gearbox_IHPC_unsorted.xml")] + public void TestGearboxComponentHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.Gearbox)); + } + + [TestCase("3L/fYxKTdIwzADHQMnUBPxcNwZNEHM+sKEC2M32UnEA=", @"Testdata\XML\Sort\IEPC_1_unsorted.xml"), + TestCase("BTHs/Hh2SgycIwU5OSuTgU/2SptMvmRFvPXr2X1Y7XQ=", @"Testdata\XML\Sort\IEPC_StdValues_unsorted.xml")] + public void TestIEPCHashSort(string expectedHash, string filePath) + { + var loadedFile = VectoHash.Load(filePath); + Assert.AreEqual(expectedHash, loadedFile.ComputeHash(VectoComponents.IEPC)); + } + } +} diff --git a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj index d35e63fe05dec5b49e7a1a918cb5fa94d40a7b64..ecd8a7e2d8069269cba8b9fd0c832e825922b552 100644 --- a/VectoCommon/VectoHashingTest/VectoHashingTest.csproj +++ b/VectoCommon/VectoHashingTest/VectoHashingTest.csproj @@ -62,6 +62,7 @@ <Compile Include="BasicHasingTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Utils\AssertHelper.cs" /> + <Compile Include="VectoHashSortTest.cs" /> <Compile Include="VectoHashTest.cs" /> </ItemGroup> <ItemGroup> @@ -86,6 +87,36 @@ <Content Include="Testdata\XML\simple_document.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> + <Content Include="Testdata\XML\Sort\ADC_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\BatterySystem_1_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\CapacitorSystem_1.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\ElectricMachineSystem-IHPC_1_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\ElectricMachineSystem_1_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\ElectricMachineSystem_StdValues_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\Gearbox_APT-N_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\Gearbox_IHPC_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\IEPC_1_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="Testdata\XML\Sort\IEPC_StdValues_unsorted.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> <Content Include="Testdata\XML\ToHash\multiple_components.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content>