From 6f73268221d3c8ef313cf3d4027f784843ba49bc Mon Sep 17 00:00:00 2001 From: Harald Martini <harald.martini@student.tugraz.at> Date: Tue, 15 Feb 2022 09:45:10 +0100 Subject: [PATCH] implemented Conventional Completed bus cif --- VECTO3GUI/Util/XML/XMLCompletedBus.cs | 2 +- .../XMLBusAuxiliariesWriter.cs | 2 +- .../BusHVACSystemConfiguration.cs | 2 +- .../CIFNinjectModule.cs | 28 ++---- .../CIFWriter/ComponentGroupWriters.cs | 36 ++++++-- .../CIFWriter/VehicleGroups.cs | 64 +++++++++++++- .../CIFWriter/VehicleWriter.cs | 35 +++++--- .../CustomerInformationFile.cs | 18 ++-- .../ICustomerInformationFileFactory.cs | 3 + .../CompletedBus/CompletedBusAuxiliaries.cs | 2 +- .../IMRFGroupWriter.cs | 5 ++ .../ManufacturerReport_0_9/todo.md | 87 ------------------- .../XMLMultistageBusReport.cs | 2 +- .../BusAuxHVACConventionalGroupWriter.cs | 2 +- .../Resources/XSD/VectoOutputCustomer.0.9.xsd | 23 +++-- .../Resources/XSD/VectoOutputDefinitions.xsd | 4 +- .../XSD/VectoOutputManufacturer.0.9.xsd | 5 ++ VectoCore/VectoCore/Utils/XMLHelper.cs | 19 ++++ .../CompletedBusSanityCheckTests.cs | 2 +- 19 files changed, 181 insertions(+), 160 deletions(-) delete mode 100644 VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/todo.md diff --git a/VECTO3GUI/Util/XML/XMLCompletedBus.cs b/VECTO3GUI/Util/XML/XMLCompletedBus.cs index 212977ea42..eb1cc9c1b0 100644 --- a/VECTO3GUI/Util/XML/XMLCompletedBus.cs +++ b/VECTO3GUI/Util/XML/XMLCompletedBus.cs @@ -177,7 +177,7 @@ namespace VECTO3GUI.Util.XML new XElement(_v26 + XMLNames.Bus_Brakelights, auxBus?.BrakelightsLED), new XElement(_v26 + XMLNames.Bus_Interiorlights, auxBus?.InteriorLightsLED))), new XElement(_v26 + "HVAC", - new XElement(_v26 + XMLNames.Bus_SystemConfiguration, auxBus?.SystemConfiguration.GetXmlFormat()), + new XElement(_v26 + XMLNames.Bus_SystemConfiguration, auxBus?.SystemConfiguration.ToXmlFormat()), new XElement(_v26 + XMLNames.Bus_CompressorType, new XElement(_v26 + XMLNames.Bus_DriverAC, auxBus?.CompressorTypeDriver.GetLabel()), new XElement(_v26 + XMLNames.Bus_PassengerAC, auxBus?.CompressorTypePassenger.GetLabel())), diff --git a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLBusAuxiliariesWriter.cs b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLBusAuxiliariesWriter.cs index e60a7c01bc..9c0374bdcc 100644 --- a/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLBusAuxiliariesWriter.cs +++ b/VECTO3GUI2020/Util/XML/Implementation/ComponentWriter/XMLBusAuxiliariesWriter.cs @@ -95,7 +95,7 @@ namespace VECTO3GUI2020.Util.XML.Implementation.ComponentWriter if (_inputData.HVACAux != null) { var hvacElement = new XElement(_defaultNamespace + "HVAC"); - hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_SystemConfiguration, _inputData.HVACAux.SystemConfiguration.GetXmlFormat())); + hvacElement.Add(new XElement(_defaultNamespace + XMLNames.Bus_SystemConfiguration, _inputData.HVACAux.SystemConfiguration.ToXmlFormat())); hvacElement.Add(GetHeatPumpGroupElement( xmlNameWrapper:XMLNames.Bus_HeatPumpTypeDriver, diff --git a/VectoCommon/VectoCommon/BusAuxiliaries/BusHVACSystemConfiguration.cs b/VectoCommon/VectoCommon/BusAuxiliaries/BusHVACSystemConfiguration.cs index 9da7b984e8..9d3a511d06 100644 --- a/VectoCommon/VectoCommon/BusAuxiliaries/BusHVACSystemConfiguration.cs +++ b/VectoCommon/VectoCommon/BusAuxiliaries/BusHVACSystemConfiguration.cs @@ -69,7 +69,7 @@ namespace TUGraz.VectoCommon.BusAuxiliaries { return hvacConfig.ToString().Replace(Prefix, ""); } - public static string GetXmlFormat(this BusHVACSystemConfiguration? hvacConfiguration) + public static string ToXmlFormat(this BusHVACSystemConfiguration? hvacConfiguration) { if (hvacConfiguration == BusHVACSystemConfiguration.Unknown) { return "0"; diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFNinjectModule.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFNinjectModule.cs index ac47730512..e3de958a9b 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFNinjectModule.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFNinjectModule.cs @@ -90,24 +90,6 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation true, false))); - Bind<IXMLCustomerReport>().To<PEV_IEPC_Lorry_CIF>().Named(nameCombinationMethod.Invoke( - ToParams( - VehicleCategoryHelper.Lorry, - VectoSimulationJobType.BatteryElectricVehicle, - ArchitectureID.E_IEPC, - false, - true, - false))); - - Bind<IXMLCustomerReport>().To<PEV_IEPC_Lorry_CIF>().Named(nameCombinationMethod.Invoke( - ToParams( - VehicleCategoryHelper.Lorry, - VectoSimulationJobType.BatteryElectricVehicle, - ArchitectureID.E_IEPC, - false, - true, - false))); - Bind<IXMLCustomerReport>().To<Conventional_CompletedBusCIF>().Named(nameCombinationMethod.Invoke( ToParams(VehicleCategoryHelper.CompletedBus, VectoSimulationJobType.ConventionalVehicle, @@ -179,6 +161,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation #region VehicleGroups Bind<IReportVehicleOutputGroup>().To<GeneralVehicleOutputSequenceGroupCif>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetGeneralVehicleSequenceGroupWriter()); + Bind<IReportCompletedBusOutputGroup>().To<GeneralVehicleOutputSequenceGroupCif>().When(AccessedViaCIFFactory) + .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetGeneralVehicleSequenceGroupWriterCompletedBus()); + Bind<IReportOutputGroup>().To<LorryGeneralVehicleSequenceGroupCIF>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetLorryGeneralVehicleSequenceGroupWriter()); Bind<IReportOutputGroup>().To<ConventionalLorryVehicleSequenceGroupCIF>().When(AccessedViaCIFFactory) @@ -191,13 +176,12 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetPEV_LorryVehicleTypeGroup()); Bind<IReportOutputGroup>().To<PEV_VehicleSequenceGroupWriter>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetPEV_VehicleSequenceGroupWriter()); - Bind<IReportOutputGroup>().To<CompletedBusVehicleTypeGroup>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetCompletedBusVehicleTypeGroup()); - + #endregion #region ComponentGroups - Bind<IReportOutputGroup>().To<ComponentGroupWriters>().When(AccessedViaCIFFactory) + Bind<IReportOutputGroup>().To<EngineGroup>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetEngineGroup()); Bind<IReportOutputGroup>().To<TransmissionGroup>().When(AccessedViaCIFFactory) .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetTransmissionGroup()); @@ -209,6 +193,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetREESSGroup()); Bind<IReportOutputGroup>().To<LorryAuxGroup>().When(AccessedViaCIFFactory). NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetLorryAuxGroup()); + Bind<IReportOutputGroup>().To<CompletedBusAuxGroup>().When(AccessedViaCIFFactory) + .NamedLikeFactoryMethod((ICustomerInformationFileFactory f) => f.GetCompletedBusAuxGroup()); #endregion diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/ComponentGroupWriters.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/ComponentGroupWriters.cs index 9ea6914b67..1f80ef5d25 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/ComponentGroupWriters.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/ComponentGroupWriters.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; +using TUGraz.VectoCommon.BusAuxiliaries; using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Resources; @@ -13,9 +14,9 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CIFWriter { - public class ComponentGroupWriters : AbstractCIFGroupWriter + public class EngineGroup : AbstractCIFGroupWriter { - public ComponentGroupWriters(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { } + public EngineGroup(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { } #region Overrides of AbstractCIFGroupWriter @@ -34,10 +35,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation var sortedFuels = fuelTypes.ToList(); sortedFuels.Sort((fuelType1, fuelType2) => fuelType1.CompareTo(fuelType2)); - sortedFuels.ForEach(type => fuelTypesXElement.Add(new XElement(_cif + XMLNames.Engine_FuelType, type))); + sortedFuels.ForEach(type => fuelTypesXElement.Add(new XElement(_cif + XMLNames.Engine_FuelType, type.ToXMLFormat()))); return new List<XElement>() { - new XElement(_cif + XMLNames.Engine_RatedPower, engine.RatedPowerDeclared.ValueAsUnit("kW")), + new XElement(_cif + "EngineRatedPower", engine.RatedPowerDeclared.ValueAsUnit("kW")), new XElement(_cif + "EngineCapacity", engine.Displacement.ValueAsUnit("ltr")), fuelTypesXElement }; @@ -135,7 +136,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation result.Add(new XElement(_cif + "TotalRatedPropulsionPower", totalRatedPropulsionPower.ValueAsUnit("kW"))); - result.Add(new XElement(_cif + "MaxContinousPropulsionPower", "TODO")); + result.Add(new XElement(_cif + "MaxContinousPropulsionPower", totalRatedPropulsionPower.ValueAsUnit("kW"))); //TODO: use max ContinuousPropulsionPower @@ -161,8 +162,29 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation .Sum(bp => bp.Capacity); var totalUsableCapacity = batteries.Sum(bp => bp.TotalUsableCapacityInSimulation()); return new List<XElement>() { - new XElement(_cif + "TotalStorageCapacity", totalUsableCapacity), - new XElement(_cif + "UsableStorageCapacity", totalStorageCapacity) + new XElement(_cif + "TotalStorageCapacity", totalUsableCapacity.ValueAsUnit("Ah", 0)), + new XElement(_cif + "UsableStorageCapacity", totalStorageCapacity.ValueAsUnit("Ah", 0)) + }; + } + + #endregion + } + + public class CompletedBusAuxGroup : AbstractCIFGroupWriter + { + public CompletedBusAuxGroup(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { } + + #region Overrides of AbstractCIFGroupWriter + + public override IList<XElement> GetElements(IDeclarationInputDataProvider inputData) + { + var consolidatedAuxData = ((IMultistageBusInputDataProvider)inputData).JobInputData.ConsolidateManufacturingStage.Vehicle.Components.BusAuxiliaries; + return new List<XElement>() { + new XElement(_cif + XMLNames.BusAux_HVAC, + new XElement(_cif + XMLNames.Bus_SystemConfiguration, + consolidatedAuxData.HVACAux.SystemConfiguration.ToXmlFormat()), + new XElement(_cif + "AuxiliaryHeaterPower", consolidatedAuxData.HVACAux.AuxHeaterPower), + new XElement(_cif + XMLNames.Bus_DoubleGlazing, consolidatedAuxData.HVACAux.DoubleGlazing)) }; } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleGroups.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleGroups.cs index 3973d3e7be..61e60953dd 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleGroups.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleGroups.cs @@ -12,7 +12,7 @@ using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CIFWriter { - public class GeneralVehicleOutputSequenceGroupCif : AbstractCIFGroupWriter, IReportVehicleOutputGroup + public class GeneralVehicleOutputSequenceGroupCif : AbstractCIFGroupWriter, IReportVehicleOutputGroup, IReportCompletedBusOutputGroup { public GeneralVehicleOutputSequenceGroupCif(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { } @@ -41,6 +41,24 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation } #endregion + + #region Implementation of IReportCompletedBusOutputGroup + + public IList<XElement> GetElements(IMultistageBusInputDataProvider multiStageInputDataProvider) + { + var consolidatedVehicleData = multiStageInputDataProvider.JobInputData.ConsolidateManufacturingStage.Vehicle; + var primary = multiStageInputDataProvider.JobInputData.PrimaryVehicle.Vehicle; + var result = new List<XElement>() { + new XElement(_cif + XMLNames.Vehicle_VIN, consolidatedVehicleData.VIN), + new XElement(_cif + XMLNames.Vehicle_VehicleCategory, consolidatedVehicleData.LegislativeClass.ToXMLFormat()), + new XElement(_cif + XMLNames.Vehicle_AxleConfiguration, primary.AxleConfiguration.ToXMLFormat()), + new XElement(_cif + XMLNames.Vehicle_TPMLM, XMLHelper.ValueAsUnit(consolidatedVehicleData.GrossVehicleMassRating, "kg")), + new XElement(_cif + XMLNames.Report_Vehicle_VehicleGroup, consolidatedVehicleData.VehicleCategory.ToXMLFormat()) + }; + return result; + } + + #endregion } @@ -180,6 +198,13 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public class CompletedBusVehicleTypeGroup : AbstractCIFGroupWriter { + private XElement GetManufacturerAndAddress(string manufacturer, string manufacturerAddress, int stepCount) + { + return new XElement(_cif + "Step", + new XAttribute(XMLNames.ManufacturingStep_StepCount, stepCount), + new XElement(_cif + XMLNames.Component_Manufacturer, manufacturer), + new XElement(_cif + XMLNames.Component_ManufacturerAddress, manufacturerAddress)); + } public CompletedBusVehicleTypeGroup(ICustomerInformationFileFactory cifFactory) : base(cifFactory) { } #region Overrides of AbstractCIFGroupWriter @@ -187,11 +212,46 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override IList<XElement> GetElements(IDeclarationInputDataProvider inputData) { var completedBusData = inputData as IMultistageBusInputDataProvider; + if (completedBusData == null) { + throw new ArgumentException( + $"{nameof(inputData)} must implement {nameof(IMultistageBusInputDataProvider)}"); + } var result = new List<XElement>(); - result.AddRange(_cifFactory.GetGeneralVehicleSequenceGroupWriter().GetElements(completedBusData.JobInputData.ConsolidateManufacturingStage.Vehicle)); + result.AddRange( + _cifFactory.GetGeneralVehicleSequenceGroupWriterCompletedBus().GetElements(completedBusData)); + result.Add(GetManufacturers(completedBusData)); + + + + var consolidatedVehicle = completedBusData.JobInputData.ConsolidateManufacturingStage.Vehicle; + result.AddRange(new List<XElement>() { + new XElement(_cif + XMLNames.CorrectedActualMass, consolidatedVehicle.CurbMassChassis), + new XElement(_cif + XMLNames.Vehicle_ZeroEmissionVehicle, consolidatedVehicle.ZeroEmissionVehicle), + new XElement(_cif + XMLNames.Vehicle_HybridElectricHDV, consolidatedVehicle.HybridElectricHDV), + new XElement(_cif + XMLNames.Vehicle_RegisteredClass, consolidatedVehicle.RegisteredClass.ToXMLFormat()), + new XElement(_cif + "TotalNumberOfPassengers", consolidatedVehicle.NumberPassengerSeatsLowerDeck + + consolidatedVehicle.NumberPassengerSeatsUpperDeck + + consolidatedVehicle.NumberPassengersStandingLowerDeck + + consolidatedVehicle.NumberPassengersStandingUpperDeck), + consolidatedVehicle.VehicleTypeApprovalNumber != null ? new XElement(_cif + XMLNames.VehicleTypeApprovalNumber, consolidatedVehicle.VehicleTypeApprovalNumber) : null + }); + return result; } + private XElement GetManufacturers(IMultistageBusInputDataProvider completedBusData) + { + var manufacturers = new XElement(_cif + "Manufacturers", + GetManufacturerAndAddress(completedBusData.JobInputData.PrimaryVehicle.Vehicle.Manufacturer, + completedBusData.JobInputData.PrimaryVehicle.Vehicle.ManufacturerAddress, 1)); + foreach (var step in completedBusData.JobInputData.ManufacturingStages) { + manufacturers.Add(GetManufacturerAndAddress(step.Vehicle.Manufacturer, step.Vehicle.ManufacturerAddress, + step.StepCount)); + } + + return manufacturers; + } + #endregion } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleWriter.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleWriter.cs index 7be6f98bab..521dca8580 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CIFWriter/VehicleWriter.cs @@ -12,6 +12,7 @@ using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.InputData.FileIO.JSON; using TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CustomerInformationFile; using TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport.ManufacturerReport_0_9.ManufacturerReportXMLTypeWriter; +using TUGraz.VectoCore.Utils; namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformationFile.CustomerInformationFile_0_9.CIFWriter { @@ -44,8 +45,8 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation protected XElement GetAxleRatio(IDeclarationInputDataProvider inputData, bool optional = false) { if (!optional || (inputData.JobInputData.Vehicle.Components.AxleGearInputData != null)) { - return new XElement(_cif + XMLNames.Axlegear_Ratio, - inputData.JobInputData.Vehicle.Components.AxleGearInputData.Ratio.ToXMLFormat(2)); + return new XElement(_cif + "AxleRatio", + inputData.JobInputData.Vehicle.Components.AxleGearInputData.Ratio.ToXMLFormat(3)); } else { return null; } @@ -71,7 +72,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation _cifFactory.GetGeneralVehicleSequenceGroupWriter().GetElements(inputData.JobInputData.Vehicle), _cifFactory.GetLorryGeneralVehicleSequenceGroupWriter().GetElements(inputData), _cifFactory.GetConventionalLorryVehicleSequenceGroupWriter().GetElements(inputData), - _mrfFactory.GetConventionalADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetConventionalADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), _cifFactory.GetTransmissionGroup().GetElements(inputData), GetRetarder(inputData), @@ -97,9 +98,12 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetHEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), _cifFactory.GetTransmissionGroup().GetElements(inputData), + GetRetarder(inputData), + GetAxleRatio(inputData), + _cifFactory.GetAxleWheelsGroup().GetElements(inputData), _cifFactory.GetElectricMachineGroup().GetElements(inputData), _cifFactory.GetREESSGroup().GetElements(inputData), _cifFactory.GetLorryAuxGroup().GetElements(inputData) @@ -119,7 +123,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetHEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), _cifFactory.GetTransmissionGroup().GetElements(inputData), GetRetarder(inputData), @@ -144,7 +148,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetHEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), GetRetarder(inputData), GetAxleRatio(inputData), @@ -168,7 +172,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetHEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), _cifFactory.GetAxleWheelsGroup().GetElements(inputData), _cifFactory.GetElectricMachineGroup().GetElements(inputData), @@ -190,7 +194,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetHEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetHEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetEngineGroup().GetElements(inputData), GetRetarder(inputData), GetAxleRatio(inputData, true), @@ -214,7 +218,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetPEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetTransmissionGroup().GetElements(inputData), GetRetarder(inputData), GetAxleRatio(inputData), @@ -238,7 +242,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetPEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), GetRetarder(inputData), GetAxleRatio(inputData), _cifFactory.GetAxleWheelsGroup().GetElements(inputData), @@ -261,7 +265,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetPEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), _cifFactory.GetAxleWheelsGroup().GetElements(inputData), _cifFactory.GetElectricMachineGroup().GetElements(inputData), _cifFactory.GetREESSGroup().GetElements(inputData), @@ -282,7 +286,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation { return new XElement(_cif + XMLNames.Component_Vehicle, _cifFactory.GetPEV_LorryVehicleTypeGroup().GetElements(inputData), - _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS), + _mrfFactory.GetPEVADASType().GetXmlType(inputData.JobInputData.Vehicle.ADAS).WithXName(_cif + "ADAS"), GetRetarder(inputData), GetAxleRatio(inputData, true), _cifFactory.GetAxleWheelsGroup().GetElements(inputData), @@ -304,7 +308,12 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override XElement GetElement(IDeclarationInputDataProvider inputData) { return new XElement(_cif + XMLNames.Component_Vehicle, - _cifFactory.GetCompletedBusVehicleTypeGroup().GetElements(inputData)); + _cifFactory.GetCompletedBusVehicleTypeGroup().GetElements(inputData), + _mrfFactory.GetConventionalADASType().GetXmlType(((IMultistageBusInputDataProvider)inputData) + .JobInputData + .ConsolidateManufacturingStage.Vehicle.ADAS).WithXName(_cif + "ADAS"), + _cifFactory.GetCompletedBusAuxGroup().GetElements(inputData) + ); } #endregion diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs index bb9aaff209..5595d6b315 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/CustomerInformationFile/CustomerInformationFile.cs @@ -69,7 +69,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetHEV_S2_LorryVehicleType().GetElement(inputData); - GenerateReport("HEV_S2_LorryVehicleType"); + GenerateReport("HEV_S2_LorryOutputType"); } #endregion @@ -84,7 +84,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetHEV_S3_LorryVehicleType().GetElement(inputData); - GenerateReport("HEV_S3_LorryVehicleType"); + GenerateReport("HEV_S3_LorryOutputType"); } #endregion @@ -99,7 +99,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetHEV_S4_LorryVehicleType().GetElement(inputData); - GenerateReport("HEV_S4_LorryVehicleType"); + GenerateReport("HEV_S4_LorryOutputType"); } #endregion @@ -114,7 +114,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetHEV_IEPC_LorryVehicleType().GetElement(inputData); - GenerateReport("HEV_IEPC_S_LorryVehicleType"); + GenerateReport("HEV_IEPC_S_LorryOutputType"); } #endregion @@ -129,7 +129,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetPEV_E2_LorryVehicleType().GetElement(inputData); - GenerateReport("PEV_E2_LorryVehicleType"); + GenerateReport("PEV_E2_LorryOutputType"); } #endregion @@ -144,7 +144,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetPEV_E3_LorryVehicleType().GetElement(inputData); - GenerateReport("PEV_E3_LorryVehicleType"); + GenerateReport("PEV_E3_LorryOutputType"); } #endregion @@ -159,7 +159,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetPEV_E4_LorryVehicleType().GetElement(inputData); - GenerateReport("PEV_E4_LorryVehicleType"); + GenerateReport("PEV_E4_LorryOutputType"); } #endregion @@ -174,7 +174,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetPEV_IEPC_LorryVehicleType().GetElement(inputData); - GenerateReport("PEV_IEPC_LorryVehicleType"); + GenerateReport("PEV_IEPC_LorryOutputType"); } #endregion @@ -214,7 +214,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation public override void InitializeVehicleData(IDeclarationInputDataProvider inputData) { Vehicle = _cifFactory.GetHEV_CompletedBusVehicleType().GetElement(inputData); - GenerateReport("HEV_CompltedBusOutputType"); + GenerateReport("HEV_CompletedBusOutputType"); } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs index 5ff8e3eae9..835445c05e 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/CustomerInformationFile/CustomerInformationFile_0_9/ICustomerInformationFileFactory.cs @@ -41,6 +41,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation IReportOutputGroup GetTransmissionGroup(); IReportOutputGroup GetAxleWheelsGroup(); IReportOutputGroup GetLorryAuxGroup(); + IReportOutputGroup GetCompletedBusAuxGroup(); IReportOutputGroup GetHEV_VehicleSequenceGroupWriter(); IReportOutputGroup GetHEV_LorryVehicleTypeGroup(); IReportOutputGroup GetElectricMachineGroup(); @@ -48,5 +49,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation IReportOutputGroup GetPEV_LorryVehicleTypeGroup(); IReportOutputGroup GetPEV_VehicleSequenceGroupWriter(); IReportOutputGroup GetCompletedBusVehicleTypeGroup(); + IReportCompletedBusOutputGroup GetGeneralVehicleSequenceGroupWriterCompletedBus(); + } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/CompletedBus/CompletedBusAuxiliaries.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/CompletedBus/CompletedBusAuxiliaries.cs index 84a7200316..5775b44746 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/CompletedBus/CompletedBusAuxiliaries.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/CompletedBus/CompletedBusAuxiliaries.cs @@ -35,7 +35,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. { return new List<XElement>() { new XElement(_mrf + XMLNames.Bus_SystemConfiguration, - busAuxiliaries.HVACAux.SystemConfiguration.GetXmlFormat()), + busAuxiliaries.HVACAux.SystemConfiguration.ToXmlFormat()), new XElement(_mrf + XMLNames.Bus_HeatPumpTypeDriver, new XElement(_mrf + XMLNames.BusHVACHeatPumpCooling, busAuxiliaries.HVACAux.HeatPumpTypeCoolingDriverCompartment.GetLabel()), diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/IMRFGroupWriter.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/IMRFGroupWriter.cs index b8135ad5df..e1da3ed0ad 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/IMRFGroupWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/ManufacturerReportGroupWriter/IMRFGroupWriter.cs @@ -17,4 +17,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.ManufacturerReport. { IList<XElement> GetElements(IVehicleDeclarationInputData vehicleData); } + + public interface IReportCompletedBusOutputGroup + { + IList<XElement> GetElements(IMultistageBusInputDataProvider multiStageInputDataProvider); + } } diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/todo.md b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/todo.md deleted file mode 100644 index a091e9e2ef..0000000000 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/ManufacturerReport/ManufacturerReport_0_9/todo.md +++ /dev/null @@ -1,87 +0,0 @@ -///------------------- CIF ------------------- -[ ] Component Order - - - - - - - - -[ ] unit as attribute, define type of unit in OutputDefinitions, add attribute to element - - - GetValueAsUnit - - - - - - -///--------------------- MRF ------------------- - - -[ ] ??? BoostingLimitations not implemented ? - -[ ] TODO: Electricmachine xsd update - -[ ] TODO: IEPC MaxContinuousPower ? attribute voltage (attribute) MaxContinuousPower = COntinousTorque * TestSpeedContinuous Torqe (auch bei electric machine) per voltage level - [ ] Not implemented yet ? not up to date - - -[ ] REESS Battery Total Usable Capacity in simulation (aus run daten) (eigene Methode) Helper Methode - -[ ] Completed Bus Primary Manufacturer as step 1 manufacturer ? yes! - -[ ] Off vehicle charging max power - - -[X] VehicleTypeApprovalNumber completed bus mandatory ? leave optional - - -[ ] BusAux Electric System Max AlternatorPower, select alternator where RatedCurrent * RatedVoltage max. (aus run daten, helper methode !!) (now alternator where RatedCurrent * RatedVoltage is max.) - -[ ] unit as attribute, define type of unit in OutputDefinitions, add attribute to element - - - -[x] TODO: Update REESS specifications in XSD schema according to output. (SuperCap!) -[x] BusAux Electric System ElectricStorage, (currently: sum of electric storages) convert to wh oder kWh einheit einheit als attribut in xml - -///--------------------------- DONE ----------------------- - -[x] Look into axlewheels () - -[X] Reess battery and supercap update in xml schema - - - -[X] BusAux SmartCompression system not in inputdata for HEV (update xsd scheme) - - -[V] TODO: ?? REESS specifications per battery system - sortiert nach string id aufsteigend -[x] TODO: HEV_IEPC_S_LorryManufacturerReport -[X] REESS Battery Nominal voltage //Calculated based on table ANNEXES_LS Page 290 -[X] Split electric system in Conventional/HEV and PEV, (PEV has no alternator) - -[x] Vehicle Type Approval number (MRF(x)/CIF) - - - - - - -ComponentOrder - -Engine -Transmission -Retarder -TorqueConverter -Angledrive -ElectricMachines -IEPC -REESS -AirDrag -AxleGear -AxleWheels -Auxiliaries \ No newline at end of file diff --git a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs index 7349f080ee..dffaa0e5f6 100644 --- a/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs +++ b/VectoCore/VectoCore/OutputData/XML/DeclarationReports/VehicleInformationFile/XMLMultistageBusReport.cs @@ -510,7 +510,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF return new XElement(v24 + XMLNames.BusAux_HVAC, hvac.SystemConfiguration != null - ? new XElement(v24 + XMLNames.Bus_SystemConfiguration, hvac.SystemConfiguration.GetXmlFormat()) : null, + ? new XElement(v24 + XMLNames.Bus_SystemConfiguration, hvac.SystemConfiguration.ToXmlFormat()) : null, hvac.HeatPumpTypeCoolingDriverCompartment != null && hvac.HeatPumpTypeHeatingDriverCompartment != null ? new XElement(v24 + XMLNames.Bus_HeatPumpTypeDriver, new XElement(v24 + XMLNames.BusHVACHeatPumpCooling, hvac.HeatPumpTypeCoolingDriverCompartment.GetLabel()), diff --git a/VectoCore/VectoCore/OutputData/XML/GroupWriter/Declaration/Vehicle/Components/Auxiliaries/BusAuxHVACConventionalGroupWriter.cs b/VectoCore/VectoCore/OutputData/XML/GroupWriter/Declaration/Vehicle/Components/Auxiliaries/BusAuxHVACConventionalGroupWriter.cs index 34b659e3e6..96f5e6abe2 100644 --- a/VectoCore/VectoCore/OutputData/XML/GroupWriter/Declaration/Vehicle/Components/Auxiliaries/BusAuxHVACConventionalGroupWriter.cs +++ b/VectoCore/VectoCore/OutputData/XML/GroupWriter/Declaration/Vehicle/Components/Auxiliaries/BusAuxHVACConventionalGroupWriter.cs @@ -29,7 +29,7 @@ namespace TUGraz.VectoCore.OutputData.XML.GroupWriter.Declaration.Vehicle.Compon var elements = new List<XElement>(); elements.Add(new XElement(_writerNamespace + XMLNames.Bus_SystemConfiguration, - aux.HVACAux.SystemConfiguration.GetXmlFormat())); + aux.HVACAux.SystemConfiguration.ToXmlFormat())); elements.AddRange(_groupWriterFactory .GetBusAuxiliariesDeclarationGroupWriter(GroupNames.BusAuxHVACHeatPumpSequenceGroup, _writerNamespace) diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd index f73050bb2e..5f6c0bdf0f 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputCustomer.0.9.xsd @@ -121,12 +121,13 @@ <xs:complexType name="HEV_S2_LorryVehicleType"> <xs:sequence> <xs:group ref="HEV_LorryVehicleTypeGroup"/> + <xs:element name="ADAS" type="mrf:HEVADASType"/> <xs:group ref="EngineGroup"/> <xs:group ref="TransmissionGroup"/> <xs:element name="Retarder"/> <xs:element name="AxleRatio"/> <xs:group ref="AxleWheelsGroup"/> - <xs:element name="ADAS" type="mrf:HEVADASType"/> + <xs:group ref="ElectricMachineGroup"/> <xs:group ref="REESSGroup"/> <xs:group ref="LorryAuxGroup"/> @@ -135,11 +136,11 @@ <xs:complexType name="HEV_S3_LorryVehicleType"> <xs:sequence> <xs:group ref="HEV_LorryVehicleTypeGroup"/> + <xs:element name="ADAS" type="mrf:HEVADASType"/> <xs:group ref="EngineGroup"/> <xs:element name="Retarder"/> <xs:element name="AxleRatio"/> <xs:group ref="AxleWheelsGroup"/> - <xs:element name="ADAS" type="mrf:HEVADASType"/> <xs:group ref="ElectricMachineGroup"/> <xs:group ref="REESSGroup"/> <xs:group ref="LorryAuxGroup"/> @@ -198,8 +199,6 @@ <xs:sequence> <xs:group ref="PEV_LorryVehicleTypeGroup"/> <xs:element name="ADAS" type="mrf:PEVADASType"/> - <xs:element name="Retarder"/> - <xs:element name="AxleRatio"/> <xs:group ref="AxleWheelsGroup"/> <xs:group ref="ElectricMachineGroup"/> <xs:group ref="REESSGroup"/> @@ -248,7 +247,7 @@ <xs:element name="Model"/> <xs:element name="CorrectedActualMass"/> <xs:element name="SleeperCab"/> - <xs:element name="ZeroEmissionHDV"/> + <xs:element name="ZeroEmissionVehicle"/> <xs:element name="HybridElectricHDV"/> </xs:sequence> </xs:complexType> @@ -265,7 +264,7 @@ <xs:element name="Manufacturer"/> <xs:element name="ManufacturerAddress"/> </xs:sequence> - <xs:attribute name="Count" type="xs:int"/> + <xs:attribute name="stepCount" type="xs:int"/> </xs:complexType> </xs:element> </xs:sequence> @@ -274,7 +273,7 @@ </xs:sequence> <xs:sequence> <xs:element name="CorrectedActualMass"/> - <xs:element name="ZeroEmissionHDV"/> + <xs:element name="ZeroEmissionVehicle"/> <xs:element name="HybridElectricHDV"/> <xs:element name="ClassBus"/> <xs:element name="TotalNumberOfPassengers"/> @@ -316,7 +315,7 @@ </xs:element> <xs:element name="VocationalVehicle" type="v1.0:VocationalVehicleType"/> <xs:element name="SleeperCab" type="v1.0:SleeperCabType"/> - <xs:element name="ZeroEmissionHDV" type="v1.0:ZeroEmissionVehicleType"/> + <xs:element name="ZeroEmissionVehicle" type="v1.0:ZeroEmissionVehicleType"/> <xs:element name="HybridElectricHDV" type="v1.0:HybridElectricHDVType"/> </xs:sequence> </xs:group> @@ -372,7 +371,7 @@ <xs:element name="Manufacturer"/> <xs:element name="ManufacturerAddress"/> </xs:sequence> - <xs:attribute name="Count" type="xs:int"/> + <xs:attribute name="stepCount" type="xs:int"/> </xs:complexType> </xs:element> </xs:sequence> @@ -381,7 +380,7 @@ </xs:sequence> <xs:sequence> <xs:element name="CorrectedActualMass"/> - <xs:element name="ZeroEmissionHDV"/> + <xs:element name="ZeroEmissionVehicle"/> <xs:element name="HybridElectricHDV"/> <xs:element name="ClassBus"/> <xs:element name="TotalNumberOfPassengers"/> @@ -428,7 +427,7 @@ <xs:group name="AxleWheelsGroup"> <xs:sequence> <xs:element name="AverageRRC" type="v1.0:TyreRRCISOType"/> - <xs:element name="Axle"> + <xs:element name="Axle" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="TyreDimension" type="v2.3:TyreDimensionType"/> @@ -491,7 +490,7 @@ </xs:group> <xs:group name="CompletedBusAuxGroup"> <xs:sequence> - <xs:element name="HVACSystem"> + <xs:element name="HVAC"> <xs:complexType> <xs:sequence> <xs:element name="SystemConfiguration"/> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputDefinitions.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputDefinitions.xsd index 3b5e8a0f0c..21584288ec 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputDefinitions.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputDefinitions.xsd @@ -39,8 +39,8 @@ </xs:simpleType> <xs:simpleType name="StorageCapacityUnitType"> <xs:restriction base="xs:token"> - <xs:enumeration value="kWh"/> - <xs:enumeration value="Wh"/> + <xs:enumeration value="As"/> + <xs:enumeration value="Ah"/> </xs:restriction> </xs:simpleType> </xs:schema> diff --git a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd index 8f5982665b..b2ec5c9740 100644 --- a/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd +++ b/VectoCore/VectoCore/Resources/XSD/VectoOutputManufacturer.0.9.xsd @@ -1472,4 +1472,9 @@ <xs:enumeration value="Other technology Article 9 exempted"/> </xs:restriction> </xs:simpleType> + + <xs:simpleType name="SteeringPumpOutput"> + <xs:union memberTypes="v2.4:AuxSPTechnologyLorryType v2.4:AuxSPTechnology_HEV-S_LorryType v2.4:AuxSPTechnology_PEV_LorryType"> + </xs:union> + </xs:simpleType> </xs:schema> diff --git a/VectoCore/VectoCore/Utils/XMLHelper.cs b/VectoCore/VectoCore/Utils/XMLHelper.cs index a8d38c812f..f4b2ea4604 100644 --- a/VectoCore/VectoCore/Utils/XMLHelper.cs +++ b/VectoCore/VectoCore/Utils/XMLHelper.cs @@ -98,6 +98,19 @@ namespace TUGraz.VectoCore.Utils throw new NotImplementedException($"unknown unit '{unit}'"); } + public static object[] ValueAsUnit(this AmpereSecond capacity, string unit, uint? decimals = 0) + { + switch (unit) + { + case "As": return GetValueAsUnit(capacity.Value(), unit, decimals); + case "Ah": return GetValueAsUnit(capacity?.AsAmpHour, unit, decimals); + } + + throw new NotImplementedException($"unknown unit '{unit}'"); + } + + + public static object[] ValueAsUnit(this CubicMeter volume, string unit, uint? decimals = 0) { switch (unit) { @@ -330,5 +343,11 @@ namespace TUGraz.VectoCore.Utils xElement.AddIfContentNotNull(element); } } + + public static XElement WithXName(this XElement xElement, XName xName) + { + xElement.Name = xName; + return xElement; + } } } \ No newline at end of file diff --git a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs index 44c69ecd1e..25b57db546 100644 --- a/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs +++ b/VectoCore/VectoCoreTest/Integration/CompletedBus/CompletedBusSanityCheckTests.cs @@ -132,7 +132,7 @@ namespace TUGraz.VectoCore.Tests.Integration.CompletedBus completedXML.Load(completedJob); var hvacCfgNode = completedXML.SelectSingleNode("//*[local-name()='SystemConfiguration']"); - hvacCfgNode.InnerText = hvacConfig.GetXmlFormat(); + hvacCfgNode.InnerText = hvacConfig.ToXmlFormat(); var airDuctsNode = completedXML.SelectSingleNode("//*[local-name()='SeparateAirDistributionDucts']"); airDuctsNode.InnerText = XmlConvert.ToString(separateDucts); -- GitLab