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

Skip to content
Snippets Groups Projects
Commit 42e2ab62 authored by Harald Martini's avatar Harald Martini
Browse files

use IEPC_S instead of SerialHybrid as vecto simulation type

use IEPC_E  isntead of BatteryElectric as vecto simulation type

Updated bindings
parent e709a0f5
No related branches found
No related tags found
No related merge requests found
Showing
with 104 additions and 20 deletions
......@@ -673,7 +673,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public XMLDeclarationMultistage_HEV_IEPC_S_PrimaryVehicleBusDataProviderV01(IXMLPrimaryVehicleBusJobInputData busJobData, XmlNode xmlNode, string sourceFile) : base(busJobData, xmlNode, sourceFile) { }
public override VectoSimulationJobType VehicleType { get => VectoSimulationJobType.SerialHybridVehicle; }
public override VectoSimulationJobType VehicleType { get => VectoSimulationJobType.IEPC_S; }
public override string PowertrainPositionPrefix => "S";
}
......
using System.Linq;
using System;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using TUGraz.VectoCommon.BusAuxiliaries;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.InputData;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Resources;
......@@ -203,7 +205,50 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider.v24
XMLHelper.CombineNamespace(NAMESPACE_URI.NamespaceName, XSD_TYPE);
public XMLDeclarationHevCompletedBusDataProviderV24(IXMLDeclarationJobInputData jobData, XmlNode xmlNode, string sourceFile) : base(jobData, xmlNode, sourceFile) { }
public override VectoSimulationJobType VehicleType => ArchitectureID.ToString().StartsWith("S") ? VectoSimulationJobType.SerialHybridVehicle : VectoSimulationJobType.ParallelHybridVehicle;
private VectoSimulationJobType? _vehicleType = null;
public override VectoSimulationJobType VehicleType
{
get
{
if (_vehicleType.HasValue) {
return _vehicleType.Value;
}
switch (ArchitectureID) {
case ArchitectureID.UNKNOWN:
case ArchitectureID.E2:
case ArchitectureID.E3:
case ArchitectureID.E4:
case ArchitectureID.E_IEPC:
throw new VectoException($"Invalid {ArchitectureID} for hybrid vehicle");
case ArchitectureID.P1:
case ArchitectureID.P2:
case ArchitectureID.P2_5:
case ArchitectureID.P3:
case ArchitectureID.P4:
_vehicleType = VectoSimulationJobType.ParallelHybridVehicle;
break;
case ArchitectureID.P_IHPC:
_vehicleType = VectoSimulationJobType.IHPC;
break;
case ArchitectureID.S2:
case ArchitectureID.S3:
case ArchitectureID.S4:
_vehicleType = VectoSimulationJobType.SerialHybridVehicle;
break;
case ArchitectureID.S_IEPC:
_vehicleType = VectoSimulationJobType.IEPC_S;
break;
default:
throw new ArgumentOutOfRangeException();
}
return _vehicleType.Value;
}
}
//ArchitectureID.ToString().StartsWith("S") ? VectoSimulationJobType.SerialHybridVehicle : VectoSimulationJobType.ParallelHybridVehicle;
public override bool HybridElectricHDV => true;
}
......
......@@ -1341,6 +1341,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Reader.Impl
case VectoSimulationJobType.ParallelHybridVehicle:
case VectoSimulationJobType.SerialHybridVehicle:
case VectoSimulationJobType.BatteryElectricVehicle:
case VectoSimulationJobType.IEPC_S:
case VectoSimulationJobType.IEPC_E:
return WaterElectricHeater != null && AirElectricHeater != null && OtherHeatingTechnology != null;
default:
return false;
......
......@@ -258,8 +258,16 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.CompletedBus.Gener
public class HEV_S3 : SerialHybrid { }
public class HEV_S4 : SerialHybrid { }
public class HEV_S_IEPC : SerialHybrid { }
public class HEV_S_IEPC : SerialHybrid
{
#region Overrides of SerialHybrid
protected override IGearboxDataAdapter GearboxDataAdapter { get; } =
new GenericCompletedBusIEPCGearboxDataAdapter();
#endregion
}
public abstract class ParallelHybrid : Hybrid
{
......
......@@ -21,9 +21,8 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
public abstract class PrimaryBusBase : IPrimaryBusDeclarationDataAdapter
{
public static readonly GearboxType[] SupportedGearboxTypes =
{ GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial };
#region Implementation of IDeclarationDataAdapter
public virtual GearboxType[] SupportedGearboxTypes => throw new NotImplementedException();
private readonly IDriverDataAdapter _driverDataAdapter = new PrimaryBusDriverDataAdapter();
protected readonly IVehicleDataAdapter _vehicleDataAdapter = new PrimaryBusVehicleDataAdapter();
......@@ -160,15 +159,17 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
return AuxDataAdapter.CreateBusAuxiliariesData(mission, vehicleData, runData);
}
#endregion
}
public class Conventional : PrimaryBusBase
{
#region Overrides of PrimaryBusBase
public override GearboxType[] SupportedGearboxTypes => new GearboxType[]
{
GearboxType.MT, GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.ATSerial
};
protected override IEngineDataAdapter EngineDataAdapter { get; } = new CombustionEngineComponentDataAdapter();
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
......@@ -233,6 +234,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
#region Overrides of SerialHybrid
public override GearboxType[] SupportedGearboxTypes => new[]
{ GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.APTN, GearboxType.ATSerial };
#endregion
}
public class HEV_S3 : SerialHybrid
......@@ -253,6 +260,9 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public abstract class ParallelHybrid : Hybrid
{
public override GearboxType[] SupportedGearboxTypes => new[]
{ GearboxType.AMT, GearboxType.ATSerial, GearboxType.ATPowerSplit };
#region Overrides of PrimaryBusBase
protected override IGearboxDataAdapter GearboxDataAdapter { get; } = new GearboxDataAdapter(new TorqueConverterDataAdapter());
......@@ -271,7 +281,11 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
public class HEV_P2 : ParallelHybrid
{
#region Overrides of ParallelHybrid
public override GearboxType[] SupportedGearboxTypes => new[] { GearboxType.AMT, GearboxType.IHPC };
#endregion
}
public class HEV_P2_5 : ParallelHybrid
......@@ -293,9 +307,12 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.PrimaryBus
{
private readonly IElectricStorageAdapter _electricStorageAdapter = new ElectricStorageAdapter();
#region Overrides of PrimaryBusBase
public override GearboxType[] SupportedGearboxTypes => new[]
{ GearboxType.AMT, GearboxType.ATPowerSplit, GearboxType.APTN, GearboxType.ATSerial };
protected override IEngineDataAdapter EngineDataAdapter => throw new NotImplementedException();
#region Overrides of PrimaryBusBase
protected override IEngineDataAdapter EngineDataAdapter => throw new NotImplementedException();
protected override IGearboxDataAdapter GearboxDataAdapter => throw new NotImplementedException();
......
......@@ -465,6 +465,7 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
public class IEPCGearboxDataAdapter : GearboxDataAdapterBase
{
private GearboxData CreateIEPCGearboxData(IVehicleDeclarationInputData vehicle, VectoRunData runData, IShiftPolygonCalculator shiftPolygonCalc)
{
......@@ -545,9 +546,14 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter.SimulationComponen
#endregion
}
public class GenericCompletedBusIEPCGearboxDataAdapter : IEPCGearboxDataAdapter
{
}
public class CompletedSpecifigBusGearboxDataAdapter : GenericCompletedBusGearboxDataAdapter
public class CompletedSpecificBusGearboxDataAdapter : GenericCompletedBusGearboxDataAdapter
{
public CompletedSpecifigBusGearboxDataAdapter(ITorqueConverterDataAdapter torqueConverterDataAdapter) : base(torqueConverterDataAdapter) { }
public CompletedSpecificBusGearboxDataAdapter(ITorqueConverterDataAdapter torqueConverterDataAdapter) : base(torqueConverterDataAdapter) { }
}
}
\ No newline at end of file
......@@ -209,6 +209,7 @@ namespace TUGraz.VectoCore.InputData.Reader
Bind<IVectoRunDataFactory>().To<DeclarationModeCompletedBusRunDataFactory.HEV_P4>().Named(
_vehicleStringHelper.GetName(VehicleCategoryHelper.CompletedBus, VectoSimulationJobType.ParallelHybridVehicle,
ArchitectureID.P4));
Bind<IVectoRunDataFactory>().To<DeclarationModeCompletedBusRunDataFactory.PEV_E2>().Named(
_vehicleStringHelper.GetName(VehicleCategoryHelper.CompletedBus, VectoSimulationJobType.BatteryElectricVehicle,
ArchitectureID.E2));
......
......@@ -626,14 +626,17 @@ namespace TUGraz.VectoCore.Models.Declaration
public const double TorqueLimitGearboxFactor = 0.9;
public const double TorqueLimitVehicleFactor = 0.95;
public static KilogramSquareMeter EngineInertia(VectoSimulationJobType jobType, CubicMeter displacement, GearboxType gbxType)
public static KilogramSquareMeter EngineInertia(VectoSimulationJobType jobType, CubicMeter displacement, GearboxType? gbxType)
{
// VB Code: Return 1.3 + 0.41 + 0.27 * (Displ / 1000)
KilogramSquareMeter clutchPlateTc;
if (jobType.IsOneOf(VectoSimulationJobType.SerialHybridVehicle, VectoSimulationJobType.IEPC_S)) {
clutchPlateTc = 0.SI<KilogramSquareMeter>();
} else {
clutchPlateTc = (gbxType.AutomaticTransmission() ? TorqueConverterInertia : ClutchInertia);
if (!gbxType.HasValue) {
throw new VectoException("Gearbox type must be provided!");
}
clutchPlateTc = (gbxType.Value.AutomaticTransmission() ? TorqueConverterInertia : ClutchInertia);
}
return clutchPlateTc + EngineBaseInertia +
......
......@@ -56,7 +56,7 @@ namespace TUGraz.VectoCore.Models.Declaration
IdleSpeed = idleSpeed,
Displacement = engineData.Displacement,
WHRType = WHRType.None,
Inertia = DeclarationData.Engine.EngineInertia(primaryVehicle.VehicleType, engineData.Displacement, gearbox.Type),
Inertia = DeclarationData.Engine.EngineInertia(primaryVehicle.VehicleType, engineData.Displacement, gearbox?.Type),
EngineStartTime = DeclarationData.Engine.DefaultEngineStartTime,
RatedPowerDeclared = engineData.RatedPowerDeclared,
RatedSpeedDeclared = engineData.RatedSpeedDeclared,
......
......@@ -95,7 +95,9 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
var result = new List<XElement> {
new XElement(_vif + XMLNames.Vehicle_OvcHev, vehicle.OvcHev),
};
if (vehicle.OvcHev) {
if (vehicle.OvcHev && !vehicle.VehicleType.IsOneOf(
VectoSimulationJobType.BatteryElectricVehicle,
VectoSimulationJobType.IEPC_E)) {
result.Add(new XElement(_vif + XMLNames.Vehicle_MaxChargingPower, vehicle.MaxChargingPower.Value()));
}
return result;
......
......@@ -159,7 +159,7 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.VehicleInformationF
false)));
Bind<IXMLMultistepIntermediateReport>().To<HEV_CompletedBus_VIF>().Named(MRFNinjectModule.VehicleTypeAndArchitectureStringHelper.CreateName.Invoke(MRFNinjectModule.VehicleTypeAndArchitectureStringHelper.ToParams(VehicleCategoryHelper.PrimaryBus,
VectoSimulationJobType.SerialHybridVehicle,
VectoSimulationJobType.IEPC_S,
ArchitectureID.S_IEPC,
false,
true,
......
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