diff --git a/Documentation/Checklist_Release_VECTO_3.3.3.1639.docx b/Documentation/Checklist_Release_VECTO_3.3.3.1639.docx new file mode 100644 index 0000000000000000000000000000000000000000..2a2afb9926c41160f4fc584b09559410deea5ead Binary files /dev/null and b/Documentation/Checklist_Release_VECTO_3.3.3.1639.docx differ diff --git a/Documentation/Checklist_Release_VECTO_3.3.3.1639.pdf b/Documentation/Checklist_Release_VECTO_3.3.3.1639.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2716b470b592021386d34865994bab1d5f695641 Binary files /dev/null and b/Documentation/Checklist_Release_VECTO_3.3.3.1639.pdf differ diff --git a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf index 7e2773c23061af8e2a3baa87914e3b507e23de0d..91c1c0bea089cca2a292823220b3a9a9d035ab97 100644 Binary files a/Documentation/User Manual Source/Release Notes Vecto3.x.pdf and b/Documentation/User Manual Source/Release Notes Vecto3.x.pdf differ diff --git a/Documentation/User Manual Source/Release Notes Vecto3.x.pptx b/Documentation/User Manual Source/Release Notes Vecto3.x.pptx index 182da643bafdf3815b3b4c9bd6ca0c0c2e6b4802..5698d4e6214e581acdfe9fffc1bdf73e9cb4ad80 100644 Binary files a/Documentation/User Manual Source/Release Notes Vecto3.x.pptx and b/Documentation/User Manual Source/Release Notes Vecto3.x.pptx differ diff --git a/Documentation/User Manual/6-changelog/changelog.md b/Documentation/User Manual/6-changelog/changelog.md index 059e8c0a233f8b4ddb214f23c59ea2d36da89e26..3755518044c388e63fb7b10607bbfbb49376274b 100644 --- a/Documentation/User Manual/6-changelog/changelog.md +++ b/Documentation/User Manual/6-changelog/changelog.md @@ -2,6 +2,18 @@ **VECTO 3.3.3** +***Build 1639 (2019-06-27) OFFICIAL RELEASE*** + +- Bugfixes (compared to VECTO 3.3.3.1609-RC) + * [VECTO-1003] - Vecto Error: Loss-Map extrapolation in declaration mode required (issue VECTO-991) + * [VECTO-1006] - Failed to find torque converter operating point on UD cycle (issue VECTO-996) + * [VECTO-1010] - Unexpected Response: ResponseOverload in UD cycle (issue VECTO-996) + * [VECTO-1015] - XML Schema not correctly identified + * [VECTO-1019] - Error opening job in case a file is missing + * [VECTO-1020] - HashingTool Crashes + * [VECTO-1021] - Invalid hash of job data + + ***Build 1609 (2019-05-29) RELEASE CANDIDATE*** - Improvement diff --git a/Documentation/User Manual/help.html b/Documentation/User Manual/help.html index 637bc1970b325382a3aed6b4364d899b54570eee..27d80186a0d315b3bfc72c3754411b9788e354e6 100644 --- a/Documentation/User Manual/help.html +++ b/Documentation/User Manual/help.html @@ -7561,6 +7561,19 @@ CycleTime,UnknownCycleName,3600</code></pre> <div id="changelog" class="section level1"> <h1>Changelog</h1> <p><strong>VECTO 3.3.3</strong></p> +<p><strong><em>Build 1639 (2019-06-27) OFFICIAL RELEASE</em></strong></p> +<ul> +<li>Bugfixes (compared to VECTO 3.3.3.1609-RC) +<ul> +<li>[VECTO-1003] - Vecto Error: Loss-Map extrapolation in declaration mode required (issue VECTO-991)</li> +<li>[VECTO-1006] - Failed to find torque converter operating point on UD cycle (issue VECTO-996)</li> +<li>[VECTO-1010] - Unexpected Response: ResponseOverload in UD cycle (issue VECTO-996)</li> +<li>[VECTO-1015] - XML Schema not correctly identified</li> +<li>[VECTO-1019] - Error opening job in case a file is missing</li> +<li>[VECTO-1020] - HashingTool Crashes</li> +<li>[VECTO-1021] - Invalid hash of job data</li> +</ul></li> +</ul> <p><strong><em>Build 1609 (2019-05-29) RELEASE CANDIDATE</em></strong></p> <ul> <li>Improvement diff --git a/Documentation/VectoResults_3.3.3.1639.xlsx b/Documentation/VectoResults_3.3.3.1639.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..26439dc3e1153334bc9a5bd25266d84f39f07c68 Binary files /dev/null and b/Documentation/VectoResults_3.3.3.1639.xlsx differ diff --git a/HashingTool/Properties/Version.cs b/HashingTool/Properties/Version.cs index a01c33e98b088ea2fa2a7210daae7558a44336fc..ebb794bee6ac7e1a63ea30da5b74bd4128135ae6 100644 --- a/HashingTool/Properties/Version.cs +++ b/HashingTool/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("0.2.0.1609")] -[assembly: AssemblyFileVersion("0.2.0.1609")] +[assembly: AssemblyVersion("0.2.0.1639")] +[assembly: AssemblyFileVersion("0.2.0.1639")] diff --git a/HashingTool/ViewModel/HashComponentDataViewModel.cs b/HashingTool/ViewModel/HashComponentDataViewModel.cs index f8e1aab09a6008cd15f5883a3ad4a8fdd4030f3d..e65a6bb0f254f837f6b38b9d89ed0ba0ae1e1951 100644 --- a/HashingTool/ViewModel/HashComponentDataViewModel.cs +++ b/HashingTool/ViewModel/HashComponentDataViewModel.cs @@ -43,6 +43,7 @@ using HashingTool.Helper; using HashingTool.Util; using HashingTool.ViewModel.UserControl; using TUGraz.VectoHashing; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel { @@ -60,7 +61,7 @@ namespace HashingTool.ViewModel private DateTime? _date; public HashComponentDataViewModel() - : base("Hash Component Data", false, HashingHelper.IsComponentFile) + : base("Hash Component Data", false, HashingHelper.IsComponentFile, XmlDocumentType.DeclarationComponentData) { _xmlFile.PropertyChanged += SourceChanged; _saveCommand = new RelayCommand(SaveDocument, diff --git a/HashingTool/ViewModel/UserControl/CustomerReportXMLFile.cs b/HashingTool/ViewModel/UserControl/CustomerReportXMLFile.cs index 659c73f7db894857b7bccaf37c84faf20de16b07..22fc7ba3282ff7593154660ac6da2d17e513af28 100644 --- a/HashingTool/ViewModel/UserControl/CustomerReportXMLFile.cs +++ b/HashingTool/ViewModel/UserControl/CustomerReportXMLFile.cs @@ -34,6 +34,7 @@ using System.ComponentModel; using System.Linq; using System.Xml; using TUGraz.VectoHashing; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -48,7 +49,7 @@ namespace HashingTool.ViewModel.UserControl private bool _manufacturerReportDigestValid; public CustomerReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, hashValidation) + Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, XmlDocumentType.CustomerReport, hashValidation) { } diff --git a/HashingTool/ViewModel/UserControl/HashedXMLFile.cs b/HashingTool/ViewModel/UserControl/HashedXMLFile.cs index 1072a9caed32c0841318061c4e7b928cf66e5407..fa172c3614b1630cf90651122a72f1e02c81a729 100644 --- a/HashingTool/ViewModel/UserControl/HashedXMLFile.cs +++ b/HashingTool/ViewModel/UserControl/HashedXMLFile.cs @@ -33,6 +33,7 @@ using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Xml; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -41,8 +42,10 @@ namespace HashingTool.ViewModel.UserControl protected string _digestValueRead; private DateTime? _date; - public HashedXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, hashValidation) {} + public HashedXMLFile( + string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType, + Action<XmlDocument, VectoXMLFile> hashValidation = null) : base( + name, true, contentCheck, xmlDocumentType, hashValidation) { } public string DigestValueRead { diff --git a/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs b/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs index a1fbbb883280bf5bbb4ffd2994ce5436b21e4e60..a612e475025e699311da331a2ddbc288ecb61306 100644 --- a/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs +++ b/HashingTool/ViewModel/UserControl/ManufacturerReportXMLFile.cs @@ -40,6 +40,7 @@ using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; using TUGraz.VectoHashing; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -48,7 +49,7 @@ namespace HashingTool.ViewModel.UserControl private bool _manufacturerReportValid; public ManufacturerReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, hashValidation) + Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, contentCheck, XmlDocumentType.ManufacturerReport, hashValidation) { _xmlFile.PropertyChanged += UpdateComponents; } diff --git a/HashingTool/ViewModel/UserControl/ReportXMLFile.cs b/HashingTool/ViewModel/UserControl/ReportXMLFile.cs index dd4c831c8d1ef5fd0a9ab8b247b3bdecdc1d3beb..6c4c2496c1088e578a6a5e8122ce541574dd939c 100644 --- a/HashingTool/ViewModel/UserControl/ReportXMLFile.cs +++ b/HashingTool/ViewModel/UserControl/ReportXMLFile.cs @@ -37,6 +37,7 @@ using System.Xml; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCore.InputData.FileIO.XML.Declaration; using TUGraz.VectoHashing; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -52,9 +53,8 @@ namespace HashingTool.ViewModel.UserControl protected VectoJobFile _jobData; private string _reportVin; - public ReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) - : base(name, contentCheck, hashValidation) + public ReportXMLFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType, Action<XmlDocument, VectoXMLFile> hashValidation = null) + : base(name, contentCheck, xmlDocumentType, hashValidation) { _xmlFile.PropertyChanged += ReportChanged; } @@ -123,7 +123,8 @@ namespace HashingTool.ViewModel.UserControl JobDigestMatchesReport = vinMatch && digestMatch; - } catch (Exception) { + } catch (Exception e) { + _xmlFile.LogError(e.Message); JobDigestValueComputed = ""; JobDigestMatchesReport = false; } diff --git a/HashingTool/ViewModel/UserControl/VectoJobFile.cs b/HashingTool/ViewModel/UserControl/VectoJobFile.cs index 814b309bf3ad171a59d50782ff7e59ec7788dcb3..57fb7a4ae60b1418bc9acd0a2e9a9886eb2086df 100644 --- a/HashingTool/ViewModel/UserControl/VectoJobFile.cs +++ b/HashingTool/ViewModel/UserControl/VectoJobFile.cs @@ -38,6 +38,7 @@ using HashingTool.Helper; using TUGraz.VectoCommon.Hashing; using TUGraz.VectoCommon.Resources; using TUGraz.VectoHashing; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -50,7 +51,7 @@ namespace HashingTool.ViewModel.UserControl public VectoJobFile(string name, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, hashValidation) + Action<XmlDocument, VectoXMLFile> hashValidation = null) : base(name, true, contentCheck, XmlDocumentType.DeclarationJobData, hashValidation) { _xmlFile.PropertyChanged += JobFilechanged; Components = new ObservableCollection<ComponentEntry>(); diff --git a/HashingTool/ViewModel/UserControl/VectoXMLFile.cs b/HashingTool/ViewModel/UserControl/VectoXMLFile.cs index 9eabe8527b5a1313cb4bba0cfbd66b95616f2b85..564582ca54b838b529c8412d9cf59ef0fd9d656b 100644 --- a/HashingTool/ViewModel/UserControl/VectoXMLFile.cs +++ b/HashingTool/ViewModel/UserControl/VectoXMLFile.cs @@ -35,6 +35,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Xml; using HashingTool.Helper; +using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; namespace HashingTool.ViewModel.UserControl { @@ -51,11 +52,10 @@ namespace HashingTool.ViewModel.UserControl private string _digestMethod; - public VectoXMLFile(string name, bool validate, Func<XmlDocument, IErrorLogger, bool?> contentCheck, - Action<XmlDocument, VectoXMLFile> hashValidation = null) + public VectoXMLFile(string name, bool validate, Func<XmlDocument, IErrorLogger, bool?> contentCheck, XmlDocumentType xmlDocumentType, Action<XmlDocument, VectoXMLFile> hashValidation = null) { _validateHashes = hashValidation; - _xmlFile = new XMLFileSelector(IoService, name, validate, contentCheck); + _xmlFile = new XMLFileSelector(IoService, name, xmlDocumentType, validate, contentCheck); _xmlFile.PropertyChanged += FileChanged; Name = name; CanonicalizationMethods = new ObservableCollection<string>(); diff --git a/HashingTool/ViewModel/UserControl/XMLFileSelector.cs b/HashingTool/ViewModel/UserControl/XMLFileSelector.cs index 831815cdfa4382c7aa43bbe1e468adeda6a21967..4e6053f9df6df57b23ba4bd71f84964baca8528c 100644 --- a/HashingTool/ViewModel/UserControl/XMLFileSelector.cs +++ b/HashingTool/ViewModel/UserControl/XMLFileSelector.cs @@ -72,13 +72,15 @@ namespace HashingTool.ViewModel.UserControl private bool? _contentValid; private RelayCommand _browseFileCommand; private string _prefix; + private XmlDocumentType _expectedDocumentType; - public XMLFileSelector(IOService ioservice, string prefix, bool validate = false, + public XMLFileSelector(IOService ioservice, string prefix, XmlDocumentType expectedDocumentType, bool validate = false, Func<XmlDocument, IErrorLogger, bool?> contentCheck = null) { IoService = ioservice; _validate = validate; _prefix = prefix; + _expectedDocumentType = expectedDocumentType; _browseFileCommand = new RelayCommand(BrowseXMLFile, () => !_busy); XMLValidationErrors = new ObservableCollection<string>(); HasContentValidation = contentCheck != null; @@ -181,8 +183,13 @@ namespace HashingTool.ViewModel.UserControl IsValid = XmlFileStatus.Unknown; return; } - using (var stream = File.OpenRead(fileName)) { - await LoadXMLFile(stream); + + try { + using (var stream = File.OpenRead(fileName)) { + await LoadXMLFile(stream); + } + } catch (Exception e) { + LogError(e.Message); } } @@ -190,14 +197,17 @@ namespace HashingTool.ViewModel.UserControl private async void BrowseXMLFile() { string filename; + try { + using (var stream = IoService.OpenFileDialog(null, ".xml", "VECTO XML file|*.xml", out filename)) { + if (stream == null) { + return; + } - using (var stream = IoService.OpenFileDialog(null, ".xml", "VECTO XML file|*.xml", out filename)) { - if (stream == null) { - return; + Source = filename; + //await LoadXMLFile(stream); } - - await LoadXMLFile(stream); - Source = filename; + } catch (Exception e) { + LogError(e.Message); } } @@ -272,18 +282,32 @@ namespace HashingTool.ViewModel.UserControl var valid = true; try { var validator = new AsyncXMLValidator(xml, r => { valid = r; }, - (s, e) => { - Application.Current.Dispatcher.Invoke( - () => - LogError(string.Format("Validation {0} Line {2}: {1}", - s == XmlSeverityType.Warning ? "WARNING" : "ERROR", - e.ValidationEventArgs == null - ? e.Exception.Message + - (e.Exception.InnerException != null ? Environment.NewLine + e.Exception.InnerException.Message : "") - : e.ValidationEventArgs.Message, - e.ValidationEventArgs == null ? 0 : e.ValidationEventArgs.Exception.LineNumber))); - }); - await validator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport); + (s, e) => { + Application.Current.Dispatcher.Invoke( + () => { + if (e.ValidationEventArgs == null) { + LogError( + string.Format( + "XML file does not validate against a supported version of {0}", + _expectedDocumentType.ToString())); + } else { + LogError( + string.Format( + "Validation {0} Line {2}: {1}", + s == XmlSeverityType.Warning ? "WARNING" : "ERROR", + e.ValidationEventArgs == null + ? e.Exception.Message + + (e.Exception.InnerException != null + ? Environment.NewLine + e.Exception.InnerException.Message + : "") + : e.ValidationEventArgs.Message, + e.ValidationEventArgs == null ? 0 : e.ValidationEventArgs.Exception.LineNumber)); + } + } + ); + } + ); + valid = await validator.ValidateXML(_expectedDocumentType); } catch (Exception e) { LogError(e.Message); } diff --git a/HashingTool/ViewModel/VerifyComponentInputDataViewModel.cs b/HashingTool/ViewModel/VerifyComponentInputDataViewModel.cs index cd43531d6338b986f7eba58ac422d48b195bc3e2..16c45b4ec86a1564e46f8cd2101c8f0363910d1e 100644 --- a/HashingTool/ViewModel/VerifyComponentInputDataViewModel.cs +++ b/HashingTool/ViewModel/VerifyComponentInputDataViewModel.cs @@ -39,6 +39,7 @@ using System.Windows.Input; using HashingTool.Helper; using HashingTool.ViewModel.UserControl; using TUGraz.VectoCommon.Hashing; +using TUGraz.VectoCore.Utils; using TUGraz.VectoHashing; namespace HashingTool.ViewModel @@ -49,7 +50,7 @@ namespace HashingTool.ViewModel //private bool _componentDataValid; public VerifyComponentInputDataViewModel() - : base("Verify Component Data", HashingHelper.IsComponentFile, HashingHelper.ValidateDocumentHash) + : base("Verify Component Data", HashingHelper.IsComponentFile, XmlDocumentType.DeclarationComponentData, HashingHelper.ValidateDocumentHash) { _xmlFile.PropertyChanged += ComponentFilechanged; } diff --git a/VectoCommon/VectoCommon/Properties/Version.cs b/VectoCommon/VectoCommon/Properties/Version.cs index c933d379139fef6d71ae0f4c5feea09a868fa1e4..526345cb16276ccce5f0af81ed96b596bb8f013f 100644 --- a/VectoCommon/VectoCommon/Properties/Version.cs +++ b/VectoCommon/VectoCommon/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("3.3.3.1609")] -[assembly: AssemblyFileVersion("3.3.3.1609")] \ No newline at end of file +[assembly: AssemblyVersion("3.3.3.1639")] +[assembly: AssemblyFileVersion("3.3.3.1639")] \ No newline at end of file diff --git a/VectoCommon/VectoHashing/Properties/Version.cs b/VectoCommon/VectoHashing/Properties/Version.cs index e0526a73b0f026e8f97916e5111d4c3d9e389efc..3c55f85e829873a0b36c5e5019a2195e8b1fd006 100644 --- a/VectoCommon/VectoHashing/Properties/Version.cs +++ b/VectoCommon/VectoHashing/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("1.2.0.1609")] -[assembly: AssemblyFileVersion("1.2.0.1609")] +[assembly: AssemblyVersion("1.2.0.1639")] +[assembly: AssemblyFileVersion("1.2.0.1639")] diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_engine_valid.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_engine_valid.xml index cc89ab132435c5fdd88483b4d8641fcb40b729f5..39a26b1a140961897c0fae941893c4fb3d142fb7 100644 --- a/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_engine_valid.xml +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_engine_valid.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v0.8" - xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8" - xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="0.6" +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" + xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0" + xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8 ../XSD/VectoComponent.xsd"> + xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0 https://webgate.ec.europa.eu/CITnet/svn/VECTO/trunk/Share/XML/XSD/VectoComponent.xsd"> <tns:Engine> <Data id="ENG-c481b13b8dba4d3682c4"> <Manufacturer>Generic Engine Manufacturer</Manufacturer> <Model>Generic 40t Long Haul Truck Engine</Model> - <TechnicalReportId>ENG-gooZah3D</TechnicalReportId> + <CertificationNumber>ENG-gooZah3D</CertificationNumber> <Date>2017-02-15T11:00:00Z</Date> <AppVersion>VectoEngine x.y</AppVersion> <Displacement>12730</Displacement> @@ -158,7 +158,7 @@ <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>BWAxs/2pGjQJdvn2GJE7X2lbNOBYSN3Xrrb+a+BfVUg=</di:DigestValue> + <di:DigestValue>bYGqZ5tcExIOHyNkH7HElRegtVqLcqBNzbTEWAKttsc=</di:DigestValue> </di:Reference> </Signature> </tns:Engine> diff --git a/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_gearbox_valid.xml b/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_gearbox_valid.xml index 7b4b5fda927b4b34c0806ab26dbccaa713e631a4..f39102a6ef3c98fe4b9bdcb7ee6db69f4d0e6aff 100644 --- a/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_gearbox_valid.xml +++ b/VectoCommon/VectoHashingTest/Testdata/XML/Validation/vecto_gearbox_valid.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v0.8" - xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8" +<tns:VectoInputDeclaration xmlns="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" + xmlns:tns="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0" xmlns:di="http://www.w3.org/2000/09/xmldsig#" schemaVersion="0.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v0.8 ../XSD/VectoComponent.xsd"> + xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:DeclarationComponent:v1.0 ../XSD/VectoComponent.xsd"> <tns:Gearbox> <Data id="GBX-75d63e1e3e6642028bc5"> <Manufacturer>Generic Gearbox Manufacturer</Manufacturer> <Model>Generic 40t Long Haul Truck Gearbox</Model> - <TechnicalReportId>GBX-vi2Oak2N</TechnicalReportId> + <CertificationNumber>GBX-vi2Oak2N</CertificationNumber> <Date>2017-01-11T11:00:00Z</Date> <AppVersion>3.0.1</AppVersion> <TransmissionType>AMT</TransmissionType> @@ -2390,7 +2390,7 @@ <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>H4xO+urVMI8J65DssHC27LwPG+t193DROb3nhM657/A=</di:DigestValue> + <di:DigestValue>osxjs+vChAnmncXtxqxie5iHDQthzhKSGE7sqzCc2bM=</di:DigestValue> </di:Reference> </Signature> </tns:Gearbox> diff --git a/VectoCommon/VectoHashingTest/VectoHashTest.cs b/VectoCommon/VectoHashingTest/VectoHashTest.cs index 733cb953b442e120fd93f2eb7af8d966ef8225ad..96cf65962239651bb9b06470f56e4e2ba2c04dc7 100644 --- a/VectoCommon/VectoHashingTest/VectoHashTest.cs +++ b/VectoCommon/VectoHashingTest/VectoHashTest.cs @@ -498,5 +498,21 @@ namespace VectoHashingTest { AssertHelper.Exception<ArgumentOutOfRangeException>(() => ((VectoComponents)9999).HashIdPrefix()); } + + + + [TestCase(@"Testdata\XML\Validation\vecto_engine_valid.xml"), + TestCase(@"Testdata\XML\Validation\vecto_gearbox_valid.xml")] + public void TestXMLComponentValidation(string file) + { + var xmlDoc = new XmlDocument(); + xmlDoc.Load(XmlReader.Create(file)); + var validator = new XMLValidator(xmlDoc); + Assert.IsTrue(validator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport)); + + var version = XMLHelper.GetVersionFromNamespaceUri(xmlDoc.DocumentElement.NamespaceURI); + Assert.AreEqual("1.0", version); + + } } } diff --git a/VectoConsole/Properties/Version.cs b/VectoConsole/Properties/Version.cs index 9badfa14a9ae029bacb3be8c1af8a2a85f2bf382..426016566051a01d974695745d14a03fbcf1cc0e 100644 --- a/VectoConsole/Properties/Version.cs +++ b/VectoConsole/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("3.3.3.1609")] -[assembly: AssemblyFileVersion("3.3.3.1609")] \ No newline at end of file +[assembly: AssemblyVersion("3.3.3.1639")] +[assembly: AssemblyFileVersion("3.3.3.1639")] \ No newline at end of file diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs index ddc382aa28a8234959548e22258c72dcc7f6ecbd..f6fe87d632ef28c144826d77e97ab80834801f0b 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONInputData.cs @@ -67,7 +67,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON protected JSONFile(JObject data, string filename, bool tolerateMissing = false) { var header = (JObject)data.GetEx(JsonKeys.JsonHeader); - Version = header.GetEx<string>(JsonKeys.JsonHeader_FileVersion); + Version = header[JsonKeys.JsonHeader_FileVersion] != null ? header.GetEx<string>(JsonKeys.JsonHeader_FileVersion) : string.Empty; Body = (JObject)data.GetEx(JsonKeys.JsonBody); _sourceFile = Path.GetFullPath(filename); TolerateMissing = tolerateMissing; diff --git a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationInputDataProvider.cs b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationInputDataProvider.cs index eda34566e9eb0b42e5867977b862f6ef6c0c1f10..9c125841f2286c830b084f79a3a3392f661f01ee 100644 --- a/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationInputDataProvider.cs +++ b/VectoCore/VectoCore/InputData/FileIO/XML/Declaration/DataProvider/XMLDeclarationInputDataProvider.cs @@ -62,6 +62,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration { Document = xmlDoc; SourceType = DataSourceType.XMLFile; + + var h = VectoHash.Load(xmlDoc); + XMLHash = h.ComputeXmlHash(); } #region Overrides of AbstractXMLResource diff --git a/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs b/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs index 2bf6548ebe01b3bc6cad9559e3205df2bdfb89c6..3da0b1a2c9b3d45a2fa0ed2d314dc29a2b8bd4f5 100644 --- a/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs +++ b/VectoCore/VectoCore/InputData/Reader/ComponentData/TransmissionLossMapReader.cs @@ -129,14 +129,16 @@ namespace TUGraz.VectoCore.InputData.Reader.ComponentData VectoMath.LeastSquaresFitting(speedBucket.Value, x => x.InputTorque.Value(), x => x.TorqueLoss.Value(), out k, out d, out r); - var inTq = DeclarationData.LossMapExtrapolationFactor * maxTorque; - if (k > 0) { - entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, k * inTq + d.SI<NewtonMeter>())); - entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, k * inTq + d.SI<NewtonMeter>())); - } else { - var torqueLossLastEntry = speedBucket.Value.OrderBy(x => x.InputSpeed).Last().TorqueLoss; - entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, torqueLossLastEntry)); - entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, torqueLossLastEntry)); + for (var i = 2; i <= DeclarationData.LossMapExtrapolationFactor; i++) { + var inTq = i * maxTorque; + if (k > 0) { + entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, k * inTq + d.SI<NewtonMeter>())); + entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, k * inTq + d.SI<NewtonMeter>())); + } else { + var torqueLossLastEntry = speedBucket.Value.OrderBy(x => x.InputSpeed).Last().TorqueLoss; + entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, inTq, torqueLossLastEntry)); + entries.Add(new TransmissionLossMap.GearLossMapEntry(speedBucket.Key, -inTq, torqueLossLastEntry)); + } } } diff --git a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs index 31010b77dc19219c5b8d7ce36a54d3b0d442940b..53d2910afbfa77f9dca276a71a70763506d87971 100644 --- a/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/VectoCore/Models/Declaration/DeclarationData.cs @@ -77,7 +77,7 @@ namespace TUGraz.VectoCore.Models.Declaration public static readonly StandardBodies StandardBodies = new StandardBodies(); public static readonly Payloads Payloads = new Payloads(); public static readonly PTOTransmission PTOTransmission = new PTOTransmission(); - public const double LossMapExtrapolationFactor = 3; + public const double LossMapExtrapolationFactor = 6; public static readonly ADASCombinations ADASCombinations = new ADASCombinations(); public static readonly ADASBenefits ADASBenefits = new ADASBenefits(); diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs index 2f2a94e8fa17afba911e3dc26322831bb661a5f0..e81b35851d9f756f2954e1b2fab2854eed91c707 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -352,7 +352,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl IterationStatistics.Increment(this, "Coast"); Log.Debug("DrivingAction Coast"); - return CoastOrRollAction(absTime, ds, maxVelocity, gradient, false); + var gear = DataBus.Gear; + var tcLocked = DataBus.TCLocked; + var retVal = CoastOrRollAction(absTime, ds, maxVelocity, gradient, false); + var gearChanged = !(DataBus.Gear == gear && DataBus.TCLocked == tcLocked); + if (DataBus.GearboxType.AutomaticTransmission() && gearChanged && (retVal is ResponseOverload || retVal is ResponseUnderload)) { + Log.Debug("Gear changed after a valid operating point was found - re-try coasting!"); + retVal = CoastOrRollAction(absTime, ds, maxVelocity, gradient, false); + } + + return retVal; } /// <summary> diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs index cd7d75c756442175bb8abf40c3fc6fada9801e80..aca76e1cf836955fa35085aef54c4279e39c26f8 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/TorqueConverter.cs @@ -230,7 +230,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return operatingPoint; } catch (VectoException ve) { Log.Error(ve, "TorqueConverter: Failed to find operating point for DragPower {0}", engineResponse.DragPower); - var engineSpeed = VectoMath.Max(DataBus.EngineIdleSpeed, 0.8 * DataBus.EngineSpeed); + var engineSpeed = VectoMath.Max(DataBus.EngineIdleSpeed * 1.001, 0.8 * DataBus.EngineSpeed); var retVal = FindValidTorqueConverterOperatingPoint( absTime, dt, outAngularVelocity, engineSpeed, diff --git a/VectoCore/VectoCore/Properties/Version.cs b/VectoCore/VectoCore/Properties/Version.cs index 9b20ec249eb2e144766838f6d89daf9381e95ffd..0b60f0010c4e189a85908097352e3c6235b04813 100644 --- a/VectoCore/VectoCore/Properties/Version.cs +++ b/VectoCore/VectoCore/Properties/Version.cs @@ -30,5 +30,5 @@ */ using System.Reflection; -[assembly: AssemblyVersion("3.3.3.1609")] -[assembly: AssemblyFileVersion("3.3.3.1609")] +[assembly: AssemblyVersion("3.3.3.1639")] +[assembly: AssemblyFileVersion("3.3.3.1639")] diff --git a/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b2cd8b1b8ef878b41074466df970e372e26e7cdd --- /dev/null +++ b/VectoCore/VectoCore/Resources/XSD/VectoMonitoring.xsd @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- edited with XMLSpy v2016 rel. 2 sp1 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:ParameterDocumentation ParameterDocumentation.xsd"> + <!-- + + This is a convienience file that imports the schema for all supported versions of customer information file and all supported declaration definitions + + --> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:MonitoringOutput:v0.7" schemaLocation="VectoMonitoring.0.7.xsd"/> +</xs:schema> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.xsd index 044e6c7007d04487bed31c427862ef558675e5e7..243edf30180c83a4ae7e92b58f2059f1676e637b 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.xsd @@ -1,258 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- edited with XMLSpy v2016 rel. 2 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> -<!--W3C XML Schema generated by XMLSpy vXMLSpy Professional Edition v2016 rel. 2 (x64) (http://www.altova.com)--> -<xs:schema xmlns="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.5" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vdecdef="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" targetNamespace="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.5" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.5"> - <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"> - <xs:complexType> - <xs:complexContent> - <xs:extension base="VectoOutputDataType"/> - </xs:complexContent> - </xs:complexType> - </xs:element> - <xs:element name="Signature" type="vdecdef:SignatureType"/> - </xs:sequence> - <xs:attribute name="schemaVersion" type="xs:decimal" use="required"/> - </xs:complexType> - </xs:element> - <xs:complexType name="CO2Type"> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="CO2UnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - <xs:complexType name="FuelConsumptionType"> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="FuelConsumptionUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - <xs:complexType name="ResultType"> - <xs:sequence> - <xs:element name="Mission" type="MissionTypeType"/> - <xs:choice> - <xs:sequence> - <xs:element name="Payload"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="MassUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="FuelType" type="vdecdef:FuelTypeType"/> - <xs:element name="AverageSpeed"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="SpeedUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="FuelConsumption" type="FuelConsumptionType" maxOccurs="unbounded"/> - <xs:element name="CO2" type="CO2Type" maxOccurs="unbounded"/> - </xs:sequence> - <xs:element name="Error"/> - </xs:choice> - </xs:sequence> - <xs:attribute name="status" use="required"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="success"/> - <xs:enumeration value="error"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - <xs:complexType name="VectoOutputDataType"> - <xs:sequence> - <xs:element name="Vehicle" type="VehicleType"/> - <xs:element name="ResultDataSignature" type="vdecdef:SignatureType"/> - <xs:element name="Results"> - <xs:complexType> - <xs:sequence> - <xs:element name="Status"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="success"/> - <xs:enumeration value="error"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="Result" type="ResultType" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="ApplicationInformation"> - <xs:complexType> - <xs:sequence> - <xs:element name="SimulationToolVersion"/> - <xs:element name="Date"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - <xs:attribute name="id" use="required"/> - </xs:complexType> - <xs:complexType name="VehiclePerformanceType"> - <xs:sequence/> - </xs:complexType> - <xs:complexType name="VehicleType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="Manufacturer" type="vdecdef:ManufacturerType"/> - <xs:element name="ManufacturerAddress" type="vdecdef:ManufacturerAddressType"/> - <xs:element name="VIN"> - <xs:annotation> - <xs:documentation>P238</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="LegislativeClass" type="vdecdef:LegislativeClassDeclarationType"> - <xs:annotation> - <xs:documentation>P251</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="VehicleGroup" type="VehicleGroupType"> - <xs:annotation> - <xs:documentation>VECTO</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="AxleConfiguration" type="vdecdef:VehicleAxleConfigurationDeclarationType"> - <xs:annotation> - <xs:documentation>P037</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="GrossVehicleMass" type="vdecdef:VehicleGrossVehicleMassType"> - <xs:annotation> - <xs:documentation>P041</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CurbMassChassis" type="vdecdef:VehicleCurbMassChassisType"> - <xs:annotation> - <xs:documentation>P038</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EngineRatedPower" type="vdecdef:EngineRatedPower"> - <xs:annotation> - <xs:documentation>P250</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="EngineDisplacement" type="vdecdef:EngineDisplacementType"> - <xs:annotation> - <xs:documentation>P061</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="FuelType" type="vdecdef:FuelTypeType"> - <xs:annotation> - <xs:documentation>P193</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="TransmissionMainCertificationMethod" type="vdecdef:GearboxCertificationOptionType"> - <xs:annotation> - <xs:documentation>P154</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="TransmissionType" type="vdecdef:GearboxTransmissionTypeType"> - <xs:annotation> - <xs:documentation>P076</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="GearsCount"> - <xs:annotation> - <xs:documentation>P199</xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:int"> - <xs:minInclusive value="1"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="Retarder" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P052</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="AxleRatio" type="vdecdef:AxlegearRatioType"> - <xs:annotation> - <xs:documentation>P150</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="AverageRRC" type="vdecdef:TyreRRCISOType"/> - <xs:element name="InputDataSignature" type="vdecdef:SignatureType"/> - </xs:sequence> - </xs:complexType> - <xs:simpleType name="AccelerationUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="m/s²"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="AirdragCertificationOptionType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Measured"/> - <xs:enumeration value="Standard values"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="CO2UnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="g/km"/> - <xs:enumeration value="g/t-km"/> - <xs:enumeration value="g/p-km"/> - <xs:enumeration value="g/m³-km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="DistanceUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="FuelConsumptionUnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="g/km"/> - <xs:enumeration value="g/t-km"/> - <xs:enumeration value="g/p-km"/> - <xs:enumeration value="g/m³-km"/> - <xs:enumeration value="l/100km"/> - <xs:enumeration value="l/t-km"/> - <xs:enumeration value="l/p-km"/> - <xs:enumeration value="l/m³-km"/> - <xs:enumeration value="MJ/km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="MassUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="kg"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="MissionTypeType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="Long Haul EMS"/> - <xs:enumeration value="Long Haul"/> - <xs:enumeration value="Regional Delivery EMS"/> - <xs:enumeration value="Regional Delivery"/> - <xs:enumeration value="Urban Delivery"/> - <xs:enumeration value="Municipal Utility"/> - <xs:enumeration value="Construction"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="SpeedUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="km/h"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="VehicleGroupType"> - <xs:restriction base="xs:int"> - <xs:minInclusive value="1"/> - <xs:maxInclusive value="16"/> - </xs:restriction> - </xs:simpleType> +<!-- edited with XMLSpy v2016 rel. 2 sp1 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="urn:tugraz:ivt:VectoAPI:CustomerOutput" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:ParameterDocumentation ParameterDocumentation.xsd"> + <!-- + + This is a convienience file that imports the schema for all supported versions of customer information file and all supported declaration definitions + + --> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.5" schemaLocation="VectoOutputCustomer.0.5.xsd"/> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:CustomerOutput:v0.7" schemaLocation="VectoOutputCustomer.0.7.xsd"/> </xs:schema> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.xsd index 54f7fe161bd33a74fc08663c6cf2308ec3cbd92e..b8765ba6f1241780a6559be5b2f98ad71280fd99 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.xsd @@ -1,648 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2016 rel. 2 sp1 (x64) (http://www.altova.com) by Helmut Eichlseder (TU Graz/Inst. f. VKM und THD) --> -<!--W3C XML Schema generated by XMLSpy vXMLSpy Professional Edition v2016 rel. 2 (x64) (http://www.altova.com)--> -<xs:schema xmlns="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.5" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vdecdef="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" targetNamespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.5" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.5"> - <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationDefinitions:v1.0" schemaLocation="VectoDeclarationDefinitions.1.0.xsd"/> - <xs:element name="VectoOutput"> - <xs:annotation> - <xs:documentation>Comment describing your root element</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element name="Data"> - <xs:complexType> - <xs:complexContent> - <xs:extension base="VectoOutputDataType"/> - </xs:complexContent> - </xs:complexType> - </xs:element> - <xs:element name="Signature" type="vdecdef:SignatureType"/> - </xs:sequence> - <xs:attribute name="schemaVersion" type="xs:decimal" use="required"/> - </xs:complexType> - </xs:element> - <xs:complexType name="AirdragType"> - <xs:sequence> - <xs:element name="Model" minOccurs="0"/> - <xs:element name="CertificationMethod" type="AirdragCertificationOptionType"/> - <xs:element name="CertificationNumber" minOccurs="0"/> - <xs:element name="DigestValue" minOccurs="0"/> - <xs:element name="CdxA" type="vdecdef:AirdragCdxAType"> - <xs:annotation> - <xs:documentation>P245</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="AngledriveType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationMethod" type="vdecdef:AngledriveCertificationOptionType"> - <xs:annotation> - <xs:documentation>P258</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"/> - <xs:element name="DigestValue" type="xs:token"/> - <xs:element name="Ratio" type="vdecdef:AngledriveRatioType"> - <xs:annotation> - <xs:documentation>P176</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="AuxiliariesType"> - <xs:sequence> - <xs:element name="FanTechnology" type="vdecdef:AuxFanTechnologyType"> - <xs:annotation> - <xs:documentation>P181</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="SteeringPumpTechnology" maxOccurs="4"> - <xs:annotation> - <xs:documentation>P182</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="vdecdef:AuxSPTechnologyType"/> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="ElectricSystemTechnology" type="vdecdef:AuxESTechnologyType"> - <xs:annotation> - <xs:documentation>P183</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="PneumaticSystemTechnology" type="vdecdef:AuxPSTechnologyType"> - <xs:annotation> - <xs:documentation>P184</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="HVACTechnology" type="vdecdef:AuxHVACTechnologyType"> - <xs:annotation> - <xs:documentation>P185</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="AxlegearType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationMethod" type="vdecdef:AxlegearCertificationOptionType"> - <xs:annotation> - <xs:documentation>P256</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"/> - <xs:element name="DigestValue" type="xs:token"/> - <xs:element name="LineType" type="vdecdef:AxlegearLineTypeType"> - <xs:annotation> - <xs:documentation>P253</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="Ratio" type="vdecdef:AxlegearRatioType"> - <xs:annotation> - <xs:documentation>P150</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="AxleType"> - <xs:sequence> - <xs:element name="TyreDimension" type="vdecdef:TyreDimensionType"> - <xs:annotation> - <xs:documentation>P108</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="TyreCertificationNumber" type="vdecdef:CertificationNumberType"> - <xs:annotation> - <xs:documentation>P267</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="DigestValue" type="xs:token"/> - <xs:element name="TyreRRCDeclared" type="vdecdef:TyreRRCISOType"> - <xs:annotation> - <xs:documentation>P046</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="TwinTyres" type="vdecdef:AxleTwinTyresType"> - <xs:annotation> - <xs:documentation>P045</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - <xs:attribute name="axleNumber" use="required"> - <xs:simpleType> - <xs:restriction base="xs:int"> - <xs:minInclusive value="1"/> - <xs:maxInclusive value="4"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - <xs:complexType name="AxleWheelsType"> - <xs:sequence minOccurs="2" maxOccurs="4"> - <xs:element name="Axle" type="AxleType"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="CO2Type"> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="CO2UnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - <xs:complexType name="ComponentDescriptionType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType"/> - <xs:element name="DigestValue" type="xs:token"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="EngineType"> - <xs:complexContent> - <xs:extension base="ComponentDescriptionType"> - <xs:sequence> - <xs:element name="RatedPower"> - <xs:annotation> - <xs:documentation>P250</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="vdecdef:EngineRatedPower"> - <xs:attribute name="unit" type="PowerUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="IdlingSpeed"> - <xs:annotation> - <xs:documentation>P063 / P198</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="vdecdef:EngineDeclaredSpeedType"> - <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="RatedSpeed"> - <xs:annotation> - <xs:documentation>P249</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="vdecdef:EngineDeclaredSpeedType"> - <xs:attribute name="unit" type="AngularVelocityUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="Displacement"> - <xs:annotation> - <xs:documentation>P061</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="DisplacementType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="FuelType" type="vdecdef:FuelTypeType"> - <xs:annotation> - <xs:documentation>P193</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - <xs:complexType name="FuelConsumptionType"> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="FuelConsumptionUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - <xs:complexType name="GearboxType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationMethod" type="vdecdef:GearboxCertificationOptionType"> - <xs:annotation> - <xs:documentation>P154</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"/> - <xs:element name="DigestValue" type="xs:token"/> - <xs:element name="TransmissionType" type="vdecdef:GearboxTransmissionTypeType"> - <xs:annotation> - <xs:documentation>P076</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="GearsCount"> - <xs:annotation> - <xs:documentation>P199</xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:int"> - <xs:minInclusive value="1"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="TransmissionRatioFinalGear" type="vdecdef:GearboxGearRatioType"> - <xs:annotation> - <xs:documentation>P078</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="ResultType"> - <xs:sequence> - <xs:element name="Mission" type="MissionTypeType"/> - <xs:choice> - <xs:sequence> - <xs:element name="Distance"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="DistanceUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="SimulationParameters" type="SimulationParametersType"/> - <xs:element name="VehiclePerformance" type="VehiclePerformanceType"/> - <xs:element name="FuelConsumption" type="FuelConsumptionType" maxOccurs="unbounded"/> - <xs:element name="CO2" type="CO2Type" maxOccurs="unbounded"/> - </xs:sequence> - <xs:sequence> - <xs:element name="Error" type="xs:string"/> - <xs:element name="ErrorDetails" type="xs:string"/> - </xs:sequence> - </xs:choice> - </xs:sequence> - <xs:attribute name="status" use="required"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="success"/> - <xs:enumeration value="error"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - <xs:complexType name="RetarderType"> - <xs:sequence> - <xs:element name="RetarderType" type="vdecdef:RetarderTypeType"> - <xs:annotation> - <xs:documentation>P052</xs:documentation> - </xs:annotation> - </xs:element> - <xs:sequence minOccurs="0"> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationMethod" type="vdecdef:RetarderCertificationOptionType"> - <xs:annotation> - <xs:documentation>P255</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"/> - <xs:element name="DigestValue" type="xs:token"/> - </xs:sequence> - </xs:sequence> - </xs:complexType> - <xs:complexType name="SimulationParametersType"> - <xs:sequence> - <xs:element name="TotalVehicleMass"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="MassUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="Payload"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="MassUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="FuelType" type="vdecdef:FuelTypeType"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="TorqueconverterType"> - <xs:sequence> - <xs:element name="Model" type="vdecdef:ModelType"/> - <xs:element name="CertificationMethod" type="vdecdef:TorqueConverterCertificationOptionType"> - <xs:annotation> - <xs:documentation>P257</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="CertificationNumber" type="vdecdef:CertificationNumberType" minOccurs="0"/> - <xs:element name="DigestValue" type="xs:token"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="TorqueLimitsEntryType"> - <xs:attribute name="gear" type="vdecdef:GearboxGearNumberType" use="required"> - <xs:annotation> - <xs:documentation>P196</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="torqueLimit" type="vdecdef:TorqueLimitEntryMaxTorqueType" use="required"> - <xs:annotation> - <xs:documentation>P197 / P194</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - <xs:complexType name="TorqueLimitsType"> - <xs:sequence> - <xs:element name="Entry" type="TorqueLimitsEntryType"/> - </xs:sequence> - </xs:complexType> - <xs:complexType name="VectoOutputDataType"> - <xs:sequence> - <xs:element name="Vehicle" type="VehicleType"/> - <xs:element name="Results"> - <xs:complexType> - <xs:sequence> - <xs:element name="Status"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value="success"/> - <xs:enumeration value="error"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="Result" type="ResultType" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="ApplicationInformation"> - <xs:complexType> - <xs:sequence> - <xs:element name="SimulationToolVersion"/> - <xs:element name="Date"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:sequence> - <xs:attribute name="id" use="required"/> - </xs:complexType> - <xs:complexType name="VehiclePerformanceType"> - <xs:sequence> - <xs:element name="AverageSpeed"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="SpeedUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="AverageDrivingSpeed"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="SpeedUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="MinSpeed"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="SpeedUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="MaxSpeed"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="SpeedUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="MaxDeceleration"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="AccelerationUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="MaxAcceleration"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="AccelerationUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="FullLoadDrivingtimePercentage"> - <xs:simpleType> - <xs:restriction base="xs:double"> - <xs:minInclusive value="0"/> - <xs:maxInclusive value="100"/> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="GearshiftCount" type="xs:int"/> - <xs:element name="EngineSpeedDriving"> - <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:complexType> - </xs:element> - </xs:sequence> - </xs:complexType> - <xs:complexType name="VehicleType"> - <xs:sequence> - <xs:element name="VIN"> - <xs:annotation> - <xs:documentation>P238</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="LegislativeClass" type="vdecdef:LegislativeClassDeclarationType"> - <xs:annotation> - <xs:documentation>P251</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="VehicleGroup" type="VehicleGroupType"> - <xs:annotation> - <xs:documentation>VECTO</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="AxleConfiguration" type="vdecdef:VehicleAxleConfigurationDeclarationType"> - <xs:annotation> - <xs:documentation>P037</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="GrossVehicleMass"> - <xs:annotation> - <xs:documentation>P041</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:double"> - <xs:attribute name="unit" type="MassUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="CurbMassChassis"> - <xs:annotation> - <xs:documentation>P038</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="vdecdef:VehicleCurbMassChassisType"> - <xs:attribute name="unit" type="MassUnitType" use="required"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="PTO" type="xs:boolean"> - <xs:annotation> - <xs:documentation>P247</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element name="TorqueLimits" type="TorqueLimitsType" minOccurs="0"/> - <xs:element name="Components"> - <xs:complexType> - <xs:sequence> - <xs:element name="Engine" type="EngineType"/> - <xs:element name="Gearbox" type="GearboxType"/> - <xs:element name="Torqueconverter" type="TorqueconverterType" minOccurs="0"/> - <xs:element name="Retarder" type="RetarderType"/> - <xs:element name="Angledrive" type="AngledriveType" minOccurs="0"/> - <xs:element name="Axlegear" type="AxlegearType"/> - <xs:element name="AirDrag" type="AirdragType"/> - <xs:element name="AxleWheels" type="AxleWheelsType"/> - <xs:element name="Auxiliaries" type="AuxiliariesType"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="InputDataSignature" type="vdecdef:SignatureType"/> - </xs:sequence> - </xs:complexType> - <xs:simpleType name="AccelerationUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="m/s²"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="AirdragCertificationOptionType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="Measured"/> - <xs:enumeration value="Standard values"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="CO2UnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="g/km"/> - <xs:enumeration value="g/t-km"/> - <xs:enumeration value="g/p-km"/> - <xs:enumeration value="g/m³-km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="DistanceUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="FuelConsumptionUnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="g/km"/> - <xs:enumeration value="g/t-km"/> - <xs:enumeration value="g/p-km"/> - <xs:enumeration value="g/m³-km"/> - <xs:enumeration value="l/100km"/> - <xs:enumeration value="l/t-km"/> - <xs:enumeration value="l/p-km"/> - <xs:enumeration value="l/m³-km"/> - <xs:enumeration value="MJ/km"/> - <xs:enumeration value="MJ/t-km"/> - <xs:enumeration value="MJ/m³-km"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="MassUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="kg"/> - <xs:enumeration value="t"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="MissionTypeType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="Long Haul EMS"/> - <xs:enumeration value="Long Haul"/> - <xs:enumeration value="Regional Delivery EMS"/> - <xs:enumeration value="Regional Delivery"/> - <xs:enumeration value="Urban Delivery"/> - <xs:enumeration value="Municipal Utility"/> - <xs:enumeration value="Construction"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="SpeedUnitType"> - <xs:restriction base="xs:token"> - <xs:enumeration value="km/h"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="VehicleGroupType"> - <xs:restriction base="xs:int"> - <xs:minInclusive value="1"/> - <xs:maxInclusive value="16"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="AngularVelocityUnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="rpm"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="PowerUnitType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="kW"/> - </xs:restriction> - </xs:simpleType> - <xs:simpleType name="DisplacementType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="ltr"/> - </xs:restriction> - </xs:simpleType> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="urn:tugraz:ivt:VectoAPI:ParameterDocumentation ParameterDocumentation.xsd"> + <!-- + + This is a convienience file that imports the schema for all supported versions of manufacturer records file and all supported declaration definitions + + --> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.5" schemaLocation="VectoOutputManufacturer.0.5.xsd"/> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.6" schemaLocation="VectoOutputManufacturer.0.6.xsd"/> + <xs:import namespace="urn:tugraz:ivt:VectoAPI:DeclarationOutput:v0.7" schemaLocation="VectoOutputManufacturer.0.7.xsd"/> </xs:schema> diff --git a/VectoCore/VectoCore/Utils/VectoVersionCore.cs b/VectoCore/VectoCore/Utils/VectoVersionCore.cs index 7ad7ac22f7329eb033b5c6749435b56666ba0f9b..0c836df444ca0a1d3fd1d7d4bab9bd3552ae1c67 100644 --- a/VectoCore/VectoCore/Utils/VectoVersionCore.cs +++ b/VectoCore/VectoCore/Utils/VectoVersionCore.cs @@ -47,7 +47,7 @@ namespace TUGraz.VectoCore.Utils public static string VersionNumber { get { - return "3.3.3.1609" + SUFFIX; + return "3.3.3.1639" + SUFFIX; } } diff --git a/VectoCore/VectoCore/Utils/XMLDefinitions.cs b/VectoCore/VectoCore/Utils/XMLDefinitions.cs index d54fa72ecb1e079f6a643a578d53ff349b529e8d..42903ce30c2a3d46bc500715ca0c6b16d16c5a49 100644 --- a/VectoCore/VectoCore/Utils/XMLDefinitions.cs +++ b/VectoCore/VectoCore/Utils/XMLDefinitions.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Xml; namespace TUGraz.VectoCore.Utils { @@ -74,20 +75,21 @@ namespace TUGraz.VectoCore.Utils {XmlDocumentType.DeclarationComponentData, "VectoDeclarationComponent.xsd"}, {XmlDocumentType.EngineeringJobData, "VectoEngineeringJob.xsd" }, {XmlDocumentType.EngineeringComponentData, "VectoEngineeringComponent.xsd" }, - {XmlDocumentType.ManufacturerReport, "VectoOutputManufacturer{0}.xsd" }, - {XmlDocumentType.CustomerReport , "VectoOutputCustomer{0}.xsd"}, - {XmlDocumentType.MonitoringReport , "VectoMonitoring{0}.xsd"}, + {XmlDocumentType.ManufacturerReport, "VectoOutputManufacturer.xsd" }, + {XmlDocumentType.CustomerReport , "VectoOutputCustomer.xsd"}, + {XmlDocumentType.MonitoringReport , "VectoMonitoring.xsd"}, }; - public static string GetSchemaFilename(XmlDocumentType type, string version) + public static string GetSchemaFilename(XmlDocumentType type) { if (!schemaFilenames.ContainsKey(type)) { throw new Exception(string.Format("Invalid argument {0} - only use single flags", type)); } var entry = schemaFilenames[type]; - return string.Format(entry, string.IsNullOrWhiteSpace(version) ? "" : "." + version); + + return entry; } } diff --git a/VectoCore/VectoCore/Utils/XMLHelper.cs b/VectoCore/VectoCore/Utils/XMLHelper.cs index 8202eb1ddae03d868ffb9cb73406fbc1f1529c80..64abf035b0b0a064fd8314ac1360fab5c2f8ff5e 100644 --- a/VectoCore/VectoCore/Utils/XMLHelper.cs +++ b/VectoCore/VectoCore/Utils/XMLHelper.cs @@ -68,18 +68,6 @@ namespace TUGraz.VectoCore.Utils // return GetVersionFromNamespaceUri(node.NamespaceURI); //} - public static string GetSchemaVersion(XmlNode node) - { - var nodeType = node.Attributes?.GetNamedItem("type", "http://www.w3.org/2001/XMLSchema-instance"); - if (nodeType != null) { - var parts = nodeType.InnerText.Split(':'); - if (parts.Length == 2) { - return GetVersionFromNamespaceUri(nodeType.GetNamespaceOfPrefix(parts[0])); - } - } - return GetVersionFromNamespaceUri(node.NamespaceURI); - } - public static string GetVersionFromNamespaceUri(XNamespace namespaceUri) { const string versionPrefix = "v"; diff --git a/VectoCore/VectoCore/Utils/XMLValidator.cs b/VectoCore/VectoCore/Utils/XMLValidator.cs index 1956b61f67486d587f7fb3b5d8e7f0c50733a3c6..76dcdfde63168ce6864f98df6e985eaea00e9359 100644 --- a/VectoCore/VectoCore/Utils/XMLValidator.cs +++ b/VectoCore/VectoCore/Utils/XMLValidator.cs @@ -78,26 +78,16 @@ namespace TUGraz.VectoCore.Utils throw new Exception("empty XML document"); } - var version = XMLHelper.GetSchemaVersion(_doc.DocumentElement); - - _doc.Schemas = GetXMLSchema(docType, version); + _doc.Schemas = GetXMLSchema(docType); + _doc.Validate(ValidationCallBack); - //var settings = new XmlReaderSettings(); - //settings.Schemas = GetXMLSchema(docType, version); - //settings.ValidationType = ValidationType.Schema; - //settings.ValidationFlags = - // XmlSchemaValidationFlags.ReportValidationWarnings | XmlSchemaValidationFlags.AllowXmlAttributes; - //settings.ValidationEventHandler += ValidationCallBack; - //var m = new MemoryStream(); - //var w = new XmlTextWriter(m, Encoding.UTF8); - //_doc.WriteTo(w); - //w.Flush(); - //m.Flush(); - //m.Seek(0, SeekOrigin.Begin); - //var r = new XmlTextReader(m); - //var reader = XmlReader.Create(r, settings); - //_doc = new XmlDocument(); - //_doc.Load(reader); + + if (_doc.SchemaInfo.Validity != XmlSchemaValidity.Valid || _doc.DocumentElement?.SchemaInfo == null || + _doc.DocumentElement.SchemaInfo.SchemaType == null) { + ValidationCallBack(null, null); + _valid = false; + } + return _valid; } @@ -105,7 +95,7 @@ namespace TUGraz.VectoCore.Utils { _resultAction(false); _valid = false; - _validationErrorAction(args.Severity, new ValidationEvent { ValidationEventArgs = args }); + _validationErrorAction(args?.Severity ?? XmlSeverityType.Error, new ValidationEvent { ValidationEventArgs = args }); } public static void CallBackExceptionOnError(XmlSeverityType severity, ValidationEvent evt) @@ -115,16 +105,15 @@ namespace TUGraz.VectoCore.Utils } } - private static XmlSchemaSet GetXMLSchema(XmlDocumentType docType, string version) + private static XmlSchemaSet GetXMLSchema(XmlDocumentType docType) { var xset = new XmlSchemaSet() { XmlResolver = new XmlResourceResolver() }; - foreach (var entry in EnumHelper.GetValues<XmlDocumentType>()) { if ((entry & docType) == 0) { continue; } - var schemaFile = XMLDefinitions.GetSchemaFilename(entry, version); + var schemaFile = XMLDefinitions.GetSchemaFilename(entry); if (schemaFile == null) { continue; } @@ -134,7 +123,7 @@ namespace TUGraz.VectoCore.Utils resource = RessourceHelper.LoadResourceAsStream(RessourceHelper.ResourceType.XMLSchema, schemaFile); } catch (Exception e) { throw new Exception( - string.Format("Unknown XML schema! version: {0}, xml document type: {1} ({2})", entry, version, schemaFile), e); + string.Format("Missing resource {0} for XML document type: {1} ({2})", schemaFile, entry, docType.ToString()), e); } var reader = XmlReader.Create(resource, new XmlReaderSettings(), "schema://"); diff --git a/VectoCore/VectoCore/VectoCore.csproj b/VectoCore/VectoCore/VectoCore.csproj index ae5ba4cbdf283b1384c69c983afb8354af830bd1..1d012b47b9d953e42fd9768baf495ccca7faf015 100644 --- a/VectoCore/VectoCore/VectoCore.csproj +++ b/VectoCore/VectoCore/VectoCore.csproj @@ -76,7 +76,7 @@ <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> - <DefineConstants>RELEASE_CANDIDATE</DefineConstants> + <DefineConstants>CERTIFICATION_RELEASE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> @@ -680,6 +680,9 @@ <EmbeddedResource Include="Resources\XSD\VectoEngineeringJob.xsd"> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="Resources\XSD\VectoMonitoring.xsd"> + <SubType>Designer</SubType> + </EmbeddedResource> <None Include="Utils\VectoVersionCore.tt"> <Generator>TextTemplatingFileGenerator</Generator> <LastGenOutput>VectoVersionCore.cs</LastGenOutput> diff --git a/VectoCore/VectoCoreTest/FileIO/JsonWriteTest.cs b/VectoCore/VectoCoreTest/FileIO/JsonWriteTest.cs index a12d7a7f3021de1e32df601ba98e30d0c03c6298..f23bdd9ebd54235c969451c68aa44aba53bf4420 100644 --- a/VectoCore/VectoCoreTest/FileIO/JsonWriteTest.cs +++ b/VectoCore/VectoCoreTest/FileIO/JsonWriteTest.cs @@ -31,7 +31,6 @@ using System.IO; using NUnit.Framework; -using NUnit.Framework.Internal; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCore.InputData.FileIO.JSON; using TUGraz.VectoCore.Tests.Utils; diff --git a/VectoCore/VectoCoreTest/Integration/Declaration/ExemptedVehicleTest.cs b/VectoCore/VectoCoreTest/Integration/Declaration/ExemptedVehicleTest.cs index 94f308f06f801301bda6ba2f1871c0dbd6cc8925..32150285bb1d8c30b17b4bdf2e84682c2bca2aa0 100644 --- a/VectoCore/VectoCoreTest/Integration/Declaration/ExemptedVehicleTest.cs +++ b/VectoCore/VectoCoreTest/Integration/Declaration/ExemptedVehicleTest.cs @@ -117,7 +117,7 @@ namespace TUGraz.VectoCore.Tests.Integration var val2 = new XMLValidator(XmlReader.Create(customerFile)); Assert.IsTrue(val2.ValidateXML(XmlDocumentType.CustomerReport)); - var val3 = new XMLValidator(XmlReader.Create(customerFile)); + var val3 = new XMLValidator(XmlReader.Create(monitoringFile)); Assert.IsTrue(val3.ValidateXML(XmlDocumentType.MonitoringReport)); } diff --git a/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs b/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs index 1afb697da649d8b747f0214db03eb796e50ecf3c..5ae0634b3d60ca88a9377ebff38c253134ced0ce 100644 --- a/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs +++ b/VectoCore/VectoCoreTest/Integration/XMLReportTest.cs @@ -37,6 +37,7 @@ using System.Xml.Linq; using System.Xml.XPath; using Ninject; using NUnit.Framework; +using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Resources; using TUGraz.VectoCommon.Utils; @@ -49,6 +50,7 @@ using TUGraz.VectoCore.OutputData.FileIO; using TUGraz.VectoCore.OutputData.XML; using TUGraz.VectoCore.Tests.XML; using TUGraz.VectoCore.Utils; +using TUGraz.VectoHashing; using XmlDocumentType = TUGraz.VectoCore.Utils.XmlDocumentType; @@ -140,13 +142,13 @@ namespace TUGraz.VectoCore.Tests.Integration jobContainer.WaitFinished(); var mrfValidator = GetValidator(xmlReport.FullReport); - mrfValidator.ValidateXML(XmlDocumentType.ManufacturerReport); + mrfValidator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport); var cifValidator = GetValidator(xmlReport.CustomerReport); - cifValidator.ValidateXML(XmlDocumentType.CustomerReport); + cifValidator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport); var monitoringValidator = GetValidator(xmlReport.MonitoringReport); - monitoringValidator.ValidateXML(XmlDocumentType.MonitoringReport); + monitoringValidator.ValidateXML(XmlDocumentType.DeclarationComponentData | XmlDocumentType.DeclarationJobData | XmlDocumentType.CustomerReport | XmlDocumentType.ManufacturerReport); } private static XMLValidator GetValidator(XDocument xmlReport) @@ -235,5 +237,52 @@ namespace TUGraz.VectoCore.Tests.Integration } } } + + + [TestCase] + public void TestXMLReportCorrectHashes() + { + var jobfile = @"Testdata\XML\XMLReaderDeclaration\vecto_vehicle-sample.xml"; + var dataProvider = xmlInputReader.CreateDeclaration(jobfile); + var writer = new FileOutputWriter(jobfile); + var xmlReport = new XMLDeclarationReport(writer); + var sumData = new SummaryDataContainer(writer); + var jobContainer = new JobContainer(sumData); + + if (File.Exists(writer.SumFileName)) { + File.Delete(writer.SumFileName); + } + + var runsFactory = new SimulatorFactory(ExecutionMode.Declaration, dataProvider, writer, xmlReport) { + WriteModalResults = false, + Validate = false, + }; + jobContainer.AddRuns(runsFactory); + + // no need to run the simulation, we only check whether the meta-data is correct, no results are considered + //jobContainer.Execute(); + //jobContainer.WaitFinished(); + xmlReport.DoWriteReport(); + + + var inputHash = VectoHash.Load(jobfile); + + var mrfDigestData = new DigestData(xmlReport.FullReport.Document.XPathSelectElement("//*[local-name()='InputDataSignature']")); + var mrfInputDigest = inputHash.ComputeHash(mrfDigestData.CanonicalizationMethods, mrfDigestData.DigestMethod); + + Assert.AreEqual(mrfInputDigest, mrfDigestData.DigestValue); + + var cifDigestData = new DigestData(xmlReport.CustomerReport.Document.XPathSelectElement("//*[local-name()='InputDataSignature']")); + var cifInputDigest = inputHash.ComputeHash(cifDigestData.CanonicalizationMethods, cifDigestData.DigestMethod); + + Assert.AreEqual(cifInputDigest, cifDigestData.DigestValue); + + var mrfHash = VectoHash.Load(writer.XMLFullReportName); + var mrfCifDigestData = new DigestData(xmlReport.CustomerReport.Document.XPathSelectElement("//*[local-name()='ResultDataSignature']")); + var mrfCifDigest = mrfHash.ComputeHash(mrfCifDigestData.CanonicalizationMethods, mrfCifDigestData.DigestMethod); + + Assert.AreEqual(mrfCifDigest, mrfCifDigestData.DigestValue); + + } } } diff --git a/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs b/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs index ed2361653ed526e7c4ab849757500e14d65bdd5b..330f6ebd9aea26dd11a263fac9757533129f8ba8 100644 --- a/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs +++ b/VectoCore/VectoCoreTest/Models/SimulationComponent/GearboxTest.cs @@ -285,8 +285,8 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent }; } - [TestCase(GearboxDataFile, EngineDataFile, 6.38, 9600, 1600, 9756.1054377), - TestCase(GearboxDataFile, EngineDataFile, 6.38, -9600, 1000, -9445.40776858)] + [TestCase(GearboxDataFile, EngineDataFile, 6.38, 96000, 1600, 96499.10109), + TestCase(GearboxDataFile, EngineDataFile, 6.38, -96000, 1000, -95502.403188)] public void Gearbox_LossMapExtrapolation_Declaration(string gbxFile, string engineFile, double ratio, double torque, double inAngularSpeed, double expectedTorque) { @@ -314,15 +314,15 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent Assert.AreEqual(absTime, port.AbsTime); Assert.AreEqual(dt, port.Dt); Assert.AreEqual(inAngularSpeed, port.AngularVelocity.Value() / Constants.RPMToRad, 1e-3); - AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque); + AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque, 1e-2); var modData = new MockModalDataContainer(); Assert.IsTrue(gearbox.CurrentState.TorqueLossResult.Extrapolated); AssertHelper.Exception<VectoException>(() => { gearbox.CommitSimulationStep(modData); }); } - [TestCase(GearboxDataFile, EngineDataFile, 6.38, 9600, 1600, 9756.1054377), - TestCase(GearboxDataFile, EngineDataFile, 6.38, -9600, 1000, -9445.40776858)] + [TestCase(GearboxDataFile, EngineDataFile, 6.38, 96000, 1600, 96499.10109), + TestCase(GearboxDataFile, EngineDataFile, 6.38, -96000, 1000, -95502.403188)] public void Gearbox_LossMapExtrapolation_Engineering(string gbxFile, string engineFile, double ratio, double torque, double inAngularSpeed, double expectedTorque) { @@ -350,14 +350,14 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent Assert.AreEqual(absTime, port.AbsTime); Assert.AreEqual(dt, port.Dt); Assert.AreEqual(n, port.AngularVelocity); - AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque); + AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque, 1e-2); var modData = new MockModalDataContainer(); Assert.IsTrue(gearbox.CurrentState.TorqueLossResult.Extrapolated); gearbox.CommitSimulationStep(modData); } - [TestCase(GearboxDataFile, EngineDataFile, 6.38, 9600, 1600, true, 9756.10543), + [TestCase(GearboxDataFile, EngineDataFile, 6.38, 96000, 1600, true, 96499.10109), TestCase(GearboxDataFile, EngineDataFile, 6.38, -2500, 1000, false, -2443.5392), TestCase(GearboxDataFile, EngineDataFile, 6.38, -3000, 1000, false, -2933.73529)] public void Gearbox_LossMapExtrapolation_DryRun(string gbxFile, string engineFile, double ratio, double torque, @@ -387,7 +387,7 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent Assert.AreEqual(dt, port.Dt); Assert.AreEqual(n, port.AngularVelocity); Assert.AreEqual(extrapolated, gearbox.CurrentState.TorqueLossResult.Extrapolated); - AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque); + AssertHelper.AreRelativeEqual(expectedTorque.SI<NewtonMeter>(), port.Torque, 1e-2); var modData = new MockModalDataContainer(); gearbox.CommitSimulationStep(modData); diff --git a/VectoCore/VectoCoreTest/VectoCoreTest.csproj b/VectoCore/VectoCoreTest/VectoCoreTest.csproj index 2bccef5ae2aea4ccbc8ae09989a76e9aebbdc954..c986de6dbee901e06fecfc4015e5da326c966dbe 100644 --- a/VectoCore/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCore/VectoCoreTest/VectoCoreTest.csproj @@ -209,6 +209,10 @@ <Project>{79a066ad-69a9-4223-90f6-6ed5d2d084f4}</Project> <Name>VectoCommon</Name> </ProjectReference> + <ProjectReference Include="..\..\VectoCommon\VectoHashing\VectoHashing.csproj"> + <Project>{B673E12F-D323-4C4C-8805-9915B2C72D3D}</Project> + <Name>VectoHashing</Name> + </ProjectReference> <ProjectReference Include="..\..\VECTO\VECTO.vbproj"> <Project>{AAC0F132-0A9F-45B3-B682-77AC9B24B352}</Project> <Name>VECTO</Name>