Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 947636fc authored by Franz KOBER josef's avatar Franz KOBER josef
Browse files

added PEV primary bus E2 to reader

parent 7ba8ca51
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,7 @@ namespace TUGraz.VectoCommon.InputData { ...@@ -115,6 +115,7 @@ namespace TUGraz.VectoCommon.InputData {
case "Components_PEV-E2_LorryType": case "Components_PEV-E2_LorryType":
case "Components_PEV-E3_LorryType": case "Components_PEV-E3_LorryType":
case "Components_PEV-E4_LorryType": case "Components_PEV-E4_LorryType":
case "Components_PEV-E2_PrimaryBusType":
return $"E{pos}"; return $"E{pos}";
default: default:
return null; return null;
......
...@@ -24,11 +24,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider ...@@ -24,11 +24,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public const string XSD_TYPE = "AUX_Conventional_PrimaryBusType"; public const string XSD_TYPE = "AUX_Conventional_PrimaryBusType";
public const string XSD_HEV_P_TYPE = "AUX_HEV-P_PrimaryBusType"; public const string XSD_HEV_P_TYPE = "AUX_HEV-P_PrimaryBusType";
public const string XSD_HEV_S_TYPE = "AUX_HEV-S_PrimaryBusType"; public const string XSD_HEV_S_TYPE = "AUX_HEV-S_PrimaryBusType";
public const string XSD_PEV_E2_TYPE = "AUX_PEV_PrimaryBusType";
public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE); public static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public static readonly string QUALIFIED_XSD_HEV_P_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_P_TYPE); public static readonly string QUALIFIED_XSD_HEV_P_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_P_TYPE);
public static readonly string QUALIFIED_XSD_HEV_S_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_S_TYPE); public static readonly string QUALIFIED_XSD_HEV_S_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_S_TYPE);
public static readonly string QUALIFIED_XSD_PEV_E2_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_PEV_E2_TYPE);
public XMLDeclarationPrimaryBusAuxiliariesDataProviderV210( public XMLDeclarationPrimaryBusAuxiliariesDataProviderV210(
IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(componentNode) { } IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) : base(componentNode) { }
......
...@@ -99,7 +99,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider ...@@ -99,7 +99,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public virtual IBusAuxiliariesDeclarationData BusAuxiliaries => null; public virtual IBusAuxiliariesDeclarationData BusAuxiliaries => null;
public virtual IElectricStorageSystemDeclarationInputData ElectricStorage => _electricStorageSystemInputData ?? (_electricStorageSystemInputData = ComponentReader.ElectricStorageSystem); public virtual IElectricStorageSystemDeclarationInputData ElectricStorage => _electricStorageSystemInputData ?? (_electricStorageSystemInputData = ComponentReader.ElectricStorageSystem);
public virtual IElectricMachinesDeclarationInputData ElectricMachines => _electricMachinesInputData ?? (_electricMachinesInputData = ComponentReader.ElectricMachines); public virtual IElectricMachinesDeclarationInputData ElectricMachines => _electricMachinesInputData ?? (_electricMachinesInputData = ComponentReader.ElectricMachines);
public IIEPCDeclarationInputData IEPC => _iepcInputData ?? (_iepcInputData = ComponentReader.IEPCInputData); public virtual IIEPCDeclarationInputData IEPC => _iepcInputData ?? (_iepcInputData = ComponentReader.IEPCInputData);
#endregion #endregion
...@@ -428,4 +428,28 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider ...@@ -428,4 +428,28 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public XMLDeclarationHeavyLorryPEVExComponentDataV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) public XMLDeclarationHeavyLorryPEVExComponentDataV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { } : base(vehicle, componentNode, sourceFile) { }
} }
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusPEVE2ComponentDataV210 : XMLDeclarationComponentsDataProviderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Components_PEV-E2_PrimaryBusType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
private IBusAuxiliariesDeclarationData _busAuxiliariesDeclarationInputData;
public XMLDeclarationPrimaryBusPEVE2ComponentDataV210(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { }
#region Overrides of XMLDeclarationComponentsDataProviderV10
public override IEngineDeclarationInputData EngineInputData => null;
public override IIEPCDeclarationInputData IEPC => null;
public override IBusAuxiliariesDeclarationData BusAuxiliaries => _busAuxiliariesDeclarationInputData ??
(_busAuxiliariesDeclarationInputData = ComponentReader.BusAuxiliariesInputData);
#endregion
}
} }
\ No newline at end of file
...@@ -1429,4 +1429,22 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider ...@@ -1429,4 +1429,22 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion #endregion
} }
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPEVPrimaryBusDataProviderV210 : XMLDeclarationPEVMediumLorryExDataProviderV210
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Vehicle_PEV_PrimaryBusDeclarationType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationPEVPrimaryBusDataProviderV210(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile)
: base(jobData, xmlNode, sourceFile) { }
#region Overrides of XMLDeclarationVehicleDataProviderV10
public override CubicMeter CargoVolume => null;
#endregion
}
} }
\ No newline at end of file
...@@ -58,6 +58,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules ...@@ -58,6 +58,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVMediumLorryExDataProviderV210>() Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVMediumLorryExDataProviderV210>()
.Named(XMLDeclarationPEVMediumLorryExDataProviderV210.QUALIFIED_XSD_TYPE); .Named(XMLDeclarationPEVMediumLorryExDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationPEVPrimaryBusDataProviderV210>()
.Named(XMLDeclarationPEVPrimaryBusDataProviderV210.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>() Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationCompletedBusComponentsDataProviderV210>()
.Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE); .Named(XMLDeclarationCompletedBusComponentsDataProviderV210.QUALIFIED_XSD_TYPE);
...@@ -100,6 +103,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules ...@@ -100,6 +103,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHeavyLorryPEVExComponentDataV210>() Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHeavyLorryPEVExComponentDataV210>()
.Named(XMLDeclarationHeavyLorryPEVExComponentDataV210.QUALIFIED_XSD_PEV_E4_TYPE); .Named(XMLDeclarationHeavyLorryPEVExComponentDataV210.QUALIFIED_XSD_PEV_E4_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusPEVE2ComponentDataV210>()
.Named(XMLDeclarationPrimaryBusPEVE2ComponentDataV210.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV210_CompletedBus>().Named(XMLComponentReaderV210_CompletedBus.QUALIFIED_XSD_TYPE); Bind<IXMLComponentReader>().To<XMLComponentReaderV210_CompletedBus>().Named(XMLComponentReaderV210_CompletedBus.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV210_HEV_PxHeavyLorry>().Named(XMLComponentReaderV210_HEV_PxHeavyLorry.QUALIFIED_XSD_TYPE); Bind<IXMLComponentReader>().To<XMLComponentReaderV210_HEV_PxHeavyLorry>().Named(XMLComponentReaderV210_HEV_PxHeavyLorry.QUALIFIED_XSD_TYPE);
...@@ -137,6 +143,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules ...@@ -137,6 +143,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLComponentReader>().To<XMLPEVHeavyLorryE4DeclarationComponentReaderV201>() Bind<IXMLComponentReader>().To<XMLPEVHeavyLorryE4DeclarationComponentReaderV201>()
.Named(XMLPEVHeavyLorryE4DeclarationComponentReaderV201.QUALIFIED_XSD_TYPE); .Named(XMLPEVHeavyLorryE4DeclarationComponentReaderV201.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVPrimaryBusE2DeclarationComponentReaderV201>()
.Named(XMLPEVPrimaryBusE2DeclarationComponentReaderV201.QUALIFIED_XSD_TYPE);
Bind<IXMLGearboxReader>().To<XMLGearboxDeclarationComponentReaderV201>() Bind<IXMLGearboxReader>().To<XMLGearboxDeclarationComponentReaderV201>()
.Named(XMLGearboxDeclarationComponentReaderV201.GEARBOX_READER_QUALIFIED_XSD_TYPE); .Named(XMLGearboxDeclarationComponentReaderV201.GEARBOX_READER_QUALIFIED_XSD_TYPE);
...@@ -187,6 +196,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules ...@@ -187,6 +196,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>() Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>()
.Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_HEV_S_TYPE); .Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_HEV_S_TYPE);
Bind<IXMLBusAuxiliariesDeclarationData>().To<XMLDeclarationPrimaryBusAuxiliariesDataProviderV210>()
.Named(XMLDeclarationPrimaryBusAuxiliariesDataProviderV210.QUALIFIED_XSD_PEV_E2_TYPE);
Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV210>() Bind<IXMLDeclarationVehicleData>().To<XMLDeclarationMediumLorryVehicleDataProviderV210>()
.Named(XMLDeclarationMediumLorryVehicleDataProviderV210.QUALIFIED_XSD_TYPE); .Named(XMLDeclarationMediumLorryVehicleDataProviderV210.QUALIFIED_XSD_TYPE);
......
...@@ -891,9 +891,35 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl ...@@ -891,9 +891,35 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
#endregion #endregion
} }
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE2DeclarationComponentReaderV201 : XMLComponentReaderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V210_JOBS;
public new const string XSD_TYPE = "Components_PEV-E2_PrimaryBusType";
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
protected IBusAuxiliariesDeclarationData _busAuxInputData;
public XMLPEVPrimaryBusE2DeclarationComponentReaderV201(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
#region Overrides of XMLComponentReaderV10
public override IAuxiliariesDeclarationInputData AuxiliaryData => null;
public override IBusAuxiliariesDeclarationData BusAuxiliariesInputData =>
_busAuxInputData ?? (_busAuxInputData = CreateComponent(XMLNames.Component_Auxiliaries, BusAuxCreator));
protected virtual IBusAuxiliariesDeclarationData BusAuxCreator(string version, XmlNode componentNode, string sourceFile)
{
return Factory.CreateBusAuxiliaires(version, Vehicle, componentNode, sourceFile);
}
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLGearboxDeclarationComponentReaderV201 : XMLComponentReaderV10 public class XMLGearboxDeclarationComponentReaderV201 : XMLComponentReaderV10
{ {
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V2101_JOBS; public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V2101_JOBS;
......
...@@ -1250,6 +1250,37 @@ namespace TUGraz.VectoCore.Tests.XML ...@@ -1250,6 +1250,37 @@ namespace TUGraz.VectoCore.Tests.XML
} }
[TestCase(@"PrimaryBus\PEV_primaryBus_AMT_E2.xml")]
public void TestPEVPrimaryBusE2(string jobfile)
{
var filename = Path.Combine(BASE_DIR, jobfile);
var dataProvider = xmlInputReader.CreateDeclaration(XmlReader.Create(filename));
Assert.NotNull(dataProvider.JobInputData);
var vehicle = dataProvider.JobInputData.Vehicle;
Assert.NotNull(vehicle);
Assert.IsNull(vehicle.Components.EngineInputData);
Assert.IsNotNull(vehicle.Components.ElectricMachines);
Assert.AreEqual(1, vehicle.Components.ElectricMachines.Entries.Count);
Assert.AreEqual(PowertrainPosition.BatteryElectricE2, vehicle.Components.ElectricMachines.Entries[0].Position);
Assert.IsNull(vehicle.Components.IEPC);
Assert.IsNotNull(vehicle.Components.GearboxInputData);
TestTorqueConverter(vehicle);
Assert.IsNotNull(vehicle.Components.AngledriveInputData);
Assert.IsNotNull(vehicle.Components.RetarderInputData);
Assert.IsNotNull(vehicle.Components.AxleGearInputData);
Assert.IsNotNull(vehicle.Components.AxleWheels);
Assert.IsNull(vehicle.Components.AuxiliaryInputData);
Assert.IsNotNull(vehicle.Components.BusAuxiliaries);
Assert.IsNotNull(vehicle.Components.AirdragInputData);
Assert.IsNotNull(vehicle.Components.ElectricStorage);
Assert.IsNull(vehicle.Components.PTOTransmissionInputData);
Assert.IsNull(vehicle.CargoVolume);
Assert.IsNotNull(vehicle.TorqueLimits);
Assert.IsNotNull(vehicle.ElectricMotorTorqueLimits);
Assert.IsNull(vehicle.MaxPropulsionTorque);
}
#region Test existence of torque converter #region Test existence of torque converter
private void TestTorqueConverter(IVehicleDeclarationInputData vehicle) private void TestTorqueConverter(IVehicleDeclarationInputData vehicle)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment