Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit d5914b80 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

feat: partial implementation for new vehicle battery (vecto/vecto!337)

mr: vecto/vecto!337

issue: n.a.
parents e076e07e e2e8f9b2
Branches test/nuget_publish
Tags Nuget/v0.11.4-DEV
No related merge requests found
Showing
with 415 additions and 48 deletions
......@@ -223,6 +223,12 @@ Public Class Battery
End Get
End Property
Public ReadOnly Property DeteriorationPerformanceRatio As Double? Implements IBatteryPackDeclarationInputData.DeteriorationPerformanceRatio
Get
Return Nothing
End Get
End Property
Public ReadOnly Property BatteryType As BatteryType Implements IBatteryPackDeclarationInputData.BatteryType
Public ReadOnly Property Capacity As AmpereSecond Implements IBatteryPackDeclarationInputData.Capacity
......
......@@ -1120,6 +1120,7 @@ Public Class ElectricStorageWrapper
Public ReadOnly Property DigestValue As DigestData Implements IComponentInputData.DigestValue
Public ReadOnly Property MinSOC As Double? Implements IBatteryPackDeclarationInputData.MinSOC
Public ReadOnly Property MaxSOC As Double? Implements IBatteryPackDeclarationInputData.MaxSOC
Public ReadOnly Property DeteriorationPerformanceRatio As Double? Implements IBatteryPackDeclarationInputData.DeteriorationPerformanceRatio
Public ReadOnly Property BatteryType As BatteryType Implements IBatteryPackDeclarationInputData.BatteryType
Public ReadOnly Property Capacity As AmpereSecond Implements IBatteryPackDeclarationInputData.Capacity
Public ReadOnly Property ConnectorsSubsystemsIncluded As Boolean? Implements IBatteryPackDeclarationInputData.ConnectorsSubsystemsIncluded
......
......@@ -1021,6 +1021,8 @@ namespace TUGraz.VectoCommon.InputData
double? MaxSOC { get; }
double? DeteriorationPerformanceRatio { get; }
BatteryType BatteryType { get; }
AmpereSecond Capacity { get; }
......
......@@ -29,6 +29,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
public double? MinSOC => Body.GetEx<double>("SOC_min") / 100.0;
public double? MaxSOC => Body.GetEx<double>("SOC_max") / 100.0;
public double? DeteriorationPerformanceRatio => null;
public BatteryType BatteryType { get; }
AmpereSecond IBatteryPackDeclarationInputData.Capacity => Body.GetEx<double>("Capacity").SI(Unit.SI.Ampere.Hour).Cast<AmpereSecond>();
......
......@@ -586,6 +586,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHEVPxLorryComponentsDataProviderV27 : XMLDeclarationHEVPxLorryComponentsDataProviderV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationHEVPxLorryComponentsDataProviderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile) :
base(vehicle, componentNode, sourceFile)
{ }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHevs2LorryComponentsDataProviderV24 : XMLDeclarationHEVPxLorryComponentsDataProviderV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -663,6 +675,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV27 : XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV27(IXMLDeclarationVehicleData vehicle,
XmlNode componentNode, string sourceFile) : base(vehicle, componentNode, sourceFile)
{ }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusHEVS2ComponentDataProviderV24 : XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -768,6 +792,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHeavyLorryPEVE2ComponentDataV27 : XMLDeclarationHeavyLorryPEVE2ComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationHeavyLorryPEVE2ComponentDataV27(IXMLDeclarationVehicleData vehicle,
XmlNode componentNode, string sourceFile) : base(vehicle, componentNode, sourceFile)
{ }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHeavyLorryPevExComponentDataV24 : XMLDeclarationHeavyLorryPEVE2ComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -781,6 +817,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationHeavyLorryPevExComponentDataV27 : XMLDeclarationHeavyLorryPevExComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public new static readonly string QUALIFIED_XSD_PEV_E4_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_PEV_E4_TYPE);
public XMLDeclarationHeavyLorryPevExComponentDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile) { }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusPEVE2ComponentDataV24 : XMLDeclarationComponentsDataProviderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -812,6 +860,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusPEVE2ComponentDataV27 : XMLDeclarationPrimaryBusPEVE2ComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationPrimaryBusPEVE2ComponentDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile)
{ }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusPevExComponentDataV24 : XMLDeclarationPrimaryBusPEVE2ComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -827,6 +887,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationPrimaryBusPevExComponentDataV27 : XMLDeclarationPrimaryBusPevExComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public new static readonly string QUALIFIED_XSD_PEV_E4_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_PEV_E4_TYPE);
public XMLDeclarationPrimaryBusPevExComponentDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode,
string sourceFile) : base(vehicle, componentNode, sourceFile) { }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCHeavyLorryComponentDataV24 : XMLDeclarationComponentsDataProviderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -852,6 +924,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCHeavyLorryComponentDataV27 : XMLDeclarationIEPCHeavyLorryComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationIEPCHeavyLorryComponentDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile)
{ }
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCPrimaryBusComponentDataV24 : XMLDeclarationPrimaryBusComponentsDataProviderV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -871,4 +955,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLDeclarationIEPCPrimaryBusComponentDataV27 : XMLDeclarationIEPCPrimaryBusComponentDataV24
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationIEPCPrimaryBusComponentDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile)
{ }
}
}
\ No newline at end of file
......@@ -36,9 +36,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
private IXMLDeclarationVehicleData _vehicle;
public XMLElectricStorageSystemDeclarationInputDataV24(
IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile, bool obsolete = true)
: base(componentNode, sourceFile)
{
if (obsolete)
{
throw new VectoException($"{XSD_TYPE} v2.4 is no longer supported. Use newer version instead.");
}
_vehicle = vehicle;
//SourceType = DataSourceType.XMLEmbedded;
}
......@@ -101,6 +106,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
// ---------------------------------------------------------------------------------------
public class XMLElectricStorageSystemDeclarationInputDataV27 : XMLElectricStorageSystemDeclarationInputDataV24
{
public static new readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public static new readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLElectricStorageSystemDeclarationInputDataV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode, string sourceFile)
: base(vehicle, componentNode, sourceFile, obsolete: false)
{}
}
// ---------------------------------------------------------------------------------------
public abstract class AbstractBatteryPackDeclarationInputDataProvider : AbstractCommonComponentType, IXMLBatteryPackDeclarationInputData
{
protected AbstractBatteryPackDeclarationInputDataProvider(XmlNode node, string source) : base(node, source) { }
......@@ -144,6 +161,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
}
}
public virtual double? DeteriorationPerformanceRatio
{
get
{
// ancestor-or-self::*[local-name()='Battery']/*[local-name()='DeteriorationPerformanceRatio']
var node = BaseNode.SelectSingleNode($"ancestor-or-self::*[local-name()='{XMLNames.ElectricEnergyStorage_Battery}']/*[local-name()='DeteriorationPerformanceRatio']");
return node != null
? node.InnerText.ToDouble() / 100
: (double?)null;
}
}
public virtual BatteryType BatteryType => GetString(XMLNames.REESS_BatteryType).ParseEnum<BatteryType>();
public virtual AmpereSecond Capacity => GetDouble(XMLNames.REESS_RatedCapacity).SI(Unit.SI.Ampere.Hour).Cast<AmpereSecond>();
......@@ -293,6 +322,14 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
#endregion
}
public class XMLBatteryPackDeclarationInputDataMeasuredV26 : XMLBatteryPackDeclarationInputDataMeasuredV23
{
public static new readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V26;
public static new readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLBatteryPackDeclarationInputDataMeasuredV26(XmlNode componentNode, string sourceFile) : base(componentNode, sourceFile) { }
}
public class XMLBatteryPackDeclarationInputDataStandardV26 : AbstractBatteryPackDeclarationInputDataProvider
{
public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V26;
......
......@@ -6,6 +6,8 @@ using System.Text;
using System.Threading.Tasks;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader;
using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl;
namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
{
......@@ -16,6 +18,9 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLBatteryPackDeclarationInputData>().To<XMLBatteryPackDeclarationInputDataStandardV26>()
.Named(XMLBatteryPackDeclarationInputDataStandardV26.QUALIFIED_XSD_TYPE);
Bind<IXMLBatteryPackDeclarationInputData>().To<XMLBatteryPackDeclarationInputDataMeasuredV26>()
.Named(XMLBatteryPackDeclarationInputDataMeasuredV26.QUALIFIED_XSD_TYPE);
Bind<IXMLSuperCapDeclarationInputData>().To<XMLSuperCapDeclarationInputDataV26>()
.Named(XMLSuperCapDeclarationInputDataV26.QUALIFIED_XSD_TYPE);
......
......@@ -26,6 +26,76 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.NinjectModules
Bind<IXMLAxlesReader>().To<XMLComponentReaderV27>().Named(
XMLComponentReaderV27.AXLES_READER_QUALIFIED_XSD_TYPE);
Bind<IXMLElectricStorageSystemDeclarationInputData>().To<XMLElectricStorageSystemDeclarationInputDataV27>()
.Named(XMLElectricStorageSystemDeclarationInputDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLREESSReader>().To<XMLREESSReaderV27>().Named(XMLREESSReaderV27.QUALIFIED_XSD_TYPE);
// IXMLVehicleComponentsDeclaration
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHEVPxLorryComponentsDataProviderV27>()
.Named(XMLDeclarationHEVPxLorryComponentsDataProviderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV27>()
.Named(XMLDeclarationPrimaryBusHEVPxComponentsDataProviderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHeavyLorryPEVE2ComponentDataV27>()
.Named(XMLDeclarationHeavyLorryPEVE2ComponentDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHeavyLorryPevExComponentDataV27>()
.Named(XMLDeclarationHeavyLorryPevExComponentDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationHeavyLorryPevExComponentDataV27>()
.Named(XMLDeclarationHeavyLorryPevExComponentDataV27.QUALIFIED_XSD_PEV_E4_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusPEVE2ComponentDataV27>()
.Named(XMLDeclarationPrimaryBusPEVE2ComponentDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusPevExComponentDataV27>()
.Named(XMLDeclarationPrimaryBusPevExComponentDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationPrimaryBusPevExComponentDataV27>()
.Named(XMLDeclarationPrimaryBusPevExComponentDataV27.QUALIFIED_XSD_PEV_E4_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationIEPCHeavyLorryComponentDataV27>()
.Named(XMLDeclarationIEPCHeavyLorryComponentDataV27.QUALIFIED_XSD_TYPE);
Bind<IXMLVehicleComponentsDeclaration>().To<XMLDeclarationIEPCPrimaryBusComponentDataV27>()
.Named(XMLDeclarationIEPCPrimaryBusComponentDataV27.QUALIFIED_XSD_TYPE);
// IXMLComponentReader
Bind<IXMLComponentReader>().To<XMLPEVHeavyLorryE4DeclarationComponentReaderV27>()
.Named(XMLPEVHeavyLorryE4DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV27_HEV_PxHeavyLorry>()
.Named(XMLComponentReaderV27_HEV_PxHeavyLorry.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLComponentReaderV27_HEV_PxHeavyLorry>()
.Named(XMLComponentReaderV27_HEV_PxHeavyLorry.QUALIFIED_XSD_HEV_Px_TYPE);
Bind<IXMLComponentReader>().To<XMLPrimaryBusHEVPxDeclarationComponentReaderV27>()
.Named(XMLPrimaryBusHEVPxDeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLIEPCHeavyLorryComponentReaderV27>()
.Named(XMLIEPCHeavyLorryComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLIEPCPrimaryBusComponentReaderV27>()
.Named(XMLIEPCPrimaryBusComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVHeavyLorryE2DeclarationComponentReaderV27>()
.Named(XMLPEVHeavyLorryE2DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVPrimaryBusE2DeclarationComponentReaderV27>()
.Named(XMLPEVPrimaryBusE2DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVHeavyLorryE3DeclarationComponentReaderV27>()
.Named(XMLPEVHeavyLorryE3DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVPrimaryBusE3DeclarationComponentReaderV27>()
.Named(XMLPEVPrimaryBusE3DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
Bind<IXMLComponentReader>().To<XMLPEVPrimaryBusE4DeclarationComponentReaderV27>()
.Named(XMLPEVPrimaryBusE4DeclarationComponentReaderV27.QUALIFIED_XSD_TYPE);
}
}
}
......@@ -533,6 +533,19 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLComponentReaderV27_HEV_PxHeavyLorry : XMLComponentReaderV24_HEV_PxHeavyLorry
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public new static readonly string QUALIFIED_XSD_HEV_Px_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_HEV_Px_TYPE);
public XMLComponentReaderV27_HEV_PxHeavyLorry(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLElectricMachineSystemReaderV24 : AbstractComponentReader, IXMLElectricMachineSystemReader
{
public static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -681,6 +694,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLREESSReaderV27 : XMLREESSReaderV24
{
public static new readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public static new readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLREESSReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentNode,
string sourceFile) : base(vehicle, componentNode, sourceFile) { }
}
// ---------------------------------------------------------------------------------------
public class XMLREESSReaderV01 : XMLREESSReaderV24
{
......@@ -940,6 +964,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPrimaryBusHEVPxDeclarationComponentReaderV27 : XMLPrimaryBusHEVPxDeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPrimaryBusHEVPxDeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPrimaryBusHEVS2DeclarationComponentReaderV201 : XMLPrimaryBusHEVPxDeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1112,6 +1147,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLPEVHeavyLorryE2DeclarationComponentReaderV27 : XMLPEVHeavyLorryE2DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVHeavyLorryE2DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPEVHeavyLorryE3DeclarationComponentReaderV201 : XMLPEVHeavyLorryE2DeclarationComponentReaderV201
......@@ -1134,6 +1179,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPEVHeavyLorryE3DeclarationComponentReaderV27 : XMLPEVHeavyLorryE3DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVHeavyLorryE3DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPEVHeavyLorryE4DeclarationComponentReaderV201 : XMLPEVHeavyLorryE3DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1152,6 +1208,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPEVHeavyLorryE4DeclarationComponentReaderV27 : XMLPEVHeavyLorryE4DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVHeavyLorryE4DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE2DeclarationComponentReaderV201 : XMLComponentReaderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1181,6 +1248,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE2DeclarationComponentReaderV27 : XMLPEVPrimaryBusE2DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVPrimaryBusE2DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE3DeclarationComponentReaderV201 : XMLPEVPrimaryBusE2DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1202,6 +1280,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE3DeclarationComponentReaderV27 : XMLPEVPrimaryBusE3DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVPrimaryBusE3DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE4DeclarationComponentReaderV201 : XMLPEVPrimaryBusE3DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1220,6 +1309,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLPEVPrimaryBusE4DeclarationComponentReaderV27 : XMLPEVPrimaryBusE4DeclarationComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLPEVPrimaryBusE4DeclarationComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLIEPCHeavyLorryComponentReaderV201 : XMLComponentReaderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V24;
......@@ -1240,6 +1340,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
#endregion
}
// ---------------------------------------------------------------------------------------
public class XMLIEPCHeavyLorryComponentReaderV27 : XMLIEPCHeavyLorryComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLIEPCHeavyLorryComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLIEPCPrimaryBusComponentReaderV201 : XMLIEPCHeavyLorryComponentReaderV201
......@@ -1276,6 +1388,17 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
// ---------------------------------------------------------------------------------------
public class XMLIEPCPrimaryBusComponentReaderV27 : XMLIEPCPrimaryBusComponentReaderV201
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V27;
public new static readonly string QUALIFIED_XSD_TYPE = XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLIEPCPrimaryBusComponentReaderV27(IXMLDeclarationVehicleData vehicle, XmlNode componentsNode)
: base(vehicle, componentsNode) { }
}
// ---------------------------------------------------------------------------------------
public class XMLGearboxDeclarationComponentReaderV201 : XMLComponentReaderV10
{
public new static readonly XNamespace NAMESPACE_URI = XMLDefinitions.DECLARATION_DEFINITIONS_NAMESPACE_URI_V23;
......
......@@ -50,6 +50,27 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
if (b.ConnectorsSubsystemsIncluded != null && !b.ConnectorsSubsystemsIncluded.Value) {
addConnectorSystemResistance = true;
}
if (jobType.IsOneOf(VectoSimulationJobType.BatteryElectricVehicle, VectoSimulationJobType.IEPC_E) ||
(jobType == VectoSimulationJobType.ParallelHybridVehicle) && ovc)
{
if (b.MinSOC == null)
{
throw new VectoException("Battery SOCmin is undefined");
}
if (b.MaxSOC == null)
{
throw new VectoException("Battery SOCmax is undefined");
}
if (b.DeteriorationPerformanceRatio == null)
{
//TODO: This should only apply to version v2.7 XSD
//throw new VectoException("Battery DeteriorationPerformanceRatio is undefined");
}
}
var minSoc = genericSOC.SOCMin;
if (b.MinSOC != null && b.MinSOC > minSoc) {
minSoc = b.MinSOC.Value;
......
......@@ -351,6 +351,9 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
public double? MinSOC => 0.2;
public double? MaxSOC => 0.8;
public double? DeteriorationPerformanceRatio { get; }
public BatteryType BatteryType { get; }
public AmpereSecond Capacity { get; }
public bool? ConnectorsSubsystemsIncluded { get; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment