diff --git a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs index e138d9ede983943150c1a936eb9910b5650ff502..03a486b2f3efc1683b32b983567b047ba0523c30 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs @@ -37,12 +37,14 @@ using System.Reflection; using System.Xml; using System.Xml.Linq; using TUGraz.IVT.VectoXML.Writer; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; +using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Utils; using TUGraz.VectoHashing; @@ -96,7 +98,7 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Report_Vehicle_VehicleGroup, modelData.VehicleData.VehicleClass.GetClassNumber()), new XElement(tns + XMLNames.Vehicle_VocationalVehicle, modelData.VehicleData.VocationalVehicle), new XElement(tns + XMLNames.Vehicle_SleeperCab, modelData.VehicleData.SleeperCab), - + GetADAS(modelData.VehicleData.ADAS) }.Concat(ComponentData(modelData)) ); if (exempted) { @@ -114,6 +116,16 @@ namespace TUGraz.VectoCore.OutputData.XML }; } + private XElement GetADAS(VehicleData.ADASData adasData) + { + return new XElement(tns + XMLNames.Vehicle_ADAS, + new XElement(tns + XMLNames.Vehicle_ADAS_EngineStopStart, adasData.EngineStopStart), + new XElement(tns + XMLNames.Vehicle_ADAS_EcoRollWithoutEngineStop, adasData.EcoRollWithoutengineStop), + new XElement(tns + XMLNames.Vehicle_ADAS_EcoRollWithEngineStopStart, adasData.EcoRollWithEngineStop), + new XElement(tns + XMLNames.Vehicle_ADAS_PCC, adasData.PredictiveCruiseControl != PredictiveCruiseControlType.None) + ); + } + private XElement[] ComponentData(VectoRunData modelData) { return new[] { @@ -132,11 +144,10 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Report_Vehicle_Retarder, modelData.Retarder.Type.IsDedicatedComponent()), new XElement(tns + XMLNames.Report_Vehicle_AxleRatio, modelData.AxleGearData.AxleGear.Ratio.ToXMLFormat(3)), new XElement( - tns + XMLNames.Report_Vehicle_AverageRRC, - modelData.VehicleData.AverageRollingResistanceTruck.ToXMLFormat(4), - new XElement(tns + XMLNames.Report_Vehicle_AverageRRCLabel), - DeclarationData.Wheels.TyreClass.Lookup(modelData.VehicleData.AverageRollingResistanceTruck) - ) + tns + XMLNames.Report_Vehicle_AverageRRC, modelData.VehicleData.AverageRollingResistanceTruck.ToXMLFormat(4)), + new XElement( + tns + XMLNames.Report_Vehicle_AverageRRCLabel, + DeclarationData.Wheels.TyreClass.Lookup(modelData.VehicleData.AverageRollingResistanceTruck)) }; } @@ -212,15 +223,12 @@ namespace TUGraz.VectoCore.OutputData.XML var results = new XElement(Results); results.AddFirst(new XElement(tns + XMLNames.Report_Result_Status, _allSuccess ? "success" : "error")); var summary = _weightedPayload > 0 - ? new XElement( - "Summary", - new XElement( - "SpecificCO2Emissions", + ? new XElement(tns + "Summary", + new XElement(tns + "SpecificCO2Emissions", new XAttribute(XMLNames.Report_Results_Unit_Attr, "gCO2/tkm"), (_weightedCo2 / _weightedPayload).ConvertToGrammPerTonKilometer().ToXMLFormat(1) ), - new XElement( - "AveragePayload", + new XElement(tns + "AveragePayload", new XAttribute(XMLNames.Report_Results_Unit_Attr, XMLNames.Unit_t), _weightedPayload.ConvertToTon().ToXMLFormat(3) ) @@ -241,7 +249,6 @@ namespace TUGraz.VectoCore.OutputData.XML vehicle, new XElement(tns + "ResultDataSignature", resultSignature), results, - summary, GetApplicationInfo()) ) ); diff --git a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs index 70bda1d2215213b67c70ac0e38507ccbf1f39719..d9e1453021f6d4a8982e5330871b419423e97db9 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLDeclarationReport.cs @@ -99,6 +99,10 @@ namespace TUGraz.VectoCore.OutputData.XML public PerSecond EngineSpeedDrivingAvg { get; private set; } public PerSecond EngineSpeedDrivingMax { get; private set; } + public double AverageGearboxEfficiency { get; private set; } + + public double AverageAxlegearEfficiency { get; private set; } + public double WeightingFactor { get; set; } @@ -138,6 +142,17 @@ namespace TUGraz.VectoCore.OutputData.XML CO2Total = FuelConsumptionTotal * data.FuelData.CO2PerFuelWeight; EnergyConsumptionTotal = FuelConsumptionTotal * data.FuelData.LowerHeatingValueVecto; + var gbxOutSignal = runData.Retarder.Type == RetarderType.TransmissionOutputRetarder + ? ModalResultField.P_retarder_in + : (runData.AngledriveData == null ? ModalResultField.P_axle_in : ModalResultField.P_angle_in); + var eGbxIn = data.TimeIntegral<WattSecond>(ModalResultField.P_gbx_in, x => x > 0); + var eGbxOut = data.TimeIntegral<WattSecond>(gbxOutSignal, x => x > 0); + AverageGearboxEfficiency = eGbxOut / eGbxIn; + + var eAxlIn = data.TimeIntegral<WattSecond>(ModalResultField.P_axle_in, x => x > 0); + var eAxlOut = data.TimeIntegral<WattSecond>(ModalResultField.P_brake_in, x => x > 0); + AverageAxlegearEfficiency = eAxlOut / eAxlIn; + WeightingFactor = weightingFactor; } diff --git a/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs index 3900e4740c5247eb59d15d88cd47d232a8f08233..3ed1cb3be107bb96109f5a3a167d9234fe3586e3 100644 --- a/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs @@ -372,7 +372,9 @@ namespace TUGraz.VectoCore.OutputData.XML new XElement(tns + XMLNames.Report_ResultEntry_EngineSpeedDriving_Min, XMLHelper.ValueAsUnit(result.EngineSpeedDrivingMin, XMLNames.Unit_RPM, 1)), new XElement(tns + XMLNames.Report_ResultEntry_EngineSpeedDriving_Avg, XMLHelper.ValueAsUnit(result.EngineSpeedDrivingAvg, XMLNames.Unit_RPM, 1)), new XElement(tns + XMLNames.Report_ResultEntry_EngineSpeedDriving_Max, XMLHelper.ValueAsUnit(result.EngineSpeedDrivingMax, XMLNames.Unit_RPM, 1)) - ) + ), + new XElement(tns + "AverageGearboxEfficiency", XMLHelper.ValueAsUnit(result.AverageGearboxEfficiency, XMLNames.UnitPercent, 2)), + new XElement(tns + "AverageAxlegearEfficiency", XMLHelper.ValueAsUnit(result.AverageAxlegearEfficiency, XMLNames.UnitPercent, 2)) ), //FC XMLDeclarationReport.GetResults(result, tns, true).Cast<object>().ToArray() diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.7.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.7.xsd index ca5e7f9fdc3ca4edf923e45fba1e13315e13ed1d..8283663b8f6c95e83c544dcf3f946f89ef795174 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.7.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.7.xsd @@ -4,9 +4,6 @@ <xs:schema xmlns="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.7" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vdecdef="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" targetNamespace="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.7" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.7"> <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> <xs:element name="VectoCustomerInformation"> - <xs:annotation> - <xs:documentation>Comment describing your root element</xs:documentation> - </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Data"> @@ -167,7 +164,7 @@ </xs:complexType> </xs:element> </xs:sequence> - <xs:attribute name="id" use="required"/> + <xs:attribute name="id" type="xs:NCName" use="required"/> </xs:complexType> <xs:complexType name="VehiclePerformanceType"> <xs:sequence/> @@ -260,32 +257,7 @@ <xs:documentation>P267 / II.1.1.13</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="ADAS"> - <xs:complexType> - <xs:sequence> - <xs:element name="EngineStopStart" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P271 / II.1.2.11</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EcoRollWithoutEngineStop" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P272 / II.1.2.12</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EcoRollWithEngineStop" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P273 / II.1.2.13</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="PredictiveCruiseControl" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P274 / II.1.2.14</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> + <xs:element name="ADAS" type="ADASType"/> <xs:element name="EngineRatedPower"> <xs:annotation> <xs:documentation>P250 / II.1.2.1</xs:documentation> @@ -347,12 +319,12 @@ </xs:element> <xs:element name="AverageRRCMotorVehicleTyres" type="vdecdef:TyreRRCISOType"> <xs:annotation> - <xs:documentation>P046 / II.1.2.9</xs:documentation> + <xs:documentation>P046 / II.1.2.9 // arithmetic average of RRC over all truck tires</xs:documentation> </xs:annotation> </xs:element> <xs:element name="AverageFuelEfficiencyLabelMotorVehicleTyres"> <xs:annotation> - <xs:documentation>II.1.2.10</xs:documentation> + <xs:documentation>II.1.2.10 // classification of AverageRRCMotorVehicleTyres according to 1222/2009 C3 tyres </xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> @@ -468,4 +440,28 @@ <xs:enumeration value="ltr"/> </xs:restriction> </xs:simpleType> + <xs:complexType name="ADASType"> + <xs:sequence> + <xs:element name="EngineStopStart" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P271 / II.1.2.11</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EcoRollWithoutEngineStop" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P272 / II.1.2.12</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EcoRollWithEngineStop" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P273 / II.1.2.13</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="PredictiveCruiseControl" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P274 / II.1.2.14</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> </xs:schema> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.7.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.7.xsd index bb7ea49256c03dfcaae428082e98061a306f1fdd..216ea10068c778c8f8145eed98ba5ea1164bd327 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.7.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.7.xsd @@ -27,12 +27,12 @@ <xs:documentation>VECTO / I.1.8.2 / #22</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="CertificationNumber" minOccurs="0"> + <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"> <xs:annotation> <xs:documentation>P268 / I.1.8.3 / #3</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="DigestValue" minOccurs="0"> + <xs:element name="DigestValue" type="xs:token" minOccurs="0"> <xs:annotation> <xs:documentation>? / I.1.8.5</xs:documentation> </xs:annotation> @@ -53,7 +53,7 @@ </xs:element> <xs:element name="CertificationMethod" type="vdecdef:AngledriveCertificationOptionType"> <xs:annotation> - <xs:documentation>P258 / I.1.6.3</xs:documentation> + <xs:documentation>P258 / I.1.6.3 / #37</xs:documentation> </xs:annotation> </xs:element> <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"> @@ -68,7 +68,7 @@ </xs:element> <xs:element name="Ratio" type="vdecdef:AngledriveRatioType"> <xs:annotation> - <xs:documentation>P176 / I.1.6.4</xs:documentation> + <xs:documentation>P176 / I.1.6.4 / #38</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -77,12 +77,12 @@ <xs:sequence> <xs:element name="FanTechnology" type="vdecdef:AuxFanTechnologyType"> <xs:annotation> - <xs:documentation>P181 / I.1.10.1</xs:documentation> + <xs:documentation>P181 / I.1.10.1 / #52</xs:documentation> </xs:annotation> </xs:element> <xs:element name="SteeringPumpTechnology" maxOccurs="4"> <xs:annotation> - <xs:documentation>P182 / I.1.10.2</xs:documentation> + <xs:documentation>P182 / I.1.10.2 / #53</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -92,12 +92,12 @@ </xs:element> <xs:element name="ElectricSystemTechnology" type="vdecdef:AuxESTechnologyType"> <xs:annotation> - <xs:documentation>P183 / I.1.10.3</xs:documentation> + <xs:documentation>P183 / I.1.10.3 / #54</xs:documentation> </xs:annotation> </xs:element> <xs:element name="PneumaticSystemTechnology" type="vdecdef:AuxPSTechnologyType"> <xs:annotation> - <xs:documentation>P184 / I.1.10.4</xs:documentation> + <xs:documentation>P184 / I.1.10.4 / #55</xs:documentation> </xs:annotation> </xs:element> <xs:element name="HVACTechnology" type="vdecdef:AuxHVACTechnologyType"> @@ -116,7 +116,7 @@ </xs:element> <xs:element name="CertificationMethod" type="vdecdef:AxlegearCertificationOptionType"> <xs:annotation> - <xs:documentation>P256 I.1.7.3</xs:documentation> + <xs:documentation>P256 I.1.7.3 / #34</xs:documentation> </xs:annotation> </xs:element> <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"> @@ -131,12 +131,12 @@ </xs:element> <xs:element name="LineType" type="vdecdef:AxlegearLineTypeType"> <xs:annotation> - <xs:documentation>P253 / I.1.7.4</xs:documentation> + <xs:documentation>P253 / I.1.7.4 / #35</xs:documentation> </xs:annotation> </xs:element> <xs:element name="Ratio" type="vdecdef:AxlegearRatioType"> <xs:annotation> - <xs:documentation>P150 / I.1.7.5</xs:documentation> + <xs:documentation>P150 / I.1.7.5 / #36</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -145,7 +145,7 @@ <xs:sequence> <xs:element name="TyreDimension" type="vdecdef:TyreDimensionType"> <xs:annotation> - <xs:documentation>P108 / I.1.9.1, I.1.9.4, I.1.9.8, I.1.9.12</xs:documentation> + <xs:documentation>P108 / I.1.9.1, I.1.9.4, I.1.9.8, I.1.9.12 / #41, #43, #46, #49</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TyreCertificationNumber" type="vdecdef:CertificationNumberType"> @@ -160,12 +160,12 @@ </xs:element> <xs:element name="TyreRRCDeclared" type="vdecdef:TyreRRCISOType"> <xs:annotation> - <xs:documentation>P046 / I.1.9.3, I.1.9.7, I.1.9.11, I.1.9.15</xs:documentation> + <xs:documentation>P046 / I.1.9.3, I.1.9.7, I.1.9.11, I.1.9.15 / #42, #45, #48, #51</xs:documentation> </xs:annotation> </xs:element> <xs:element name="TwinTyres" type="vdecdef:AxleTwinTyresType"> <xs:annotation> - <xs:documentation>P045 / I.1.9.5, I.1.9.9, I.1.9.13</xs:documentation> + <xs:documentation>P045 / I.1.9.5, I.1.9.9, I.1.9.13, #44, #47, #50</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -305,7 +305,7 @@ </xs:element> <xs:element name="GearsCount"> <xs:annotation> - <xs:documentation>P199 / I.1.3.5</xs:documentation> + <xs:documentation>P199 / I.1.3.5 / #28</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:int"> @@ -315,7 +315,7 @@ </xs:element> <xs:element name="TransmissionRatioFinalGear" type="vdecdef:GearboxGearRatioType"> <xs:annotation> - <xs:documentation>P078 / I.1.3.6</xs:documentation> + <xs:documentation>P078 / I.1.3.6 / #29</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -324,14 +324,14 @@ <xs:sequence> <xs:element name="Mission" type="MissionTypeType"> <xs:annotation> - <xs:documentation>I.2.1.1</xs:documentation> + <xs:documentation>I.2.1.1 / #56</xs:documentation> </xs:annotation> </xs:element> <xs:choice> <xs:sequence> <xs:element name="Distance"> <xs:annotation> - <xs:documentation>I.2.2.8</xs:documentation> + <xs:documentation>I.2.2.8 / #67</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -345,12 +345,12 @@ <xs:element name="VehiclePerformance" type="VehiclePerformanceType"/> <xs:element name="FuelConsumption" type="FuelConsumptionType" maxOccurs="unbounded"> <xs:annotation> - <xs:documentation>I.2.3.1 - I.2.3.12</xs:documentation> + <xs:documentation>I.2.3.1 - I.2.3.12 / #69</xs:documentation> </xs:annotation> </xs:element> <xs:element name="CO2" type="CO2Type" maxOccurs="unbounded"> <xs:annotation> - <xs:documentation>I.2.3.10 - I.2.3.16</xs:documentation> + <xs:documentation>I.2.3.13 - I.2.3.16 / #68</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -373,7 +373,7 @@ <xs:sequence> <xs:element name="RetarderType" type="vdecdef:RetarderTypeType"> <xs:annotation> - <xs:documentation>P052 / I.1.3.7</xs:documentation> + <xs:documentation>P052 / I.1.3.7 / #30</xs:documentation> </xs:annotation> </xs:element> <xs:sequence minOccurs="0"> @@ -404,7 +404,7 @@ <xs:sequence> <xs:element name="TotalVehicleMass"> <xs:annotation> - <xs:documentation>I.2.1.4</xs:documentation> + <xs:documentation>I.2.1.4 / #59</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -416,7 +416,7 @@ </xs:element> <xs:element name="Payload"> <xs:annotation> - <xs:documentation>I.2.1.2</xs:documentation> + <xs:documentation>I.2.1.2 / #57</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -428,7 +428,7 @@ </xs:element> <xs:element name="FuelType" type="vdecdef:FuelTypeType"> <xs:annotation> - <xs:documentation>I.2.1.3</xs:documentation> + <xs:documentation>I.2.1.3 / #58</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> @@ -526,27 +526,27 @@ <xs:element name="ApplicationInformation"> <xs:complexType> <xs:sequence> - <xs:element name="SimulationToolVersion"> + <xs:element name="SimulationToolVersion" type="xs:string"> <xs:annotation> - <xs:documentation>I.3.1.1</xs:documentation> + <xs:documentation>I.3.1.1 / #70</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="Date"> + <xs:element name="Date" type="vdecdef:DateTimeWithTimezone"> <xs:annotation> - <xs:documentation>I.3.1.2</xs:documentation> + <xs:documentation>I.3.1.2 / #71</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> - <xs:attribute name="id" use="required"/> + <xs:attribute name="id" type="xs:NCName" use="required"/> </xs:complexType> <xs:complexType name="VehiclePerformanceType"> <xs:sequence> <xs:element name="AverageSpeed"> <xs:annotation> - <xs:documentation>I.2.2.1</xs:documentation> + <xs:documentation>I.2.2.1 / #60</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -567,7 +567,7 @@ </xs:element> <xs:element name="MinSpeed"> <xs:annotation> - <xs:documentation>I.2.2.2</xs:documentation> + <xs:documentation>I.2.2.2 / #61</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -579,7 +579,7 @@ </xs:element> <xs:element name="MaxSpeed"> <xs:annotation> - <xs:documentation>I.2.2.3</xs:documentation> + <xs:documentation>I.2.2.3 / #62</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -591,7 +591,7 @@ </xs:element> <xs:element name="MaxDeceleration"> <xs:annotation> - <xs:documentation>I.2.2.4</xs:documentation> + <xs:documentation>I.2.2.4 / #63</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -603,7 +603,7 @@ </xs:element> <xs:element name="MaxAcceleration"> <xs:annotation> - <xs:documentation>I.2.2.5</xs:documentation> + <xs:documentation>I.2.2.5 / #64</xs:documentation> </xs:annotation> <xs:complexType> <xs:simpleContent> @@ -615,7 +615,7 @@ </xs:element> <xs:element name="FullLoadDrivingtimePercentage"> <xs:annotation> - <xs:documentation>I.2.2.6</xs:documentation> + <xs:documentation>I.2.2.6 / #65</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:double"> @@ -626,40 +626,26 @@ </xs:element> <xs:element name="GearshiftCount" type="xs:int"> <xs:annotation> - <xs:documentation>I.2.2.7</xs:documentation> + <xs:documentation>I.2.2.7 / #66</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="EngineSpeedDriving"> + <xs:element name="EngineSpeedDriving" type="EngineSpeedDrivingType"/> + <xs:element name="AverageGearboxEfficiency"> <xs:complexType> - <xs:sequence> - <xs:element name="Min"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="Average"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="Max"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - </xs:sequence> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" type="PercentType" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="AverageAxlegearEfficiency"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" type="PercentType" use="required"/> + </xs:extension> + </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> @@ -681,7 +667,7 @@ <xs:documentation>P252 / I.1.1.1 / #14</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="VIN"> + <xs:element name="VIN" type="vdecdef:VINType"> <xs:annotation> <xs:documentation>P238 / I.1.1.3 / #1</xs:documentation> </xs:annotation> @@ -743,7 +729,7 @@ <xs:documentation>VECTO / I.1.1.7 / #13</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="VocationalVehicle"> + <xs:element name="VocationalVehicle" type="xs:boolean"> <xs:annotation> <xs:documentation>P270 / I.1.1.9</xs:documentation> </xs:annotation> @@ -755,35 +741,10 @@ </xs:element> <xs:element name="PTO" type="xs:boolean"> <xs:annotation> - <xs:documentation>P247 / I.1.3.8</xs:documentation> + <xs:documentation>P247 / I.1.3.8 / #31</xs:documentation> </xs:annotation> </xs:element> - <xs:element name="ADAS"> - <xs:complexType> - <xs:sequence> - <xs:element name="EngineStopStart" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P271 / I.1.12.1</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EcoRollWithoutEngineStop" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P272 / I.1.12.2</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EcoRollWithEngineStop" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P273 / I.1.12.3</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="PredictiveCruiseControl" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P274 / I.1.12.4</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - </xs:element> + <xs:element name="ADAS" type="ADASType"/> <xs:element name="TorqueLimits" type="TorqueLimitsType" minOccurs="0"/> <xs:element name="Components"> <xs:complexType> @@ -929,9 +890,69 @@ </xs:element> <xs:element name="Signature" type="vdecdef:SignatureType"> <xs:annotation> - <xs:documentation>I.3.1.4</xs:documentation> + <xs:documentation>I.3.1.4 / #73</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:simpleType name="PercentType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="%"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="ADASType"> + <xs:sequence> + <xs:element name="EngineStopStart" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P271 / I.1.12.1</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="EcoRollWithoutEngineStop" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P272 / I.1.12.2</xs:documentation> </xs:annotation> </xs:element> + <xs:element name="EcoRollWithEngineStop" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P273 / I.1.12.3</xs:documentation> + </xs:annotation> + </xs:element> + <xs:element name="PredictiveCruiseControl" type="xs:boolean"> + <xs:annotation> + <xs:documentation>P274 / I.1.12.4</xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="EngineSpeedDrivingType"> + <xs:sequence> + <xs:element name="Min"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="Average"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="Max"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:double"> + <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> </xs:sequence> </xs:complexType> </xs:schema> diff --git a/VectoCore/VectoCore/Utils/XMLHelper.cs b/VectoCore/VectoCore/Utils/XMLHelper.cs index 8f1620bacf01ee6a4e6ceafd732714e822baef3c..e266110265bb0d6ebb50dca596f54b4b0cc403e3 100644 --- a/VectoCore/VectoCore/Utils/XMLHelper.cs +++ b/VectoCore/VectoCore/Utils/XMLHelper.cs @@ -42,8 +42,8 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(Kilogram mass, string unit, uint? decimals = 0) { switch (unit) { - case "t": return ValueAsUnit(mass.ConvertToTon(), unit, decimals); - case "kg": return ValueAsUnit(mass.Value(), unit, decimals); + case "t": return GetValueAsUnit(mass.ConvertToTon(), unit, decimals); + case "kg": return GetValueAsUnit(mass.Value(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } @@ -51,8 +51,8 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(Watt power, string unit, uint? decimals = 0) { switch (unit) { - case "kW": return ValueAsUnit(power.ConvertToKiloWatt(), unit, decimals); - case "W": return ValueAsUnit(power.Value(), unit, decimals); + case "kW": return GetValueAsUnit(power.ConvertToKiloWatt(), unit, decimals); + case "W": return GetValueAsUnit(power.Value(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } @@ -60,9 +60,9 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(CubicMeter volume, string unit, uint? decimals = 0) { switch (unit) { - case "ltr": return ValueAsUnit(volume.ConvertToCubicDeziMeter(), unit, decimals); - case "ccm": return ValueAsUnit(volume.ConvertToCubicCentiMeter(), unit, decimals); - case "m3": return ValueAsUnit(volume.Value(), unit, decimals); + case "ltr": return GetValueAsUnit(volume.ConvertToCubicDeziMeter(), unit, decimals); + case "ccm": return GetValueAsUnit(volume.ConvertToCubicCentiMeter(), unit, decimals); + case "m3": return GetValueAsUnit(volume.Value(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } @@ -70,7 +70,7 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(PerSecond angSpeed, string unit, uint? decimals = 0) { switch (unit) { - case "rpm": return ValueAsUnit(angSpeed.ConvertToRoundsPerMinute(), unit, decimals); + case "rpm": return GetValueAsUnit(angSpeed.ConvertToRoundsPerMinute(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } @@ -79,7 +79,7 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(MeterPerSecond speed, string unit, uint? decimals) { switch (unit) { - case "km/h": return ValueAsUnit(speed.ConvertToKiloMeterPerHour(), unit, decimals); + case "km/h": return GetValueAsUnit(speed.ConvertToKiloMeterPerHour(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } @@ -87,17 +87,27 @@ namespace TUGraz.VectoCore.Utils { public static object[] ValueAsUnit(MeterPerSquareSecond acc, string unit, uint? decimals) { switch (unit) { - case "m/s²": return ValueAsUnit(acc.Value(), unit, decimals); + case "m/s²": return GetValueAsUnit(acc.Value(), unit, decimals); } throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); } - private static object[] ValueAsUnit(double value, string unit, uint? decimals) + public static object[] ValueAsUnit(double value, string unit, uint? decimals) + { + switch (unit) { + case "%": return GetValueAsUnit(value * 100, unit, decimals); + } + throw new NotImplementedException(string.Format("unknown unit '{0}'", unit)); + } + + private static object[] GetValueAsUnit(double value, string unit, uint? decimals) { return new object[] { new XAttribute(XMLNames.Report_Results_Unit_Attr, unit), value.ToXMLFormat(decimals) }; } + + } } \ No newline at end of file